tech-crypto archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: sync rijndael-alg-fst.c with OpenBSD



   Date: Sat, 1 Oct 2016 20:26:18 +0100
   From: Alexander Nasonov <alnsn%yandex.ru@localhost>

   If the goal is switching cgd to opencrypto, this is where all
   self-tests should be implemented.

That was a goal a long time ago.  It's not clear to me that opencrypto
is the way to go, though -- opencrypto was designed for an era when
hardware acceleration meant issuing asynchronous I/O requests over a
PCI bus, not when hardware acceleration meant executing a CPU
instruction.

In any case, it should be easy to add a self-test to
cgd_cipher_aes_init which panics if it fails.  Failure means kernel
memory or the CPU or something is screwy, so panicking is a reasonable
course of action.  This would be localized to cgd_crypto.c and require
no API changes.  I expect it should add at most a couple dozen lines
of code, mainly for the test vector itself.


Home | Main Index | Thread Index | Old Index