News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

optimized crypto A.T.S

Started by 0x401000, February 04, 2010, 08:30:52 AM

Previous topic - Next topic

0x401000

Seeking optimized by the size of the implementation of AES256, Twofish and Serpent. The total amount of code, tables, and expanded key has to be minimal. There is an acute shortage of memory and each kilobyte is very expensive. Thanks in advance!

dsouza123

Some of the new i5 Intel CPUs have 6 new AES instructions AES-NI using xmm registers.
AESENC, AESENCLAST, AESDEC, AESDELAST, AESIMC, AESKEYGENASSIST.

There is an informitive pdf from Intel using Intel syntax assembly code.

aes-instructions-set_wp.pdf


Also a newer one using mostly C with intrinsics and ATT syntax assembly,
also has some performance graphs.

AES_WP_Rev_03_Final_2010_01_26.pdf

Need the following URL to get the newer version.
http://software.intel.com/en-us/articles/intel-advanced-encryption-standard-aes-instructions-set/

0x401000

Thanks, the program will be performed on older processors also. Information is very interesting. thanks!  :U

Astro

Hi,

What OS are you running?

Best regards,
Robin.

theunknownguy

On serpent it would be some kind of hard, but i think you can optimise the SBOXs and the KeyRounds.

But it depends on how you done them, if you already compress them i think there isnt much to do...


donkey

Quote from: 0x401000 on February 04, 2010, 08:30:52 AM
Seeking optimized by the size of the implementation of AES256, Twofish and Serpent. The total amount of code, tables, and expanded key has to be minimal. There is an acute shortage of memory and each kilobyte is very expensive. Thanks in advance!

Attached is an implementation of AES (rjindael) for GoAsm, it has switches for static or dynamic tables that will reduce the resulting size, just assemble it with:

#DEFINE AES_TABLES AES_DYNAMIC
#DEFINE AES_KEY_SIZE 256

which I think is the default anyway but you might check to be sure.

Edgar
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

0x401000


jj2007

Or, rather the time needed to crack the key has been dramatically reduced (from 10 Mio years to only 3 Mio, assuming a Billion puters are working in parallel on the problem).

https://research.microsoft.com/en-us/projects/cryptanalysis/aes.aspx
:U