i.MX RT1180 public-key hardware accelerator More...
#include "fsl_device_registers.h"
#include "ele_crypto.h"
#include "core/crypto.h"
#include "hardware/mimxrt1180/mimxrt1180_crypto.h"
#include "hardware/mimxrt1180/mimxrt1180_crypto_pkc.h"
#include "pkc/rsa.h"
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | TRACE_LEVEL CRYPTO_TRACE_LEVEL |
Functions | |
SDK_ALIGN (static EleRsaArgs eleRsaArgs, 8) | |
error_t | rsaGeneratePrivateKey (const PrngAlgo *prngAlgo, void *prngContext, size_t k, uint_t e, RsaPrivateKey *privateKey) |
RSA private key generation. More... | |
error_t | rsaesPkcs1v15Encrypt (const PrngAlgo *prngAlgo, void *prngContext, const RsaPublicKey *key, const uint8_t *message, size_t messageLen, uint8_t *ciphertext, size_t *ciphertextLen) |
RSAES-PKCS1-v1_5 encryption operation. More... | |
error_t | rsaesPkcs1v15Decrypt (const RsaPrivateKey *key, const uint8_t *ciphertext, size_t ciphertextLen, uint8_t *message, size_t messageSize, size_t *messageLen) |
RSAES-PKCS1-v1_5 decryption operation. More... | |
error_t | rsaesOaepEncrypt (const PrngAlgo *prngAlgo, void *prngContext, const RsaPublicKey *key, const HashAlgo *hash, const char_t *label, const uint8_t *message, size_t messageLen, uint8_t *ciphertext, size_t *ciphertextLen) |
RSAES-OAEP encryption operation. More... | |
error_t | rsaesOaepDecrypt (const RsaPrivateKey *key, const HashAlgo *hash, const char_t *label, const uint8_t *ciphertext, size_t ciphertextLen, uint8_t *message, size_t messageSize, size_t *messageLen) |
RSAES-OAEP decryption operation. More... | |
error_t | rsassaPkcs1v15Sign (const RsaPrivateKey *key, const HashAlgo *hash, const uint8_t *digest, uint8_t *signature, size_t *signatureLen) |
RSASSA-PKCS1-v1_5 signature generation operation. More... | |
error_t | rsassaPkcs1v15Verify (const RsaPublicKey *key, const HashAlgo *hash, const uint8_t *digest, const uint8_t *signature, size_t signatureLen) |
RSASSA-PKCS1-v1_5 signature verification operation. More... | |
error_t | rsassaPssSign (const PrngAlgo *prngAlgo, void *prngContext, const RsaPrivateKey *key, const HashAlgo *hash, size_t saltLen, const uint8_t *digest, uint8_t *signature, size_t *signatureLen) |
RSASSA-PSS signature generation operation. More... | |
error_t | rsassaPssVerify (const RsaPublicKey *key, const HashAlgo *hash, size_t saltLen, const uint8_t *digest, const uint8_t *signature, size_t signatureLen) |
RSASSA-PSS signature verification operation. More... | |
Detailed Description
i.MX RT1180 public-key hardware accelerator
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 mimxrt1180_crypto_pkc.c.
Macro Definition Documentation
◆ TRACE_LEVEL
#define TRACE_LEVEL CRYPTO_TRACE_LEVEL |
Definition at line 32 of file mimxrt1180_crypto_pkc.c.
Function Documentation
◆ rsaesOaepDecrypt()
error_t rsaesOaepDecrypt | ( | const RsaPrivateKey * | key, |
const HashAlgo * | hash, | ||
const char_t * | label, | ||
const uint8_t * | ciphertext, | ||
size_t | ciphertextLen, | ||
uint8_t * | message, | ||
size_t | messageSize, | ||
size_t * | messageLen | ||
) |
RSAES-OAEP decryption operation.
- Parameters
-
[in] key Recipient's RSA private key [in] hash Underlying hash function [in] label Optional label to be associated with the message [in] ciphertext Ciphertext to be decrypted [in] ciphertextLen Length of the ciphertext to be decrypted [out] message Output buffer where to store the decrypted message [in] messageSize Size of the output buffer [out] messageLen Length of the decrypted message
- Returns
- Error code
Definition at line 537 of file mimxrt1180_crypto_pkc.c.
◆ rsaesOaepEncrypt()
error_t rsaesOaepEncrypt | ( | const PrngAlgo * | prngAlgo, |
void * | prngContext, | ||
const RsaPublicKey * | key, | ||
const HashAlgo * | hash, | ||
const char_t * | label, | ||
const uint8_t * | message, | ||
size_t | messageLen, | ||
uint8_t * | ciphertext, | ||
size_t * | ciphertextLen | ||
) |
RSAES-OAEP encryption operation.
- Parameters
-
[in] prngAlgo PRNG algorithm [in] prngContext Pointer to the PRNG context [in] key Recipient's RSA public key [in] hash Underlying hash function [in] label Optional label to be associated with the message [in] message Message to be encrypted [in] messageLen Length of the message to be encrypted [out] ciphertext Ciphertext resulting from the encryption operation [out] ciphertextLen Length of the resulting ciphertext
- Returns
- Error code
Definition at line 398 of file mimxrt1180_crypto_pkc.c.
◆ rsaesPkcs1v15Decrypt()
error_t rsaesPkcs1v15Decrypt | ( | const RsaPrivateKey * | key, |
const uint8_t * | ciphertext, | ||
size_t | ciphertextLen, | ||
uint8_t * | message, | ||
size_t | messageSize, | ||
size_t * | messageLen | ||
) |
RSAES-PKCS1-v1_5 decryption operation.
- Parameters
-
[in] key Recipient's RSA private key [in] ciphertext Ciphertext to be decrypted [in] ciphertextLen Length of the ciphertext to be decrypted [out] message Output buffer where to store the decrypted message [in] messageSize Size of the output buffer [out] messageLen Length of the decrypted message
- Returns
- Error code
Definition at line 293 of file mimxrt1180_crypto_pkc.c.
◆ rsaesPkcs1v15Encrypt()
error_t rsaesPkcs1v15Encrypt | ( | const PrngAlgo * | prngAlgo, |
void * | prngContext, | ||
const RsaPublicKey * | key, | ||
const uint8_t * | message, | ||
size_t | messageLen, | ||
uint8_t * | ciphertext, | ||
size_t * | ciphertextLen | ||
) |
RSAES-PKCS1-v1_5 encryption operation.
- Parameters
-
[in] prngAlgo PRNG algorithm [in] prngContext Pointer to the PRNG context [in] key Recipient's RSA public key [in] message Message to be encrypted [in] messageLen Length of the message to be encrypted [out] ciphertext Ciphertext resulting from the encryption operation [out] ciphertextLen Length of the resulting ciphertext
- Returns
- Error code
Definition at line 198 of file mimxrt1180_crypto_pkc.c.
◆ rsaGeneratePrivateKey()
error_t rsaGeneratePrivateKey | ( | const PrngAlgo * | prngAlgo, |
void * | prngContext, | ||
size_t | k, | ||
uint_t | e, | ||
RsaPrivateKey * | privateKey | ||
) |
RSA private key generation.
- Parameters
-
[in] prngAlgo PRNG algorithm [in] prngContext Pointer to the PRNG context [in] k Required bit length of the modulus n [in] e Public exponent (3, 5, 17, 257 or 65537) [out] privateKey RSA private key
- Returns
- Error code
Definition at line 62 of file mimxrt1180_crypto_pkc.c.
◆ rsassaPkcs1v15Sign()
error_t rsassaPkcs1v15Sign | ( | const RsaPrivateKey * | key, |
const HashAlgo * | hash, | ||
const uint8_t * | digest, | ||
uint8_t * | signature, | ||
size_t * | signatureLen | ||
) |
RSASSA-PKCS1-v1_5 signature generation operation.
- Parameters
-
[in] key Signer's RSA private key [in] hash Hash function used to digest the message [in] digest Digest of the message to be signed [out] signature Resulting signature [out] signatureLen Length of the resulting signature
- Returns
- Error code
Definition at line 679 of file mimxrt1180_crypto_pkc.c.
◆ rsassaPkcs1v15Verify()
error_t rsassaPkcs1v15Verify | ( | const RsaPublicKey * | key, |
const HashAlgo * | hash, | ||
const uint8_t * | digest, | ||
const uint8_t * | signature, | ||
size_t | signatureLen | ||
) |
RSASSA-PKCS1-v1_5 signature verification operation.
- Parameters
-
[in] key Signer's RSA public key [in] hash Hash function used to digest the message [in] digest Digest of the message whose signature is to be verified [in] signature Signature to be verified [in] signatureLen Length of the signature to be verified
- Returns
- Error code
Definition at line 793 of file mimxrt1180_crypto_pkc.c.
◆ rsassaPssSign()
error_t rsassaPssSign | ( | const PrngAlgo * | prngAlgo, |
void * | prngContext, | ||
const RsaPrivateKey * | key, | ||
const HashAlgo * | hash, | ||
size_t | saltLen, | ||
const uint8_t * | digest, | ||
uint8_t * | signature, | ||
size_t * | signatureLen | ||
) |
RSASSA-PSS signature generation operation.
- Parameters
-
[in] prngAlgo PRNG algorithm [in] prngContext Pointer to the PRNG context [in] key Signer's RSA private key [in] hash Hash function used to digest the message [in] saltLen Length of the salt, in bytes [in] digest Digest of the message to be signed [out] signature Resulting signature [out] signatureLen Length of the resulting signature
- Returns
- Error code
Definition at line 916 of file mimxrt1180_crypto_pkc.c.
◆ rsassaPssVerify()
error_t rsassaPssVerify | ( | const RsaPublicKey * | key, |
const HashAlgo * | hash, | ||
size_t | saltLen, | ||
const uint8_t * | digest, | ||
const uint8_t * | signature, | ||
size_t | signatureLen | ||
) |
RSASSA-PSS signature verification operation.
- Parameters
-
[in] key Signer's RSA public key [in] hash Hash function used to digest the message [in] saltLen Length of the salt, in bytes [in] digest Digest of the message whose signature is to be verified [in] signature Signature to be verified [in] signatureLen Length of the signature to be verified
- Returns
- Error code
Definition at line 1032 of file mimxrt1180_crypto_pkc.c.
◆ SDK_ALIGN()
SDK_ALIGN | ( | static EleRsaArgs | eleRsaArgs, |
8 | |||
) |