Adding new public key KEM API

Werner Koch wk at gnupg.org
Wed Oct 18 10:21:15 CEST 2023


Hi!

On Tue, 17 Oct 2023 15:27, NIIBE Yutaka said:

> In this API, format of the CONTEXT, PUBKEY, SECKEY, CIPHERTEXT,
> SHARED_SECRET are defined by ALGO.  (Most of the cases, it's
> fixed-length byte string.)

I really would like to see a size parmater for each pointer.  This can
help to detect eerrrors earlier, avoid problems with API/ABI mismatches,
and makes low-level language bindings easier to write.

Regarding the context parameter, I consider this extremely useful and it
was a misconception that we did not add this to the other public key
functions.  Most other subsystems in Libgcrypt follow the open-use-close
paradigm with the public key functions beeing the major exception.

The context parameter offers us a way to do pre-computations and keep to
keep other kinds of state.


Salam-Shalom,

   Werner

-- 
The pioneers of a warless world are the youth that
refuse military service.             - A. Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 247 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gcrypt-devel/attachments/20231018/27ac5805/attachment.sig>


More information about the Gcrypt-devel mailing list