Migrate Bluetooth protocol to BQP's master secret derivation

This commit is contained in:
str4d
2016-02-02 02:31:30 +00:00
parent 77e4ec381a
commit c822623677
4 changed files with 25 additions and 33 deletions

View File

@@ -20,8 +20,8 @@ public class KeyAgreementTest extends BriarTestCase {
byte[] aPub = aPair.getPublic().getEncoded();
KeyPair bPair = crypto.generateAgreementKeyPair();
byte[] bPub = bPair.getPublic().getEncoded();
SecretKey aMaster = crypto.deriveBTMasterSecret(aPub, bPair, true);
SecretKey bMaster = crypto.deriveBTMasterSecret(bPub, aPair, false);
SecretKey aMaster = crypto.deriveMasterSecret(aPub, bPair, true);
SecretKey bMaster = crypto.deriveMasterSecret(bPub, aPair, false);
assertArrayEquals(aMaster.getBytes(), bMaster.getBytes());
}