[OTR-dev] AES128 CTR?

alex323 alex323 at gmail.com
Tue Jan 18 20:51:29 EST 2005


"This should monotonically increase (as a big-endian value) for
      each message sent with the same (sender keyid, recipient keyid)
      pair , and must not be all 0x00."


So I am assuming that whenever the sender keyid and recipient keyid are 
the same, i add one to the counter. For example:

0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03
...

"The initial counter is a 16-byte value whose first 8
     bytes are the above "top half of counter init" value, and whose
     last 8 bytes are all 0x00."

And this should be:

0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 
0x00, 0x00, 0x00, 0x00
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 
0x00, 0x00, 0x00, 0x00
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 
0x00, 0x00, 0x00, 0x00

Correct?


Nikita Borisov wrote:

>
> On Jan 18, 2005, at 4:52 PM, alex323 wrote:
>
>> That also means I need to code my own AES implementation as well :(
>
>
> Probably not; you should be able to use the AES implementation in ECB 
> mode to encrypt the counter value.
>
> - Nikita
>
> _______________________________________________
> OTR-dev mailing list
> OTR-dev at lists.cypherpunks.ca
> http://lists.cypherpunks.ca/mailman/listinfo/otr-dev
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 825 bytes
Desc: OpenPGP digital signature
URL: <http://lists.cypherpunks.ca/pipermail/otr-dev/attachments/20050118/7ddcf6e4/attachment.pgp>


More information about the OTR-dev mailing list