Closed mkannwischer closed 8 months ago
Resolves https://github.com/mupq/pqm4/issues/291
This adds the SNOVA implementation from https://csrc.nist.gov/csrc/media/Projects/pqc-dig-sig/documents/round-1/submission-pkg/SNOVAnoKATs-submission.zip.
There is one things that is really ugly:
https://github.com/mupq/mupq/blob/97c1c0a3c42d9102384717510d1f5d22faf344b2/crypto_sign/snova-24-5-16-4-esk/ref/snova.c#L7-L32
It's using static pre-computed tables. The precomputation is done outside of the regular API functions with (1) feels like cheating, (2) does not work in pqm4. I have added a call to snova_init() to each of crypto_sign_keypair, crypto_sign, and crypto_sign_open: https://github.com/mupq/mupq/blob/97c1c0a3c42d9102384717510d1f5d22faf344b2/crypto_sign/snova-24-5-16-4-esk/ref/sign.c#L10 https://github.com/mupq/mupq/blob/97c1c0a3c42d9102384717510d1f5d22faf344b2/crypto_sign/snova-24-5-16-4-esk/ref/sign.c#L30 https://github.com/mupq/mupq/blob/97c1c0a3c42d9102384717510d1f5d22faf344b2/crypto_sign/snova-24-5-16-4-esk/ref/sign.c#L55
snova_init()
crypto_sign_keypair
crypto_sign
crypto_sign_open
I guess those should all be pre-computed and placed in flash. But that requires a little more effort than I am willing to put in right now.
Resolves https://github.com/mupq/pqm4/issues/291
This adds the SNOVA implementation from https://csrc.nist.gov/csrc/media/Projects/pqc-dig-sig/documents/round-1/submission-pkg/SNOVAnoKATs-submission.zip.
There is one things that is really ugly:
https://github.com/mupq/mupq/blob/97c1c0a3c42d9102384717510d1f5d22faf344b2/crypto_sign/snova-24-5-16-4-esk/ref/snova.c#L7-L32
It's using static pre-computed tables. The precomputation is done outside of the regular API functions with (1) feels like cheating, (2) does not work in pqm4. I have added a call to
snova_init()
to each ofcrypto_sign_keypair
,crypto_sign
, andcrypto_sign_open
: https://github.com/mupq/mupq/blob/97c1c0a3c42d9102384717510d1f5d22faf344b2/crypto_sign/snova-24-5-16-4-esk/ref/sign.c#L10 https://github.com/mupq/mupq/blob/97c1c0a3c42d9102384717510d1f5d22faf344b2/crypto_sign/snova-24-5-16-4-esk/ref/sign.c#L30 https://github.com/mupq/mupq/blob/97c1c0a3c42d9102384717510d1f5d22faf344b2/crypto_sign/snova-24-5-16-4-esk/ref/sign.c#L55I guess those should all be pre-computed and placed in flash. But that requires a little more effort than I am willing to put in right now.