Skip to content

Commit

Permalink
Version 0.12.0 (#24)
Browse files Browse the repository at this point in the history
Signed-off-by: Vlad Gheorghiu <[email protected]>
  • Loading branch information
vsoftco committed Jan 15, 2025
1 parent eb55cbc commit 7e293be
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Version 0.12.0 - January 14, 2025
# Version 0.12.0 - January 15, 2025

- Fixes https://github.com/open-quantum-safe/liboqs-cpp/issues/21. The API that
NIST has introduced in [FIPS 204](https://csrc.nist.gov/pubs/fips/204/final)
Expand All @@ -8,6 +8,7 @@
const bytes& context) const`
- `bool Signature::verify_with_ctx_str(const bytes& message,
const bytes& signature, const bytes& context, const bytes& public_key) const`
- Updated examples to use `ML-KEM` and `ML-DSA` as the defaults

# Version 0.10.0 - March 27, 2024

Expand Down
2 changes: 1 addition & 1 deletion RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ See in particular limitations on intended use.

## Release notes

This release of liboqs-cpp was released on January 14, 2025. Its release page
This release of liboqs-cpp was released on January 15, 2025. Its release page
on GitHub is
https://github.com/open-quantum-safe/liboqs-cpp/releases/tag/0.12.0.

Expand Down
2 changes: 1 addition & 1 deletion examples/kem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ int main() {
std::cout << "liboqs-cpp version: " << oqs::oqs_cpp_version() << '\n';
std::cout << "Enabled KEMs:\n" << oqs::KEMs::get_enabled_KEMs();

std::string kem_name = "Kyber512";
std::string kem_name = "ML-KEM-512";
oqs::KeyEncapsulation client{kem_name};
std::cout << "\n\nKEM details:\n" << client.get_details();

Expand Down
2 changes: 1 addition & 1 deletion examples/sig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ int main() {
std::cout << "Enabled signatures:\n" << oqs::Sigs::get_enabled_sigs();

oqs::bytes message = "This is the message to sign"_bytes;
std::string sig_name = "Dilithium2";
std::string sig_name = "ML-DSA-44";
oqs::Signature signer{sig_name};
std::cout << "\n\nSignature details:\n" << signer.get_details();

Expand Down
12 changes: 7 additions & 5 deletions unit_tests/tests/test_kem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,18 +52,20 @@ void test_kem_wrong_ciphertext(const std::string& kem_name) {
oqs::bytes wrong_ciphertext = oqs::rand::randombytes(ciphertext.size());
oqs::bytes shared_secret_client;
try {
// this line should throw
shared_secret_client = client.decap_secret(wrong_ciphertext);
// if not, test should fail
bool is_valid = (shared_secret_client == shared_secret_server);
if (is_valid)
std::cerr << kem_name << ": shared secrets should not coincide"
<< std::endl;
EXPECT_FALSE(is_valid);
} catch (std::exception& e) {
if (e.what() == std::string{"Can not decapsulate secret"})
return;
else
throw; // this is another un-expected exception
}
bool is_valid = (shared_secret_client == shared_secret_server);
if (is_valid)
std::cerr << kem_name << ": shared secrets should not coincide"
<< std::endl;
EXPECT_FALSE(is_valid);
}

TEST(oqs_KeyEncapsulation, Correctness) {
Expand Down

0 comments on commit 7e293be

Please sign in to comment.