aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/account.cpp4
-rw-r--r--src/crypto.cpp2
-rw-r--r--src/ratchet.cpp2
-rw-r--r--src/session.cpp4
4 files changed, 6 insertions, 6 deletions
diff --git a/src/account.cpp b/src/account.cpp
index 2323856..198c5d3 100644
--- a/src/account.cpp
+++ b/src/account.cpp
@@ -53,7 +53,7 @@ std::size_t olm::Account::new_account(
unsigned id = 0;
identity_key.id = ++id;
- olm::generate_key(random, identity_key.key);
+ olm::curve25519_generate_key(random, identity_key.key);
random += 32;
random += 32;
@@ -61,7 +61,7 @@ std::size_t olm::Account::new_account(
for (unsigned i = 0; i < 10; ++i) {
LocalKey & key = *one_time_keys.insert(one_time_keys.end());
key.id = ++id;
- olm::generate_key(random, key.key);
+ olm::curve25519_generate_key(random, key.key);
random += 32;
}
diff --git a/src/crypto.cpp b/src/crypto.cpp
index ebe4724..db4bfa6 100644
--- a/src/crypto.cpp
+++ b/src/crypto.cpp
@@ -136,7 +136,7 @@ inline void hmac_sha256_final(
} // namespace
-void olm::generate_key(
+void olm::curve25519_generate_key(
std::uint8_t const * random_32_bytes,
olm::Curve25519KeyPair & key_pair
) {
diff --git a/src/ratchet.cpp b/src/ratchet.cpp
index 2f361fa..b9108db 100644
--- a/src/ratchet.cpp
+++ b/src/ratchet.cpp
@@ -419,7 +419,7 @@ std::size_t olm::Ratchet::encrypt(
if (sender_chain.empty()) {
sender_chain.insert();
- olm::generate_key(random, sender_chain[0].ratchet_key);
+ olm::curve25519_generate_key(random, sender_chain[0].ratchet_key);
create_chain_key(
root_key,
sender_chain[0].ratchet_key,
diff --git a/src/session.cpp b/src/session.cpp
index a028431..08498e4 100644
--- a/src/session.cpp
+++ b/src/session.cpp
@@ -68,10 +68,10 @@ std::size_t olm::Session::new_outbound_session(
}
Curve25519KeyPair base_key;
- olm::generate_key(random, base_key);
+ olm::curve25519_generate_key(random, base_key);
Curve25519KeyPair ratchet_key;
- olm::generate_key(random + 32, ratchet_key);
+ olm::curve25519_generate_key(random + 32, ratchet_key);
received_message = false;
alice_identity_key.id = local_account.identity_key.id;