]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ossl: Add support for AES-CBC cipher
authorKornel Duleba <mindal@semihalf.com>
Tue, 2 Nov 2021 11:53:22 +0000 (12:53 +0100)
committerWojciech Macek <wma@FreeBSD.org>
Sat, 6 Nov 2021 08:08:44 +0000 (09:08 +0100)
commit849faf4e0ba9a8b8f24ff34da93a0fd46c14eda9
tree6f7d91892e483efe7e7ae4c12f2a75dc94a72562
parent6badb512a94df667f0df1484fb288ece186305bd
ossl: Add support for AES-CBC cipher

AES-CBC OpenSSL assembly is used underneath.
The glue layer(ossl_aes.c) is based on CHACHA20 implementation.
Contrary to the SHA and CHACHA20, AES OpenSSL assembly logic
does not have a fallback implementation in case CPU doesn't
support required instructions.
Because of that CPU caps are checked during initialization and AES
support is advertised only if available.
The feature is available on all architectures that ossl supports:
i386, amd64, arm64.

The biggest advantage of this patch over existing solutions
(aesni(4) and armv8crypto(4)) is that it supports SHA,
allowing for ETA operations.

Sponsored by: Stormshield
Obtained from: Semihalf
Reviewed by: jhb
Differential revision: https://reviews.freebsd.org/D32099
16 files changed:
share/man/man4/ossl.4
sys/conf/files
sys/conf/files.amd64
sys/conf/files.arm64
sys/conf/files.i386
sys/crypto/openssl/ossl.c
sys/crypto/openssl/ossl.h
sys/crypto/openssl/ossl_aarch64.c
sys/crypto/openssl/ossl_aarch64.h [new file with mode: 0644]
sys/crypto/openssl/ossl_aes.c [new file with mode: 0644]
sys/crypto/openssl/ossl_chacha20.c
sys/crypto/openssl/ossl_cipher.h [new file with mode: 0644]
sys/crypto/openssl/ossl_x86.c
sys/crypto/openssl/ossl_x86.h [new file with mode: 0644]
sys/modules/ossl/Makefile
tests/sys/opencrypto/cryptotest.py