[Cryptech Tech] [Cryptech-Commits] [user/sra/aes-keywrap] 01/01: Initial commit of AES Key Wrap implementation.

Joachim Strömbergson joachim at secworks.se
Fri May 8 07:24:27 UTC 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Aloha!

Rob Austein wrote:
> The software version needs a chunk of memory big enough to hold the 
> ciphertext, which will always be a bit larger than the plaintext due 
> to the initialization vector and rounding the plaintext up to the
> next block boundary.  One can move stuff around to do encrypt in
> place, but there's no simple way to avoid the buffer.
> 
> In a hardware version I guess one could unroll the j loop into a 
> series of six stages.  One could almost do the i loop in parallel, 
> except that (I think) one has to serialize the AES operations due to 
> the feedback cycle taking place in the A register.

Yes, I think it is hard to avoid the looping there. The
rotation/movement of words in R should be possible to replace by simple
index increment. But I don't see a way to avoid receiving the complete P
before processing. This means that we need to define a max size of P in
number of 64-bit words.

What would be the proper size? 4096 kbits, 8192, 16384?

The same memory would then be used as output buffer.
The interface would then look something like:

(1) Write n number of words to the keywrap buffer memory.
(2) Write n to the MESSAGE_SIZE register.
(3) Write 0x01 to the control register
(4) Wait for ready bit in status reg to be set.
(5) Read out the result from the buffer memory.

Looks ok?

- -- 
Med vänlig hälsning, Yours

Joachim Strömbergson - Alltid i harmonisk svängning.
========================================================================
 Joachim Strömbergson          Secworks AB          joachim at secworks.se
========================================================================
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBCAAGBQJVTGSrAAoJEF3cfFQkIuyN7T8QAMBqkPxUxAKKgL7w9B2eCn4P
d5njohUpMSGmRI/Uo5Hz41IY0ZneO1AKQgMmtExQqGHkRU7TWcUH+EXxBFNDlWQZ
QzbGeSOzs7py8b6JHYRh9TI03BeZPJ+p4A3yuTNPK95ul87XlfOxtNtBIh/sqcx2
NOeTYKJ0rDt9PCb92lYF26RwYKXCGD4dT+LWMfqGEeli7Oi4hAoLxX5H3lnC5/+4
P17kmmTd5M+XYPj5W1VQ35E3vtZtqM+Pn30OKQjazDO9w9Er7iRQSd5g3puzUMmH
TE69uZaEvOmRnV6/Bmn/2ebLhQFQ7lhy78TGlyaW9XoQoMX8BJwPlyWUtBy4Yc6C
ixQ4Oasi5ArCLUv8+dz8YXk0Ta6Zb4vJC/suBUoO07XlkozhxCWwfsBgkyFLi3OU
UbT4YS85bsieWq9ukzEnY2SZbxXKgvUc3bZTwtJugYQ3+GVF7InT3G9h7En0MZtQ
sCdKlS3iE2qOtMFYfXjTtihfEW0yO0EzjfxxNqy//rUbuE+LdnC7LADwW42/tSXg
pVI3jovMD3FS1eLjSc8U5IpxLZ0cWSZKmlVfMveo5ovKsplolCvSdIH6l1xWklAm
USJ2Oc1lTcAhVnz990nj7fYzw8W0JJOrbjv6t9DGbIMqxgVc9hsOF37a6vCsT5fh
oEn4o1i19Y9U2Zx4uASs
=8C5L
-----END PGP SIGNATURE-----


More information about the Tech mailing list