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.

up vote 0 down vote accepted

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.

  • 1
    "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? – Lam Nguyen Oct 5 '17 at 4:27
  • ed25519.cr.yp.to has the specifications of EdDSA, in the papers section. – SAI Peregrinus Oct 6 '17 at 3:34

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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