Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | rc6_state |
Macros | |
#define | Pw 0xb7e15163 |
#define | Qw 0x9e3779b9 |
#define | BLOCK_SIZE 16 |
#define | r 20 |
#define | w 32 |
#define | ROTL(x, y) (((x) << ((y) & (w - 1))) | ((x) >> (w - ((y) & (w - 1))))) |
#define | ROTR(x, y) (((x) >> ((y) & (w - 1))) | ((x) << (w - ((y) & (w - 1))))) |
Functions | |
static bool | rc6_init_state (struct rc6_state *const state, const ut8 *key, int keylen) |
static void | rc6_encrypt (struct rc6_state *const state, const ut8 *inbuf, ut8 *outbuf) |
static void | rc6_decrypt (struct rc6_state *const state, const ut8 *inbuf, ut8 *outbuf) |
static bool | rc6_set_key (RzCrypto *cry, const ut8 *key, int keylen, int mode, int direction) |
static int | rc6_get_key_size (RzCrypto *cry) |
static bool | rc6_use (const char *algo) |
static bool | update (RzCrypto *cry, const ut8 *buf, int len) |
static bool | final (RzCrypto *cry, const ut8 *buf, int len) |
static bool | rc6_init (RzCrypto *cry) |
static bool | rc6_fini (RzCrypto *cry) |
Variables | |
RzCryptoPlugin | rz_crypto_plugin_rc6 |
RZ_API RzLibStruct | rizin_plugin |
#define BLOCK_SIZE 16 |
Definition at line 11 of file crypto_rc6.c.
#define Pw 0xb7e15163 |
Definition at line 9 of file crypto_rc6.c.
#define Qw 0x9e3779b9 |
Definition at line 10 of file crypto_rc6.c.
#define r 20 |
Definition at line 12 of file crypto_rc6.c.
Definition at line 14 of file crypto_rc6.c.
Definition at line 15 of file crypto_rc6.c.
#define w 32 |
Definition at line 13 of file crypto_rc6.c.
Definition at line 201 of file crypto_rc6.c.
Definition at line 64 of file crypto_rc6.c.
References A, B, BLOCK_SIZE, C, D, i, inbuf, outbuf, r, ROTL, rz_read_at_le32(), and ut8.
Referenced by update().
Definition at line 212 of file crypto_rc6.c.
References free(), rz_return_val_if_fail, and rz_crypto_t::user.
Definition at line 158 of file crypto_rc6.c.
References rc6_state::key_size, rz_return_val_if_fail, and rz_crypto_t::user.
Definition at line 205 of file crypto_rc6.c.
References NULL, RZ_NEW0, rz_return_val_if_fail, and rz_crypto_t::user.
Definition at line 22 of file crypto_rc6.c.
References A, B, c, free(), i, k, key, L, Pw, Qw, r, ROTL, RZ_NEWS, rz_read_at_le32(), rz_warn_if_reached, v, and w.
Referenced by rc6_set_key().
|
static |
Definition at line 149 of file crypto_rc6.c.
References rz_crypto_t::dir, key, rc6_init_state(), rz_return_val_if_fail, and rz_crypto_t::user.
Definition at line 165 of file crypto_rc6.c.
Definition at line 169 of file crypto_rc6.c.
References BLOCK_SIZE, blocks, calloc(), rz_crypto_t::dir, eprintf, free(), i, if(), len, obuf, rc6_decrypt(), rc6_encrypt(), rz_crypto_append(), RZ_CRYPTO_DIR_DECRYPT, rz_return_val_if_fail, and rz_crypto_t::user.
Referenced by final().
RZ_API RzLibStruct rizin_plugin |
Definition at line 233 of file crypto_rc6.c.
RzCryptoPlugin rz_crypto_plugin_rc6 |
Definition at line 219 of file crypto_rc6.c.