Separate OpenSSL-based OCB implementation from others
Split src/crypto/ocb.cc into two files – one containing the AES-OCB implementation backed by OpenSSL, and the other containing implementations backed by Apple Common Crypto and Nettle. This paves the way for a new OpenSSL implementation that uses OpenSSL 1.1’s OCB support directly, rather than one that merely uses OpenSSL to provide the underlying block cipher. Remove support for rijndael-alg-fst.c and compiler-provided AES intrinsics, since they’re not in use anymore. (Mosh can still use hardware-accelerated AES if it’s available; it just now relies exclusively on the underlying cryptography library to accelerate AES if possible.) Update the build system to conditionally compile in either ocb_openssl.cc or ocb_internal.cc, depending on which cryptography library you pass to ./configure. To make this commit easy to audit, ocb_openssl.cc and ocb_internal.cc are trivially diffable against ocb.cc (now deleted). Expected diffs consist of a copyright notice update, a preprocessor check to ensure the appropriate cryptography implementation has been selected, and deletions to remove code that’s no longer in use. This does mean a substantial amount of code is duplicated between ocb_openssl.cc and ocb_internal.cc; however, ocb_openssl.cc should be completely replaced soon, so it won’t be an issue in the long term. Bug: https://github.com/mobile-shell/mosh/issues/1174
This commit is contained in:
committed by
Alex Chernyakhovsky
parent
2f90addb7c
commit
a563093f16
Vendored
+2
-1
@@ -98,8 +98,9 @@ License: GPL-3+ with Autoconf exception
|
||||
On Debian systems, the complete text of the GNU General
|
||||
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".
|
||||
|
||||
Files: src/crypto/ocb.cc
|
||||
Files: src/crypto/ocb_internal.cc src/crypto/ocb_openssl.cc
|
||||
Copyright: 2011 Ted Krovetz
|
||||
2022 Google LLC
|
||||
License: ISC
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
|
||||
Reference in New Issue
Block a user