diff options
Diffstat (limited to 'libcmix-crypto/curve25519/sodium')
| -rw-r--r-- | libcmix-crypto/curve25519/sodium/libsodium_curve25519.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libcmix-crypto/curve25519/sodium/libsodium_curve25519.c b/libcmix-crypto/curve25519/sodium/libsodium_curve25519.c index 6c3fe13..2405442 100644 --- a/libcmix-crypto/curve25519/sodium/libsodium_curve25519.c +++ b/libcmix-crypto/curve25519/sodium/libsodium_curve25519.c @@ -47,7 +47,7 @@ void curve25519_add_public_share(char** buffer, size_t* out_len, char const* sha } -struct SharedKey curve25519_derive_shared_key(struct KeyPair pair, unsigned char const* other_pub, size_t pub_len, unsigned char const* value, size_t value_len, void* priv_value, bool swap_pub_order) { +GroupElement curve25519_derive_shared_key(struct KeyPair pair, unsigned char const* other_pub, size_t pub_len, unsigned char const* value, size_t value_len, void* priv_value, bool swap_pub_order) { unsigned char* shared = (unsigned char*) sodium_malloc(crypto_generichash_BYTES); crypto_generichash_state h; @@ -71,9 +71,7 @@ struct SharedKey curve25519_derive_shared_key(struct KeyPair pair, unsigned char sodium_free(scalarmult_q); - return (struct SharedKey){ - shared, - }; + return shared; } void curve25519_deinitialize(void) {} |
