All of lore.kernel.org
 help / color / mirror / Atom feed
* cannot pass split cryptomgr tests for aes ctr
@ 2021-05-03  7:56 Kestrel seventyfour
  2021-05-04 16:52 ` Eric Biggers
  0 siblings, 1 reply; 3+ messages in thread
From: Kestrel seventyfour @ 2021-05-03  7:56 UTC (permalink / raw)
  To: linux-crypto

Hi,

I am trying to update the old ifxdeu driver to pass the crypto mgr tests.
However, I continously fail to pass the split tests and I wonder what to do.

For example, I successfully pass the test vector 0 here:
https://elixir.bootlin.com/linux/latest/source/crypto/testmgr.h#L16654
if there is no split.

But if the text "Single block msg" is split into two 8 byte blocks
(single even aligned splits), which end up as separate skcipher walks
in the driver, the second block is wrong and does not compare
correctly, to what is hardcoded in testmgr.h. Same if I try it with
online aes-ctr encoders in the web.
I have tried doing the xor manually with the aes encoded iv, but I get
the same result as the hardware and if I use the next last iv, I still
do not get the second 8 bytes that are hardcoded in cryptomgr.h.

Can someone shed a light on it?
Is it valid to compare a crypto result that was done on a single walk
with 16byte with two separate walks on the 8 byte splits (of the
original 16)? Is the cryptomgr test on the split tests expecting that
I concat the two walks into a single one?
If yes, how to do that on the uneven splits with separations like 15
16 5 byte sequences, etc., fill up the walk up to full block size and
spill over into the next walk?

Thanks in advance.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-07  5:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-03  7:56 cannot pass split cryptomgr tests for aes ctr Kestrel seventyfour
2021-05-04 16:52 ` Eric Biggers
2021-05-07  5:41   ` Kestrel seventyfour

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.