Add key derivation for static keys.

This commit is contained in:
akwizgran
2019-04-10 13:22:50 +01:00
parent b568405f59
commit d4b929fc6c
5 changed files with 176 additions and 9 deletions

View File

@@ -20,6 +20,7 @@ import static org.briarproject.bramble.test.TestUtils.getSecretKey;
import static org.briarproject.bramble.test.TestUtils.getTransportId;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;
public class KeyDerivationTest extends BrambleTestCase {
@@ -137,7 +138,7 @@ public class KeyDerivationTest extends BrambleTestCase {
@Test
public void testTransportIdAffectsOutput() {
TransportId transportId1 = getTransportId();
assertFalse(transportId.getString().equals(transportId1.getString()));
assertNotEquals(transportId.getString(), transportId1.getString());
TransportKeys k = transportCrypto.deriveTransportKeys(transportId,
master, 123, true, true);
TransportKeys k1 = transportCrypto.deriveTransportKeys(transportId1,