Skip to content

Latest commit

 

History

History
96 lines (80 loc) · 2.42 KB

slides-04-berner-js.md

File metadata and controls

96 lines (80 loc) · 2.42 KB

Puzzle ITC Logo

Bitcoin Cryptography with JavaScript

Oliver Gugger

Full Stack Engineer at Puzzle ITC
github.com/guggero
@gugol
slides: https://gugger.guru

ECC block asymmetric address private key SHA256 signature merkle tree ECDSA public key transaction HMAC multi-signature RIPEMD160

Don't worry! This is a high-level overview for engineers and coders.

Cryptography Primitives in Bitcoin

  • Elliptic curves (ECC / ECDSA)
  • Hashing (SHA, RIPEMD)

Elliptic Curve Cryptography


  • Geometry based one-way function
  • Can be used for key exchange (ECDH) and signatures (ECDSA)
  • Shorter key size compared to RSA
    (256bit ECC ≃ 3072bit RSA)

Cryptographic Hashing

  • Collision resistant, constant-size fingerprint
  • SHA256 extensively used in Bitcoin
  • RIPEMD160 as a secondary safety net for addresses

Demo: Libraries used

Demo

Security concerns

  • 2256 ≃ 1077 addresses
    (universe has ~1080 atoms)
  • Bitcoin Mining: ~76bit in 10 minutes
  • Use secure "randomness"
  • Be very careful with browser RNGs!

Further topics

  • Hierarchical Deterministic (HD) wallets
  • Merkle Trees
  • HMAC
  • PBKDF2

Thank you!

Questions?