Skip to content

Commit 1570066

Browse files
Move dk to Tests in ML-KEM ACVP (#2867)
### Description of changes: NIST moved the private key in the ML-KEM decapsulation tests from the group to the individual tests. Upstream BoringSSL has a similar change here: google/boringssl@f12962c. ### Call-outs: This will be cherry-picked over to FIPS branch once in main. ### Testing: Updated ACVP tests By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.
1 parent 3c3e4a1 commit 1570066

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

util/fipstools/acvp/acvptool/subprocess/ml_kem.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ type mlKemEncapDecapTestGroup struct {
9898
Type string `json:"testType"`
9999
ParameterSet string `json:"parameterSet"`
100100
Function string `json:"function"`
101-
DK hexEncodedByteString `json:"dk"`
102101
Tests []struct {
103102
ID uint64 `json:"tcId"`
104103
EK hexEncodedByteString `json:"ek"`
104+
DK hexEncodedByteString `json:"dk"`
105105
M hexEncodedByteString `json:"m"`
106106
C hexEncodedByteString `json:"c"`
107107
}
@@ -147,7 +147,7 @@ func processMlKemEncapDecap(vectors json.RawMessage, m Transactable) (interface{
147147
case strings.EqualFold(group.Function, "encapsulation"):
148148
testResponse, err = processMlKemEncapTestCase(test.ID, group.ParameterSet, test.EK, test.M, m)
149149
case strings.EqualFold(group.Function, "decapsulation"):
150-
testResponse, err = processMlKemDecapTestCase(test.ID, group.ParameterSet, group.DK, test.C, m)
150+
testResponse, err = processMlKemDecapTestCase(test.ID, group.ParameterSet, test.DK, test.C, m)
151151
default:
152152
return nil, fmt.Errorf("unknown encDecap function: %v", group.Function)
153153
}
-9.73 KB
Binary file not shown.
-367 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)