Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

Add API for signatures with context string #31

Closed
dstebila opened this issue Nov 19, 2024 · 0 comments
Closed

Add API for signatures with context string #31

dstebila opened this issue Nov 19, 2024 · 0 comments
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
@dstebila dstebila closed this as not planned Won't fix, can't repro, duplicate, stale Jan 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant