NetBSD/sys/conf
riastradh 04a6492d1e New cgd cipher adiantum.
Adiantum is a wide-block cipher, built out of AES, XChaCha12,
Poly1305, and NH, defined in

   Paul Crowley and Eric Biggers, `Adiantum: length-preserving
   encryption for entry-level processors', IACR Transactions on
   Symmetric Cryptology 2018(4), pp. 39--61.

Adiantum provides better security than a narrow-block cipher with CBC
or XTS, because every bit of each sector affects every other bit,
whereas with CBC each block of plaintext only affects the following
blocks of ciphertext in the disk sector, and with XTS each block of
plaintext only affects its own block of ciphertext and nothing else.

Adiantum generally provides much better performance than
constant-time AES-CBC or AES-XTS software do without hardware
support, and performance comparable to or better than the
variable-time (i.e., leaky) AES-CBC and AES-XTS software we had
before.  (Note: Adiantum also uses AES as a subroutine, but only once
per disk sector.  It takes only a small fraction of the time spent by
Adiantum, so there's relatively little performance impact to using
constant-time AES software over using variable-time AES software for
it.)

Adiantum naturally scales to essentially arbitrary disk sector sizes;
sizes >=1024-bytes take the most advantage of Adiantum's design for
performance, so 4096-byte sectors would be a natural choice if we
taught cgd to change the disk sector size.  (However, it's a
different cipher for each disk sector size, so it _must_ be a cgd
parameter.)

The paper presents a similar construction HPolyC.  The salient
difference is that HPolyC uses Poly1305 directly, whereas Adiantum
uses Poly1395(NH(...)).  NH is annoying because it requires a
1072-byte key, which means the test vectors are ginormous, and
changing keys is costly; HPolyC avoids these shortcomings by using
Poly1305 directly, but HPolyC is measurably slower, costing about
1.5x what Adiantum costs on 4096-byte sectors.

For the purposes of cgd, we will reuse each key for many messages,
and there will be very few keys in total (one per cgd volume) so --
except for the annoying verbosity of test vectors -- the tradeoff
weighs in the favour of Adiantum, especially if we teach cgd to do
>>512-byte sectors.

For now, everything that Adiantum needs beyond what's already in the
kernel is gathered into a single file, including NH, Poly1305, and
XChaCha12.  We can split those out -- and reuse them, and provide MD
tuned implementations, and so on -- as needed; this is just a first
pass to get Adiantum implemented for experimentation.
2020-06-29 23:44:01 +00:00
..
assym.mk
compat_netbsd09.config
compat_netbsd10.config
compat_netbsd11.config
compat_netbsd12.config
compat_netbsd13.config
compat_netbsd14.config
compat_netbsd15.config
compat_netbsd16.config
compat_netbsd20.config
compat_netbsd30.config
compat_netbsd40.config
compat_netbsd50.config
compat_netbsd60.config
compat_netbsd70.config
compat_netbsd80.config Fix version numbers in comments 2020-01-18 07:54:26 +00:00
compat_netbsd90.config Fix version numbers in comments 2020-01-18 07:54:26 +00:00
compat_netbsd.config
copts.mk XXX: 2020-03-07 00:53:24 +00:00
copyright Welcome to 2020. 2020-01-01 06:14:29 +00:00
cscope.mk
debugsyms.c
dts.mk change -h to -n because it is more "portable" 2019-04-24 20:53:10 +00:00
files New cgd cipher adiantum. 2020-06-29 23:44:01 +00:00
filesystems.config remove SMBFS and nsmb(4) - kernel part 2020-04-04 15:43:21 +00:00
gdbinit.mk
genassym.cf
ldscript.mk
linkset
lint.mk
majors Add fault(4). 2020-06-07 09:45:19 +00:00
majors.std
majors.storage
majors.tty
majors.usb urio has gone. Comment it out (remaining visible to hold the number) 2020-02-03 13:28:11 +00:00
majors.ws
Makefile.kern.inc enable gcc stack usage limit for kernel functions, set to 3.5 KiB for now 2020-06-25 14:52:26 +00:00
mdroot.mk
mkldscript.sh
newvers_stand.mk
newvers_stand.sh
newvers.mk
newvers.sh
osrelease.sh
param.c
ssp.mk Retire KLEAK. 2020-02-08 07:07:06 +00:00
std