Date: Sun, 7 Mar 2021 20:08:56 GMT From: Oleksandr Tymoshenko <gonzo@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 748be78e60cc - main - armv8crypto: fix AES-XTS regression introduced by ed9b7f44 Message-ID: <202103072008.127K8u3V042976@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by gonzo: URL: https://cgit.FreeBSD.org/src/commit/?id=748be78e60ccc4a26325a636347debb1f7e6749b commit 748be78e60ccc4a26325a636347debb1f7e6749b Author: Oleksandr Tymoshenko <gonzo@FreeBSD.org> AuthorDate: 2021-03-07 20:03:47 +0000 Commit: Oleksandr Tymoshenko <gonzo@FreeBSD.org> CommitDate: 2021-03-07 20:03:47 +0000 armv8crypto: fix AES-XTS regression introduced by ed9b7f44 Initialization of the XTS key schedule was accidentally dropped when adding AES-GCM support so all-zero schedule was used instead. This rendered previously created GELI partitions unusable. This change restores proper XTS key schedule initialization. Reported by: Peter Jeremy <peter@rulingia.com> MFC after: immediately --- sys/crypto/armv8/armv8_crypto.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/crypto/armv8/armv8_crypto.c b/sys/crypto/armv8/armv8_crypto.c index 24f6eff5608d..95bb96124323 100644 --- a/sys/crypto/armv8/armv8_crypto.c +++ b/sys/crypto/armv8/armv8_crypto.c @@ -305,6 +305,9 @@ armv8_crypto_cipher_setup(struct armv8_crypto_session *ses, aes_v8_set_decrypt_key(key, keylen * 8, &ses->dec_schedule); + if (csp->csp_cipher_alg == CRYPTO_AES_XTS) + aes_v8_set_encrypt_key(key + keylen, keylen * 8, &ses->xts_schedule); + if (csp->csp_cipher_alg == CRYPTO_AES_NIST_GCM_16) { memset(H.c, 0, sizeof(H.c)); aes_v8_encrypt(H.c, H.c, &ses->enc_schedule);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202103072008.127K8u3V042976>