ID Chip Reader
|
Triple DES (3DES) encryption and decryption library header file. More...
#include "typedef.h"
Go to the source code of this file.
Data Structures | |
struct | des_context |
Macros | |
#define | CRYPTOGRAPHY_DES3_H_ |
#define | MBEDTLS_DES_ENCRYPT 1 |
#define | MBEDTLS_DES_DECRYPT 0 |
#define | MBEDTLS_ERR_DES_INVALID_INPUT_LENGTH 0 |
#define | USE_DES_EN 1 |
#define | USE_DES_ECB_EN 1 |
#define | USE_DES_CBC_EN 0 |
#define | USE_3DES_EN 1 |
#define | USE_3DES_ECB_EN 0 |
#define | USE_3DES_CBC_EN 1 |
#define | DES_INPUT_LENGTH -0x0002 |
#define | MBEDTLS_DES_KEY_SIZE 8 |
#define | DES_KEY_SIZE (8) |
#define | DES3_KEY2_SIZE (16) |
#define | DES3_KEY3_SIZE (24) |
Functions | |
unsigned int | des_ecb_encrypt (unsigned char *pout, unsigned char *pdata, unsigned int nlen, unsigned char *pkey) |
unsigned int | des_ecb_decrypt (unsigned char *pout, unsigned char *pdata, unsigned int nlen, unsigned char *pkey) |
unsigned int | des3_cbc_encrypt (unsigned char *pout, unsigned char *pdata, unsigned int nlen, unsigned char *pkey, unsigned int klen, unsigned char *piv) |
unsigned int | des3_cbc_decrypt (unsigned char *pout, unsigned char *pdata, unsigned int nlen, unsigned char *pkey, unsigned int klen, unsigned char *piv) |
Triple DES (3DES) encryption and decryption library header file.
This header file provides APIs for Triple DES (3DES) encryption and decryption operations. The library supports both DES and 3DES algorithms, as well as Electronic Codebook (ECB) and Cipher Block Chaining (CBC) modes.
Supported algorithms and modes:
#define CRYPTOGRAPHY_DES3_H_ |
#define DES3_KEY2_SIZE (16) |
#define DES3_KEY3_SIZE (24) |
#define DES_INPUT_LENGTH -0x0002 |
#define DES_KEY_SIZE (8) |
#define MBEDTLS_DES_DECRYPT 0 |
#define MBEDTLS_DES_ENCRYPT 1 |
#define MBEDTLS_DES_KEY_SIZE 8 |
#define MBEDTLS_ERR_DES_INVALID_INPUT_LENGTH 0 |
#define USE_3DES_CBC_EN 1 |
#define USE_3DES_ECB_EN 0 |
#define USE_3DES_EN 1 |
#define USE_DES_CBC_EN 0 |
#define USE_DES_ECB_EN 1 |
#define USE_DES_EN 1 |
unsigned int des3_cbc_decrypt | ( | unsigned char * | pout, |
unsigned char * | pdata, | ||
unsigned int | nlen, | ||
unsigned char * | pkey, | ||
unsigned int | klen, | ||
unsigned char * | piv | ||
) |
unsigned int des3_cbc_encrypt | ( | unsigned char * | pout, |
unsigned char * | pdata, | ||
unsigned int | nlen, | ||
unsigned char * | pkey, | ||
unsigned int | klen, | ||
unsigned char * | piv | ||
) |
unsigned int des_ecb_decrypt | ( | unsigned char * | pout, |
unsigned char * | pdata, | ||
unsigned int | nlen, | ||
unsigned char * | pkey | ||
) |
unsigned int des_ecb_encrypt | ( | unsigned char * | pout, |
unsigned char * | pdata, | ||
unsigned int | nlen, | ||
unsigned char * | pkey | ||
) |