Skip to content

No context string input to ML-DSA #1079

@jyao1

Description

@jyao1

Problem:

VERIFY call stack (no context):

  • UnparsedPublicKey::verify(message, signature) — Rust API entry point
  • PqdsaVerificationAlgorithm::verify_sig(pub_key, msg, sig) — file: pqdsa/signature.rs line 104
  • evp_pkey.verify(msg, None, No_EVP_PKEY_CTX_consumer, signature) — file: pqdsa/signature.rs line 112
  • EVP_DigestVerifyInit(md_ctx, pctx, NULL, NULL, pkey) — file: evp_pkey.rs line 447
  • EVP_DigestVerify(md_ctx, sig, sig_len, msg, msg_len) — file: evp_pkey.rs line 462
  • C code internally calls: ml_dsa_verify(pkey, sig, sig_len, msg, msg_len, context=NULL, context_len=0) — CONTEXT IS MISSING HERE

SIGN call stack (no context):

  • PqdsaKeyPair::sign(msg, signature) — Rust API entry point
  • self.evp_pkey.sign(msg, None, No_EVP_PKEY_CTX_consumer) — file: pqdsa/key_pair.rs line 198
  • EVP_DigestSignInit(md_ctx, pctx, NULL, NULL, pkey) — file: evp_pkey.rs line 329
  • EVP_DigestSign(md_ctx, sig, sig_len, msg, msg_len) — file: evp_pkey.rs line 363
  • C code internally calls: ml_dsa_sign(pkey, sig, sig_len, msg, msg_len, context=NULL, context_len=0) — CONTEXT IS MISSING HERE

Is there any plan to add context string to RUST API, to align with C API and FIPS 204?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions