DES (Data Encryption Standard) More...
Go to the source code of this file.
Macros | |
| #define | TRACE_LEVEL CRYPTO_TRACE_LEVEL |
| #define | ROL28(a, n) ((((a) << (n)) | ((a) >> (28 - (n)))) & 0x0FFFFFFF) |
| #define | SWAPMOVE(a, b, n, m) |
| #define | IP(l, r) |
| #define | IP_INV(l, r) |
| #define | PC1(c, d) |
| #define | PC2_L(c, d) |
| #define | PC2_R(c, d) |
| #define | ROUND(l, r, k1, k2) |
Functions | |
| __weak_func error_t | desInit (DesContext *context, const uint8_t *key, size_t keyLen) |
| Initialize a DES context using the supplied key. More... | |
| __weak_func void | desEncryptBlock (DesContext *context, const uint8_t *input, uint8_t *output) |
| Encrypt a 8-byte block using DES algorithm. More... | |
| __weak_func void | desDecryptBlock (DesContext *context, const uint8_t *input, uint8_t *output) |
| Decrypt a 8-byte block using DES algorithm. More... | |
| __weak_func void | desDeinit (DesContext *context) |
| Release DES context. More... | |
| void | desComputeKeyParity (const uint8_t *input, uint8_t *output) |
| Convert a 56-bit key to a 64-bit key (with odd parity) More... | |
| void | desFixKeyParity (uint8_t *key) |
| Fix key parity. More... | |
| bool_t | desCheckKeyParity (const uint8_t *key) |
| Check key parity. More... | |
Variables | |
| const uint8_t | DES_CBC_OID [5] = {0x2B, 0x0E, 0x03, 0x02, 0x07} |
| const CipherAlgo | desCipherAlgo |
Detailed Description
DES (Data Encryption Standard)
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.
Description
DES is an encryption algorithm designed to encipher and decipher blocks of 64 bits under control of a 64-bit key. Refer to FIPS 46-3 for more details
- Version
- 2.5.4
Definition in file des.c.
Macro Definition Documentation
◆ IP
◆ IP_INV
◆ PC1
| #define PC1 | ( | c, | |
| d | |||
| ) |
◆ PC2_L
| #define PC2_L | ( | c, | |
| d | |||
| ) |
◆ PC2_R
| #define PC2_R | ( | c, | |
| d | |||
| ) |
◆ ROL28
◆ ROUND
◆ SWAPMOVE
◆ TRACE_LEVEL
Function Documentation
◆ desCheckKeyParity()
| bool_t desCheckKeyParity | ( | const uint8_t * | key | ) |
◆ desComputeKeyParity()
| void desComputeKeyParity | ( | const uint8_t * | input, |
| uint8_t * | output | ||
| ) |
◆ desDecryptBlock()
| __weak_func void desDecryptBlock | ( | DesContext * | context, |
| const uint8_t * | input, | ||
| uint8_t * | output | ||
| ) |
◆ desDeinit()
| __weak_func void desDeinit | ( | DesContext * | context | ) |
◆ desEncryptBlock()
| __weak_func void desEncryptBlock | ( | DesContext * | context, |
| const uint8_t * | input, | ||
| uint8_t * | output | ||
| ) |
◆ desFixKeyParity()
| void desFixKeyParity | ( | uint8_t * | key | ) |
◆ desInit()
| __weak_func error_t desInit | ( | DesContext * | context, |
| const uint8_t * | key, | ||
| size_t | keyLen | ||
| ) |
Variable Documentation
◆ DES_CBC_OID
◆ desCipherAlgo
| const CipherAlgo desCipherAlgo |
