Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/humla-spongycastle.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2014-01-11 08:13:09 +0400
committerPeter Dettman <peter.dettman@bouncycastle.org>2014-01-11 08:13:09 +0400
commit2e47139d9031482c77680aa8695aaf1f5349afab (patch)
treefc12cde9cc26dc528059a1ce64cb99d3df77d392 /core/src/main/java/org/bouncycastle/crypto/tls/DefaultTlsCipherFactory.java
parentded84c7ffaed280d3e4c2dc8d8cbd0be0ce3b85f (diff)
Updates for draft-josefsson-salsa20-tls-04
Diffstat (limited to 'core/src/main/java/org/bouncycastle/crypto/tls/DefaultTlsCipherFactory.java')
-rw-r--r--core/src/main/java/org/bouncycastle/crypto/tls/DefaultTlsCipherFactory.java18
1 files changed, 0 insertions, 18 deletions
diff --git a/core/src/main/java/org/bouncycastle/crypto/tls/DefaultTlsCipherFactory.java b/core/src/main/java/org/bouncycastle/crypto/tls/DefaultTlsCipherFactory.java
index 64bbedfa..7a6de6b6 100644
--- a/core/src/main/java/org/bouncycastle/crypto/tls/DefaultTlsCipherFactory.java
+++ b/core/src/main/java/org/bouncycastle/crypto/tls/DefaultTlsCipherFactory.java
@@ -4,7 +4,6 @@ import java.io.IOException;
import org.bouncycastle.crypto.BlockCipher;
import org.bouncycastle.crypto.Digest;
-import org.bouncycastle.crypto.Mac;
import org.bouncycastle.crypto.StreamCipher;
import org.bouncycastle.crypto.digests.MD5Digest;
import org.bouncycastle.crypto.digests.SHA1Digest;
@@ -17,7 +16,6 @@ import org.bouncycastle.crypto.engines.DESedeEngine;
import org.bouncycastle.crypto.engines.RC4Engine;
import org.bouncycastle.crypto.engines.SEEDEngine;
import org.bouncycastle.crypto.engines.Salsa20Engine;
-import org.bouncycastle.crypto.macs.HMac;
import org.bouncycastle.crypto.modes.AEADBlockCipher;
import org.bouncycastle.crypto.modes.CBCBlockCipher;
import org.bouncycastle.crypto.modes.CCMBlockCipher;
@@ -127,10 +125,6 @@ public class DefaultTlsCipherFactory
protected TlsStreamCipher createSalsa20Cipher(TlsContext context, int rounds, int cipherKeySize, int macAlgorithm)
throws IOException
{
- /*
- * TODO To be able to support UMAC96, we need to give the TlsStreamCipher a Mac instead of
- * assuming HMAC and passing a digest.
- */
return new TlsStreamCipher(context, createSalsa20StreamCipher(rounds), createSalsa20StreamCipher(rounds),
createHMACDigest(macAlgorithm), createHMACDigest(macAlgorithm), cipherKeySize);
}
@@ -208,16 +202,4 @@ public class DefaultTlsCipherFactory
throw new TlsFatalAlert(AlertDescription.internal_error);
}
}
-
- protected Mac createMac(int macAlgorithm) throws IOException
- {
- switch (macAlgorithm)
- {
- // TODO Need an implementation of UMAC
-// case MACAlgorithm.umac96:
-// return
- default:
- return new HMac(createHMACDigest(macAlgorithm));
- }
- }
}