aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/modes/aead/gcm/gcm.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2017-10-18 12:59:30 -0400
committerJack Lloyd <[email protected]>2017-10-18 12:59:30 -0400
commita01d850353a310dfca3cca5ffe630b654a8f5a23 (patch)
tree00a11e33d893fa3a8dbb54f7ed7d71209a91f38e /src/lib/modes/aead/gcm/gcm.cpp
parenteab327defc290e21b36591a09d93609d6deca940 (diff)
Further optimizations, and split out GHASH reduction code
Diffstat (limited to 'src/lib/modes/aead/gcm/gcm.cpp')
-rw-r--r--src/lib/modes/aead/gcm/gcm.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/modes/aead/gcm/gcm.cpp b/src/lib/modes/aead/gcm/gcm.cpp
index 4abf8b5f6..dfaffedb7 100644
--- a/src/lib/modes/aead/gcm/gcm.cpp
+++ b/src/lib/modes/aead/gcm/gcm.cpp
@@ -103,10 +103,10 @@ void GCM_Mode::start_msg(const uint8_t nonce[], size_t nonce_len)
m_ctr->set_iv(y0.data(), y0.size());
- secure_vector<uint8_t> m_enc_y0(GCM_BS);
- m_ctr->encipher(m_enc_y0);
+ zeroise(y0);
+ m_ctr->encipher(y0);
- m_ghash->start(m_enc_y0.data(), m_enc_y0.size());
+ m_ghash->start(y0.data(), y0.size());
}
size_t GCM_Encryption::process(uint8_t buf[], size_t sz)