Rizin
unix-like reverse engineering framework and cli tools
|
#include <rz_types.h>
Go to the source code of this file.
Macros | |
#define | DES_KEY_SIZE 8 |
#define | DES_BLOCK_SIZE 8 |
Functions | |
RZ_API void | rz_des_permute_key (ut32 *keylo, ut32 *keyhi) |
Apply PC-1. More... | |
RZ_API void | rz_des_permute_key_inv (ut32 *keylo, ut32 *keyhi) |
Inverse of rz_des_permute_key (PC-1) More... | |
RZ_API void | rz_des_permute_block0 (ut32 *blocklo, ut32 *blockhi) |
first permutation of the input block More... | |
RZ_API void | rz_des_permute_block1 (ut32 *blocklo, ut32 *blockhi) |
last permutation of the block More... | |
RZ_API void | rz_des_shift_key (int i, bool decrypt, ut32 *deskeylo, ut32 *deskeyhi) |
RZ_API void | rz_des_pc2 (RZ_OUT ut32 *keylo, RZ_OUT ut32 *keyhi, RZ_IN ut32 deslo, RZ_IN ut32 deshi) |
PC-2 permutation of a key. More... | |
RZ_API void | rz_des_round_key (int i, ut32 *keylo, ut32 *keyhi, ut32 *deskeylo, ut32 *deskeyhi) |
RZ_API void | rz_des_round (ut32 *buflo, ut32 *bufhi, ut32 *roundkeylo, ut32 *roundkeyhi) |
RZ_API void rz_des_pc2 | ( | RZ_OUT ut32 * | keylo, |
RZ_OUT ut32 * | keyhi, | ||
RZ_IN ut32 | deslo, | ||
RZ_IN ut32 | deshi | ||
) |
PC-2 permutation of a key.
Definition at line 247 of file des.c.
References rz_return_if_fail.
Referenced by avr_custom_des(), and rz_des_round_key().
first permutation of the input block
Definition at line 171 of file des.c.
References hi(), lo, ROTL, and rz_return_if_fail.
Referenced by avr_custom_des(), des_decrypt(), and des_encrypt().
last permutation of the block
Definition at line 195 of file des.c.
References hi(), lo, ROTR, and rz_return_if_fail.
Referenced by avr_custom_des(), des_decrypt(), and des_encrypt().
Apply PC-1.
Definition at line 115 of file des.c.
References rz_return_if_fail.
Referenced by avr_custom_des(), and des_set_key().
Inverse of rz_des_permute_key (PC-1)
This is usually not necessary when executing DES. Keep in mind that PC-1 is not injective on arbitrary values, as it drops the parity bits. This inverse function simply sets the positions of those to 0.
Definition at line 153 of file des.c.
References i, in, out, p, pc1_inv, rz_return_if_fail, st8, and ut64().
Referenced by avr_custom_des().
RZ_API void rz_des_round_key | ( | int | i, |
ut32 * | keylo, | ||
ut32 * | keyhi, | ||
ut32 * | deskeylo, | ||
ut32 * | deskeyhi | ||
) |