diff options
author | Nathan Lewis <[email protected]> | 2018-08-02 11:59:24 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-08-02 11:59:24 -0700 |
commit | 010d12474cb1572c0c9b729615fa45cf43f59d14 (patch) | |
tree | 90decc0e3097d799852e8befeb7d6b8a1a5f4be8 /lib/libicp | |
parent | 3d503a76e890d7711d5e906e025e092d0e244211 (diff) |
Add support for selecting encryption backend
- Add two new module parameters to icp (icp_aes_impl, icp_gcm_impl)
that control the crypto implementation. At the moment there is a
choice between generic and aesni (on platforms that support it).
- This enables support for AES-NI and PCLMULQDQ-NI on AMD Family
15h (bulldozer) and newer CPUs (zen).
- Modify aes_key_t to track what implementation it was generated
with as key schedules generated with various implementations
are not necessarily interchangable.
Reviewed by: Gvozden Neskovic <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tom Caputi <[email protected]>
Reviewed-by: Richard Laager <[email protected]>
Signed-off-by: Nathaniel R. Lewis <[email protected]>
Closes #7102
Closes #7103
Diffstat (limited to 'lib/libicp')
-rw-r--r-- | lib/libicp/Makefile.am | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libicp/Makefile.am b/lib/libicp/Makefile.am index d04a99e94..e9f22cd70 100644 --- a/lib/libicp/Makefile.am +++ b/lib/libicp/Makefile.am @@ -18,8 +18,8 @@ if TARGET_ASM_X86_64 ASM_SOURCES_C = asm-x86_64/aes/aeskey.c ASM_SOURCES_AS = \ asm-x86_64/aes/aes_amd64.S \ - asm-x86_64/aes/aes_intel.S \ - asm-x86_64/modes/gcm_intel.S \ + asm-x86_64/aes/aes_aesni.S \ + asm-x86_64/modes/gcm_pclmulqdq.S \ asm-x86_64/sha1/sha1-x86_64.S \ asm-x86_64/sha2/sha256_impl.S \ asm-x86_64/sha2/sha512_impl.S @@ -46,11 +46,16 @@ KERNEL_C = \ api/kcf_cipher.c \ api/kcf_miscapi.c \ api/kcf_mac.c \ + algs/aes/aes_impl_aesni.c \ + algs/aes/aes_impl_generic.c \ + algs/aes/aes_impl_x86-64.c \ algs/aes/aes_impl.c \ algs/aes/aes_modes.c \ algs/edonr/edonr.c \ algs/modes/modes.c \ algs/modes/cbc.c \ + algs/modes/gcm_generic.c \ + algs/modes/gcm_pclmulqdq.c \ algs/modes/gcm.c \ algs/modes/ctr.c \ algs/modes/ccm.c \ |