View Issue Details

IDProjectCategoryView StatusLast Update
0006783GNUnetutil librarypublic2021-03-03 21:51
Reporterthejackimonster Assigned To 
Status newResolutionopen 
Product Version0.14.0 
Summary0006783: anonymous key fails at ECDHE
DescriptionThe ECDHE fails using the anonymous key pair even if all tests with randomly generated ECDSA key pairs succeed. This could be an issue caused by the util library in GNUnet, a mixture of using gcrypt and libsodium together or even an issue inside of libsodium.
Steps To Reproduce// Get the anonymous ECDSA key pair
const struct GNUNET_CRYPTO_EcdsaPrivateKey* ecdsa_priv = GNUNET_CRYPTO_ecdsa_key_get_anonymous();
struct GNUNET_CRYPTO_EcdsaPublicKey ecdsa_pub;
GNUNET_CRYPTO_ecdsa_key_get_public(ecdsa_priv, &ecdsa_pub);

// Generate a random ECDHE key pair
struct GNUNET_CRYPTO_EcdhePrivateKey ecdhe_priv;
struct GNUNET_CRYPTO_EcdhePublicKey ecdhe_pub;
GNUNET_CRYPTO_ecdhe_key_get_public(&ecdhe_priv, &ecdhe_pub);

// Derive hashes from the keys
struct GNUNET_HashCode h1;
struct GNUNET_HashCode h2;
GNUNET_CRYPTO_ecdh_ecdsa(&ecdhe_priv, &ecdsa_pub, &h1);
GNUNET_CRYPTO_ecdsa_ecdh(ecdsa_priv, &ecdhe_pub, &h2);

// The hashes don't match..!
GNUNET_assert(GNUNET_CRYPTO_hash_cmp(&h1, &h2) == 0);
Additional InformationCurrently this is not a huge issue because ECDHE gets used only in the identity API to encrypt and decrypt data for a specific ego. So the result is that encrypting data for the anonymous ego will fail.

The functionality gets used by the messenger service but the service itself restricts encrypting messages to individually used egos (excluding the anonymous ego) in current state of development anyway.


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2021-03-03 21:51 thejackimonster New Issue
2021-03-03 21:51 thejackimonster Tag Attached: bug