|
wpa_supplicant / hostapd 2.0
|
DES and 3DES-EDE ciphers. More...
Defines | |
| #define | ROLc(x, y) |
| #define | RORc(x, y) |
Functions | |
| void | des_encrypt (const u8 *clear, const u8 *key, u8 *cypher) |
| Encrypt one block with DES. | |
| void | des_key_setup (const u8 *key, u32 *ek, u32 *dk) |
| void | des_block_encrypt (const u8 *plain, const u32 *ek, u8 *crypt) |
| void | des_block_decrypt (const u8 *crypt, const u32 *dk, u8 *plain) |
| void | des3_key_setup (const u8 *key, struct des3_key_s *dkey) |
| void | des3_encrypt (const u8 *plain, const struct des3_key_s *key, u8 *crypt) |
| void | des3_decrypt (const u8 *crypt, const struct des3_key_s *key, u8 *plain) |
DES and 3DES-EDE ciphers.
Modifications to LibTomCrypt implementation:
This software may be distributed under the terms of the BSD license. See README for more details.
| #define ROLc | ( | x, | |
| y | |||
| ) |
((((unsigned long) (x) << (unsigned long) ((y) & 31)) | \ (((unsigned long) (x) & 0xFFFFFFFFUL) >> \ (unsigned long) (32 - ((y) & 31)))) & 0xFFFFFFFFUL)
DES code submitted by Dobes Vandermeer
| #define RORc | ( | x, | |
| y | |||
| ) |
(((((unsigned long) (x) & 0xFFFFFFFFUL) >> \ (unsigned long) ((y) & 31)) | \ ((unsigned long) (x) << (unsigned long) (32 - ((y) & 31)))) & \ 0xFFFFFFFFUL)
| void des_encrypt | ( | const u8 * | clear, |
| const u8 * | key, | ||
| u8 * | cypher | ||
| ) |
Encrypt one block with DES.
| clear | 8 octets (in) |
| key | 7 octets (in) (no parity bits included) |
| cypher | 8 octets (out) |
1.7.3