PKCS #5 common definitions. More...
#include "core/crypto.h"
Go to the source code of this file.
Data Structures | |
struct | Pkcs5OctetString |
Octet string. More... | |
struct | Pkcs5Pbes1Params |
PBES1 parameters. More... | |
struct | Pkcs5KeyDerivationFunc |
Key derivation function. More... | |
struct | Pkcs5EncryptionScheme |
Encryption scheme. More... | |
struct | Pkcs5Pbes2Params |
PBES2 parameters. More... | |
Macros | |
#define | PKCS5_RC2_SUPPORT DISABLED |
#define | PKCS5_DES_SUPPORT DISABLED |
#define | PKCS5_3DES_SUPPORT DISABLED |
#define | PKCS5_AES_SUPPORT ENABLED |
#define | PKCS5_CAMELLIA_SUPPORT DISABLED |
#define | PKCS5_ARIA_SUPPORT DISABLED |
#define | PKCS5_SM4_SUPPORT DISABLED |
#define | PKCS5_MD2_SUPPORT DISABLED |
#define | PKCS5_MD5_SUPPORT DISABLED |
#define | PKCS5_SHA1_SUPPORT DISABLED |
#define | PKCS5_SHA224_SUPPORT DISABLED |
#define | PKCS5_SHA256_SUPPORT ENABLED |
#define | PKCS5_SHA384_SUPPORT ENABLED |
#define | PKCS5_SHA512_SUPPORT ENABLED |
#define | PKCS5_SHA512_224_SUPPORT DISABLED |
#define | PKCS5_SHA512_256_SUPPORT DISABLED |
#define | PKCS5_SM3_SUPPORT DISABLED |
Functions | |
const HashAlgo * | pkcs5GetPbes1HashAlgo (const uint8_t *oid, size_t length) |
Get the hash algorithm to be used for PBES1 operation. More... | |
const HashAlgo * | pkcs5GetPbes2HashAlgo (const uint8_t *oid, size_t length) |
Get the hash algorithm to be used for PBES2 operation. More... | |
const CipherAlgo * | pkcs5GetPbes1CipherAlgo (const uint8_t *oid, size_t length) |
Get the cipher algorithm to be used for PBES1 operation. More... | |
const CipherAlgo * | pkcs5GetPbes2CipherAlgo (const uint8_t *oid, size_t length) |
Get the cipher algorithm to be used for PBES2 operation. More... | |
uint_t | pkcs5GetPbes2KeyLength (const uint8_t *oid, size_t length) |
Get the encryption key length to be used for PBES2 operation. More... | |
Variables | |
const uint8_t | PBE_WITH_MD2_AND_DES_CBC_OID [9] |
const uint8_t | PBE_WITH_MD5_AND_DES_CBC_OID [9] |
const uint8_t | PBE_WITH_MD2_AND_RC2_CBC_OID [9] |
const uint8_t | PBE_WITH_MD5_AND_RC2_CBC_OID [9] |
const uint8_t | PBE_WITH_SHA1_AND_DES_CBC_OID [9] |
const uint8_t | PBE_WITH_SHA1_AND_RC2_CBC_OID [9] |
const uint8_t | PBES2_OID [9] |
Detailed Description
PKCS #5 common definitions.
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 pkcs5_common.h.
Macro Definition Documentation
◆ PKCS5_3DES_SUPPORT
#define PKCS5_3DES_SUPPORT DISABLED |
Definition at line 53 of file pkcs5_common.h.
◆ PKCS5_AES_SUPPORT
#define PKCS5_AES_SUPPORT ENABLED |
Definition at line 60 of file pkcs5_common.h.
◆ PKCS5_ARIA_SUPPORT
#define PKCS5_ARIA_SUPPORT DISABLED |
Definition at line 74 of file pkcs5_common.h.
◆ PKCS5_CAMELLIA_SUPPORT
#define PKCS5_CAMELLIA_SUPPORT DISABLED |
Definition at line 67 of file pkcs5_common.h.
◆ PKCS5_DES_SUPPORT
#define PKCS5_DES_SUPPORT DISABLED |
Definition at line 46 of file pkcs5_common.h.
◆ PKCS5_MD2_SUPPORT
#define PKCS5_MD2_SUPPORT DISABLED |
Definition at line 88 of file pkcs5_common.h.
◆ PKCS5_MD5_SUPPORT
#define PKCS5_MD5_SUPPORT DISABLED |
Definition at line 95 of file pkcs5_common.h.
◆ PKCS5_RC2_SUPPORT
#define PKCS5_RC2_SUPPORT DISABLED |
Definition at line 39 of file pkcs5_common.h.
◆ PKCS5_SHA1_SUPPORT
#define PKCS5_SHA1_SUPPORT DISABLED |
Definition at line 102 of file pkcs5_common.h.
◆ PKCS5_SHA224_SUPPORT
#define PKCS5_SHA224_SUPPORT DISABLED |
Definition at line 109 of file pkcs5_common.h.
◆ PKCS5_SHA256_SUPPORT
#define PKCS5_SHA256_SUPPORT ENABLED |
Definition at line 116 of file pkcs5_common.h.
◆ PKCS5_SHA384_SUPPORT
#define PKCS5_SHA384_SUPPORT ENABLED |
Definition at line 123 of file pkcs5_common.h.
◆ PKCS5_SHA512_224_SUPPORT
#define PKCS5_SHA512_224_SUPPORT DISABLED |
Definition at line 137 of file pkcs5_common.h.
◆ PKCS5_SHA512_256_SUPPORT
#define PKCS5_SHA512_256_SUPPORT DISABLED |
Definition at line 144 of file pkcs5_common.h.
◆ PKCS5_SHA512_SUPPORT
#define PKCS5_SHA512_SUPPORT ENABLED |
Definition at line 130 of file pkcs5_common.h.
◆ PKCS5_SM3_SUPPORT
#define PKCS5_SM3_SUPPORT DISABLED |
Definition at line 151 of file pkcs5_common.h.
◆ PKCS5_SM4_SUPPORT
#define PKCS5_SM4_SUPPORT DISABLED |
Definition at line 81 of file pkcs5_common.h.
Function Documentation
◆ pkcs5GetPbes1CipherAlgo()
const CipherAlgo* pkcs5GetPbes1CipherAlgo | ( | const uint8_t * | oid, |
size_t | length | ||
) |
Get the cipher algorithm to be used for PBES1 operation.
- Parameters
-
[in] oid Encryption algorithm identifier [in] length Length of the encryption algorithm identifier, in bytes
- Returns
- Cipher algorithm
Definition at line 222 of file pkcs5_common.c.
◆ pkcs5GetPbes1HashAlgo()
const HashAlgo* pkcs5GetPbes1HashAlgo | ( | const uint8_t * | oid, |
size_t | length | ||
) |
Get the hash algorithm to be used for PBES1 operation.
- Parameters
-
[in] oid Encryption algorithm identifier [in] length Length of the encryption algorithm identifier, in bytes
- Returns
- Hash algorithm
Definition at line 69 of file pkcs5_common.c.
◆ pkcs5GetPbes2CipherAlgo()
const CipherAlgo* pkcs5GetPbes2CipherAlgo | ( | const uint8_t * | oid, |
size_t | length | ||
) |
Get the cipher algorithm to be used for PBES2 operation.
- Parameters
-
[in] oid Encryption algorithm identifier [in] length Length of the encryption algorithm identifier, in bytes
- Returns
- Cipher algorithm
Definition at line 285 of file pkcs5_common.c.
◆ pkcs5GetPbes2HashAlgo()
const HashAlgo* pkcs5GetPbes2HashAlgo | ( | const uint8_t * | oid, |
size_t | length | ||
) |
Get the hash algorithm to be used for PBES2 operation.
- Parameters
-
[in] oid KDF algorithm identifier [in] length Length of the KDF algorithm identifier, in bytes
- Returns
- Hash algorithm
Definition at line 135 of file pkcs5_common.c.
◆ pkcs5GetPbes2KeyLength()
uint_t pkcs5GetPbes2KeyLength | ( | const uint8_t * | oid, |
size_t | length | ||
) |
Get the encryption key length to be used for PBES2 operation.
- Parameters
-
[in] oid Encryption algorithm identifier [in] length Length of the encryption algorithm identifier, in bytes
- Returns
- Encryption key length
Definition at line 384 of file pkcs5_common.c.
Variable Documentation
◆ PBE_WITH_MD2_AND_DES_CBC_OID
|
extern |
Definition at line 46 of file pkcs5_common.c.
◆ PBE_WITH_MD2_AND_RC2_CBC_OID
|
extern |
Definition at line 50 of file pkcs5_common.c.
◆ PBE_WITH_MD5_AND_DES_CBC_OID
|
extern |
Definition at line 48 of file pkcs5_common.c.
◆ PBE_WITH_MD5_AND_RC2_CBC_OID
|
extern |
Definition at line 52 of file pkcs5_common.c.
◆ PBE_WITH_SHA1_AND_DES_CBC_OID
|
extern |
Definition at line 54 of file pkcs5_common.c.
◆ PBE_WITH_SHA1_AND_RC2_CBC_OID
|
extern |
Definition at line 56 of file pkcs5_common.c.
◆ PBES2_OID
|
extern |
Definition at line 59 of file pkcs5_common.c.