Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | serpent_state |
Macros | |
#define | DW_BY_BLOCK 4 |
#define | DW_BY_USERKEY 8 |
#define | NB_ROUNDS 32 |
#define | NB_SUBKEYS 33 |
#define | NIBBLES_BY_SUBKEY 32 |
Typedefs | |
typedef struct serpent_state | serpent_state_t |
Functions | |
void | serpent_encrypt (serpent_state_t *st, ut32 in[DW_BY_BLOCK], ut32 out[DW_BY_BLOCK]) |
void | serpent_decrypt (serpent_state_t *st, ut32 in[DW_BY_BLOCK], ut32 out[DW_BY_BLOCK]) |
void | serpent_keyschedule (const serpent_state_t *st, ut32 subkeys[NB_SUBKEYS *DW_BY_BLOCK]) |
#define DW_BY_BLOCK 4 |
Definition at line 9 of file crypto_serpent_algo.h.
#define DW_BY_USERKEY 8 |
Definition at line 10 of file crypto_serpent_algo.h.
#define NB_ROUNDS 32 |
Definition at line 11 of file crypto_serpent_algo.h.
#define NB_SUBKEYS 33 |
Definition at line 12 of file crypto_serpent_algo.h.
#define NIBBLES_BY_SUBKEY 32 |
Definition at line 13 of file crypto_serpent_algo.h.
typedef struct serpent_state serpent_state_t |
void serpent_decrypt | ( | serpent_state_t * | st, |
ut32 | in[DW_BY_BLOCK], | ||
ut32 | out[DW_BY_BLOCK] | ||
) |
Definition at line 235 of file crypto_serpent_algo.c.
References apply_FP(), apply_IP(), apply_round_inv(), DW_BY_BLOCK, i, in, NB_ROUNDS, NB_SUBKEYS, out, and serpent_keyschedule().
Referenced by update().
void serpent_encrypt | ( | serpent_state_t * | st, |
ut32 | in[DW_BY_BLOCK], | ||
ut32 | out[DW_BY_BLOCK] | ||
) |
Definition at line 220 of file crypto_serpent_algo.c.
References apply_FP(), apply_IP(), apply_round(), DW_BY_BLOCK, i, in, NB_ROUNDS, NB_SUBKEYS, out, and serpent_keyschedule().
Referenced by update().
void serpent_keyschedule | ( | const serpent_state_t * | st, |
ut32 | subkeys[NB_SUBKEYS *DW_BY_BLOCK] | ||
) |
Definition at line 93 of file crypto_serpent_algo.c.
References apply_IP(), apply_sbox(), DW_BY_BLOCK, DW_BY_USERKEY, get_bit(), i, in, serpent_state::key, serpent_state::key_size, memcpy(), NB_SUBKEYS, NIBBLES_BY_SUBKEY, out, rotl(), rz_return_if_fail, and si.
Referenced by serpent_decrypt(), and serpent_encrypt().