* "AES
@ 2015-04-27 18:49 mischief
0 siblings, 0 replies; only message in thread
From: mischief @ 2015-04-27 18:49 UTC (permalink / raw)
To: counter, mode, goof
i was looking at aes counter mode code recently. in
/sys/src/libsec/port/aes.c i don't see any code that initializes
or modifies AESstate->ctrsz. ctrsz is passed to
/sys/src/libsec/port/aes.c:/^incrementCTR which is supposed to
increment the counter. since ctrsz is always 0, i think it doesn't work
the way it is intended to.
i also think the code
mpctrsz = itomp(1 << (ctrsz*8), nil);
is wrong, because any ctrsz > 3 will make the integer shift to a value
larger than signed 32 bit integer, and make itomp behave in strange ways,
resulting in incorrect modulo of the aes counter.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-04-27 18:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-27 18:49 "AES mischief
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).