Skip to content

Commit

Permalink
Set ML-KEM alg_version to "FIPS203" (#1997)
Browse files Browse the repository at this point in the history
* Update patch to include version number change

Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>

* Run copy_from_upstream

Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>

* Generate patch with git diff

Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>

---------

Signed-off-by: Spencer Wilson <spencer.wilson@uwaterloo.ca>
  • Loading branch information
SWilson4 authored Nov 26, 2024
1 parent fbaf871 commit 25206cd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
22 changes: 11 additions & 11 deletions scripts/copy_from_upstream/patches/pqcrystals-ml_kem.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ diff --git a/Kyber1024_META.yml b/ML-KEM-1024_META.yml
similarity index 55%
rename from Kyber1024_META.yml
rename to ML-KEM-1024_META.yml
index baa5ca3..fdfc298 100644
index baa5ca3..67243b8 100644
--- a/Kyber1024_META.yml
+++ b/ML-KEM-1024_META.yml
@@ -1,4 +1,4 @@
Expand All @@ -27,7 +27,7 @@ index baa5ca3..fdfc298 100644
implementations:
- name: ref
- version: https://github.com/pq-crystals/kyber/commit/28413dfbf523fdde181246451c2bd77199c0f7ff
+ version: https://github.com/pq-crystals/kyber/tree/standard
+ version: FIPS203
folder_name: ref
compile_opts: -DKYBER_K=4
- signature_keypair: pqcrystals_kyber1024_ref_keypair
Expand All @@ -41,7 +41,7 @@ index baa5ca3..fdfc298 100644
+ sources: ../LICENSE kem.c indcpa.c polyvec.c poly.c reduce.c ntt.c cbd.c verify.c kem.h params.h api.h indcpa.h polyvec.h poly.h reduce.h ntt.h cbd.h verify.h symmetric.h symmetric-shake.c
- name: avx2
- version: https://github.com/pq-crystals/kyber/commit/28413dfbf523fdde181246451c2bd77199c0f7ff
+ version: https://github.com/pq-crystals/kyber/tree/standard
+ version: FIPS203
compile_opts: -DKYBER_K=4
- signature_keypair: pqcrystals_kyber1024_avx2_keypair
- signature_enc: pqcrystals_kyber1024_avx2_enc
Expand All @@ -59,7 +59,7 @@ diff --git a/Kyber512_META.yml b/ML-KEM-512_META.yml
similarity index 55%
rename from Kyber512_META.yml
rename to ML-KEM-512_META.yml
index b251701..40440a8 100644
index b251701..18c28b0 100644
--- a/Kyber512_META.yml
+++ b/ML-KEM-512_META.yml
@@ -1,4 +1,4 @@
Expand All @@ -84,7 +84,7 @@ index b251701..40440a8 100644
implementations:
- name: ref
- version: https://github.com/pq-crystals/kyber/commit/74cad307858b61e434490c75f812cb9b9ef7279b
+ version: https://github.com/pq-crystals/kyber/tree/standard
+ version: FIPS203
folder_name: ref
compile_opts: -DKYBER_K=2
- signature_keypair: pqcrystals_kyber512_ref_keypair
Expand All @@ -98,7 +98,7 @@ index b251701..40440a8 100644
+ sources: ../LICENSE kem.c indcpa.c polyvec.c poly.c reduce.c ntt.c cbd.c verify.c kem.h params.h api.h indcpa.h polyvec.h poly.h reduce.h ntt.h cbd.h verify.h symmetric.h symmetric-shake.c
- name: avx2
- version: https://github.com/pq-crystals/kyber/commit/36414d64fc1890ed58d1ca8b1e0cab23635d1ac2
+ version: https://github.com/pq-crystals/kyber/tree/standard
+ version: FIPS203
compile_opts: -DKYBER_K=2
- signature_keypair: pqcrystals_kyber512_avx2_keypair
- signature_enc: pqcrystals_kyber512_avx2_enc
Expand All @@ -116,7 +116,7 @@ diff --git a/Kyber768_META.yml b/ML-KEM-768_META.yml
similarity index 55%
rename from Kyber768_META.yml
rename to ML-KEM-768_META.yml
index 7a0cc3d..4277df3 100644
index 7a0cc3d..ccc03c9 100644
--- a/Kyber768_META.yml
+++ b/ML-KEM-768_META.yml
@@ -1,4 +1,4 @@
Expand All @@ -141,7 +141,7 @@ index 7a0cc3d..4277df3 100644
implementations:
- name: ref
- version: https://github.com/pq-crystals/kyber/commit/28413dfbf523fdde181246451c2bd77199c0f7ff
+ version: https://github.com/pq-crystals/kyber/tree/standard
+ version: FIPS203
folder_name: ref
compile_opts: -DKYBER_K=3
- signature_keypair: pqcrystals_kyber768_ref_keypair
Expand All @@ -155,7 +155,7 @@ index 7a0cc3d..4277df3 100644
+ sources: ../LICENSE kem.c indcpa.c polyvec.c poly.c reduce.c ntt.c cbd.c verify.c kem.h params.h api.h indcpa.h polyvec.h poly.h reduce.h ntt.h cbd.h verify.h symmetric.h symmetric-shake.c
- name: avx2
- version: https://github.com/pq-crystals/kyber/commit/28413dfbf523fdde181246451c2bd77199c0f7ff
+ version: https://github.com/pq-crystals/kyber/tree/standard
+ version: FIPS203
compile_opts: -DKYBER_K=3
- signature_keypair: pqcrystals_kyber768_avx2_keypair
- signature_enc: pqcrystals_kyber768_avx2_enc
Expand Down Expand Up @@ -261,7 +261,7 @@ index 18b9d08..c4b2b3a 100644
#endif

diff --git a/avx2/params.h b/avx2/params.h
index bc70ebf..fdc688e 100644
index bc70ebf..ecfabce 100644
--- a/avx2/params.h
+++ b/avx2/params.h
@@ -12,19 +12,19 @@
Expand Down Expand Up @@ -377,7 +377,7 @@ index 9a78c09..726cfa9 100644

/*************************************************
diff --git a/ref/params.h b/ref/params.h
index 0802c74..36b2b98 100644
index 0802c74..fb4190b 100644
--- a/ref/params.h
+++ b/ref/params.h
@@ -8,11 +8,11 @@
Expand Down
2 changes: 1 addition & 1 deletion src/kem/ml_kem/kem_ml_kem_1024.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ OQS_KEM *OQS_KEM_ml_kem_1024_new(void) {
return NULL;
}
kem->method_name = OQS_KEM_alg_ml_kem_1024;
kem->alg_version = "https://github.com/pq-crystals/kyber/tree/standard";
kem->alg_version = "FIPS203";

kem->claimed_nist_level = 5;
kem->ind_cca = true;
Expand Down
2 changes: 1 addition & 1 deletion src/kem/ml_kem/kem_ml_kem_512.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ OQS_KEM *OQS_KEM_ml_kem_512_new(void) {
return NULL;
}
kem->method_name = OQS_KEM_alg_ml_kem_512;
kem->alg_version = "https://github.com/pq-crystals/kyber/tree/standard";
kem->alg_version = "FIPS203";

kem->claimed_nist_level = 1;
kem->ind_cca = true;
Expand Down
2 changes: 1 addition & 1 deletion src/kem/ml_kem/kem_ml_kem_768.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ OQS_KEM *OQS_KEM_ml_kem_768_new(void) {
return NULL;
}
kem->method_name = OQS_KEM_alg_ml_kem_768;
kem->alg_version = "https://github.com/pq-crystals/kyber/tree/standard";
kem->alg_version = "FIPS203";

kem->claimed_nist_level = 3;
kem->ind_cca = true;
Expand Down

0 comments on commit 25206cd

Please sign in to comment.