diff options
author | Michael Brown <mcb30@ipxe.org> | 2022-11-07 23:42:02 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2022-11-08 15:14:04 +0000 |
commit | 634a86093af9a6d134be8662f25616f4edfec683 (patch) | |
tree | 3f14462272fe936ce39ff5c506e653bae1b6f599 /src/include/ipxe/crypto.h | |
parent | c453b4c284dbedb5de0663f6b30878b425a7a3e8 (diff) | |
download | ipxe-634a86093af9a6d134be8662f25616f4edfec683.tar.gz |
[tls] Allow for arbitrary-length initialisation vectors
Restructure the encryption and decryption operations to allow for the
use of ciphers where the initialisation vector is constructed by
concatenating the fixed IV (derived as part of key expansion) with a
record IV (prepended to the ciphertext).
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/crypto.h')
-rw-r--r-- | src/include/ipxe/crypto.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/include/ipxe/crypto.h b/src/include/ipxe/crypto.h index ba09c9468..a15d5eba0 100644 --- a/src/include/ipxe/crypto.h +++ b/src/include/ipxe/crypto.h @@ -249,6 +249,10 @@ static inline int is_stream_cipher ( struct cipher_algorithm *cipher ) { return ( cipher->blocksize == 1 ); } +static inline int is_block_cipher ( struct cipher_algorithm *cipher ) { + return ( cipher->blocksize > 1 ); +} + static inline int is_auth_cipher ( struct cipher_algorithm *cipher ) { return cipher->authsize; } |