Encrypt with elliptic curves The last days I was looking for a way to encrypt using ECC, without having to make the program myself. I was sure that someone should have done it for everyone by now.

The best approach I had was with bouncy castle. The bad thing about it, is that I never found a "encrypt" or "decrypt" method. The best thing I could found was a sign method and a verify method. The thing is that I read about hybrid encryption, so I was trying to encrypt something with this method, so the signature isn't enough.

Also I've seen code that uses the Cipher class. But after implementing what it said and the execution failed, I saw at the Cipher class documentation that ECC is not implemented there.

Thanks for the help
While it is possible to encrypt using elliptic curves, typically some form of hybrid encryption is used (for performance reasons or because the algorithm supports only a few bytes of data). Typically an Integrated Encryption Schemes is used.

In these systems, another symmetric (AEAD) algorithm (AES in some modern and strong mode, Chacha+Poly1305, or a symmetric cipher and a MAC) is used to do the encryption, and the asymmetric algorithm is used to do a key agreement (typical in case of ECC) or key exchange (typical in case of RSA).

The key agreement process typically employed is based on Diffie-Hellman key exchange.



If you want an off-the-shelve program to encrypt data using ECC as key agreement, have a look at GPG. Versions beyond 2.1 have support for a handful of curves.

If you want to write a program that uses ECC, you will have to find a library that does ECC DH, or better yet, have a library that does the combination of key exchange and symmetric encryption for you (the so called seal and open operations), like NaCl or libsodium.