summary refs log tree commit diff
path: root/crypto/src/openpgp/PgpPublicKey.cs
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2015-04-18 21:22:01 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2015-04-18 21:22:01 +0700
commit216ccd1126d4f924bc65ac6c7dfa8faa4a8a793f (patch)
tree3bf0a0e4d7de5c8b521aff8870cb0f67c26ecf2a /crypto/src/openpgp/PgpPublicKey.cs
parentRemove overly strict check on ECC extensions (diff)
downloadBouncyCastle.NET-ed25519-216ccd1126d4f924bc65ac6c7dfa8faa4a8a793f.tar.xz
Port recent Java updates
Diffstat (limited to 'crypto/src/openpgp/PgpPublicKey.cs')
-rw-r--r--crypto/src/openpgp/PgpPublicKey.cs5
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/src/openpgp/PgpPublicKey.cs b/crypto/src/openpgp/PgpPublicKey.cs
index 249b94ea6..5bde2c8fe 100644
--- a/crypto/src/openpgp/PgpPublicKey.cs
+++ b/crypto/src/openpgp/PgpPublicKey.cs
@@ -2,6 +2,7 @@ using System;
 using System.Collections;
 using System.IO;
 
+using Org.BouncyCastle.Asn1.X9;
 using Org.BouncyCastle.Crypto;
 using Org.BouncyCastle.Crypto.IO;
 using Org.BouncyCastle.Crypto.Parameters;
@@ -104,6 +105,10 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp
                 {
                     this.keyStrength = ((ElGamalPublicBcpgKey)key).P.BitLength;
                 }
+                else if (key is ECPublicBcpgKey)
+                {
+                    this.keyStrength = ECNamedCurveTable.GetByOid(((ECPublicBcpgKey)key).CurveOid).Curve.FieldSize;
+                }
             }
         }