[Top][All Lists]

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

Addition to EGO keys

From: TheJackiMonster
Subject: Addition to EGO keys
Date: Thu, 05 Nov 2020 14:29:19 +0100
User-agent: Evolution 3.38.1


the newest changes of the identity service handling EGO keys allowed
two different types of keypairs which makes it somewhat more difficult
to interact with them.

So I would propose following functions to be added:

ssize_t GNUNET_IDENTITY_read_key_from_buffer(struct
GNUNET_IDENTITY_PublicKey *key, const void* buffer)

ssize_t GNUNET_IDENTITY_write_key_to_buffer(const struct
GNUNET_IDENTITY_PublicKey *key, void* buffer)

// both would depend on GNUNET_IDENTITY_key_get_length(...) which
currently exists

int GNUNET_IDENTITY_public_key_verify(uint32_t purpose, const struct
GNUNET_CRYPTO_EccSignaturePurpose *validate, const struct
GNUNET_IDENTITY_Signature *sig, const struct GNUNET_IDENTITY_PublicKey

int GNUNET_IDENTITY_private_key_sign(const struct
GNUNET_IDENTITY_PrivateKey *priv, const struct
GNUNET_CRYPTO_EccSignaturePurpose *purpose, struct
GNUNET_IDENTITY_Signature *sig)

// and GNUNET_IDENTITY_Signature would look like following:

struct GNUNET_IDENTITY_Signature {
  uint32_t type;
  union {
    struct GNUNET_CRYPTO_EcdsaSignature ecdsa_signature;
    struct GNUNET_CRYPTO_EddsaSignature eddsa_signature;

At least similar changes would ease the use of EGOs for
authentification which will be used for example in the messenger
service. I am also open for ideas to handle it differently. Maybe there
is planned something else with EGOs or how authentification should be
handled? Otherwise I would open a commit to add those functions which
would pretty much check for the type of public/private key and use
existing functions from GNUnet.

I also wanted to ask how I could use the EGO keys for encryption of
private messages. I know the functionality for signatures and
verification but I would like to use them for encryption.

If there is a systematic reason to not use EGO keys for that purpose,
how would I use asymmetric encryption with GNUnet then? I assume I
would use libsodium directly otherwise?

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]