[OTR-dev] AES128 CTR?
Ian Goldberg
ian at cypherpunks.ca
Tue Jan 18 21:06:31 EST 2005
On Tue, Jan 18, 2005 at 08:51:29PM -0500, alex323 wrote:
> "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:
That's correct, where "the sender keyid and recipient keyid are the same"
means "they're both the same as last time", not "they're the same as
each other".
> 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?
Yes.
- Ian
More information about the OTR-dev
mailing list