File tree Expand file tree Collapse file tree 5 files changed +12
-9
lines changed
Expand file tree Collapse file tree 5 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 1- # Version 0.12.0 - January 14 , 2025
1+ # Version 0.12.0 - January 15 , 2025
22
33- Fixes https://github.com/open-quantum-safe/liboqs-cpp/issues/21 . The API that
44 NIST has introduced in [ FIPS 204] ( https://csrc.nist.gov/pubs/fips/204/final )
88const bytes& context) const`
99 - `bool Signature::verify_with_ctx_str(const bytes& message,
1010const bytes& signature, const bytes& context, const bytes& public_key) const`
11+ - Updated examples to use ` ML-KEM ` and ` ML-DSA ` as the defaults
1112
1213# Version 0.10.0 - March 27, 2024
1314
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ See in particular limitations on intended use.
2424
2525## Release notes
2626
27- This release of liboqs-cpp was released on January 14 , 2025. Its release page
27+ This release of liboqs-cpp was released on January 15 , 2025. Its release page
2828on GitHub is
2929https://github.com/open-quantum-safe/liboqs-cpp/releases/tag/0.12.0 .
3030
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ int main() {
1414 std::cout << " liboqs-cpp version: " << oqs::oqs_cpp_version () << ' \n ' ;
1515 std::cout << " Enabled KEMs:\n " << oqs::KEMs::get_enabled_KEMs ();
1616
17- std::string kem_name = " Kyber512 " ;
17+ std::string kem_name = " ML-KEM-512 " ;
1818 oqs::KeyEncapsulation client{kem_name};
1919 std::cout << " \n\n KEM details:\n " << client.get_details ();
2020
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ int main() {
1414 std::cout << " Enabled signatures:\n " << oqs::Sigs::get_enabled_sigs ();
1515
1616 oqs::bytes message = " This is the message to sign" _bytes;
17- std::string sig_name = " Dilithium2 " ;
17+ std::string sig_name = " ML-DSA-44 " ;
1818 oqs::Signature signer{sig_name};
1919 std::cout << " \n\n Signature details:\n " << signer.get_details ();
2020
Original file line number Diff line number Diff line change @@ -52,18 +52,20 @@ void test_kem_wrong_ciphertext(const std::string& kem_name) {
5252 oqs::bytes wrong_ciphertext = oqs::rand::randombytes (ciphertext.size ());
5353 oqs::bytes shared_secret_client;
5454 try {
55+ // this line should throw
5556 shared_secret_client = client.decap_secret (wrong_ciphertext);
57+ // if not, test should fail
58+ bool is_valid = (shared_secret_client == shared_secret_server);
59+ if (is_valid)
60+ std::cerr << kem_name << " : shared secrets should not coincide"
61+ << std::endl;
62+ EXPECT_FALSE (is_valid);
5663 } catch (std::exception& e) {
5764 if (e.what () == std::string{" Can not decapsulate secret" })
5865 return ;
5966 else
6067 throw ; // this is another un-expected exception
6168 }
62- bool is_valid = (shared_secret_client == shared_secret_server);
63- if (is_valid)
64- std::cerr << kem_name << " : shared secrets should not coincide"
65- << std::endl;
66- EXPECT_FALSE (is_valid);
6769}
6870
6971TEST (oqs_KeyEncapsulation, Correctness) {
You can’t perform that action at this time.
0 commit comments