The-Lightning-Network-Book icon indicating copy to clipboard operation
The-Lightning-Network-Book copied to clipboard

Asymmetric cryptographic system properties and examples

Open renepickhardt opened this issue 6 years ago • 3 comments

I have put three main properties of asymmetric cryptographic systems in the second section of the book.

  1. Asymmetry: The public key can be derived from the private one
  2. Encryption: the public key can be used for encrypted messages which can be decrypted with the private key
  3. Signatures: private keys can produce signatures which can be verified with the public key

I have just realized that in ECDSA the second property hardly plays a role. There is only a DH key exchange to produce a symmetric key which can be used for de- and encryption.

I think explaining diffie hellman does not make sense in the beginning sections and for lightning I only need it if I go down all the way with the sphinx mix format.

renepickhardt avatar Jan 13 '19 20:01 renepickhardt

I'm not quite convinced that you are writing on the right level of abstraction. I believe that anybody who hasn't understood the basic principle of asymmetric encryption isn't qualified to read a technical book about LN at all. On the other hand, there must be hundreds of really great explanations for this kind of stuff on the Internet.

Maybe you can shorten this stuff very much (most of it feels trivial to me) and give a proper treatment of EC cryptography in the appendix.

stefanwouldgo avatar Jan 16 '19 09:01 stefanwouldgo

I just looked over the first draft on this here

FYI - If you wanted some ECC examples instead of RSA, John Newbery (@jnewbery) has a nice small implementation of secp256k1 here along with some examples in this notebook

conscott avatar Jan 23 '19 09:01 conscott

That code is from Jimmy Song's Programming Blockchain course and is BSD 2-clause licensed. I've updated the file in my repo to include the license and copyright info.

jnewbery avatar Jan 23 '19 17:01 jnewbery