ML-KEM-512 key encapsulation mechanism. More...
#include "core/crypto.h"Go to the source code of this file.
Macros | |
| #define | MLKEM512_PUBLIC_KEY_LEN 800 | 
| #define | MLKEM512_SECRET_KEY_LEN 1632 | 
| #define | MLKEM512_CIPHERTEXT_LEN 768 | 
| #define | MLKEM512_SHARED_SECRET_LEN 32 | 
| #define | MLKEM512_KEM_ALGO (&mlkem512KemAlgo) | 
Functions | |
| error_t | mlkem512GenerateKeyPair (const PrngAlgo *prngAlgo, void *prngContext, uint8_t *pk, uint8_t *sk) | 
| Key pair generation.  More... | |
| error_t | mlkem512Encapsulate (const PrngAlgo *prngAlgo, void *prngContext, uint8_t *ct, uint8_t *ss, const uint8_t *pk) | 
| Encapsulation algorithm.  More... | |
| error_t | mlkem512Decapsulate (uint8_t *ss, const uint8_t *ct, const uint8_t *sk) | 
| Decapsulation algorithm.  More... | |
Variables | |
| const KemAlgo | mlkem512KemAlgo | 
Detailed Description
ML-KEM-512 key encapsulation mechanism.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2025 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.5.4
 
Definition in file mlkem512.h.
Macro Definition Documentation
◆ MLKEM512_CIPHERTEXT_LEN
| #define MLKEM512_CIPHERTEXT_LEN 768 | 
Definition at line 42 of file mlkem512.h.
◆ MLKEM512_KEM_ALGO
| #define MLKEM512_KEM_ALGO (&mlkem512KemAlgo) | 
Definition at line 47 of file mlkem512.h.
◆ MLKEM512_PUBLIC_KEY_LEN
| #define MLKEM512_PUBLIC_KEY_LEN 800 | 
Definition at line 38 of file mlkem512.h.
◆ MLKEM512_SECRET_KEY_LEN
| #define MLKEM512_SECRET_KEY_LEN 1632 | 
Definition at line 40 of file mlkem512.h.
◆ MLKEM512_SHARED_SECRET_LEN
| #define MLKEM512_SHARED_SECRET_LEN 32 | 
Definition at line 44 of file mlkem512.h.
Function Documentation
◆ mlkem512Decapsulate()
| error_t mlkem512Decapsulate | ( | uint8_t * | ss, | 
| const uint8_t * | ct, | ||
| const uint8_t * | sk | ||
| ) | 
Decapsulation algorithm.
- Parameters
 - 
  
[out] ss Shared secret [in] ct Ciphertext [in] sk Secret key  
- Returns
 - Error code
 
Definition at line 111 of file mlkem512.c.
◆ mlkem512Encapsulate()
| error_t mlkem512Encapsulate | ( | const PrngAlgo * | prngAlgo, | 
| void * | prngContext, | ||
| uint8_t * | ct, | ||
| uint8_t * | ss, | ||
| const uint8_t * | pk | ||
| ) | 
Encapsulation algorithm.
- Parameters
 - 
  
[in] prngAlgo PRNG algorithm [in] prngContext Pointer to the PRNG context [out] ct Ciphertext [out] ss Shared secret [in] pk Public key  
- Returns
 - Error code
 
Definition at line 90 of file mlkem512.c.
◆ mlkem512GenerateKeyPair()
| error_t mlkem512GenerateKeyPair | ( | const PrngAlgo * | prngAlgo, | 
| void * | prngContext, | ||
| uint8_t * | pk, | ||
| uint8_t * | sk | ||
| ) | 
Key pair generation.
- Parameters
 - 
  
[in] prngAlgo PRNG algorithm [in] prngContext Pointer to the PRNG context [out] pk Public key [out] sk Secret key  
- Returns
 - Error code
 
Definition at line 67 of file mlkem512.c.
Variable Documentation
◆ mlkem512KemAlgo
      
  | 
  extern | 
Definition at line 45 of file mlkem512.c.
