Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

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.

share|improve this question
    
Be careful what you use that curve for - it might not be safe. See safecurves.cr.yp.to –  Niels Abildgaard Mar 15 at 17:56

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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