summary refs log tree commit diff
path: root/crypto/src/asn1/x9
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/src/asn1/x9')
-rw-r--r--crypto/src/asn1/x9/X9ECParameters.cs2
-rw-r--r--crypto/src/asn1/x9/X9ECPoint.cs12
2 files changed, 7 insertions, 7 deletions
diff --git a/crypto/src/asn1/x9/X9ECParameters.cs b/crypto/src/asn1/x9/X9ECParameters.cs
index 6389defa8..a192e4c52 100644
--- a/crypto/src/asn1/x9/X9ECParameters.cs
+++ b/crypto/src/asn1/x9/X9ECParameters.cs
@@ -87,7 +87,7 @@ namespace Org.BouncyCastle.Asn1.X9
             byte[]		seed)
         {
             this.curve = curve;
-            this.g = g;
+            this.g = g.Normalize();
             this.n = n;
             this.h = h;
             this.seed = seed;
diff --git a/crypto/src/asn1/x9/X9ECPoint.cs b/crypto/src/asn1/x9/X9ECPoint.cs
index ba2b2bcbf..75d58cd38 100644
--- a/crypto/src/asn1/x9/X9ECPoint.cs
+++ b/crypto/src/asn1/x9/X9ECPoint.cs
@@ -10,25 +10,25 @@ namespace Org.BouncyCastle.Asn1.X9
     {
         private readonly ECPoint p;
 
-		public X9ECPoint(
+        public X9ECPoint(
             ECPoint p)
         {
-            this.p = p;
+            this.p = p.Normalize();
         }
 
-		public X9ECPoint(
+        public X9ECPoint(
             ECCurve			c,
             Asn1OctetString	s)
         {
             this.p = c.DecodePoint(s.GetOctets());
         }
 
-		public ECPoint Point
+        public ECPoint Point
         {
-			get { return p; }
+            get { return p; }
         }
 
-		/**
+        /**
          * Produce an object suitable for an Asn1OutputStream.
          * <pre>
          *  ECPoint ::= OCTET STRING