3
$\begingroup$

What is the difference between encrypting some data vs signing some data (using ECC)?

Does it simply reverse the role of the public-private keys?

In the past, I thought it was just a change of role for publickey and privatekey.

As the diagram: Encrypt diagram (Encrypt diagram) enter image description here (Sign diagram)

But in practice, it seem not easy like me think.

For example, I can't use ECDSA public key to encrypt and private key corresponding to decrypt.

In this case I must use ECDH.

I do not have much experience on this issue. Please help me.

Thanks in advance.

$\endgroup$

1 Answer 1

2
$\begingroup$

ECDSA is just for signing. It stands for Elliptic Curve Digital Signature Algorithm. EdDSA is another signing algorithm, with some added security. ECDH is for key exchange: it creates a new secret key shared by both parties which no passive eavesdropper can discover.

ECC is pretty much never used to directly encrypt a message. Instead ECDH is used to create a shared secret key, and then a secret-key (symmetric) algorithm such as AES-GCM or ChaCha20+Poly1305 is used to transmit the secret data. The same thing is typically done with RSA, since asymmetric cryptography is slow it's faster to create a shared secret key and use symmetric cryptography. ECIES is a standard that does this, and several variants of the "ECDH+Symmetric encryption" idea are included in TLS.

The main use of direct encryption using an asymmetric algorithm would be a PGP-like system for encrypting e-mail or other old asynchronous protocols where no prior key agreement step is possible. I am not aware of any standard that uses ECC to do this.

$\endgroup$
2
  • 1
    $\begingroup$ "ECDSA is just for signing. It stands for Elliptic Curve Digital Signature Algorithm. EdDSA is another signing algorithm, with some added security." ----> can you show me this? $\endgroup$
    – Lam Nguyen
    Oct 5, 2017 at 4:27
  • $\begingroup$ ed25519.cr.yp.to has the specifications of EdDSA, in the papers section. $\endgroup$ Oct 6, 2017 at 3:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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