Analysis of block cipher Speck [ePrint 2013/404].
More...
#include "common.hh"
#include "speck.hh"
|
uint32_t | speck_compute_nkeywords (uint32_t word_size, uint32_t key_size) |
|
uint32_t | speck_get_keysize (uint32_t word_size) |
|
void | speck_get_rot_const (uint32_t word_size, uint32_t *alpha, uint32_t *beta) |
|
uint32_t | speck_compute_nrounds (uint32_t word_size, uint32_t nkey_words) |
|
void | speck_key_expansion (WORD_T key[SPECK_MAX_NROUNDS], uint32_t nrounds, uint32_t nkey_words, uint32_t alpha, uint32_t beta) |
|
void | speck_encrypt (WORD_T key[SPECK_MAX_NROUNDS], uint32_t nrounds, uint32_t alpha, uint32_t beta, WORD_T *x_in, WORD_T *y_in) |
|
void | speck_decrypt (WORD_T key[SPECK_MAX_NROUNDS], uint32_t nrounds, uint32_t alpha, uint32_t beta, WORD_T *x_in, WORD_T *y_in) |
|
Analysis of block cipher Speck [ePrint 2013/404].
- Author
- V.Velichkov, vesse.nosp@m.lin..nosp@m.velic.nosp@m.hkov.nosp@m.@uni..nosp@m.lu
- Date
- 2012-2013
uint32_t speck_compute_nkeywords |
( |
uint32_t |
word_size, |
|
|
uint32_t |
key_size |
|
) |
| |
Compute the number of key words depending on the word size
- Parameters
-
word_size | word size |
key_size | key size in bits |
uint32_t speck_compute_nrounds |
( |
uint32_t |
word_size, |
|
|
uint32_t |
nkey_words |
|
) |
| |
Compute the number of rounds for Speck and the index of the z-sequence
- Parameters
-
word_size | word size |
nkey_words | number of key words |
- Returns
- number of rounds
void speck_encrypt |
( |
WORD_T |
key[SPECK_MAX_NROUNDS], |
|
|
uint32_t |
nrounds, |
|
|
uint32_t |
alpha, |
|
|
uint32_t |
beta, |
|
|
WORD_T * |
x_in, |
|
|
WORD_T * |
y_in |
|
) |
| |
Speck encryption procedure.
- Parameters
-
key | expanded key |
nrounds | number of rounds |
alpha | right rotation constant |
beta | left rotation constant |
x_in | first plaintext word |
y_in | second plaintext word |
uint32_t speck_get_keysize |
( |
uint32_t |
word_size | ) |
|
Get the size of the key in bits depending on the word size
- Parameters
-
word_size | word size in bits |
void speck_get_rot_const |
( |
uint32_t |
word_size, |
|
|
uint32_t * |
alpha, |
|
|
uint32_t * |
beta |
|
) |
| |
Get the rotation constants.
void speck_key_expansion |
( |
WORD_T |
key[SPECK_MAX_NROUNDS], |
|
|
uint32_t |
nrounds, |
|
|
uint32_t |
nkey_words, |
|
|
uint32_t |
alpha, |
|
|
uint32_t |
beta |
|
) |
| |
Speck key expansion procedure.
- Parameters
-
key | original key (with enough space for the expanded key) |
nrounds | number of rounds |
nkey_words | number of key words |
alpha | right rotation constant |
beta | left rotation constant |