Open renepickhardt opened 5 years ago
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.
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
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.
I have put three main properties of asymmetric cryptographic systems in the second section of the book.
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.