3
$\begingroup$

I'm trying to read a public key into Bouncy Castle (secp256k1) and need to choose from the following objects

        FpPoint;
        FpCurve;

or

        F2mPoint;
        F2mCurve;

or

        ECPoint;
        ECCurve;

Although it would be helpful if someone simply told me which object to use, what would be more useful is if someone can guide me through the general thought process in selecting any of the above objects for a given named curve.

$\endgroup$
4
$\begingroup$

The EC objects implement general elliptic curve properties, whereas the other 2 operate on specific fields. Since secp256k1 is a prime field curve, you want the Fp objects. For binary field curves, you would use the F2m objects.

Note that NIST "K" curves are binary field curves, wheras secp256k1 is a "K" curve but over a prime field. Koblitz curves allow efficient mathematical operations.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.