Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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






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 – Niels Abildgaard Mar 15 '14 at 17:56
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


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.