[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GNUNET_CRYPTO_ecdh_ecdsa fails with anonymous key

From: TheJackiMonster
Subject: GNUNET_CRYPTO_ecdh_ecdsa fails with anonymous key
Date: Mon, 01 Mar 2021 17:57:56 +0100
User-agent: Evolution 3.38.4


I was actually integrating private messages into the messenger API when
I encountered that decrypting messages failed awfully. I thought
something in my code was wrong, then I double checked the crypto

GNUNET_CRYPTO_ecdh_ecdsa(...) and GNUNET_CRYPTO_ecdsa_ecdh(...)

But their test-case in util checked successfully. So I tested with the
ECDSA key from GNUNET_CRYPTO_ecdsa_key_get_anonymous() which gets used
by the anonymous ego in the identity service.

So the result was, that GNUNET_CRYPTO_ecdh_ecdsa and
GNUNET_CRYPTO_ecdsa_ecdh returned different hashes when using the
anonymous key. These functions are using for encrypting and decrypting
messages (generating a shared key).

From my point of view it would be fine to just letting the
GNUNET_IDENTITY_encrypt() and GNUNET_IDENTITY_decrypt() functions fail
when the anonymous key gets used (it doesn't make sense for private
messages anyway) but I was wondering why verification still seems to
work with this key.

Also I wanted to ask if this behavior was expected. Maybe this could be
addressed in some doxygen comments.

Happy hacking

Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

[Prev in Thread] Current Thread [Next in Thread]