You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.1 KiB


SPECK block cipher

The functions with 'x' at the end is setkey/encrypt combined in one call.

  • speck64.c

64-bit block size, 128-bit keys

void speck64_setkey(const void *in, void *out);
void speck64_encrypt(int enc, void *in, const void *keys);
void speck64_encryptx(void *in, const void *keys);
  • speck128.c

128-bit block size, 256-bit keys

void speck128_setkey(const void *in, void *out);
void speck128_encrypt(int enc, void *in, const void *keys);
void speck128_encryptx(void *in, const void *keys);
  • spk64.asm

x86 assembly code based on speck64.c using 32-bit stdcall convention.
See bld32.bat for example of how to compile.

  • spk128.asm

x86-64 assembly based on speck128.c using Microsoft fastcall convention.
See bld64.bat for example of how to compile.

Code Sizes

cpu setkey + encrypt + decrypt
setkey + encrypt
x86 105 64
x86-64 132 86