- updated to 0.8.0 This release features many algorithm updates, including removal of algorithms and variants no longer proceeding through NIST standardization and updates to newer versions. See the detailed list of algorithm updates below. Key encapsulation mechanisms: - BIKE: updated to Round 4 version. - Kyber: 90s variants were removed. - NTRU Prime: All variants were removed, except for sntrup761. - Saber: removed. Digital signature schemes - Dilithium; AES variants were removed. - Falcon: updated to the 2023-02-07 version. - Picnic: removed. - Rainbow: removed. - SPHINCS+: updated to version 3.1; SPHINCS+-Haraka variants were removed; SPHINCS+-SHA256 and SPHINCS+-SHAKE variants were renamed Other changes - Add Cryptographic Bill of Materials (CBOM) - Improve building on ARM platforms - Improve performance when using OpenSSL 3 for symmetric cryptography - Increment shared object library version - New configure-time options for algorithm selections - pkgconfig file now available - removed 0001-Add-support-for-powerpc64.-1160.patch: upstream - 0002-Mark-stack-non-executable-when-compiling-with-clang-.patch: upstream - liboqs is now liboqs.so.3. OBS-URL: https://build.opensuse.org/request/show/1092832 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/liboqs?expand=0&rev=11
175 lines
7.2 KiB
Diff
175 lines
7.2 KiB
Diff
Index: liboqs-0.8.0/src/kem/kyber/pqcrystals-kyber_kyber1024_ref/kem.h
|
|
===================================================================
|
|
--- liboqs-0.8.0.orig/src/kem/kyber/pqcrystals-kyber_kyber1024_ref/kem.h
|
|
+++ liboqs-0.8.0/src/kem/kyber/pqcrystals-kyber_kyber1024_ref/kem.h
|
|
@@ -30,12 +30,13 @@
|
|
#endif
|
|
|
|
#define crypto_kem_keypair KYBER_NAMESPACE(keypair)
|
|
-int crypto_kem_keypair(uint8_t *pk, uint8_t *sk);
|
|
+int crypto_kem_keypair(uint8_t pk[KYBER_PUBLICKEYBYTES], uint8_t sk[KYBER_SECRETKEYBYTES]);
|
|
+
|
|
|
|
#define crypto_kem_enc KYBER_NAMESPACE(enc)
|
|
-int crypto_kem_enc(uint8_t *ct, uint8_t *ss, const uint8_t *pk);
|
|
+int crypto_kem_enc(uint8_t ct[KYBER_CIPHERTEXTBYTES], uint8_t ss[KYBER_SSBYTES], const uint8_t pk[KYBER_PUBLICKEYBYTES]);
|
|
|
|
#define crypto_kem_dec KYBER_NAMESPACE(dec)
|
|
-int crypto_kem_dec(uint8_t *ss, const uint8_t *ct, const uint8_t *sk);
|
|
+int crypto_kem_dec(uint8_t ss[KYBER_SSBYTES], const uint8_t ct[KYBER_CIPHERTEXTBYTES], const uint8_t sk[KYBER_SECRETKEYBYTES]);
|
|
|
|
#endif
|
|
Index: liboqs-0.8.0/src/kem/kyber/pqcrystals-kyber_kyber512_ref/kem.h
|
|
===================================================================
|
|
--- liboqs-0.8.0.orig/src/kem/kyber/pqcrystals-kyber_kyber512_ref/kem.h
|
|
+++ liboqs-0.8.0/src/kem/kyber/pqcrystals-kyber_kyber512_ref/kem.h
|
|
@@ -30,12 +30,15 @@
|
|
#endif
|
|
|
|
#define crypto_kem_keypair KYBER_NAMESPACE(keypair)
|
|
-int crypto_kem_keypair(uint8_t *pk, uint8_t *sk);
|
|
+int crypto_kem_keypair(uint8_t pk[KYBER_PUBLICKEYBYTES], uint8_t sk[KYBER_SECRETKEYBYTES]);
|
|
+
|
|
|
|
#define crypto_kem_enc KYBER_NAMESPACE(enc)
|
|
-int crypto_kem_enc(uint8_t *ct, uint8_t *ss, const uint8_t *pk);
|
|
+int crypto_kem_enc(uint8_t ct[KYBER_CIPHERTEXTBYTES], uint8_t ss[KYBER_SSBYTES], const uint8_t pk[KYBER_PUBLICKEYBYTES]);
|
|
+
|
|
|
|
#define crypto_kem_dec KYBER_NAMESPACE(dec)
|
|
-int crypto_kem_dec(uint8_t *ss, const uint8_t *ct, const uint8_t *sk);
|
|
+int crypto_kem_dec(uint8_t ss[KYBER_SSBYTES], const uint8_t ct[KYBER_CIPHERTEXTBYTES], const uint8_t sk[KYBER_SECRETKEYBYTES]);
|
|
+
|
|
|
|
#endif
|
|
Index: liboqs-0.8.0/src/kem/kyber/pqcrystals-kyber_kyber768_ref/kem.h
|
|
===================================================================
|
|
--- liboqs-0.8.0.orig/src/kem/kyber/pqcrystals-kyber_kyber768_ref/kem.h
|
|
+++ liboqs-0.8.0/src/kem/kyber/pqcrystals-kyber_kyber768_ref/kem.h
|
|
@@ -30,12 +30,14 @@
|
|
#endif
|
|
|
|
#define crypto_kem_keypair KYBER_NAMESPACE(keypair)
|
|
-int crypto_kem_keypair(uint8_t *pk, uint8_t *sk);
|
|
+int crypto_kem_keypair(uint8_t pk[KYBER_PUBLICKEYBYTES], uint8_t sk[KYBER_SECRETKEYBYTES]);
|
|
+
|
|
|
|
#define crypto_kem_enc KYBER_NAMESPACE(enc)
|
|
-int crypto_kem_enc(uint8_t *ct, uint8_t *ss, const uint8_t *pk);
|
|
+int crypto_kem_enc(uint8_t ct[KYBER_CIPHERTEXTBYTES], uint8_t ss[KYBER_SSBYTES], const uint8_t pk[KYBER_PUBLICKEYBYTES]);
|
|
+
|
|
|
|
#define crypto_kem_dec KYBER_NAMESPACE(dec)
|
|
-int crypto_kem_dec(uint8_t *ss, const uint8_t *ct, const uint8_t *sk);
|
|
+int crypto_kem_dec(uint8_t ss[KYBER_SSBYTES], const uint8_t ct[KYBER_CIPHERTEXTBYTES], const uint8_t sk[KYBER_SECRETKEYBYTES]);
|
|
|
|
#endif
|
|
Index: liboqs-0.8.0/src/kem/kyber/pqcrystals-kyber_kyber512_ref/kem.c
|
|
===================================================================
|
|
--- liboqs-0.8.0.orig/src/kem/kyber/pqcrystals-kyber_kyber512_ref/kem.c
|
|
+++ liboqs-0.8.0/src/kem/kyber/pqcrystals-kyber_kyber512_ref/kem.c
|
|
@@ -20,8 +20,7 @@
|
|
*
|
|
* Returns 0 (success)
|
|
**************************************************/
|
|
-int crypto_kem_keypair(uint8_t *pk,
|
|
- uint8_t *sk)
|
|
+int crypto_kem_keypair(uint8_t pk[KYBER_PUBLICKEYBYTES], uint8_t sk[KYBER_SECRETKEYBYTES])
|
|
{
|
|
size_t i;
|
|
indcpa_keypair(pk, sk);
|
|
@@ -48,9 +47,7 @@ int crypto_kem_keypair(uint8_t *pk,
|
|
*
|
|
* Returns 0 (success)
|
|
**************************************************/
|
|
-int crypto_kem_enc(uint8_t *ct,
|
|
- uint8_t *ss,
|
|
- const uint8_t *pk)
|
|
+int crypto_kem_enc(uint8_t ct[KYBER_CIPHERTEXTBYTES], uint8_t ss[KYBER_SSBYTES], const uint8_t pk[KYBER_PUBLICKEYBYTES])
|
|
{
|
|
uint8_t buf[2*KYBER_SYMBYTES];
|
|
/* Will contain key, coins */
|
|
@@ -91,9 +88,7 @@ int crypto_kem_enc(uint8_t *ct,
|
|
*
|
|
* On failure, ss will contain a pseudo-random value.
|
|
**************************************************/
|
|
-int crypto_kem_dec(uint8_t *ss,
|
|
- const uint8_t *ct,
|
|
- const uint8_t *sk)
|
|
+int crypto_kem_dec(uint8_t ss[KYBER_SSBYTES], const uint8_t ct[KYBER_CIPHERTEXTBYTES], const uint8_t sk[KYBER_SECRETKEYBYTES])
|
|
{
|
|
size_t i;
|
|
int fail;
|
|
Index: liboqs-0.8.0/src/kem/kyber/pqcrystals-kyber_kyber768_ref/kem.c
|
|
===================================================================
|
|
--- liboqs-0.8.0.orig/src/kem/kyber/pqcrystals-kyber_kyber768_ref/kem.c
|
|
+++ liboqs-0.8.0/src/kem/kyber/pqcrystals-kyber_kyber768_ref/kem.c
|
|
@@ -20,8 +20,7 @@
|
|
*
|
|
* Returns 0 (success)
|
|
**************************************************/
|
|
-int crypto_kem_keypair(uint8_t *pk,
|
|
- uint8_t *sk)
|
|
+int crypto_kem_keypair(uint8_t pk[KYBER_PUBLICKEYBYTES], uint8_t sk[KYBER_SECRETKEYBYTES])
|
|
{
|
|
size_t i;
|
|
indcpa_keypair(pk, sk);
|
|
@@ -48,9 +47,7 @@ int crypto_kem_keypair(uint8_t *pk,
|
|
*
|
|
* Returns 0 (success)
|
|
**************************************************/
|
|
-int crypto_kem_enc(uint8_t *ct,
|
|
- uint8_t *ss,
|
|
- const uint8_t *pk)
|
|
+int crypto_kem_enc(uint8_t ct[KYBER_CIPHERTEXTBYTES], uint8_t ss[KYBER_SSBYTES], const uint8_t pk[KYBER_PUBLICKEYBYTES])
|
|
{
|
|
uint8_t buf[2*KYBER_SYMBYTES];
|
|
/* Will contain key, coins */
|
|
@@ -91,9 +88,7 @@ int crypto_kem_enc(uint8_t *ct,
|
|
*
|
|
* On failure, ss will contain a pseudo-random value.
|
|
**************************************************/
|
|
-int crypto_kem_dec(uint8_t *ss,
|
|
- const uint8_t *ct,
|
|
- const uint8_t *sk)
|
|
+int crypto_kem_dec(uint8_t ss[KYBER_SSBYTES], const uint8_t ct[KYBER_CIPHERTEXTBYTES], const uint8_t sk[KYBER_SECRETKEYBYTES])
|
|
{
|
|
size_t i;
|
|
int fail;
|
|
Index: liboqs-0.8.0/src/kem/kyber/pqcrystals-kyber_kyber1024_ref/kem.c
|
|
===================================================================
|
|
--- liboqs-0.8.0.orig/src/kem/kyber/pqcrystals-kyber_kyber1024_ref/kem.c
|
|
+++ liboqs-0.8.0/src/kem/kyber/pqcrystals-kyber_kyber1024_ref/kem.c
|
|
@@ -20,8 +20,7 @@
|
|
*
|
|
* Returns 0 (success)
|
|
**************************************************/
|
|
-int crypto_kem_keypair(uint8_t *pk,
|
|
- uint8_t *sk)
|
|
+int crypto_kem_keypair(uint8_t pk[KYBER_PUBLICKEYBYTES], uint8_t sk[KYBER_SECRETKEYBYTES])
|
|
{
|
|
size_t i;
|
|
indcpa_keypair(pk, sk);
|
|
@@ -48,9 +47,7 @@ int crypto_kem_keypair(uint8_t *pk,
|
|
*
|
|
* Returns 0 (success)
|
|
**************************************************/
|
|
-int crypto_kem_enc(uint8_t *ct,
|
|
- uint8_t *ss,
|
|
- const uint8_t *pk)
|
|
+int crypto_kem_enc(uint8_t ct[KYBER_CIPHERTEXTBYTES], uint8_t ss[KYBER_SSBYTES], const uint8_t pk[KYBER_PUBLICKEYBYTES])
|
|
{
|
|
uint8_t buf[2*KYBER_SYMBYTES];
|
|
/* Will contain key, coins */
|
|
@@ -91,9 +88,7 @@ int crypto_kem_enc(uint8_t *ct,
|
|
*
|
|
* On failure, ss will contain a pseudo-random value.
|
|
**************************************************/
|
|
-int crypto_kem_dec(uint8_t *ss,
|
|
- const uint8_t *ct,
|
|
- const uint8_t *sk)
|
|
+int crypto_kem_dec(uint8_t ss[KYBER_SSBYTES], const uint8_t ct[KYBER_CIPHERTEXTBYTES], const uint8_t sk[KYBER_SECRETKEYBYTES])
|
|
{
|
|
size_t i;
|
|
int fail;
|