Elliptic-curve cryptography (ECC) is public-key cryptography built on operations involving points on elliptic curves over finite fields. It offers security comparable to RSA with much smaller keys, improving performance, bandwidth, and battery use. Its security depends on the difficulty of solving the elliptic-curve discrete-logarithm problem; the mathematics can remain an abstraction for most developers. section 7.0 section 7.1
Use ECC through established algorithms, approved curves, and security protocols:
- Choose a named, tested curve rather than inventing one. Curve25519 emphasizes speed and security; Curve448-Goldilocks offers higher security; P-256 is widely standardized; secp256k1 is associated with Bitcoin. section 7.1.1
- Use ECDH to establish shared symmetric keys across an insecure network, as modern TLS does, rather than sending the shared secret directly. section 7.5 section 10.1.1
- Use ECDSA for digital signatures that provide authenticity, integrity, and nonrepudiation. Keep signing and encryption key pairs separate. section 7.5
- Configure the same curve for communicating parties and follow current organizational guidance for curve and key-size choices. section 7.1.1 section 7.3
Encrypting a refunds file in Java
A warehouse application can encrypt refunds.json with a recipient's public key, while a payments application decrypts the resulting file with the matching private key. Java's EC key-pair APIs generate the keys; Bouncy Castle simplifies ECIES encryption and decryption. Decrypting with another private key or changing the ciphertext causes the operation to fail. section 7.2.1 section 7.2
Figure 7.1 An example elliptic curve. This curve, named Curve25519, is one of the curves most used with the ECC algorithm.
Inspect Curve25519 as a concrete elliptic-curve example before treating curve selection as a configuration decision. section 7.1
ECC is widely used in TLS, SSH, secure messaging, cloud systems, and mobile applications. It is generally preferred for new applications because a 256-bit ECC key is considered roughly comparable to a 3,072-bit RSA key. Powerful quantum computers or a fast solution to the elliptic-curve discrete-logarithm problem would eventually undermine it, so configuration and standards guidance still matter. section 7.3 section 10.5


