ML-DSA (Edwards-Curve Digital Signature Algorithm) More...
Go to the source code of this file.
Data Structures | |
| struct | MldsaPublicKey |
| ML-DSA public key. More... | |
| struct | MldsaPrivateKey |
| ML-DSA private key. More... | |
Macros | |
| #define | MLDSA44_SECURITY_LEVEL 2 |
| #define | MLDSA44_SEED_LEN 32 |
| #define | MLDSA44_PRIVATE_KEY_LEN 2560 |
| #define | MLDSA44_PUBLIC_KEY_LEN 1312 |
| #define | MLDSA44_SIGNATURE_LEN 2420 |
| #define | MLDSA65_SECURITY_LEVEL 3 |
| #define | MLDSA65_SEED_LEN 32 |
| #define | MLDSA65_PRIVATE_KEY_LEN 4032 |
| #define | MLDSA65_PUBLIC_KEY_LEN 1952 |
| #define | MLDSA65_SIGNATURE_LEN 3309 |
| #define | MLDSA87_SECURITY_LEVEL 5 |
| #define | MLDSA87_SEED_LEN 32 |
| #define | MLDSA87_PRIVATE_KEY_LEN 4896 |
| #define | MLDSA87_PUBLIC_KEY_LEN 2592 |
| #define | MLDSA87_SIGNATURE_LEN 4627 |
Functions | |
| void | mldsaInitPublicKey (MldsaPublicKey *key) |
| Initialize an ML-DSA public key. More... | |
| void | mldsaFreePublicKey (MldsaPublicKey *key) |
| Release an ML-DSA public key. More... | |
| void | mldsaInitPrivateKey (MldsaPrivateKey *key) |
| Initialize an ML-DSA private key. More... | |
| void | mldsaFreePrivateKey (MldsaPrivateKey *key) |
| Release an ML-DSA private key. More... | |
| error_t | mldsaImportPublicKey (MldsaPublicKey *key, uint_t level, const uint8_t *input, size_t length) |
| Import an ML-DSA public key. More... | |
| error_t | mldsaExportPublicKey (const MldsaPublicKey *key, uint8_t *output, size_t *written) |
| Export an ML-DSA public key. More... | |
| error_t | mldsaImportPrivateKey (MldsaPrivateKey *key, uint_t level, const uint8_t *input, size_t length) |
| Import an ML-DSA private key. More... | |
| error_t | mldsaExportPrivateKey (const MldsaPrivateKey *key, uint8_t *output, size_t *written) |
| Export an ML-DSA private key. More... | |
| error_t | mldsaImportSeed (MldsaPrivateKey *key, uint_t level, const uint8_t *input, size_t length) |
| Import an ML-DSA seed. More... | |
| error_t | mldsaExportSeed (const MldsaPrivateKey *key, uint8_t *output, size_t *written) |
| Export an ML-DSA seed. More... | |
| error_t | mldsa44GenerateSignature (const uint8_t *secretKey, const void *message, size_t messageLen, const void *context, uint8_t contextLen, uint8_t *signature) |
| ML-DSA-44 signature generation. More... | |
| error_t | mldsa65GenerateSignature (const uint8_t *secretKey, const void *message, size_t messageLen, const void *context, uint8_t contextLen, uint8_t *signature) |
| ML-DSA-65 signature generation. More... | |
| error_t | mldsa87GenerateSignature (const uint8_t *secretKey, const void *message, size_t messageLen, const void *context, uint8_t contextLen, uint8_t *signature) |
| ML-DSA-87 signature generation. More... | |
| error_t | mldsa44VerifySignature (const uint8_t *publicKey, const void *message, size_t messageLen, const void *context, uint8_t contextLen, const uint8_t *signature) |
| ML-DSA-44 signature verification. More... | |
| error_t | mldsa65VerifySignature (const uint8_t *publicKey, const void *message, size_t messageLen, const void *context, uint8_t contextLen, const uint8_t *signature) |
| ML-DSA-65 signature verification. More... | |
| error_t | mldsa87VerifySignature (const uint8_t *publicKey, const void *message, size_t messageLen, const void *context, uint8_t contextLen, const uint8_t *signature) |
| ML-DSA-87 signature verification. More... | |
Variables | |
| const uint8_t | MLDSA44_OID [9] |
| const uint8_t | MLDSA65_OID [9] |
| const uint8_t | MLDSA87_OID [9] |
Detailed Description
ML-DSA (Edwards-Curve Digital Signature Algorithm)
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2026 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneCRYPTO Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.6.4
Definition in file mldsa.h.
Macro Definition Documentation
◆ MLDSA44_PRIVATE_KEY_LEN
◆ MLDSA44_PUBLIC_KEY_LEN
◆ MLDSA44_SECURITY_LEVEL
◆ MLDSA44_SEED_LEN
◆ MLDSA44_SIGNATURE_LEN
◆ MLDSA65_PRIVATE_KEY_LEN
◆ MLDSA65_PUBLIC_KEY_LEN
◆ MLDSA65_SECURITY_LEVEL
◆ MLDSA65_SEED_LEN
◆ MLDSA65_SIGNATURE_LEN
◆ MLDSA87_PRIVATE_KEY_LEN
◆ MLDSA87_PUBLIC_KEY_LEN
◆ MLDSA87_SECURITY_LEVEL
◆ MLDSA87_SEED_LEN
◆ MLDSA87_SIGNATURE_LEN
Function Documentation
◆ mldsa44GenerateSignature()
| error_t mldsa44GenerateSignature | ( | const uint8_t * | secretKey, |
| const void * | message, | ||
| size_t | messageLen, | ||
| const void * | context, | ||
| uint8_t | contextLen, | ||
| uint8_t * | signature | ||
| ) |
ML-DSA-44 signature generation.
- Parameters
-
[in] secretKey Pointer to the secret key (2560 bytes) [in] message Pointer to the message to be signed [in] messageLen Length of the message, in bytes [in] context Context string (a byte string of 255 or fewer bytes) [in] contextLen Length of the context, in bytes [out] signature ML-DSA-44 signature (2420 bytes)
- Returns
- Error code
◆ mldsa44VerifySignature()
| error_t mldsa44VerifySignature | ( | const uint8_t * | publicKey, |
| const void * | message, | ||
| size_t | messageLen, | ||
| const void * | context, | ||
| uint8_t | contextLen, | ||
| const uint8_t * | signature | ||
| ) |
ML-DSA-44 signature verification.
- Parameters
-
[in] publicKey Pointer to the public key (1312 bytes) [in] message Message whose signature is to be verified [in] messageLen Length of the message, in bytes [in] context Context string (a byte string of 255 or fewer bytes) [in] contextLen Length of the context, in bytes [in] signature ML-DSA-44 signature (2420 bytes)
- Returns
- Error code
◆ mldsa65GenerateSignature()
| error_t mldsa65GenerateSignature | ( | const uint8_t * | secretKey, |
| const void * | message, | ||
| size_t | messageLen, | ||
| const void * | context, | ||
| uint8_t | contextLen, | ||
| uint8_t * | signature | ||
| ) |
ML-DSA-65 signature generation.
- Parameters
-
[in] secretKey Pointer to the secret key (4032 bytes) [in] message Pointer to the message to be signed [in] messageLen Length of the message, in bytes [in] context Context string (a byte string of 255 or fewer bytes) [in] contextLen Length of the context, in bytes [out] signature ML-DSA-65 signature (3309 bytes)
- Returns
- Error code
◆ mldsa65VerifySignature()
| error_t mldsa65VerifySignature | ( | const uint8_t * | publicKey, |
| const void * | message, | ||
| size_t | messageLen, | ||
| const void * | context, | ||
| uint8_t | contextLen, | ||
| const uint8_t * | signature | ||
| ) |
ML-DSA-65 signature verification.
- Parameters
-
[in] publicKey Pointer to the public key (1952 bytes) [in] message Message whose signature is to be verified [in] messageLen Length of the message, in bytes [in] context Context string (a byte string of 255 or fewer bytes) [in] contextLen Length of the context, in bytes [in] signature ML-DSA-65 signature (3309 bytes)
- Returns
- Error code
◆ mldsa87GenerateSignature()
| error_t mldsa87GenerateSignature | ( | const uint8_t * | secretKey, |
| const void * | message, | ||
| size_t | messageLen, | ||
| const void * | context, | ||
| uint8_t | contextLen, | ||
| uint8_t * | signature | ||
| ) |
◆ mldsa87VerifySignature()
| error_t mldsa87VerifySignature | ( | const uint8_t * | publicKey, |
| const void * | message, | ||
| size_t | messageLen, | ||
| const void * | context, | ||
| uint8_t | contextLen, | ||
| const uint8_t * | signature | ||
| ) |
ML-DSA-87 signature verification.
- Parameters
-
[in] publicKey Pointer to the public key (2592 bytes) [in] message Message whose signature is to be verified [in] messageLen Length of the message, in bytes [in] context Context string (a byte string of 255 or fewer bytes) [in] contextLen Length of the context, in bytes [in] signature ML-DSA-87 signature (4627 bytes)
- Returns
- Error code
◆ mldsaExportPrivateKey()
| error_t mldsaExportPrivateKey | ( | const MldsaPrivateKey * | key, |
| uint8_t * | output, | ||
| size_t * | written | ||
| ) |
◆ mldsaExportPublicKey()
| error_t mldsaExportPublicKey | ( | const MldsaPublicKey * | key, |
| uint8_t * | output, | ||
| size_t * | written | ||
| ) |
◆ mldsaExportSeed()
| error_t mldsaExportSeed | ( | const MldsaPrivateKey * | key, |
| uint8_t * | output, | ||
| size_t * | written | ||
| ) |
◆ mldsaFreePrivateKey()
| void mldsaFreePrivateKey | ( | MldsaPrivateKey * | key | ) |
◆ mldsaFreePublicKey()
| void mldsaFreePublicKey | ( | MldsaPublicKey * | key | ) |
◆ mldsaImportPrivateKey()
| error_t mldsaImportPrivateKey | ( | MldsaPrivateKey * | key, |
| uint_t | level, | ||
| const uint8_t * | input, | ||
| size_t | length | ||
| ) |
◆ mldsaImportPublicKey()
| error_t mldsaImportPublicKey | ( | MldsaPublicKey * | key, |
| uint_t | level, | ||
| const uint8_t * | input, | ||
| size_t | length | ||
| ) |
◆ mldsaImportSeed()
| error_t mldsaImportSeed | ( | MldsaPrivateKey * | key, |
| uint_t | level, | ||
| const uint8_t * | input, | ||
| size_t | length | ||
| ) |
◆ mldsaInitPrivateKey()
| void mldsaInitPrivateKey | ( | MldsaPrivateKey * | key | ) |
◆ mldsaInitPublicKey()
| void mldsaInitPublicKey | ( | MldsaPublicKey * | key | ) |
