Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

FAST AES AVR

C bindings for Poettering's AES128 ASM implementation for AVR processors. The original version takes 2474 cycles to encrypt a single block of data and assembles to a binary of 3098 bytes.

Parameter passing is awkward since I wanted simple assembly code.

Example usage:

#define KEY_MATERIAL {0xc1, 0xe5, 0xec, 0x7b, 0x1a, 0x30, 0xe0, 0xda, 0x98, 0xd3, 0x4f, 0xf0, 0x70, 0x30, 0xfe, 0x65}

struct data{
	  unsigned char data[16];
};

char expanded_key[176];

void function()
{
  struct data key_material = {KEY_MATERIAL};
  expand_key(key_material, expanded_key);
  
  struct data pt;
  struct data ct;
  ...
  ct = encrypt_data(pt, expanded_key);
  pt = decrypt_data(ct, expanded_key);
}

About

B. Poettering's 2474 cycles per block AES implementation exposed as C/C++ functions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published