summary refs log tree commit diff
path: root/crypto/src/security/AgreementUtilities.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2015-10-14 13:53:50 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2015-10-14 13:53:50 +0700
commitbb401420a2e568c1d9995740ffc7972c9ce7299e (patch)
tree666bb9ce4f681bc708a29fe12522bc68c67561ea /crypto/src/security/AgreementUtilities.cs
parentAdded "Lenstra" check (diff)
downloadBouncyCastle.NET-ed25519-bb401420a2e568c1d9995740ffc7972c9ce7299e.tar.xz
Add ECCDH as valid alias
Diffstat (limited to 'crypto/src/security/AgreementUtilities.cs')
-rw-r--r--crypto/src/security/AgreementUtilities.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/src/security/AgreementUtilities.cs b/crypto/src/security/AgreementUtilities.cs
index 4c61ac354..12d427c8c 100644
--- a/crypto/src/security/AgreementUtilities.cs
+++ b/crypto/src/security/AgreementUtilities.cs
@@ -22,14 +22,14 @@ namespace Org.BouncyCastle.Security
 		private static readonly IDictionary algorithms = Platform.CreateHashtable();
         //private static readonly IDictionary oids = Platform.CreateHashtable();
 
-		static AgreementUtilities()
+        static AgreementUtilities()
 		{
-			//algorithms[X9ObjectIdentifiers.DHSinglePassCofactorDHSha1KdfScheme.Id] = ?;
+            algorithms[X9ObjectIdentifiers.DHSinglePassCofactorDHSha1KdfScheme.Id] = "ECCDHWITHSHA1KDF";
 			algorithms[X9ObjectIdentifiers.DHSinglePassStdDHSha1KdfScheme.Id] = "ECDHWITHSHA1KDF";
 			algorithms[X9ObjectIdentifiers.MqvSinglePassSha1KdfScheme.Id] = "ECMQVWITHSHA1KDF";
 		}
 
-		public static IBasicAgreement GetBasicAgreement(
+        public static IBasicAgreement GetBasicAgreement(
 			DerObjectIdentifier oid)
 		{
 			return GetBasicAgreement(oid.Id);
@@ -52,8 +52,8 @@ namespace Org.BouncyCastle.Security
 			if (mechanism == "ECDH")
 				return new ECDHBasicAgreement();
 
-			if (mechanism == "ECDHC")
-				return new ECDHCBasicAgreement();
+            if (mechanism == "ECDHC" || mechanism == "ECCDH")
+                    return new ECDHCBasicAgreement();
 
 			if (mechanism == "ECMQV")
 				return new ECMqvBasicAgreement();