summaryrefslogtreecommitdiff
path: root/libs/libsignal/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-10-15 19:02:31 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-10-15 19:02:31 +0300
commit33724ec73d87317bc58d4100898775712299a89c (patch)
tree37a25a88c7900d5570505963723e112aba6825a9 /libs/libsignal/src
parent71c1ad117340f089d4820bf7c7bddce20a5e113a (diff)
first version that successfully logs into
Diffstat (limited to 'libs/libsignal/src')
-rw-r--r--libs/libsignal/src/curve.c2
-rw-r--r--libs/libsignal/src/curve.h2
-rw-r--r--libs/libsignal/src/hkdf.c2
-rw-r--r--libs/libsignal/src/hkdf.h8
-rw-r--r--libs/libsignal/src/signal.def6
5 files changed, 16 insertions, 4 deletions
diff --git a/libs/libsignal/src/curve.c b/libs/libsignal/src/curve.c
index dcb27c17ea..be09369a7e 100644
--- a/libs/libsignal/src/curve.c
+++ b/libs/libsignal/src/curve.c
@@ -264,7 +264,7 @@ ec_private_key *ec_key_pair_get_private(const ec_key_pair *key_pair)
return key_pair->private_key;
}
-void ec_key_pair_destroy(signal_type_base *type)
+void ec_key_pair_destroy(ec_key_pair *type)
{
ec_key_pair *key_pair = (ec_key_pair *)type;
SIGNAL_UNREF(key_pair->public_key);
diff --git a/libs/libsignal/src/curve.h b/libs/libsignal/src/curve.h
index 09bff406da..a55e198c8c 100644
--- a/libs/libsignal/src/curve.h
+++ b/libs/libsignal/src/curve.h
@@ -52,7 +52,7 @@ void ec_private_key_destroy(signal_type_base *type);
int ec_key_pair_create(ec_key_pair **key_pair, ec_public_key *public_key, ec_private_key *private_key);
ec_public_key *ec_key_pair_get_public(const ec_key_pair *key_pair);
ec_private_key *ec_key_pair_get_private(const ec_key_pair *key_pair);
-void ec_key_pair_destroy(signal_type_base *type);
+void ec_key_pair_destroy(ec_key_pair *type);
int curve_generate_private_key(signal_context *context, ec_private_key **private_key);
int curve_generate_public_key(ec_public_key **public_key, const ec_private_key *private_key);
diff --git a/libs/libsignal/src/hkdf.c b/libs/libsignal/src/hkdf.c
index d8df253c8b..d41a1f5363 100644
--- a/libs/libsignal/src/hkdf.c
+++ b/libs/libsignal/src/hkdf.c
@@ -249,7 +249,7 @@ int hkdf_compare(const hkdf_context *context1, const hkdf_context *context2)
}
}
-void hkdf_destroy(signal_type_base *type)
+void hkdf_destroy(hkdf_context *type)
{
hkdf_context *context = (hkdf_context *)type;
free(context);
diff --git a/libs/libsignal/src/hkdf.h b/libs/libsignal/src/hkdf.h
index 43ee870401..49601d5f52 100644
--- a/libs/libsignal/src/hkdf.h
+++ b/libs/libsignal/src/hkdf.h
@@ -18,9 +18,15 @@ ssize_t hkdf_derive_secrets(hkdf_context *context,
const uint8_t *info, size_t info_len,
size_t output_len);
+ssize_t hkdf_expand(hkdf_context *context,
+ uint8_t **output,
+ const uint8_t *prk, size_t prk_len,
+ const uint8_t *info, size_t info_len,
+ size_t output_len);
+
int hkdf_compare(const hkdf_context *context1, const hkdf_context *context2);
-void hkdf_destroy(signal_type_base *type);
+void hkdf_destroy(hkdf_context *type);
#ifdef __cplusplus
}
diff --git a/libs/libsignal/src/signal.def b/libs/libsignal/src/signal.def
index de31cfe4c0..5a5e237806 100644
--- a/libs/libsignal/src/signal.def
+++ b/libs/libsignal/src/signal.def
@@ -57,6 +57,7 @@ EXPORTS
ec_key_pair_get_public
ec_key_pair_get_private
ec_private_key_serialize
+ ec_key_pair_destroy
ratchet_identity_key_pair_get_public
ratchet_identity_key_pair_get_private
signal_protocol_key_helper_generate_identity_key_pair
@@ -95,3 +96,8 @@ EXPORTS
displayable_fingerprint_local
displayable_fingerprint_remote
ciphertext_message_get_type
+ curve_calculate_agreement
+ curve_decode_private_point
+ hkdf_create
+ hkdf_expand
+ hkdf_destroy