mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 06:39:54 +01:00
Erase tag key after use.
This commit is contained in:
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user