mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-19 14:19:53 +01:00
Include protocol version in rendezvous key derivation.
This commit is contained in:
@@ -11,6 +11,7 @@ import javax.annotation.concurrent.Immutable;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import static org.briarproject.bramble.rendezvous.RendezvousConstants.KEY_MATERIAL_LABEL;
|
import static org.briarproject.bramble.rendezvous.RendezvousConstants.KEY_MATERIAL_LABEL;
|
||||||
|
import static org.briarproject.bramble.rendezvous.RendezvousConstants.PROTOCOL_VERSION;
|
||||||
import static org.briarproject.bramble.rendezvous.RendezvousConstants.RENDEZVOUS_KEY_LABEL;
|
import static org.briarproject.bramble.rendezvous.RendezvousConstants.RENDEZVOUS_KEY_LABEL;
|
||||||
import static org.briarproject.bramble.util.StringUtils.toUtf8;
|
import static org.briarproject.bramble.util.StringUtils.toUtf8;
|
||||||
|
|
||||||
@@ -27,7 +28,8 @@ class RendezvousCryptoImpl implements RendezvousCrypto {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SecretKey deriveRendezvousKey(SecretKey staticMasterKey) {
|
public SecretKey deriveRendezvousKey(SecretKey staticMasterKey) {
|
||||||
return crypto.deriveKey(RENDEZVOUS_KEY_LABEL, staticMasterKey);
|
return crypto.deriveKey(RENDEZVOUS_KEY_LABEL, staticMasterKey,
|
||||||
|
new byte[] {PROTOCOL_VERSION});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user