Hasty Briefsbeta

  • #ECDSA
  • #Cryptography
  • #Ethereum
  • ECDSA (Elliptic Curve Digital Signature Algorithm) is used by the Ethereum blockchain for signing messages.
  • The article explains ECDSA with a focus on security, including the signature malleability attack.
  • Prerequisites include basic knowledge of Public Key Cryptography and basic math, without requiring abstract algebra.
  • The article is written in a constructive, insightful, and naive style, encouraging critical thinking and engagement.
  • Modular arithmetic is fundamental to ECDSA, with operations like addition and multiplication mod p being key.
  • The extended Euclidean algorithm (EEA) is used to compute multiplicative inverses mod p efficiently.
  • Fibonacci numbers are connected to the time complexity of the EEA, growing exponentially with the golden ratio.
  • secp256k1 is the elliptic curve used by Ethereum, defined by y² = x³ + 7 mod p, where p is a large prime.
  • A group is defined over the points on the elliptic curve, with addition operations that include a point at infinity.
  • The article details how to add points on the elliptic curve, both in continuous and modular (mod p) cases.
  • Projective space is introduced to handle the point at infinity and simplify computations.
  • ECDSA private keys are numbers in ℤₙ, and public keys are derived by multiplying the private key by the generator point G.
  • Signing a message involves generating a nonce k, computing R = kG, and deriving the signature components r and s.
  • Signature verification involves recovering R from the signature and checking it against the message hash and public key.
  • The signature malleability attack allows an attacker to create a valid signature (r, n-s, 1-v) from (r, s, v), bypassing blacklists.