mirror of
https://github.com/luxfi/pqclean.git
synced 2026-10-30 15:21:55 +00:00
ML-DSA currently does not implement some required parts of the API as function symbols and instead only provides function-like macros. This patch replaces the macros with functions so that users can construct function pointers to them. Fixes: https://github.com/PQClean/PQClean/issues/576
51 lines
1.8 KiB
C
51 lines
1.8 KiB
C
#ifndef PQCLEAN_MLDSA65_CLEAN_API_H
|
|
#define PQCLEAN_MLDSA65_CLEAN_API_H
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
|
|
#define PQCLEAN_MLDSA65_CLEAN_CRYPTO_PUBLICKEYBYTES 1952
|
|
#define PQCLEAN_MLDSA65_CLEAN_CRYPTO_SECRETKEYBYTES 4032
|
|
#define PQCLEAN_MLDSA65_CLEAN_CRYPTO_BYTES 3309
|
|
#define PQCLEAN_MLDSA65_CLEAN_CRYPTO_ALGNAME "ML-DSA-65"
|
|
|
|
int PQCLEAN_MLDSA65_CLEAN_crypto_sign_keypair(uint8_t *pk, uint8_t *sk);
|
|
|
|
int PQCLEAN_MLDSA65_CLEAN_crypto_sign_signature_ctx(uint8_t *sig, size_t *siglen,
|
|
const uint8_t *m, size_t mlen,
|
|
const uint8_t *ctx, size_t ctxlen,
|
|
const uint8_t *sk);
|
|
|
|
int PQCLEAN_MLDSA65_CLEAN_crypto_sign_ctx(uint8_t *sm, size_t *smlen,
|
|
const uint8_t *m, size_t mlen,
|
|
const uint8_t *ctx, size_t ctxlen,
|
|
const uint8_t *sk);
|
|
|
|
int PQCLEAN_MLDSA65_CLEAN_crypto_sign_verify_ctx(const uint8_t *sig, size_t siglen,
|
|
const uint8_t *m, size_t mlen,
|
|
const uint8_t *ctx, size_t ctxlen,
|
|
const uint8_t *pk);
|
|
|
|
int PQCLEAN_MLDSA65_CLEAN_crypto_sign_open_ctx(uint8_t *m, size_t *mlen,
|
|
const uint8_t *sm, size_t smlen,
|
|
const uint8_t *ctx, size_t ctxlen,
|
|
const uint8_t *pk);
|
|
|
|
int PQCLEAN_MLDSA65_CLEAN_crypto_sign_signature(uint8_t *sig, size_t *siglen,
|
|
const uint8_t *m, size_t mlen,
|
|
const uint8_t *sk);
|
|
|
|
int PQCLEAN_MLDSA65_CLEAN_crypto_sign(uint8_t *sm, size_t *smlen,
|
|
const uint8_t *m, size_t mlen,
|
|
const uint8_t *sk);
|
|
|
|
int PQCLEAN_MLDSA65_CLEAN_crypto_sign_verify(const uint8_t *sig, size_t siglen,
|
|
const uint8_t *m, size_t mlen,
|
|
const uint8_t *pk);
|
|
|
|
int PQCLEAN_MLDSA65_CLEAN_crypto_sign_open(uint8_t *m, size_t *mlen,
|
|
const uint8_t *sm, size_t smlen,
|
|
const uint8_t *pk);
|
|
|
|
#endif
|