aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/modes/aead/gcm
diff options
context:
space:
mode:
authorchux0519 <[email protected]>2018-11-01 13:00:50 +0800
committerchux0519 <[email protected]>2018-11-01 13:00:50 +0800
commite733dfb6b12c698ae6ce2b4bdad9a27d7cc56761 (patch)
tree63e14c9593730d17d97b1a8f9fb99211fbe4a320 /src/lib/modes/aead/gcm
parentc6b656d51e3e16c26260d9e38729af77d3e52164 (diff)
Fixed an issue where update_granularity is equal to tag_size in GCM mode, which will cause incremental decoding to fail in ffi.
related code(ffi_cipher.cpp): ```cpp BOTAN_ASSERT(cipher.update_granularity() > cipher.minimum_final_size(), "logic error"); ```
Diffstat (limited to 'src/lib/modes/aead/gcm')
-rw-r--r--src/lib/modes/aead/gcm/gcm.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/modes/aead/gcm/gcm.cpp b/src/lib/modes/aead/gcm/gcm.cpp
index 4bace1073..bc48804e6 100644
--- a/src/lib/modes/aead/gcm/gcm.cpp
+++ b/src/lib/modes/aead/gcm/gcm.cpp
@@ -59,7 +59,7 @@ std::string GCM_Mode::provider() const
size_t GCM_Mode::update_granularity() const
{
- return GCM_BS;
+ return GCM_BS * BOTAN_BLOCK_CIPHER_PAR_MULT;
}
bool GCM_Mode::valid_nonce_length(size_t len) const