From a731b68e9f2e4e55e3627cd757c7d538c7660831 Mon Sep 17 00:00:00 2001
From: akwizgran <akwizgran@users.sourceforge.net>
Date: Fri, 12 Jul 2013 18:56:12 +0100
Subject: [PATCH] Switched from CMAC to HMAC-SHA-384 in key derivation
 function.

---
 briar-core/src/net/sf/briar/crypto/CryptoComponentImpl.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/briar-core/src/net/sf/briar/crypto/CryptoComponentImpl.java b/briar-core/src/net/sf/briar/crypto/CryptoComponentImpl.java
index 1b6defe35f..f029759c3a 100644
--- a/briar-core/src/net/sf/briar/crypto/CryptoComponentImpl.java
+++ b/briar-core/src/net/sf/briar/crypto/CryptoComponentImpl.java
@@ -35,7 +35,7 @@ import org.spongycastle.crypto.digests.SHA384Digest;
 import org.spongycastle.crypto.engines.AESLightEngine;
 import org.spongycastle.crypto.generators.ECKeyPairGenerator;
 import org.spongycastle.crypto.generators.PKCS5S2ParametersGenerator;
-import org.spongycastle.crypto.macs.CMac;
+import org.spongycastle.crypto.macs.HMac;
 import org.spongycastle.crypto.modes.AEADBlockCipher;
 import org.spongycastle.crypto.modes.GCMBlockCipher;
 import org.spongycastle.crypto.params.ECKeyGenerationParameters;
@@ -405,7 +405,7 @@ class CryptoComponentImpl implements CryptoComponent {
 			throw new IllegalArgumentException();
 		if(label[label.length - 1] != '\0')
 			throw new IllegalArgumentException();
-		Mac prf = new CMac(new AESLightEngine());
+		Mac prf = new HMac(new SHA384Digest());
 		KeyParameter k = new KeyParameter(secret);
 		prf.init(k);
 		int macLength = prf.getMacSize();
-- 
GitLab