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

@ -654,6 +654,7 @@ const ssh_cipheralg ssh_blowfish_ssh1 = {
.setkey = blowfish_ssh_setkey,
.encrypt = blowfish_ssh1_encrypt_blk,
.decrypt = blowfish_ssh1_decrypt_blk,
.next_message = nullcipher_next_message,
.blksize = 8,
.real_keybits = 128,
.padded_keybytes = SSH1_SESSION_KEY_LENGTH,
@ -668,6 +669,7 @@ const ssh_cipheralg ssh_blowfish_ssh2 = {
.setkey = blowfish_ssh_setkey,
.encrypt = blowfish_ssh2_encrypt_blk,
.decrypt = blowfish_ssh2_decrypt_blk,
.next_message = nullcipher_next_message,
.ssh2_id = "blowfish-cbc",
.blksize = 8,
.real_keybits = 128,
@ -683,6 +685,7 @@ const ssh_cipheralg ssh_blowfish_ssh2_ctr = {
.setkey = blowfish_ssh_setkey,
.encrypt = blowfish_ssh2_sdctr,
.decrypt = blowfish_ssh2_sdctr,
.next_message = nullcipher_next_message,
.ssh2_id = "blowfish-ctr",
.blksize = 8,
.real_keybits = 256,