mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Remove method that just wraps a MAC call.
This commit is contained in:
@@ -157,10 +157,8 @@ class ContactExchangeTaskImpl extends Thread implements ContactExchangeTask {
|
||||
BdfWriter w = bdfWriterFactory.createWriter(streamWriter);
|
||||
|
||||
// Derive the nonces to be signed
|
||||
byte[] aliceNonce = crypto.deriveKeyBindingNonce(ALICE_NONCE_LABEL,
|
||||
masterSecret);
|
||||
byte[] bobNonce = crypto.deriveKeyBindingNonce(BOB_NONCE_LABEL,
|
||||
masterSecret);
|
||||
byte[] aliceNonce = crypto.mac(ALICE_NONCE_LABEL, masterSecret);
|
||||
byte[] bobNonce = crypto.mac(BOB_NONCE_LABEL, masterSecret);
|
||||
|
||||
// Exchange pseudonyms, signed nonces, and timestamps
|
||||
long localTimestamp = clock.currentTimeMillis();
|
||||
|
||||
@@ -220,12 +220,9 @@ class CryptoComponentImpl implements CryptoComponent {
|
||||
|
||||
@Override
|
||||
public SecretKey deriveKey(String label, SecretKey k, byte[]... inputs) {
|
||||
return new SecretKey(mac(label, k, inputs));
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] deriveKeyBindingNonce(String label, SecretKey k) {
|
||||
return mac(label, k);
|
||||
byte[] mac = mac(label, k, inputs);
|
||||
if (mac.length != SecretKey.LENGTH) throw new IllegalStateException();
|
||||
return new SecretKey(mac);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user