Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API for signatures with context string #44

Open
dstebila opened this issue Nov 19, 2024 · 1 comment
Open

Add API for signatures with context string #44

dstebila opened this issue Nov 19, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@dstebila
Copy link
Member

Currently the signing and verification API within liboqs are as follows:

OQS_API OQS_STATUS OQS_SIG_sign(const OQS_SIG *sig, uint8_t *signature, 
    size_t *signature_len, const uint8_t *message, size_t message_len, 
    const uint8_t *secret_key);
OQS_API OQS_STATUS OQS_SIG_verify(const OQS_SIG *sig, const uint8_t *message, 
    size_t message_len, const uint8_t *signature, size_t signature_len, 
    const uint8_t *public_key);

The API that NIST has introduced in FIPS 204 for ML-DSA includes a context string of length ≥ 0.

open-quantum-safe/liboqs#1919 adds a new API for signing with a context string:

OQS_API OQS_STATUS OQS_SIG_sign_with_ctx_str(const OQS_SIG *sig, uint8_t *signature, 
    size_t *signature_len, const uint8_t *message, size_t message_len, const uint8_t *ctx_str, 
    size_t ctx_str_len, const uint8_t *secret_key);
OQS_API OQS_STATUS OQS_SIG_verify_with_ctx_str(const OQS_SIG *sig, const uint8_t *message, 
    size_t message_len, const uint8_t *signature, size_t signature_len, const uint8_t *ctx_str, 
    size_t ctx_str_len, const uint8_t *public_key);

This language wrapper will need to be updated to support the new API for signing/verifying with context string.

Note there is also a discussion in open-quantum-safe/liboqs#2001 about whether to deprecate the old API.

@dstebila dstebila added the enhancement New feature or request label Nov 19, 2024
@vsoftco
Copy link
Member

vsoftco commented Dec 3, 2024

I'll fix it

@vsoftco vsoftco self-assigned this Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants