Score:2

How can I understand the math behind crypto, especially that used in blockchains / distributed ledgers?

ke flag

A bit of a background about me; Computer Engineer but during my studies I didn't dive too deep into the maths, especially the crypto maths that is used to make the blockchain and cryptography work.

I'm looking for advice from any senior or experienced researchers or practitioners in this field to give me some advice and point me towards the correct direction.

If you can outline exactly which math topics I need to revise and learn - I would be thankful!

P.S: Suggestions for any useful and relevant online courses are most welcome!

Titanlord avatar
tl flag
I wouldn't say there is a specific branch of math just for crypto. In my opinion crypto is applied mathematics using a lot of different concepts from different fields. I would suggest reading [Katz & Lindell's textbook (3nd edition)](https://www.cs.umd.edu/~jkatz/imc.html) to start understanding modern crypto.
Muhammad Yasir avatar
ke flag
@Titanlord , do i need any other mathematical knowledge to read and properly understand this book ? I have reasonable math knowledge/background but i'm no math genius and there are things i studied 4+ years ago - i will take a look at the book for sure but i would appreciate your feedback as well !
Titanlord avatar
tl flag
The key concepts are all explained in the book (a lot of basic stuff in the appendix). All you need (i think) is the ability to understand mathematical concepts. For an introduction to blockchain/cryptocurrencies and some other crypto stuff I recommend the youtube channel 3 blue 1 brown.
Muhammad Yasir avatar
ke flag
@Titanlord thanks mate ! i understand a fair bit about blockchain and the idea of DLT in itself is honestly very, very amazing. That being said, i believe that without knowing about how things work under the hood, i would be doing my very own self the disservice of convincing me of having a solid understanding of blockchain when i only have a surface-level knowledge and some development experience on web3. my conscience won't settle until i know how are things actually working within the DLT core. Glad to have make your kind acquaintance and thanks again for the guidance !
Score:4
gd flag

Honestly speaking, the amount and sophistication of cryptography used in DLTs depends a lot on which project you are studying. First of all, please note that blockchain/DLT has also become a marketing term today, so many projects out there are just nothing more than legacy databases with a cool name. Public, unpermissioned cryptocurrencies are another matter, and imho they are what you have to study if you are really interested in this brand new field. (But first check you really need DLT. You get many features and lose many others, so first check you really don't need just a DB.) If you haven't changed your mind, let's go on with just a bunch of examples and references :)

  • In Bitcoin, you find standard pubkey/privkey signatures over elliptic curves and hashing (e.g., the core of PoW), both of which nowadays can be considered standard cryptography (nothing more than what you can find in a modern X.509 certificate of a web server domain). Much more challenging for a beginner are imho incentives and game-theory related concepts. A book I loved when I began my journey in this world is "Mastering Bitcoin 2nd. Ed." by Andreas Antonopoulos, which introduces the many concepts (the few cryptography ones as well) you need to master to dig into this world. But be careful to not consider Antonopoulos's book math-rigorous: as @kelalaka points out in comments, there are misleading problems with definition of EC scalar multiplication, in page 68 of first edition and 63 of second.
  • Usually privacy-oriented coins use fancier cryptography. For example, in Monero you find Diffie-Hellman exchanges, Ring Signatures, and other cool ideas (e.g., Pedersen Commitments and Bulletproofs). I suggest you check https://www.getmonero.org/library/ : "Zero to Monero 2nd Edition", a complete reference of today Monero ("today" because hard forks, aka non back-compatible changes are common in Monero) with more math footprint than "Mastering Bitcoin". I think good companion documents for it are the cheatsheets you can find in the same web page (disclaimer: they are mine ;-) )
  • The future of Ring Signatures seems to be Triptych and Seraphis on Monero side, and Lelantus Spark on Firo side (a "new" cryptocurrency, formerly Zcoin but with completely different protocols/math)
  • Other very cool cryptographic stuff used in cryptocurrencies are Zero Knowledge Proofs; be careful because they have so many flavors. Bulletproof used in Monero is one of them, but for sure you will find ZK-SNARKs of Zcash, ZK-STARKs and ZK-Rollups for Ethereum's future... I avoid references at application level because they are a world into a world, and imho to really understand them you have to start from the foundations, for example "Foundations of Cryptography Volume 1" by Oded Goldreich and then dig into models/heuristics of non-interactiveness.... really a mess (this is just a simplified idea: https://github.com/AdamISZ/from0k2bp/blob/master/from0k2bp.pdf - btw it contains a very understandable intro to Commitments)
kelalaka avatar
in flag
To be honest [Antonopoulos book](https://crypto.stackexchange.com/a/96056/18298) doesn't use correct language on the elliptic curves that confused many [How do I multiply two points on an elliptic curve?](https://crypto.stackexchange.com/q/88214/18298) and Foundations of Cryptography Volume 1" by Oded Goldreich is far from a beginner's book.
baro77 avatar
gd flag
I agree Mastering Bitcoin is far from providing a complete and satisfying coverage of EC, but given its broad goal it just gives an idea... of course it's wrong to learn EC only on that book, but perhaps the intro is enough for the OP to taste the topic in the context of DLT... I don't know, I guess it depends on his background (I'm also a computer engineer and I have studied a lot of math, so that degree doesn't seem an objective way to understand someone's previous knowledge ;) ).. BTW, I have checked on page 68, but I guess yours was a reference to first edition, not second one..
baro77 avatar
gd flag
Yes, Foundation of Cryptography is as demanding as profound, but ZKs are, so no way to really learn them with a beginner attitude/tools ... just imho, of course :)
kelalaka avatar
in flag
Event the second edition is problematic for the EC scalar multiplication (page 63). That's it. it is scalar multiplication.
baro77 avatar
gd flag
Thanks so much for grammar fixes @Aman and sorry... next time I'll take a breath and I'll reread my words before posting
baro77 avatar
gd flag
thanks for the updated page reference @kelalaka
kelalaka avatar
in flag
You may not those on your answer, that will be more seeable.
baro77 avatar
gd flag
Pardon @kelalaka ?! I haven't understood your last suggestion, sorry
kelalaka avatar
in flag
Indicate Antonopoulos's ECC error with the links and pages that I've provided?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.