* \file bcal_camellia128.c * \email [email protected] * \author Daniel Otte * \date 2009-01-09 * \license GPLv3 or later * */ #include <stdlib.h> #include "blockcipher_descriptor.h" #include "camellia.h" #include "keysize_descriptor.h" const char camellia128_str[] = "Camellia-128"; const uint8_t camellia128_keysize_desc[] = { KS_TYPE_LIST, 1, KS_INT(128), KS_TYPE_TERMINATOR }; const bcdesc_t camellia128_desc = { BCDESC_TYPE_BLOCKCIPHER, BC_INIT_TYPE_2, camellia128_str, sizeof(camellia128_ctx_t), 128, {(void_fpt)camellia128_init}, {(void_fpt)camellia128_enc}, {(void_fpt)camellia128_dec}, (bc_free_fpt)NULL, camellia128_keysize_desc };
* \file bcal_tdes.c * \email [email protected] * \author Daniel Otte * \date 2009-01-09 * \license GPLv3 or later * */ #include <stdlib.h> #include "blockcipher_descriptor.h" #include "des.h" #include "keysize_descriptor.h" const char tdes_str[] = "TDES"; const uint8_t tdes_keysize_desc[] = { KS_TYPE_LIST, 1, KS_INT(192), KS_TYPE_TERMINATOR }; void tdes_dummy_enc(void* block, const void* key){ tdes_enc(block, block, key); } void tdes_dummy_dec(void* block, const void* key){ tdes_dec(block, block, key); } const bcdesc_t tdes_desc = { BCDESC_TYPE_BLOCKCIPHER, BC_INIT_TYPE_1, tdes_str,
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <stdlib.h> #include <avr/pgmspace.h> #include <stdint.h> #include "streamcipher_descriptor.h" #include "keysize_descriptor.h" #include "rabbit.h" const char rabbit_str[] PROGMEM = "Rabbit"; const uint8_t rabbit_keysize_desc[] PROGMEM = { KS_TYPE_LIST, 2, KS_INT(128), KS_INT(80), KS_TYPE_TERMINATOR }; const uint8_t rabbit_ivsize_desc[] PROGMEM = { KS_TYPE_LIST, 1, KS_INT(64), KS_TYPE_TERMINATOR }; const scdesc_t rabbit_desc PROGMEM = { SCDESC_TYPE_STREAMCIPHER, /* abstraction layer type designator */ SC_INIT_TYPE_4|SC_GEN_TYPE_1, /* flags*/ rabbit_str, /* name string pointer */ sizeof(rabbit_ctx_t), /* size of context */ 8, /* blocksize */ {(void_fpt)rabbit_init}, /* init function pointer */ {(void_fpt)rabbit_gen}, /* key stream generator function pointer */ {(void_fpt)NULL}, /* key stream generator for random access function pointer */
* \email [email protected] * \author Daniel Otte * \date 2009-01-09 * \license GPLv3 or later * */ #include <avr/pgmspace.h> #include <stdlib.h> #include "blockcipher_descriptor.h" #include "present80.h" #include "keysize_descriptor.h" const char present80_str[] PROGMEM = "Present80"; const uint8_t present80_keysize_desc[] PROGMEM = { KS_TYPE_LIST, 1, KS_INT(80), KS_TYPE_TERMINATOR }; const bcdesc_t present80_desc PROGMEM = { BCDESC_TYPE_BLOCKCIPHER, BC_INIT_TYPE_2, present80_str, sizeof(present80_ctx_t), 64, {(void_fpt)present80_init}, {(void_fpt)present80_enc}, {(void_fpt)present80_dec}, (bc_free_fpt)NULL, present80_keysize_desc };
* \email [email protected] * \author Daniel Otte * \date 2009-01-09 * \license GPLv3 or later * */ #include <avr/pgmspace.h> #include <stdlib.h> #include "blockcipher_descriptor.h" #include "skipjack.h" #include "keysize_descriptor.h" const char skipjack_str[] PROGMEM = "Skipjack"; const uint8_t skipjack_keysize_desc[] PROGMEM = { KS_TYPE_LIST, 1, KS_INT(80), KS_TYPE_TERMINATOR }; const bcdesc_t skipjack_desc PROGMEM = { BCDESC_TYPE_BLOCKCIPHER, BC_INIT_TYPE_1, skipjack_str, 10, 64, {(void_fpt)NULL}, {(void_fpt)skipjack_enc}, {(void_fpt)skipjack_dec}, (bc_free_fpt)NULL, skipjack_keysize_desc };
* \email [email protected] * \author Daniel Otte * \date 2009-01-09 * \license GPLv3 or later * */ #include <avr/pgmspace.h> #include <stdlib.h> #include "blockcipher_descriptor.h" #include "present128.h" #include "keysize_descriptor.h" const char present128_str[] PROGMEM = "Present128"; const uint8_t present128_keysize_desc[] PROGMEM = { KS_TYPE_LIST, 1, KS_INT(128), KS_TYPE_TERMINATOR }; const bcdesc_t present128_desc PROGMEM = { BCDESC_TYPE_BLOCKCIPHER, BC_INIT_TYPE_2, present128_str, sizeof(present128_ctx_t), 64, {(void_fpt)present128_init}, {(void_fpt)present128_enc}, {(void_fpt)present128_dec}, (bc_free_fpt)NULL, present128_keysize_desc };
* \email [email protected] * \author Daniel Otte * \date 2010-02-20 * \license GPLv3 or later * */ #include <avr/pgmspace.h> #include <stdlib.h> #include "blockcipher_descriptor.h" #include "threefish.h" #include "keysize_descriptor.h" const char threefish512_str[] PROGMEM = "Threefish-512"; const uint8_t threefish512_keysize_desc[] PROGMEM = { KS_TYPE_LIST, 1, KS_INT(512), KS_TYPE_TERMINATOR }; static void threefish512_dummy_init(void* key, void* ctx){ threefish512_init(key, NULL, ctx); } const bcdesc_t threefish512_desc PROGMEM = { BCDESC_TYPE_BLOCKCIPHER, BC_INIT_TYPE_1, threefish512_str, sizeof(threefish512_ctx_t), 512, {(void_fpt)threefish512_dummy_init}, {(void_fpt)threefish512_enc}, {(void_fpt)threefish512_dec},
* \date 2009-01-09 * \license GPLv3 or later * */ #include <avr/pgmspace.h> #include <stdlib.h> #include "blockcipher_descriptor.h" #include "rc5.h" #include "keysize_descriptor.h" #define RC5_ROUNDS 12 const char rc5_str[] PROGMEM = "RC5"; const uint8_t rc5_keysize_desc[] PROGMEM = { KS_TYPE_RANGE, KS_INT(1), KS_INT(2040), KS_TYPE_TERMINATOR }; static void rc5_dummy_init(void *key, uint16_t keysize_b, void *ctx) { rc5_init(key, keysize_b, RC5_ROUNDS, ctx); } const bcdesc_t rc5_desc PROGMEM = { BCDESC_TYPE_BLOCKCIPHER, BC_INIT_TYPE_2, rc5_str, sizeof(rc5_ctx_t), 128,
* \email [email protected] * \author Daniel Otte * \date 2010-02-20 * \license GPLv3 or later * */ #include <avr/pgmspace.h> #include <stdlib.h> #include "blockcipher_descriptor.h" #include "threefish.h" #include "keysize_descriptor.h" const char threefish1024_str[] PROGMEM = "Threefish-1024"; const uint8_t threefish1024_keysize_desc[] PROGMEM = { KS_TYPE_LIST, 1, KS_INT(1024), KS_TYPE_TERMINATOR }; static void threefish1024_dummy_init(void* key, void* ctx){ threefish1024_init(key, NULL, ctx); } const bcdesc_t threefish1024_desc PROGMEM = { BCDESC_TYPE_BLOCKCIPHER, BC_INIT_TYPE_1, threefish1024_str, sizeof(threefish1024_ctx_t), 1024, {(void_fpt)threefish1024_dummy_init}, {(void_fpt)threefish1024_enc}, {(void_fpt)threefish1024_dec},
* \email [email protected] * \author Daniel Otte * \date 2009-01-09 * \license GPLv3 or later * */ #include <avr/pgmspace.h> #include <stdlib.h> #include "blockcipher_descriptor.h" #include "cast5.h" #include "keysize_descriptor.h" const char cast5_str[] PROGMEM = "CAST5"; const uint8_t cast5_keysize_desc[] PROGMEM = { KS_TYPE_RANGE, KS_INT(0), KS_INT(128), KS_TYPE_TERMINATOR }; const bcdesc_t cast5_desc PROGMEM = { BCDESC_TYPE_BLOCKCIPHER, BC_INIT_TYPE_2, cast5_str, sizeof(cast5_ctx_t), 128, {(void_fpt)cast5_init}, {(void_fpt)cast5_enc}, {(void_fpt)cast5_dec}, (bc_free_fpt)NULL, cast5_keysize_desc };
* \email [email protected] * \author Daniel Otte * \date 2010-12-17 * \license GPLv3 or later * */ #include <stdlib.h> #include "blockcipher_descriptor.h" #include "cscipher.h" #include "keysize_descriptor.h" const char cscipher_str[] = "CS-Cipher"; const uint8_t cscipher_keysize_desc[] = { KS_TYPE_LIST, 1, KS_INT(128), KS_TYPE_TERMINATOR }; const bcdesc_t cscipher_desc = { BCDESC_TYPE_BLOCKCIPHER, BC_INIT_TYPE_1, cscipher_str, sizeof(cscipher_ctx_t), 64, {(void_fpt)cscipher_init}, {(void_fpt)cscipher_enc}, {(void_fpt)cscipher_dec}, (bc_free_fpt)NULL, cscipher_keysize_desc };
* \email [email protected] * \author Daniel Otte * \date 2009-01-09 * \license GPLv3 or later * */ #include <avr/pgmspace.h> #include <stdlib.h> #include "blockcipher_descriptor.h" #include "seed.h" #include "keysize_descriptor.h" const char seed_str[] PROGMEM = "SEED"; const uint8_t seed_keysize_desc[] PROGMEM = { KS_TYPE_LIST, 1, KS_INT(128), KS_TYPE_TERMINATOR }; const bcdesc_t seed_desc PROGMEM = { BCDESC_TYPE_BLOCKCIPHER, BC_INIT_TYPE_1, seed_str, sizeof(seed_ctx_t), 128, { (void_fpt) seed_init }, { (void_fpt) seed_enc }, { (void_fpt) seed_dec }, (bc_free_fpt) NULL, seed_keysize_desc };
* \email [email protected] * \author Daniel Otte * \date 2010-02-20 * \license GPLv3 or later * */ #include <avr/pgmspace.h> #include <stdlib.h> #include "blockcipher_descriptor.h" #include "threefish.h" #include "keysize_descriptor.h" const char threefish256_str[] PROGMEM = "Threefish-256"; const uint8_t threefish256_keysize_desc[] PROGMEM = { KS_TYPE_LIST, 1, KS_INT(256), KS_TYPE_TERMINATOR }; static void threefish256_dummy_init(void* key, void* ctx){ threefish256_init(key, NULL, ctx); } const bcdesc_t threefish256_desc PROGMEM = { BCDESC_TYPE_BLOCKCIPHER, BC_INIT_TYPE_1, threefish256_str, sizeof(threefish256_ctx_t), 256, {(void_fpt)threefish256_dummy_init}, {(void_fpt)threefish256_enc}, {(void_fpt)threefish256_dec},
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <stdlib.h> #include <avr/pgmspace.h> #include <stdint.h> #include "streamcipher_descriptor.h" #include "keysize_descriptor.h" #include "trivium.h" const char trivium_str[] PROGMEM = "Trivium"; const uint8_t trivium_keysize_desc[] PROGMEM = { KS_TYPE_LIST, 1, KS_INT(80), KS_TYPE_TERMINATOR }; const uint8_t trivium_ivsize_desc[] PROGMEM = { KS_TYPE_LIST, 3, KS_INT(32), KS_INT(64), KS_INT(80), KS_TYPE_TERMINATOR }; const scdesc_t trivium_desc PROGMEM = { SCDESC_TYPE_STREAMCIPHER, /* abstraction layer type designator */ SC_INIT_TYPE_5|SC_GEN_TYPE_1, /* flags*/ trivium_str, /* name string pointer */ sizeof(trivium_ctx_t), /* size of context */ 8, /* blocksize */ {(void_fpt)trivium_init}, /* init function pointer */ {(void_fpt)trivium_getbyte}, /* key stream generator function pointer */ {(void_fpt)NULL}, /* key stream generator for random access function pointer */
* \email [email protected] * \author Daniel Otte * \date 2009-01-09 * \license GPLv3 or later * */ #include <avr/pgmspace.h> #include <stdlib.h> #include "blockcipher_descriptor.h" #include "des.h" #include "keysize_descriptor.h" const char des_str[] PROGMEM = "DES"; const uint8_t des_keysize_desc[] PROGMEM = { KS_TYPE_LIST, 1, KS_INT(64), KS_TYPE_TERMINATOR }; static void des_dummy_enc(void *block, void *key) { des_enc(block, block, key); } static void des_dummy_dec(void *block, void *key) { des_dec(block, block, key); } const bcdesc_t des_desc PROGMEM = { BCDESC_TYPE_BLOCKCIPHER,
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <stdlib.h> #include <avr/pgmspace.h> #include <stdint.h> #include "streamcipher_descriptor.h" #include "keysize_descriptor.h" #include "arcfour.h" const char arcfour_str[] PROGMEM = "ARCFOUR"; const uint8_t arcfour_keysize_desc[] PROGMEM = { KS_TYPE_ARG_RANGE, KS_INT(8), KS_INT(2040), KS_INT(8), KS_INT(0), KS_TYPE_TERMINATOR }; const uint8_t arcfour_ivsize_desc[] PROGMEM = { KS_TYPE_LIST, 1, KS_INT(0), KS_TYPE_TERMINATOR }; const scdesc_t arcfour_desc PROGMEM = { SCDESC_TYPE_STREAMCIPHER, /* abstraction layer type designator */ SC_INIT_TYPE_3|SC_GEN_TYPE_1, /* flags*/ arcfour_str, /* name string pointer */ sizeof(arcfour_ctx_t), /* size of context */ 8, /* blocksize */ {(void_fpt)arcfour_init}, /* init function pointer */
* \file bcal_khazad.c * \email [email protected] * \author Daniel Otte * \date 2011-01-02 * \license GPLv3 or later * */ #include <stdlib.h> #include "blockcipher_descriptor.h" #include "khazad.h" #include "keysize_descriptor.h" const char khazad_str[] = "Khazad"; const uint8_t khazad_keysize_desc[] = { KS_TYPE_LIST, 1, KS_INT(128), KS_TYPE_TERMINATOR }; const bcdesc_t khazad_desc = { BCDESC_TYPE_BLOCKCIPHER, BC_INIT_TYPE_1, khazad_str, sizeof(khazad_ctx_t), 64, {(void_fpt)khazad_init}, {(void_fpt)khazad_enc}, {(void_fpt)khazad_dec}, (bc_free_fpt)NULL, khazad_keysize_desc };
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <stdlib.h> #include <avr/pgmspace.h> #include <stdint.h> #include "streamcipher_descriptor.h" #include "keysize_descriptor.h" #include "salsa20.h" const char salsa20_str[] PROGMEM = "Salsa20"; const uint8_t salsa20_keysize_desc[] PROGMEM = { KS_TYPE_LIST, 2, KS_INT(128), KS_INT(256), KS_TYPE_TERMINATOR }; const uint8_t salsa20_ivsize_desc[] PROGMEM = { KS_TYPE_LIST, 1, KS_INT(64), KS_TYPE_TERMINATOR }; const scdesc_t salsa20_desc PROGMEM = { SCDESC_TYPE_STREAMCIPHER, /* abstraction layer type designator */ SC_INIT_TYPE_4|SC_GEN_TYPE_1, /* flags*/ salsa20_str, /* name string pointer */ sizeof(salsa20_ctx_t), /* size of context */ 8, /* blocksize */ {(void_fpt)salsa20_init}, /* init function pointer */ {(void_fpt)salsa20_gen}, /* key stream generator function pointer */ {(void_fpt)NULL}, /* key stream generator for random access function pointer */
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <stdlib.h> #include <avr/pgmspace.h> #include <stdint.h> #include "streamcipher_descriptor.h" #include "keysize_descriptor.h" #include "mickey128.h" const char mickey128_str[] PROGMEM = "Mickey128"; const uint8_t mickey128_keysize_desc[] PROGMEM = { KS_TYPE_LIST, 1, KS_INT(128), KS_TYPE_TERMINATOR }; const uint8_t mickey128_ivsize_desc[] PROGMEM = { KS_TYPE_RANGE, KS_INT(0), KS_INT(128), KS_TYPE_TERMINATOR }; const scdesc_t mickey128_desc PROGMEM = { SCDESC_TYPE_STREAMCIPHER, /* abstraction layer type designator */ SC_INIT_TYPE_5|SC_GEN_TYPE_1, /* flags*/ mickey128_str, /* name string pointer */ sizeof(mickey128_ctx_t), /* size of context */ 8, /* blocksize */ {(void_fpt)mickey128_init}, /* init function pointer */ {(void_fpt)mickey128_getbyte}, /* key stream generator function pointer */ {(void_fpt)NULL}, /* key stream generator for random access function pointer */