zfsrogue/spl-crypto — pull request #1 by lundman (2012-11-14 08:57:37+00:00)
Title: SPL add crypto functions

Thanks for doing this, I am hoping my code will help with your work.

//

Add Solaris crypto API calls to SPL layer, translating into Linux crypto API. This code was not easy to work out, Linux crypto API
lacks any documentation.

However, there appears to be a "maximum length" limitation with
Linux scatterlist. It is better to use recordsize=512 when creating
encrypted filesystems for now.

Possibly large crypt calls need to be split up into more scatterlist
entries.

Code currently does not use ASYNC calls, as original ZFS appears not to.

'iv' is computed the same as Open Solaris sources.

The ctx_template functions should probably be used to acquire the tfm
instead of calling crypto_alloc_aead() each and every time.

Note this code is littered with debug prints.