opencrypto - Adjust xforms for explicit extra IV
authorAlex Hornung <ahornung@gmail.com>
Sun, 22 Aug 2010 19:06:22 +0000 (20:06 +0100)
committerAlex Hornung <ahornung@gmail.com>
Sun, 22 Aug 2010 19:10:58 +0000 (20:10 +0100)
commit400158c16f9e4f8a627fb510bb1c69ae6a5c021b
treecc9f19ee39023b2360e332f83a9feb83624eddcc
parent3cd005af98e755d8836c16ab558e88d72b2549df
opencrypto - Adjust xforms for explicit extra IV

* Some transforms such as XTS and CTR have some private 'IV'. Since our
  cryptosoft is now concurrent, we need to keep that private IV per-op
  and not per-session as OpenBSD does. We do this by passing in the
  local IV to encrypt() and decrypt() functions, as well as reinit(),
  which was already getting it.

* We can now also use AES-XTS and AES-CTR in a concurrent environment
  without having to have multiple sessions or an explicit key.

* While here, also radically simplify the reinit() for XTS.

* With these changes we can now use aes-xts for dm_target_crypt
  successfully.
sys/opencrypto/cryptosoft.c
sys/opencrypto/xform.c
sys/opencrypto/xform.h