diff options
author | allanjude <allanjude@FreeBSD.org> | 2015-12-27 17:33:59 +0000 |
---|---|---|
committer | allanjude <allanjude@FreeBSD.org> | 2015-12-27 17:33:59 +0000 |
commit | c7c2f2dfabee24fac29d13375d8c29a7f766746c (patch) | |
tree | 8a9bc5399c16c0f637716b176f3f95c32c001a0f /sys/geom | |
parent | e7bdbef72941799b684fb8a542f52b0fbafd254d (diff) | |
download | FreeBSD-src-c7c2f2dfabee24fac29d13375d8c29a7f766746c.zip FreeBSD-src-c7c2f2dfabee24fac29d13375d8c29a7f766746c.tar.gz |
Replace sys/crypto/sha2/sha2.c with lib/libmd/sha512c.c
cperciva's libmd implementation is 5-30% faster
The same was done for SHA256 previously in r263218
cperciva's implementation was lacking SHA-384 which I implemented, validated against OpenSSL and the NIST documentation
Extend sbin/md5 to create sha384(1)
Chase dependancies on sys/crypto/sha2/sha2.{c,h} and replace them with sha512{c.c,.h}
Reviewed by: cperciva, des, delphij
Approved by: secteam, bapt (mentor)
MFC after: 2 weeks
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D3929
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/bde/g_bde.c | 2 | ||||
-rw-r--r-- | sys/geom/bde/g_bde_crypt.c | 2 | ||||
-rw-r--r-- | sys/geom/bde/g_bde_lock.c | 2 | ||||
-rw-r--r-- | sys/geom/bde/g_bde_work.c | 2 | ||||
-rw-r--r-- | sys/geom/eli/g_eli.h | 3 |
5 files changed, 6 insertions, 5 deletions
diff --git a/sys/geom/bde/g_bde.c b/sys/geom/bde/g_bde.c index 93d7733..7eda17f 100644 --- a/sys/geom/bde/g_bde.c +++ b/sys/geom/bde/g_bde.c @@ -44,7 +44,7 @@ #include <sys/sysctl.h> #include <crypto/rijndael/rijndael-api-fst.h> -#include <crypto/sha2/sha2.h> +#include <crypto/sha2/sha512.h> #include <geom/geom.h> #include <geom/bde/g_bde.h> #define BDE_CLASS_NAME "BDE" diff --git a/sys/geom/bde/g_bde_crypt.c b/sys/geom/bde/g_bde_crypt.c index c5de0b9..c59b85a 100644 --- a/sys/geom/bde/g_bde_crypt.c +++ b/sys/geom/bde/g_bde_crypt.c @@ -47,7 +47,7 @@ #include <sys/md5.h> #include <crypto/rijndael/rijndael-api-fst.h> -#include <crypto/sha2/sha2.h> +#include <crypto/sha2/sha512.h> #include <geom/geom.h> #include <geom/bde/g_bde.h> diff --git a/sys/geom/bde/g_bde_lock.c b/sys/geom/bde/g_bde_lock.c index 855987e..462b92b 100644 --- a/sys/geom/bde/g_bde_lock.c +++ b/sys/geom/bde/g_bde_lock.c @@ -58,7 +58,7 @@ #endif #include <crypto/rijndael/rijndael-api-fst.h> -#include <crypto/sha2/sha2.h> +#include <crypto/sha2/sha512.h> #include <geom/geom.h> #include <geom/bde/g_bde.h> diff --git a/sys/geom/bde/g_bde_work.c b/sys/geom/bde/g_bde_work.c index fceb865..7c21d3f 100644 --- a/sys/geom/bde/g_bde_work.c +++ b/sys/geom/bde/g_bde_work.c @@ -71,7 +71,7 @@ #include <sys/kthread.h> #include <crypto/rijndael/rijndael-api-fst.h> -#include <crypto/sha2/sha2.h> +#include <crypto/sha2/sha512.h> #include <geom/geom.h> #include <geom/bde/g_bde.h> diff --git a/sys/geom/eli/g_eli.h b/sys/geom/eli/g_eli.h index 36ef555..e4dbee6 100644 --- a/sys/geom/eli/g_eli.h +++ b/sys/geom/eli/g_eli.h @@ -32,7 +32,8 @@ #include <sys/endian.h> #include <sys/errno.h> #include <sys/malloc.h> -#include <crypto/sha2/sha2.h> +#include <crypto/sha2/sha256.h> +#include <crypto/sha2/sha512.h> #include <opencrypto/cryptodev.h> #ifdef _KERNEL #include <sys/bio.h> |