File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
core/src/main/java/org/bouncycastle/asn1/x9 Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 1212import org .bouncycastle .math .ec .ECAlgorithms ;
1313import org .bouncycastle .math .ec .ECCurve ;
1414import org .bouncycastle .math .ec .ECPoint ;
15+ import org .bouncycastle .math .field .FiniteField ;
1516import org .bouncycastle .math .field .PolynomialExtensionField ;
1617import org .bouncycastle .util .Arrays ;
1718
@@ -112,14 +113,15 @@ public X9ECParameters(
112113 this .h = h ;
113114 this .seed = Arrays .clone (seed );
114115
115- if (ECAlgorithms .isFpCurve (curve ))
116+ FiniteField field = curve .getField ();
117+ if (ECAlgorithms .isFpField (field ))
116118 {
117- this .fieldID = new X9FieldID (curve . getField () .getCharacteristic ());
119+ this .fieldID = new X9FieldID (field .getCharacteristic ());
118120 }
119- else if (ECAlgorithms .isF2mCurve ( curve ))
121+ else if (ECAlgorithms .isF2mField ( field ))
120122 {
121- PolynomialExtensionField field = (PolynomialExtensionField )curve . getField () ;
122- int [] exponents = field .getMinimalPolynomial ().getExponentsPresent ();
123+ PolynomialExtensionField f2mField = (PolynomialExtensionField )field ;
124+ int [] exponents = f2mField .getMinimalPolynomial ().getExponentsPresent ();
123125 if (exponents .length == 3 )
124126 {
125127 this .fieldID = new X9FieldID (exponents [2 ], exponents [1 ]);
You can’t perform that action at this time.
0 commit comments