diff options
author | Jack Lloyd <[email protected]> | 2018-08-17 17:51:14 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-08-17 17:51:14 -0400 |
commit | d1dfc93595098f75d6dc0c461f833627252fbf4e (patch) | |
tree | bf921df789e7d0066308a75016f6aeb569865380 /src/lib/modes/cfb | |
parent | 2c1f5b5fb8288fd8d48fcb9d0a7586609169a96f (diff) |
Have cipher modes also verify that the nonce is set prior to use
Diffstat (limited to 'src/lib/modes/cfb')
-rw-r--r-- | src/lib/modes/cfb/cfb.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/modes/cfb/cfb.cpp b/src/lib/modes/cfb/cfb.cpp index 1010cf450..e1bee0427 100644 --- a/src/lib/modes/cfb/cfb.cpp +++ b/src/lib/modes/cfb/cfb.cpp @@ -117,6 +117,7 @@ void CFB_Mode::shift_register() size_t CFB_Encryption::process(uint8_t buf[], size_t sz) { verify_key_set(m_keystream.size()); + BOTAN_STATE_CHECK(m_state.empty() == false); const size_t shift = feedback(); @@ -181,6 +182,7 @@ inline void xor_copy(uint8_t buf[], uint8_t key_buf[], size_t len) size_t CFB_Decryption::process(uint8_t buf[], size_t sz) { verify_key_set(m_keystream.size()); + BOTAN_STATE_CHECK(m_state.empty() == false); const size_t shift = feedback(); |