diff --git a/briar-core/src/net/sf/briar/crypto/CryptoComponentImpl.java b/briar-core/src/net/sf/briar/crypto/CryptoComponentImpl.java index 1b6defe35f06429d5dac5189d46137b64918154c..f029759c3a79a2b6e4d2842774e6116e1c3380ae 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();