Skip to content
Snippets Groups Projects
Commit c3d193f3 authored by akwizgran's avatar akwizgran
Browse files

Erase tag key after use.

parent d6ffe9b3
No related branches found
No related tags found
No related merge requests found
...@@ -39,6 +39,7 @@ class ConnectionWriterFactoryImpl implements ConnectionWriterFactory { ...@@ -39,6 +39,7 @@ class ConnectionWriterFactoryImpl implements ConnectionWriterFactory {
Cipher tagCipher = crypto.getTagCipher(); Cipher tagCipher = crypto.getTagCipher();
ErasableKey tagKey = crypto.deriveTagKey(secret, initiatorIsAlice); ErasableKey tagKey = crypto.deriveTagKey(secret, initiatorIsAlice);
crypto.encodeTag(tag, tagCipher, tagKey, connection); crypto.encodeTag(tag, tagCipher, tagKey, connection);
tagKey.erase();
encryption = new OutgoingEncryptionLayer(out, capacity, encryption = new OutgoingEncryptionLayer(out, capacity,
crypto.getFrameCipher(), frameKey, MAX_FRAME_LENGTH, tag); crypto.getFrameCipher(), frameKey, MAX_FRAME_LENGTH, tag);
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment