Content
@
0 reply
0 recast
0 reaction
.
@chaskin.eth
Though I find it a bit cringey, I've decided to learn in public—hoping it might benefit others (and me if other people wanna learn with me or help along the way) On Day 1 of my zk journey, I focused on modular arithmetic. Here's a breakdown of what I learned and some invaluable resources:
3 replies
1 recast
5 reactions
.
@chaskin.eth
- If a ≡ b (mod n), a & b have same remainder when divided by n - You can add, subtract, & multiply like normal but consider modulus - Multiplicative inverse: a*b ≡ 1 (mod n) if a & n are coprime. Ex: 15 ≡ 3 (mod 6) - Euclidean Algo to find the lowest common detonator
1 reply
0 recast
2 reactions
.
@chaskin.eth
There's properties to make it easier, some being: Addition: (a + b) mod n = [(a mod n) + (b mod n)] mod n Subtraction: (a - b) mod n = [(a mod n) - (b mod n)] mod n Multiplication: (a * b) mod n = [(a mod n) * (b mod n)] mod n
1 reply
0 recast
2 reactions