XTEA (eXtended TEA) More...
#include "core/crypto.h"
Go to the source code of this file.
Data Structures | |
struct | XteaContext |
XTEA algorithm context. More... | |
Macros | |
#define | XTEA_PRIVATE_CONTEXT |
#define | XTEA_BLOCK_SIZE 8 |
#define | XTEA_NB_ROUNDS 32 |
#define | XTEA_CIPHER_ALGO (&xteaCipherAlgo) |
Functions | |
error_t | xteaInit (XteaContext *context, const uint8_t *key, size_t keyLen) |
Key expansion. More... | |
void | xteaEncryptBlock (XteaContext *context, const uint8_t *input, uint8_t *output) |
Encrypt a 16-byte block using XTEA algorithm. More... | |
void | xteaDecryptBlock (XteaContext *context, const uint8_t *input, uint8_t *output) |
Decrypt a 16-byte block using XTEA algorithm. More... | |
void | xteaDeinit (XteaContext *context) |
Release XTEA context. More... | |
Variables | |
const CipherAlgo | xteaCipherAlgo |
Detailed Description
XTEA (eXtended TEA)
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 xtea.h.
Macro Definition Documentation
◆ XTEA_BLOCK_SIZE
◆ XTEA_CIPHER_ALGO
#define XTEA_CIPHER_ALGO (&xteaCipherAlgo) |
◆ XTEA_NB_ROUNDS
◆ XTEA_PRIVATE_CONTEXT
Function Documentation
◆ xteaDecryptBlock()
void xteaDecryptBlock | ( | XteaContext * | context, |
const uint8_t * | input, | ||
uint8_t * | output | ||
) |
Decrypt a 16-byte block using XTEA algorithm.
- Parameters
-
[in] context Pointer to the XTEA context [in] input Ciphertext block to decrypt [out] output Plaintext block resulting from decryption
Decrypt a 16-byte block using XTEA algorithm.
- Parameters
-
[in] context Pointer to the XTEA context [in] input Ciphertext block to decrypt [out] output Plaintext block resulting from decryption
◆ xteaDeinit()
void xteaDeinit | ( | XteaContext * | context | ) |
◆ xteaEncryptBlock()
void xteaEncryptBlock | ( | XteaContext * | context, |
const uint8_t * | input, | ||
uint8_t * | output | ||
) |
Encrypt a 16-byte block using XTEA algorithm.
- Parameters
-
[in] context Pointer to the XTEA context [in] input Plaintext block to encrypt [out] output Ciphertext block resulting from encryption
Encrypt a 16-byte block using XTEA algorithm.
- Parameters
-
[in] context Pointer to the XTEA context [in] input Plaintext block to encrypt [out] output Ciphertext block resulting from encryption
◆ xteaInit()
error_t xteaInit | ( | XteaContext * | context, |
const uint8_t * | key, | ||
size_t | keyLen | ||
) |
Key expansion.
- Parameters
-
[in] context Pointer to the XTEA context to initialize [in] key Pointer to the key [in] keyLen Length of the key
- Returns
- Error code
Key expansion.
- Parameters
-
[in] context Pointer to the XTEA context to initialize [in] key Pointer to the key [in] keyLen Length of the key (must be set to 16)
- Returns
- Error code
Variable Documentation
◆ xteaCipherAlgo
|
extern |