1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-19 11:57:12 -05:00

Add 'next_message' methods to cipher and MAC vtables.

This provides a convenient hook to be called between SSH messages, for
the crypto components to do any per-message processing like
incrementing a sequence number.
This commit is contained in:
Simon Tatham
2022-08-16 18:27:06 +01:00
parent 9160c41e7b
commit 840043f06e
12 changed files with 66 additions and 0 deletions

View File

@ -52,6 +52,7 @@ static inline bool check_availability(const struct aes_extra *extra)
.setkey = aes ## impl_c ## _setkey, \
.encrypt = aes ## bits ## impl_c ## _cbc_encrypt, \
.decrypt = aes ## bits ## impl_c ## _cbc_decrypt, \
.next_message = nullcipher_next_message, \
.ssh2_id = "aes" #bits "-cbc", \
.blksize = 16, \
.real_keybits = bits, \
@ -69,6 +70,7 @@ static inline bool check_availability(const struct aes_extra *extra)
.setkey = aes ## impl_c ## _setkey, \
.encrypt = aes ## bits ## impl_c ## _sdctr, \
.decrypt = aes ## bits ## impl_c ## _sdctr, \
.next_message = nullcipher_next_message, \
.ssh2_id = "aes" #bits "-ctr", \
.blksize = 16, \
.real_keybits = bits, \