<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/include/sys/crypto, branch zfs-0.7.0-rc2</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=zfs-0.7.0-rc2</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=zfs-0.7.0-rc2'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2016-10-03T21:51:15Z</updated>
<entry>
<title>OpenZFS 4185 - add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R</title>
<updated>2016-10-03T21:51:15Z</updated>
<author>
<name>Tony Hutter</name>
<email>hutter2@llnl.gov</email>
</author>
<published>2016-06-15T22:47:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=3c67d83a8afb391f20bc53d36a0cebea6897b3e2'/>
<id>urn:sha1:3c67d83a8afb391f20bc53d36a0cebea6897b3e2</id>
<content type='text'>
Reviewed by: George Wilson &lt;george.wilson@delphix.com&gt;
Reviewed by: Prakash Surya &lt;prakash.surya@delphix.com&gt;
Reviewed by: Saso Kiselkov &lt;saso.kiselkov@nexenta.com&gt;
Reviewed by: Richard Lowe &lt;richlowe@richlowe.net&gt;
Approved by: Garrett D'Amore &lt;garrett@damore.org&gt;
Ported by: Tony Hutter &lt;hutter2@llnl.gov&gt;

OpenZFS-issue: https://www.illumos.org/issues/4185
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/45818ee

Porting Notes:
This code is ported on top of the Illumos Crypto Framework code:

    https://github.com/zfsonlinux/zfs/pull/4329/commits/b5e030c8dbb9cd393d313571dee4756fbba8c22d

The list of porting changes includes:

- Copied module/icp/include/sha2/sha2.h directly from illumos

- Removed from module/icp/algs/sha2/sha2.c:
	#pragma inline(SHA256Init, SHA384Init, SHA512Init)

- Added 'ctx' to lib/libzfs/libzfs_sendrecv.c:zio_checksum_SHA256() since
  it now takes in an extra parameter.

- Added CTASSERT() to assert.h from for module/zfs/edonr_zfs.c

- Added skein &amp; edonr to libicp/Makefile.am

- Added sha512.S.  It was generated from sha512-x86_64.pl in Illumos.

- Updated ztest.c with new fletcher_4_*() args; used NULL for new CTX argument.

- In icp/algs/edonr/edonr_byteorder.h, Removed the #if defined(__linux) section
  to not #include the non-existant endian.h.

- In skein_test.c, renane NULL to 0 in "no test vector" array entries to get
  around a compiler warning.

- Fixup test files:
	- Rename &lt;sys/varargs.h&gt; -&gt; &lt;varargs.h&gt;, &lt;strings.h&gt; -&gt; &lt;string.h&gt;,
	- Remove &lt;note.h&gt; and define NOTE() as NOP.
	- Define u_longlong_t
	- Rename "#!/usr/bin/ksh" -&gt; "#!/bin/ksh -p"
	- Rename NULL to 0 in "no test vector" array entries to get around a
	  compiler warning.
	- Remove "for isa in $($ISAINFO); do" stuff
	- Add/update Makefiles
	- Add some userspace headers like stdio.h/stdlib.h in places of
	  sys/types.h.

- EXPORT_SYMBOL *_Init/*_Update/*_Final... routines in ICP modules.

- Update scripts/zfs2zol-patch.sed

- include &lt;sys/sha2.h&gt; in sha2_impl.h

- Add sha2.h to include/sys/Makefile.am

- Add skein and edonr dirs to icp Makefile

- Add new checksums to zpool_get.cfg

- Move checksum switch block from zfs_secpolicy_setprop() to
  zfs_check_settable()

- Fix -Wuninitialized error in edonr_byteorder.h on PPC

- Fix stack frame size errors on ARM32
  	- Don't unroll loops in Skein on 32-bit to save stack space
  	- Add memory barriers in sha2.c on 32-bit to save stack space

- Add filetest_001_pos.ksh checksum sanity test

- Add option to write psudorandom data in file_write utility
</content>
</entry>
<entry>
<title>Illumos Crypto Port module added to enable native encryption in zfs</title>
<updated>2016-07-20T17:43:30Z</updated>
<author>
<name>Tom Caputi</name>
<email>tcaputi@datto.com</email>
</author>
<published>2016-05-12T14:51:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=0b04990a5de594659d2cf20458965277dd6efeb1'/>
<id>urn:sha1:0b04990a5de594659d2cf20458965277dd6efeb1</id>
<content type='text'>
A port of the Illumos Crypto Framework to a Linux kernel module (found
in module/icp). This is needed to do the actual encryption work. We cannot
use the Linux kernel's built in crypto api because it is only exported to
GPL-licensed modules. Having the ICP also means the crypto code can run on
any of the other kernels under OpenZFS. I ended up porting over most of the
internals of the framework, which means that porting over other API calls (if
we need them) should be fairly easy. Specifically, I have ported over the API
functions related to encryption, digests, macs, and crypto templates. The ICP
is able to use assembly-accelerated encryption on amd64 machines and AES-NI
instructions on Intel chips that support it. There are place-holder
directories for similar assembly optimizations for other architectures
(although they have not been written).

Signed-off-by: Tom Caputi &lt;tcaputi@datto.com&gt;
Signed-off-by: Tony Hutter &lt;hutter2@llnl.gov&gt;
Signed-off-by: Brian Behlendorf &lt;behlendorf1@llnl.gov&gt;
Issue #4329
</content>
</entry>
</feed>
