Kinetis K6x cipher hardware accelerator. More...
#include "fsl_device_registers.h"
#include "fsl_mmcau.h"
#include "core/crypto.h"
#include "hardware/mk6x/mk6x_crypto.h"
#include "hardware/mk6x/mk6x_crypto_cipher.h"
#include "cipher/cipher_algorithms.h"
#include "debug.h"
Go to the source code of this file.
Macros | |
#define | TRACE_LEVEL CRYPTO_TRACE_LEVEL |
Functions | |
error_t | desInit (DesContext *context, const uint8_t *key, size_t keyLen) |
Initialize a DES context using the supplied key. More... | |
void | desEncryptBlock (DesContext *context, const uint8_t *input, uint8_t *output) |
Encrypt a 8-byte block using DES algorithm. More... | |
void | desDecryptBlock (DesContext *context, const uint8_t *input, uint8_t *output) |
Decrypt a 8-byte block using DES algorithm. More... | |
void | des3EncryptBlock (Des3Context *context, const uint8_t *input, uint8_t *output) |
Encrypt a 8-byte block using Triple DES algorithm. More... | |
void | des3DecryptBlock (Des3Context *context, const uint8_t *input, uint8_t *output) |
Decrypt a 8-byte block using Triple DES algorithm. More... | |
error_t | aesInit (AesContext *context, const uint8_t *key, size_t keyLen) |
Key expansion. More... | |
void | aesEncryptBlock (AesContext *context, const uint8_t *input, uint8_t *output) |
Encrypt a 16-byte block using AES algorithm. More... | |
void | aesDecryptBlock (AesContext *context, const uint8_t *input, uint8_t *output) |
Decrypt a 16-byte block using AES algorithm. More... | |
Detailed Description
Kinetis K6x cipher hardware accelerator.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 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.4.4
Definition in file mk6x_crypto_cipher.c.
Macro Definition Documentation
◆ TRACE_LEVEL
#define TRACE_LEVEL CRYPTO_TRACE_LEVEL |
Definition at line 32 of file mk6x_crypto_cipher.c.
Function Documentation
◆ aesDecryptBlock()
void aesDecryptBlock | ( | AesContext * | context, |
const uint8_t * | input, | ||
uint8_t * | output | ||
) |
Decrypt a 16-byte block using AES algorithm.
- Parameters
-
[in] context Pointer to the AES context [in] input Ciphertext block to decrypt [out] output Plaintext block resulting from decryption
Definition at line 264 of file mk6x_crypto_cipher.c.
◆ aesEncryptBlock()
void aesEncryptBlock | ( | AesContext * | context, |
const uint8_t * | input, | ||
uint8_t * | output | ||
) |
Encrypt a 16-byte block using AES algorithm.
- Parameters
-
[in] context Pointer to the AES context [in] input Plaintext block to encrypt [out] output Ciphertext block resulting from encryption
Definition at line 238 of file mk6x_crypto_cipher.c.
◆ aesInit()
error_t aesInit | ( | AesContext * | context, |
const uint8_t * | key, | ||
size_t | keyLen | ||
) |
Key expansion.
- Parameters
-
[in] context Pointer to the AES context to initialize [in] key Pointer to the key [in] keyLen Length of the key
- Returns
- Error code
Definition at line 189 of file mk6x_crypto_cipher.c.
◆ des3DecryptBlock()
void des3DecryptBlock | ( | Des3Context * | context, |
const uint8_t * | input, | ||
uint8_t * | output | ||
) |
Decrypt a 8-byte block using Triple DES algorithm.
- Parameters
-
[in] context Pointer to the Triple DES context [in] input Ciphertext block to decrypt [out] output Plaintext block resulting from decryption
Definition at line 157 of file mk6x_crypto_cipher.c.
◆ des3EncryptBlock()
void des3EncryptBlock | ( | Des3Context * | context, |
const uint8_t * | input, | ||
uint8_t * | output | ||
) |
Encrypt a 8-byte block using Triple DES algorithm.
- Parameters
-
[in] context Pointer to the Triple DES context [in] input Plaintext block to encrypt [out] output Ciphertext block resulting from encryption
Definition at line 128 of file mk6x_crypto_cipher.c.
◆ desDecryptBlock()
void desDecryptBlock | ( | DesContext * | context, |
const uint8_t * | input, | ||
uint8_t * | output | ||
) |
Decrypt a 8-byte block using DES algorithm.
- Parameters
-
[in] context Pointer to the DES context [in] input Ciphertext block to decrypt [out] output Plaintext block resulting from decryption
Definition at line 103 of file mk6x_crypto_cipher.c.
◆ desEncryptBlock()
void desEncryptBlock | ( | DesContext * | context, |
const uint8_t * | input, | ||
uint8_t * | output | ||
) |
Encrypt a 8-byte block using DES algorithm.
- Parameters
-
[in] context Pointer to the DES context [in] input Plaintext block to encrypt [out] output Ciphertext block resulting from encryption
Definition at line 80 of file mk6x_crypto_cipher.c.
◆ desInit()
error_t desInit | ( | DesContext * | context, |
const uint8_t * | key, | ||
size_t | keyLen | ||
) |
Initialize a DES context using the supplied key.
- Parameters
-
[in] context Pointer to the DES context to initialize [in] key Pointer to the key [in] keyLen Length of the key (must be set to 8)
- Returns
- Error code
Definition at line 55 of file mk6x_crypto_cipher.c.