nakov / Practical-Cryptography-for-Developers-Book

Practical Cryptography for Developers: Hashes, MAC, Key Derivation, DHKE, Symmetric and Asymmetric Ciphers, Public Key Cryptosystems, RSA, Elliptic Curves, ECC, secp256k1, ECDH, ECIES, Digital Signatures, ECDSA, EdDSA
https://cryptobook.nakov.com
MIT License
3.46k stars 418 forks source link

bug / issue report #46

Open nakov opened 3 years ago

nakov commented 3 years ago

Hi Svetlin,

First of all, thanks for writing this book. I’ve been only reading the chapter “Asymmetric Key Cipher”, but already learned a lot. And I think it’s easy to follow!

Have a question about this particular section https://cryptobook.nakov.com/asymmetric-key-ciphers/ecc-encryption-decryption

Btw (minor thing), a typo in the sentence "if we encrypt data by a private key, we will be able to decrypt the ciphertext later by the corresponding public key”. I believe you meant the other way around.

The main thing I’m questioning is the statement "The elliptic curve cryptography (ECC) does not directly provide encryption method”. As far as I understand, ECC is similar to the discrete log problem. The idea is also that with x, g^x is easy to commute but the reverse is hard. Therefore, we should be able to apply the very same idea as in ElGamal encryption (https://en.wikipedia.org/wiki/ElGamal_encryption) to achieve the public key encryption “directly”.

Practically, it’s probably a minor point anyway, my guess is people use ECIES more. But technically, ECC should achieve public key encryption in a straightforward way. Thanks for your time for reading!

Best, Yi-Hsiu