Erase tag key after use.

This commit is contained in:
akwizgran
2013-04-09 20:11:16 +01:00
parent d6ffe9b3d0
commit c3d193f398

View File

@@ -39,6 +39,7 @@ class ConnectionWriterFactoryImpl implements ConnectionWriterFactory {
Cipher tagCipher = crypto.getTagCipher();
ErasableKey tagKey = crypto.deriveTagKey(secret, initiatorIsAlice);
crypto.encodeTag(tag, tagCipher, tagKey, connection);
tagKey.erase();
encryption = new OutgoingEncryptionLayer(out, capacity,
crypto.getFrameCipher(), frameKey, MAX_FRAME_LENGTH, tag);
} else {