diff options
author | chux0519 <[email protected]> | 2018-11-01 13:00:50 +0800 |
---|---|---|
committer | chux0519 <[email protected]> | 2018-11-01 13:00:50 +0800 |
commit | e733dfb6b12c698ae6ce2b4bdad9a27d7cc56761 (patch) | |
tree | 63e14c9593730d17d97b1a8f9fb99211fbe4a320 /src/lib/modes/aead/gcm | |
parent | c6b656d51e3e16c26260d9e38729af77d3e52164 (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.cpp | 2 |
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 |