Rizin
unix-like reverse engineering framework and cli tools
rz_des.h
Go to the documentation of this file.
1 #ifndef RZ_DES_H
2 #define RZ_DES_H
3 
4 #include <rz_types.h>
5 
6 #define DES_KEY_SIZE 8
7 #define DES_BLOCK_SIZE 8
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 RZ_API void rz_des_permute_key(ut32 *keylo, ut32 *keyhi);
14 RZ_API void rz_des_permute_key_inv(ut32 *keylo, ut32 *keyhi);
15 RZ_API void rz_des_permute_block0(ut32 *blocklo, ut32 *blockhi);
16 RZ_API void rz_des_permute_block1(ut32 *blocklo, ut32 *blockhi);
17 RZ_API void rz_des_shift_key(int i, bool decrypt, ut32 *deskeylo, ut32 *deskeyhi);
18 RZ_API void rz_des_pc2(RZ_OUT ut32 *keylo, RZ_OUT ut32 *keyhi, RZ_IN ut32 deslo, RZ_IN ut32 deshi);
19 RZ_API void rz_des_round_key(int i, ut32 *keylo, ut32 *keyhi, ut32 *deskeylo, ut32 *deskeyhi);
20 RZ_API void rz_des_round(ut32 *buflo, ut32 *bufhi, ut32 *roundkeylo, ut32 *roundkeyhi);
21 
22 #ifdef __cplusplus
23 }
24 #endif
25 
26 #endif // RZ_DES_H
lzma_index ** i
Definition: index.h:629
#define RZ_API
uint32_t ut32
RZ_API void rz_des_round(ut32 *buflo, ut32 *bufhi, ut32 *roundkeylo, ut32 *roundkeyhi)
RZ_API void rz_des_permute_key(ut32 *keylo, ut32 *keyhi)
Apply PC-1.
Definition: des.c:115
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: des.c:247
RZ_API void rz_des_round_key(int i, ut32 *keylo, ut32 *keyhi, ut32 *deskeylo, ut32 *deskeyhi)
RZ_API void rz_des_shift_key(int i, bool decrypt, ut32 *deskeylo, ut32 *deskeyhi)
RZ_API void rz_des_permute_block1(ut32 *blocklo, ut32 *blockhi)
last permutation of the block
Definition: des.c:195
RZ_API void rz_des_permute_key_inv(ut32 *keylo, ut32 *keyhi)
Inverse of rz_des_permute_key (PC-1)
Definition: des.c:153
RZ_API void rz_des_permute_block0(ut32 *blocklo, ut32 *blockhi)
first permutation of the input block
Definition: des.c:171
#define RZ_IN
Definition: rz_types.h:50
#define RZ_OUT
Definition: rz_types.h:51