mirror of
https://github.com/ipxe/ipxe
synced 2025-12-17 10:01:03 +03:00
[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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user