XEX-based tweaked-codebook mode with ciphertext stealing (XTS) More...
Go to the source code of this file.
Macros | |
#define | TRACE_LEVEL CRYPTO_TRACE_LEVEL |
Functions | |
error_t | xtsInit (XtsContext *context, const CipherAlgo *cipherAlgo, const void *key, size_t keyLen) |
Initialize XTS context. More... | |
error_t | xtsEncrypt (XtsContext *context, const uint8_t *i, const uint8_t *p, uint8_t *c, size_t length) |
Encrypt a data unit using XTS. More... | |
error_t | xtsDecrypt (XtsContext *context, const uint8_t *i, const uint8_t *c, uint8_t *p, size_t length) |
Decrypt a data unit using XTS. More... | |
void | xtsMul (uint8_t *x, const uint8_t *a) |
Multiplication by x in GF(2^128) More... | |
void | xtsXorBlock (uint8_t *x, const uint8_t *a, const uint8_t *b) |
XOR operation. More... | |
Detailed Description
XEX-based tweaked-codebook mode with ciphertext stealing (XTS)
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.
Description
XTS is a tweakable block cipher designed for encryption of sector-based storage. Refer to IEEE Std 1619 and SP 800-38E for more details
- Version
- 2.4.4
Definition in file xts.c.
Macro Definition Documentation
◆ TRACE_LEVEL
Function Documentation
◆ xtsDecrypt()
error_t xtsDecrypt | ( | XtsContext * | context, |
const uint8_t * | i, | ||
const uint8_t * | c, | ||
uint8_t * | p, | ||
size_t | length | ||
) |
Decrypt a data unit using XTS.
- Parameters
-
[in] context Pointer to the XTS context [in] i Value of the 128-bit tweak [in] c Pointer to the data unit to be decrypted (ciphertext) [out] p Pointer to the resulting data unit (plaintext) [in] length Length of the data unit, in bytes
- Returns
- Error code
◆ xtsEncrypt()
error_t xtsEncrypt | ( | XtsContext * | context, |
const uint8_t * | i, | ||
const uint8_t * | p, | ||
uint8_t * | c, | ||
size_t | length | ||
) |
Encrypt a data unit using XTS.
- Parameters
-
[in] context Pointer to the XTS context [in] i Value of the 128-bit tweak [in] p Pointer to the data unit to be encrypted (plaintext) [out] c Pointer to the resulting data unit (ciphertext) [in] length Length of the data unit, in bytes
- Returns
- Error code
◆ xtsInit()
error_t xtsInit | ( | XtsContext * | context, |
const CipherAlgo * | cipherAlgo, | ||
const void * | key, | ||
size_t | keyLen | ||
) |
◆ xtsMul()
void xtsMul | ( | uint8_t * | x, |
const uint8_t * | a | ||
) |