open-quantum-safe / liboqs

C library for prototyping and experimenting with quantum-resistant cryptography
https://openquantumsafe.org/
Other
1.68k stars 414 forks source link

Add comparsion for shared secret after encapsulation #1794

Closed yogappu closed 1 month ago

yogappu commented 1 month ago

The NIST provided Intermediate TestVectors testcases for ML-KEM takes encaps_k(shared secret) as an argument 4 but however does not use it for comparison after the encapsulation stage. This PR adds this check and aborts the code flow incase the comparison fails.

yogappu commented 1 month ago

will create a MR soon again with more changes and add @baentsch @SWilson4