table of contents
hcrypto_des(3) | Heimdal crypto library | hcrypto_des(3) |
NAME¶
hcrypto_des - DES crypto functions
Functions¶
void DES_set_odd_parity (DES_cblock *key)
int HC_DEPRECATED DES_check_key_parity (DES_cblock *key)
int DES_is_weak_key (DES_cblock *key)
int HC_DEPRECATED DES_set_key (DES_cblock *key, DES_key_schedule *ks)
int DES_set_key_unchecked (DES_cblock *key, DES_key_schedule *ks)
int DES_set_key_checked (DES_cblock *key, DES_key_schedule *ks)
int DES_key_sched (DES_cblock *key, DES_key_schedule *ks)
void DES_encrypt (uint32_t u[2], DES_key_schedule *ks, int encp)
void DES_ecb_encrypt (DES_cblock *input, DES_cblock *output,
DES_key_schedule *ks, int encp)
void DES_cbc_encrypt (const void *in, void *out, long length,
DES_key_schedule *ks, DES_cblock *iv, int encp)
void DES_pcbc_encrypt (const void *in, void *out, long length,
DES_key_schedule *ks, DES_cblock *iv, int encp)
void DES_ecb3_encrypt (DES_cblock *input, DES_cblock *output,
DES_key_schedule *ks1, DES_key_schedule *ks2, DES_key_schedule *ks3, int
encp)
void DES_ede3_cbc_encrypt (const void *in, void *out, long length,
DES_key_schedule *ks1, DES_key_schedule *ks2, DES_key_schedule *ks3,
DES_cblock *iv, int encp)
void DES_cfb64_encrypt (const void *in, void *out, long length,
DES_key_schedule *ks, DES_cblock *iv, int *num, int encp)
uint32_t DES_cbc_cksum (const void *in, DES_cblock *output, long
length, DES_key_schedule *ks, DES_cblock *iv)
void DES_string_to_key (const char *str, DES_cblock *key)
int HC_DEPRECATED DES_new_random_key (DES_cblock *key)
void HC_DEPRECATED DES_init_random_number_generator (DES_cblock *seed)
void HC_DEPRECATED DES_random_key (DES_cblock *key)
Detailed Description¶
See the DES - Data Encryption Standard crypto interface for description and examples.
Function Documentation¶
uint32_t DES_cbc_cksum (const void * in, DES_cblock * output, long length, DES_key_schedule * ks, DES_cblock * iv)¶
Crete a checksum using DES in CBC encryption mode. This mode is only used for Kerberos 4, and it should stay that way.
The IV must always be diffrent for diffrent input data blocks.
Parameters:
output the checksum
length length of data
ks key schedule to use
iv initial vector to use
void DES_cbc_encrypt (const void * in, void * out, long length, DES_key_schedule * ks, DES_cblock * iv, int encp)¶
Encrypt/decrypt a block using DES in Chain Block Cipher mode (cbc).
The IV must always be diffrent for diffrent input data blocks.
Parameters:
out data to encrypt
length length of data
ks key schedule to use
iv initial vector to use
encp if non zero, encrypt. if zero, decrypt.
void DES_cfb64_encrypt (const void * in, void * out, long length, DES_key_schedule * ks, DES_cblock * iv, int * num, int encp)¶
Encrypt/decrypt using DES in cipher feedback mode with 64 bit feedback.
The IV must always be diffrent for diffrent input data blocks.
Parameters:
out data to encrypt
length length of data
ks key schedule to use
iv initial vector to use
num offset into in cipher block encryption/decryption stop last time.
encp if non zero, encrypt. if zero, decrypt.
int HC_DEPRECATED DES_check_key_parity (DES_cblock * key)¶
Check if the key have correct parity.
Parameters:
Returns:
void DES_ecb3_encrypt (DES_cblock * input, DES_cblock * output, DES_key_schedule * ks1, DES_key_schedule * ks2, DES_key_schedule * ks3, int encp)¶
Encrypt/decrypt a block using triple DES using EDE mode, encrypt/decrypt/encrypt.
Parameters:
output data to encrypt
ks1 key schedule to use
ks2 key schedule to use
ks3 key schedule to use
encp if non zero, encrypt. if zero, decrypt.
void DES_ecb_encrypt (DES_cblock * input, DES_cblock * output, DES_key_schedule * ks, int encp)¶
Encrypt/decrypt a block using DES.
Parameters:
output data to encrypt
ks key schedule to use
encp if non zero, encrypt. if zero, decrypt.
void DES_ede3_cbc_encrypt (const void * in, void * out, long length, DES_key_schedule * ks1, DES_key_schedule * ks2, DES_key_schedule * ks3, DES_cblock * iv, int encp)¶
Encrypt/decrypt using Triple DES in Chain Block Cipher mode (cbc).
The IV must always be diffrent for diffrent input data blocks.
Parameters:
out data to encrypt
length length of data
ks1 key schedule to use
ks2 key schedule to use
ks3 key schedule to use
iv initial vector to use
encp if non zero, encrypt. if zero, decrypt.
void DES_encrypt (uint32_t u[2], DES_key_schedule * ks, int encp)¶
Encrypt/decrypt a block using DES. Also called ECB mode
Parameters:
ks key schedule to use
encp if non zero, encrypt. if zero, decrypt.
void HC_DEPRECATED DES_init_random_number_generator (DES_cblock * seed)¶
Seed the random number generator. Deprecated, use RAND - random number
Parameters:
int DES_is_weak_key (DES_cblock * key)¶
Checks if the key is any of the weaks keys that makes DES attacks trival.
Parameters:
Returns:
int DES_key_sched (DES_cblock * key, DES_key_schedule * ks)¶
Compatibility function for eay libdes, works just like DES_set_key_checked().
Parameters:
ks a key schedule to initialize.
Returns:
int HC_DEPRECATED DES_new_random_key (DES_cblock * key)¶
Generate a random des key using a random block, fixup parity and skip weak keys.
Parameters:
Returns:
void DES_pcbc_encrypt (const void * in, void * out, long length, DES_key_schedule * ks, DES_cblock * iv, int encp)¶
Encrypt/decrypt a block using DES in Propagating Cipher Block Chaining mode. This mode is only used for Kerberos 4, and it should stay that way.
The IV must always be diffrent for diffrent input data blocks.
Parameters:
out data to encrypt
length length of data
ks key schedule to use
iv initial vector to use
encp if non zero, encrypt. if zero, decrypt.
void HC_DEPRECATED DES_random_key (DES_cblock * key)¶
Generate a random key, deprecated since it doesn't return an error code, use DES_new_random_key().
Parameters:
int HC_DEPRECATED DES_set_key (DES_cblock * key, DES_key_schedule * ks)¶
Setup a des key schedule from a key. Deprecated function, use DES_set_key_unchecked() or DES_set_key_checked() instead.
Parameters:
ks a key schedule to initialize.
Returns:
int DES_set_key_checked (DES_cblock * key, DES_key_schedule * ks)¶
Just like DES_set_key_unchecked() except checking that the key is not weak for or have correct parity.
Parameters:
ks a key schedule to initialize.
Returns:
int DES_set_key_unchecked (DES_cblock * key, DES_key_schedule * ks)¶
Setup a des key schedule from a key. The key is no longer needed after this transaction and can cleared.
Does NOT check that the key is weak for or have wrong parity.
Parameters:
ks a key schedule to initialize.
Returns:
void DES_set_odd_parity (DES_cblock * key)¶
Set the parity of the key block, used to generate a des key from a random key. See DES key generation.
Parameters:
void DES_string_to_key (const char * str, DES_cblock * key)¶
Convert a string to a DES key. Use something like PKCS5_PBKDF2_HMAC_SHA1() to create key from passwords.
Parameters:
key the resulting key
Author¶
Generated automatically by Doxygen for Heimdal crypto library from the source code.
Tue Jul 11 2017 | Version 7.4.0 |