# Elliptical Curve Actual Encryption

Im havirng a had time understanding ECC. For example, I have the equation below:

Equation : y^2 = x^3 - 4x + 1
Initial Points :

A = (2, 1)

B = (-2, -1)

N or number of iteration : 10

Final Point or Location : ?


I know that ECC has got to do something with private keys and public keys. But I know Im missing something important. My question is how to actually encrypt a message using ECC. For example, the sentence : "Shalom !".

What is the actual encrypted text, and how to get the private key and public key from it? Please help.

Elliptic curve cryptography usually implies Elliptic Curve Diffie-Hellman (and/or digital signatures).

Diffie-Hellman is a key agreement algorithm, rather than a public-key encryption algorithm. You can not use it to "directly" encrypt your message.

Diffie-Hellman allows two parties to arrive at a mutual shared secret. Once you have a shared secret, encryption is (relatively) easy: Derive an encryption key for a symmetric (authenticated) cipher using the shared secret, and then use that key for encryption.

Using public-key cryptography to share a secret, then using that for symmetric cryptography is frequently referred to as "hybrid encryption".

## Technically...

You could cobble together an RSA-like construction using elliptic curves. But there is no advantage to doing so.

Indeed, in many if not most situations, you don't really want "public-key encryption".

Even if you have public-key encryption (meaning you can a priori select a message rather than generating a shared secret), it's usually a better idea to use it to encapsulate a key and use that for symmetric encryption than it is to use the public-key encryption algorithm to send your message.

• Thanks, but do you know how to use and what is the shortcut function use to arrive at a final location when the private key is already known and the two initial points? – alyssaeliyah Feb 4 '19 at 8:13
• What is the final location and why there are two points? – kelalaka Feb 4 '19 at 13:49