diff options
author | lloyd <[email protected]> | 2014-01-18 19:45:16 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2014-01-18 19:45:16 +0000 |
commit | ef465af87d61c0cfbba17b86a3e1cc48b90ab391 (patch) | |
tree | 151aafc54f2a57c1ca037653b647398616221060 /src/lib/modes | |
parent | 1822ba0d828d2c7bec51313597a9a64a54ccc559 (diff) |
Use unique_ptr instead of bare pointers and explicit delete in block, mac, hash.
m_ namespaced everything while I'm in there. Changed CMAC poly_double signature.
Diffstat (limited to 'src/lib/modes')
-rw-r--r-- | src/lib/modes/aead/ocb/ocb.cpp | 2 | ||||
-rw-r--r-- | src/lib/modes/aead/siv/siv.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/modes/aead/ocb/ocb.cpp b/src/lib/modes/aead/ocb/ocb.cpp index fd66bb2e9..2e337ba66 100644 --- a/src/lib/modes/aead/ocb/ocb.cpp +++ b/src/lib/modes/aead/ocb/ocb.cpp @@ -63,7 +63,7 @@ class L_computer secure_vector<byte> poly_double(const secure_vector<byte>& in) const { - return CMAC::poly_double(in, 0x87); + return CMAC::poly_double(in); } secure_vector<byte> m_L_dollar, m_L_star; diff --git a/src/lib/modes/aead/siv/siv.cpp b/src/lib/modes/aead/siv/siv.cpp index a89c3dd08..be998cdb0 100644 --- a/src/lib/modes/aead/siv/siv.cpp +++ b/src/lib/modes/aead/siv/siv.cpp @@ -104,19 +104,19 @@ secure_vector<byte> SIV_Mode::S2V(const byte* text, size_t text_len) for(size_t i = 0; i != m_ad_macs.size(); ++i) { - V = CMAC::poly_double(V, 0x87); + V = CMAC::poly_double(V); V ^= m_ad_macs[i]; } if(m_nonce.size()) { - V = CMAC::poly_double(V, 0x87); + V = CMAC::poly_double(V); V ^= m_nonce; } if(text_len < 16) { - V = CMAC::poly_double(V, 0x87); + V = CMAC::poly_double(V); xor_buf(&V[0], text, text_len); V[text_len] ^= 0x80; return cmac().process(V); |