help-gnunet
[Top][All Lists]
Advanced

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

[Help-gnunet] What's the correct CRYPTO API to sign a CADET message?


From: Alessio Vanni
Subject: [Help-gnunet] What's the correct CRYPTO API to sign a CADET message?
Date: Wed, 18 Sep 2019 21:52:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hello,

As part of an application I'm writing, some messages are exchanged
between peers through CADET.  Due to some design choices of the
application, I need to sign these messages so that the recipient can
verify that they were not tampered with (any particular characteristic
of CADET does not apply here, due to the aforementioned choices.)

Looking at the CRYPTO library and some actual code using it I believe I
got how to do what I need, but I'm still not sure, so I have these
questions:

Can I use an ego's pair of keys to sign arbitrary data?  The public key
is part of the message already, so if I could also use the private key
the recipient wouldn't need any extra information as part of the
message.  This is mostly to be sure, in case there is a better approach.

How can I serialize the resulting signature in a string?  Using the
ego's key pair the result is a structure, but there is no "to_string"
API.  Can I just copy the content in an array of char and use the result
as a string?  If the proper way is another, is there an API or is
copying the memory block as-is a choice?

Thanks,
A.V.



reply via email to

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