The MASM Forum Archive 2004 to 2012

General Forums => The Laboratory => Topic started by: 0x401000 on February 04, 2010, 08:30:52 AM

Title: optimized crypto A.T.S
Post by: 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!
Title: Re: optimized crypto A.T.S
Post by: dsouza123 on February 04, 2010, 09:24:13 PM
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/
Title: Re: optimized crypto A.T.S
Post by: 0x401000 on February 04, 2010, 10:08:22 PM
Thanks, the program will be performed on older processors also. Information is very interesting. thanks!  :U
Title: Re: optimized crypto A.T.S
Post by: Astro on February 19, 2010, 09:00:10 PM
Hi,

What OS are you running?

Best regards,
Robin.
Title: Re: optimized crypto A.T.S
Post by: theunknownguy on March 16, 2010, 07:31:02 AM
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...

Title: Re: optimized crypto A.T.S
Post by: donkey on March 16, 2010, 02:30:21 PM
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
Title: Re: optimized crypto A.T.S
Post by: 0x401000 on March 21, 2010, 12:35:14 PM
Thank you!  :U
Title: AES cracked!
Post by: jj2007 on August 19, 2011, 10:09:38 AM
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