Include protocol version in rendezvous key derivation.

This commit is contained in:
akwizgran
2019-06-05 10:59:21 +01:00
parent 3dbd0b80aa
commit 0579157010

View File

@@ -11,6 +11,7 @@ import javax.annotation.concurrent.Immutable;
import javax.inject.Inject;
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.util.StringUtils.toUtf8;
@@ -27,7 +28,8 @@ class RendezvousCryptoImpl implements RendezvousCrypto {
@Override
public SecretKey deriveRendezvousKey(SecretKey staticMasterKey) {
return crypto.deriveKey(RENDEZVOUS_KEY_LABEL, staticMasterKey);
return crypto.deriveKey(RENDEZVOUS_KEY_LABEL, staticMasterKey,
new byte[] {PROTOCOL_VERSION});
}
@Override