ML-DSA (Edwards-Curve Digital Signature Algorithm) More...
Go to the source code of this file.
Macros | |
| #define | TRACE_LEVEL CRYPTO_TRACE_LEVEL |
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] = {0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x11} |
| const uint8_t | MLDSA65_OID [9] = {0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x12} |
| const uint8_t | MLDSA87_OID [9] = {0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x13} |
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.c.
Macro Definition Documentation
◆ TRACE_LEVEL
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 | ) |
Variable Documentation
◆ MLDSA44_OID
| const uint8_t MLDSA44_OID[9] = {0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x11} |
◆ MLDSA65_OID
| const uint8_t MLDSA65_OID[9] = {0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x12} |
