Data Structures | Typedefs | Enumerations | Functions | Variables
des3.h File Reference

Go to the source code of this file.

Data Structures

struct  Des
 
struct  Des3
 

Typedefs

typedef struct Des Des
 
typedef struct Des3 Des3
 

Enumerations

enum  {
  DES_ENC_TYPE = WC_CIPHER_DES, DES3_ENC_TYPE = WC_CIPHER_DES3, DES_BLOCK_SIZE = 8, DES_KS_SIZE = 32,
  DES_ENCRYPTION = 0, DES_DECRYPTION = 1
}
 
enum  { DES_CBC = 0, DES_ECB = 1 }
 

Functions

WOLFSSL_API int wc_Des_SetKey (Des *des, const byte *key, const byte *iv, int dir)
 This function sets the key and initialization vector (iv) for the Des structure given as argument. It also initializes and allocates space for the buffers needed for encryption and decryption, if these have not yet been initialized. Note: If no iv is provided (i.e. iv == NULL) the initialization vector defaults to an iv of 0. More...
 
WOLFSSL_API void wc_Des_SetIV (Des *des, const byte *iv)
 This function sets the initialization vector (iv) for the Des structure given as argument. When passed a NULL iv, it sets the initialization vector to 0. More...
 
WOLFSSL_API int wc_Des_CbcEncrypt (Des *des, byte *out, const byte *in, word32 sz)
 This function encrypts the input message, in, and stores the result in the output buffer, out. It uses DES encryption with cipher block chaining (CBC) mode. More...
 
WOLFSSL_API int wc_Des_CbcDecrypt (Des *des, byte *out, const byte *in, word32 sz)
 This function decrypts the input ciphertext, in, and stores the resulting plaintext in the output buffer, out. It uses DES encryption with cipher block chaining (CBC) mode. More...
 
WOLFSSL_API int wc_Des_EcbEncrypt (Des *des, byte *out, const byte *in, word32 sz)
 This function encrypts the input message, in, and stores the result in the output buffer, out. It uses Des encryption with Electronic Codebook (ECB) mode. More...
 
WOLFSSL_API int wc_Des3_EcbEncrypt (Des3 *des, byte *out, const byte *in, word32 sz)
 This function encrypts the input message, in, and stores the result in the output buffer, out. It uses Des3 encryption with Electronic Codebook (ECB) mode. Warning: In nearly all use cases ECB mode is considered to be less secure. Please avoid using ECB API’s directly whenever possible. More...
 
WOLFSSL_API int wc_Des3_SetKey (Des3 *des, const byte *key, const byte *iv, int dir)
 This function sets the key and initialization vector (iv) for the Des3 structure given as argument. It also initializes and allocates space for the buffers needed for encryption and decryption, if these have not yet been initialized. Note: If no iv is provided (i.e. iv == NULL) the initialization vector defaults to an iv of 0. More...
 
WOLFSSL_API int wc_Des3_SetIV (Des3 *des, const byte *iv)
 This function sets the initialization vector (iv) for the Des3 structure given as argument. When passed a NULL iv, it sets the initialization vector to 0. More...
 
WOLFSSL_API int wc_Des3_CbcEncrypt (Des3 *des, byte *out, const byte *in, word32 sz)
 This function encrypts the input message, in, and stores the result in the output buffer, out. It uses Triple Des (3DES) encryption with cipher block chaining (CBC) mode. More...
 
WOLFSSL_API int wc_Des3_CbcDecrypt (Des3 *des, byte *out, const byte *in, word32 sz)
 This function decrypts the input ciphertext, in, and stores the resulting plaintext in the output buffer, out. It uses Triple Des (3DES) encryption with cipher block chaining (CBC) mode. More...
 
WOLFSSL_API int wc_Des3Init (Des3 *, void *, int)
 
WOLFSSL_API void wc_Des3Free (Des3 *)
 

Variables

 C
 

Variable Documentation

◆ C

C
Initial value:
{
#endif
enum {
DES_KEY_SIZE = 8,
DES3_KEY_SIZE = 24,
DES_IV_SIZE = 8,
}