[PATCH] Add Streamlined NTRU Prime sntrup761.

Simon Josefsson simon at josefsson.org
Tue May 16 08:56:08 CEST 2023


Hi

Attached is a second version of the sntrup761 patch, this time using a
minimal API that would work for Kyber too (please confirm).  Unless we
know complexity is required, I prefer to keep things minimal.

I've pushed it to:
https://gitlab.com/jas/libgcrypt/-/commits/jas/sntrup761v2

Below is the added API.  Thoughts?

enum gcry_kem_algos
  {
    GCRY_KEM_SNTRUP761 = 761,
  };

#define GCRY_KEM_SNTRUP761_SECRETKEY_SIZE 1763
#define GCRY_KEM_SNTRUP761_PUBLICKEY_SIZE 1158
#define GCRY_KEM_SNTRUP761_CIPHERTEXT_SIZE 1039
#define GCRY_KEM_SNTRUP761_SHAREDSECRET_SIZE 32

gcry_error_t gcry_kem_keypair (int algo,
			       void *pubkey,
			       void *seckey);

gcry_error_t gcry_kem_enc (int algo,
			   const void *pubkey,
			   void *ciphertext,
			   void *ss);

gcry_error_t gcry_kem_dec (int algo,
			   const void *ciphertext,
			   const void *seckey,
			   void *ss);

/Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-Streamlined-NTRU-Prime-sntrup761.patch
Type: text/x-diff
Size: 38454 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gcrypt-devel/attachments/20230516/f4610818/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 255 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gcrypt-devel/attachments/20230516/f4610818/attachment-0001.sig>


More information about the Gcrypt-devel mailing list