A presentation at Strange Loop 2022 in September 2022 in St. Louis, MO, USA by Brooklyn Zelenka
โ The Skip Ratchet โญ Massive Hash Chains Without All the Waiting Or: An Encrypted Counting Scheme https://eprint.iacr.org/2022/1078 github.com/fission-codes
Whereโs Quinn? @wilton_quinn GET WELL SOON ๐
Brooklyn Zelenka @expede
Brooklyn Zelenka @expede โข Cofounder & CTO at Fission โข https://fission.codes โข @FissionCodes โข Infra & SDK for edge apps โข PLT, VMs, DSys โ IANYC! โข Standards: UCAN, EIPs, FVM, Multiformats, &c
Brooklyn Zelenka @expede โข Cofounder & CTO at Fission โข https://fission.codes โข @FissionCodes โข Infra & SDK for edge apps โข PLT, VMs, DSys โ IANYC! โข Standards: UCAN, EIPs, FVM, Multiformats, &c https://eprint.iacr.org/2022/1078.pdf
Motivation At a High Level ๐ญ
Motivation ๐ญ Uses
Motivation ๐ญ Uses Local-first data WNFS: distributed private file system Implemented in at least TypeScript, Rust, Golang Electric coins, streaming payment channels HD wallets (key management) Long-running, asymmetric channels
Motivation ๐ญ Deterministic Keys in WNFS / Header / Header / Content /Docs/ Header / Header / Content /Docs/ Header /Docs/ Content /stl.md Header /Docs/ Header /Docs/ Content /stl.md Header /stl.md Content / Content /Docs/ Content /stl.md Header /stl.md Content /stl.md Content
Motivation ๐ญ A Tale As Old as Time
Motivation ๐ญ A Tale As Old as Time PLT cross-pollination driving innovation in cryptography Really simple idea with lots of applications Interesting way of arriving at it / analogies to other areas Letโs talk number systems & applied cryptography!
Fundamentals Hash Chains, Lamport OTP, & More! โ
Fundamentals โ Hash Chains
Fundamentals โ Hash Chains Seed
Fundamentals โ Hash Chains Hash Seed Hash Seed Hash(seed)
Fundamentals โ Hash Chains Hash Seed Hash Hash Hash Seed Seed Hash(seed) Hash Hash(Hash(seed))
Fundamentals โ Hash Chains Hash Seed Hash Hash Hash Hash Hash Hash Seed Seed Seed Hash(seed) Hash Hash(Hash(seed)) Hash Hash(Hash(Hash(seed)))
Fundamentals โ Hash Chains Hash Seed Hash Hash Hash Hash Hash Hash Seed Seed Seed Hash(seed) Hash Hash(Hash(seed)) Hash Hash(Hash(Hash(seed))) H3(seed)
Fundamentals โ Pseudoradom Stream
Fundamentals โ Pseudoradom Stream Seed (ECDH)
Fundamentals โ Pseudoradom Stream โA โB โC Seed (ECDH) Reset โA โB โC
Fundamentals โ Lamport OTP, S/KEY
Fundamentals โ Lamport OTP, S/KEY Seed
Fundamentals โ Lamport OTP, S/KEY Seed Hash H(Seed)
Fundamentals โ Lamport OTP, S/KEY Seed Hash H(Seed) Hash H2(Seed)
Fundamentals โ Lamport OTP, S/KEY Seed Hash H(Seed) Hash H2(Seed) Hash H3(Seed)
Fundamentals โ Lamport OTP, S/KEY Seed Hash H(Seed) Hash H2(Seed) Hash H3(Seed) Hash H4(Seed)
Fundamentals โ Lamport OTP, S/KEY Seed Hash H(Seed) Hash H2(Seed) Hash H3(Seed) Hash H4(Seed) Prover Verifier
Fundamentals โ Lamport OTP, S/KEY Seed Hash H(Seed) Hash H2(Seed) Hash H3(Seed) Hash H4(Seed) Prover Hx(Seed) Verifier
Fundamentals โ Lamport OTP, S/KEY Seed Hash H(Seed) Hash H2(Seed) Hash H3(Seed) Hash H4(Seed) Prover Hx(Seed) Verifier x H
Fundamentals โ Lamport OTP, S/KEY Preimage Seed Hash H(Seed) Hash H2(Seed) Hash H3(Seed) Hash H4(Seed) Prover Hx(Seed) Verifier x H
Fundamentals โ Lamport OTP, S/KEY Preimage Seed Hash H(Seed) Hash H2(Seed) Hash H3(Seed) Hx-1(Seed) Hash โ Hash H4(Seed) Prover Hx(Seed) Verifier x H
Fundamentals โ Lamport OTP, S/KEY Preimage Seed Hash H(Seed) Hash H2(Seed) Hash H3(Seed) Hx-1(Seed) x-1 H Hash โ Hash H4(Seed) Prover Hx(Seed) Verifier x H
Fundamentals โ Lamport OTP, S/KEY Preimage Seed Hash H(Seed) Hash H2(Seed) Hash Preimage H3(Seed) Hx-1(Seed) x-1 H Hash โ Hash H4(Seed) Prover Hx(Seed) Verifier x H
Fundamentals โ Lamport OTP, S/KEY Preimage Seed Hash H(Seed) Hash H2(Seed) Hx-2(Seed) Hash โ Hash Preimage H3(Seed) Hx-1(Seed) x-1 H Hash โ Hash H4(Seed) Prover Hx(Seed) Verifier x H
Fundamentals โ Lamport OTP, S/KEY Preimage Seed Hash H(Seed) Hash H2(Seed) Hx-2(Seed) x-2 H Hash โ Hash Preimage H3(Seed) Hx-1(Seed) x-1 H Hash โ Hash H4(Seed) Prover Hx(Seed) Verifier x H
Fundamentals โ Lamport OTP, S/KEY Preimage Seed Hash H(Seed) Hash H2(Seed) Latest message takes O(n) to catch up One PITM (can be) very bad Hx-2(Seed) Hash โ Hash Preimage H3(Seed) Hx-1(Seed) Hash โ Hash H4(Seed) Prover Hx(Seed) Verifier Eventually run out of hashes x-2 H x-1 H x H
Fundamentals โ Samy Kamkarโs Drive it like you Hacked it https://www.youtube.com/watch?v=UNgvShN4USU
Fundamentals โ Micropayments (Simplified PayWord)
Fundamentals โ Micropayments (Simplified PayWord) ๐ช Seed H(Seed) H2(Seed) H3(Seed) H4(Seed)
Analogy From Counting One Hash, Two Hashโฆ ๐ข
โCan you do Addition?โ the White Queen said. โWhatโs one and one and one and one and one and one and one and one and one and one?โ โI donโt know,โ said Alice. โI lost count.โ โShe canโt do Addition,โ the Red Queen interrupted. โ Lewis Carroll, Through the Looking Glass
Analogy From Counting ๐ข The Ishango Bone Ishango Bone Congo ~20,000 years ๐พ Agriculture ~ 11.5k years ๐ท Herding ~ 10k years Lebombo Bone South Africa ~44,000 years Joeykentin CC-BY-SA 4.0 https://commons.wikimedia.org/wiki/File:Ishango_bone.jpg
Analogy From Counting ๐ข Unary Counting
Analogy From Counting ๐ข Unary Counting | || ||| |||| ||||| |||||| ||||||| |||||||| ||||||||| ||||||||||
Analogy From Counting ๐ข Unary Counting | || ||| |||| | || ||| |||| ||||| |||||| ||||||| |||||||| ||||||||| ||||||||||
Analogy From Counting ๐ข Unary Counting | || ||| |||| ||||| |||||| ||||||| |||||||| ||||||||| |||||||||| | || ||| |||| |||| |||| | |||| || |||| ||| |||| |||| |||| ||||
Analogy From Counting ๐ข Unary Counting | || ||| |||| ||||| |||||| ||||||| |||||||| ||||||||| |||||||||| | || ||| |||| |||| |||| | |||| || |||| ||| |||| |||| |||| |||| || ||||
Analogy From Counting ๐ข Unary Constructors data Peano = Zero | Succ Peano
Analogy From Counting ๐ข Unary Constructors data Peano = Zero | Succ Peano Zero
Analogy From Counting ๐ข Unary Constructors data Peano = Zero | Succ Peano Succ Zero +1 Zero
Analogy From Counting ๐ข Unary Constructors data Peano = Zero | Succ Peano Succ Zero +1 Succ Succ Zero Zero +1
Analogy From Counting ๐ข From Constructors to Functions 0 ฮปf x โ x
Analogy From Counting ๐ข From Constructors to Functions 0 ฮปf x โ x 1 ฮปf x โ f x
Analogy From Counting ๐ข From Constructors to Functions 0 ฮปf x โ x 1 ฮปf x โ f x 2 ฮปf x โ f (f x)
Analogy From Counting ๐ข From Constructors to Functions 0 ฮปf x โ x 1 ฮปf x โ f x 2 ฮปf x โ f (f x) 3 ฮปf x โ f (f (f x))
Analogy From Counting ๐ข From Constructors to Functions 0 ฮปf x โ x 1 ฮปf x โ f x 2 ฮปf x โ 3 ฮปf x โ f (f (f x)) f (f x)
Analogy From Counting ๐ข From Constructors to Functions 0 ฮปf x โ x 1 ฮปf x โ f x 2 ฮปf x โ 3 ฮปf x โ f (f (f x)) 3 h f (f x) x โ h (h (h x))
Analogy From Counting ๐ข Naive ||| Succ (Succ (Succ Zero)) ฮปf x โ f (f (f x)) h (h (h x))
Positional Numerals Abstraction By Symbolic Juxtaposition ๐งฎ
Mathematics is only the art of saying the same thing in different words โ Bertrand Russell
Positional Numerals ๐งฎ Positional Systems
Positional Numerals ๐งฎ Positional Systems Image Credit: National Numismatic Collection at the Smithsonian Institution, CC BY-SA 3.0
Positional Numerals ๐งฎ Positional Systems 9 Image Credit: National Numismatic Collection at the Smithsonian Institution, CC BY-SA 3.0
Positional Numerals ๐งฎ Positional Systems 100 โ ๅฃนไฝฐ 1000 โ ๅฃนไป 9 Image Credit: National Numismatic Collection at the Smithsonian Institution, CC BY-SA 3.0
Positional Numerals ๐งฎ Positional Digits
Positional Numerals ๐งฎ Positional Digits Numeral X 100 X 10 X1
Positional Numerals ๐งฎ Positional Digits Numeral X 100 X 10 X1 0 0 0 0
Positional Numerals ๐งฎ Positional Digits Numeral X 100 X 10 X1 0 0 0 0 11 0 1 1
Positional Numerals ๐งฎ Positional Digits Numeral X 100 X 10 X1 0 0 0 0 11 0 1 1 582 5 8 2
Positional Numerals ๐งฎ Positional Digits Numeral X 10010 X 1010 X 110 0 0 0 0 11 0 1 1 582 5 8 2
Positional Numerals ๐งฎ Mixed-Radix ๐ฅด Numeral X 12111 X 412 X 14 0 0 0 0 11 0 2 3 582 44 1 2
Positional Numerals ๐งฎ Mixed-Radix
Positional Numerals ๐งฎ Mixed-Radix 2022 Sept 22 11:22:03.987 60 minutes / hour 24 hours / day 7 days / week 52 weeks / year
Positional Numerals ๐งฎ Compound Hash
Positional Numerals ๐งฎ Compound Hash Numeral โhundredsโ โtensโ โonesโ
Positional Numerals ๐งฎ Compound Hash Numeral โhundredsโ โtensโ โonesโ X + 0 โhundredsโ โtensโ โonesโ
Positional Numerals ๐งฎ Compound Hash Numeral โhundredsโ โtensโ โonesโ X + 0 โhundredsโ โtensโ โonesโ h(โtensโ) h(โonesโ) X + 11 โhundredsโ 523c079f58465edb79c834fbf460809 d413f65286221536df21b59e5d29215 9cf864039bb511c072beb35c568c80e e2817d8cc70a1d6ef4273e7c63c6b1a df 08
Positional Numerals ๐งฎ Compound Hash Numeral โhundredsโ โtensโ โonesโ X + 0 โhundredsโ โtensโ โonesโ h(โtensโ) h(โonesโ) X + 11 X + 582 โhundredsโ h5(โhundredsโ) 523c079f58465edb79c834fbf460809 d413f65286221536df21b59e5d29215 9cf864039bb511c072beb35c568c80e e2817d8cc70a1d6ef4273e7c63c6b1a df 08 h8(โtensโ) h2(โonesโ) b7fee5aff5d93be282a3826766c8f4a 6d00cd80a2f03d126077401fa4b9512 e6f92be646346875e815ebd95fbc0e3 3af7a35e620e78b300c5a8fd8791e77 9d4e79ec3f4ea7ae36099af5a39478e b2412e2d630b2325decdbdb4a0eeb34 cb f7 01
Positional Numerals ๐งฎ Denominated PayWord https://sci-hub.ru/https://link.springer.com/article/10.1007/s10623-003-1162-6
Positional Numerals ๐งฎ Denominated PayWord L H(L) H2(L) https://sci-hub.ru/https://link.springer.com/article/10.1007/s10623-003-1162-6
Positional Numerals ๐งฎ Denominated PayWord L H(L) H2(L) M H(M) H2(M) https://sci-hub.ru/https://link.springer.com/article/10.1007/s10623-003-1162-6 H3(M) H4(M)
Positional Numerals ๐งฎ Denominated PayWord L H(L) H2(L) M H(M) H2(M) H3(M) S H(S) H2(S) H3(S) https://sci-hub.ru/https://link.springer.com/article/10.1007/s10623-003-1162-6 H4(M)
Positional Numerals ๐งฎ Denominated PayWord $20s L H(L) H2(L) $5s M H(M) H2(M) H3(M) $1s S H(S) H2(S) H3(S) https://sci-hub.ru/https://link.springer.com/article/10.1007/s10623-003-1162-6 H4(M)
Positional Numerals ๐งฎ Denominated PayWord ๐ ๐ $20s L H(L) H2(L) $5s M H(M) H2(M) H3(M) $1s S H(S) H2(S) H3(S) https://sci-hub.ru/https://link.springer.com/article/10.1007/s10623-003-1162-6 H4(M)
Analogy From Data Structures Who Doesnโt Love DAGs In Their Crypto? ๐ฒ
Analogy From Data Structures ๐ฒ Deterministic Skip List
Analogy From Data Structures ๐ฒ Deterministic Skip List Nil A B C D E F G H
Analogy From Data Structures ๐ฒ Deterministic Skip List Nil D H B A F C E G
Analogy From Data Structures ๐ฒ Simplified Binary Skip Ratchet
Analogy From Data Structures ๐ฒ Simplified Binary Skip Ratchet L M S
Analogy From Data Structures ๐ฒ Simplified Binary Skip Ratchet L M S 0002
Analogy From Data Structures ๐ฒ Simplified Binary Skip Ratchet L L M M S 0002 +1 h(S) 0012
Analogy From Data Structures ๐ฒ Simplified Binary Skip Ratchet L L L M M h(M) S 0002 +1 h(S) 0012 +1 Sโ 0102
Analogy From Data Structures ๐ฒ Simplified Binary Skip Ratchet L L L M M h(M) S 0002 +1 h(S) 0012 Next M +1 Sโ 0102
Analogy From Data Structures ๐ฒ Simplified Binary Skip Ratchet L L L L M M h(M) h(M) S 0002 +1 h(S) 0012 Next M +1 Sโ 0102 +1 h(Sโ) 0112
Analogy From Data Structures ๐ฒ Simplified Binary Skip Ratchet L L L L h(L) M M h(M) h(M) Mโ S 0002 +1 h(S) 0012 Next M +1 Sโ 0102 +1 h(Sโ) 0112 +1 Sโ 1002
Analogy From Data Structures ๐ฒ Simplified Binary Skip Ratchet L L L L h(L) M M h(M) h(M) Mโ S 0002 +1 h(S) 0012 Next M +1 Sโ 0102 +1 h(Sโ) 0112 Next M +1 Sโ 1002
Analogy From Data Structures ๐ฒ Simplified Binary Skip Ratchet Next L Next L Next L Next L L L L L h(L) M M h(M) h(M) Mโ S 0002 +1 h(S) 0012 Next M +1 Sโ 0102 +1 h(Sโ) 0112 Next M +1 Sโ 1002
Analogy From Data Structures ๐ฒ Deriving Secrets L L โ M M โ S โ S OUT
Analogy From Data Structures ๐ฒ Deriving Secrets With Secrets Seed +1 State 1 +1 State 2 +1 State 3 +1 State 4 +1 State 5
Analogy From Data Structures ๐ฒ Deriving Secrets With Secrets Seed +1 State 1 โ Secret 1 +1 State 2 โ Secret 2 +1 State 3 โ Secret 3 +1 State 4 โ Secret 4 +1 State 5 โ Secret 5
Analogy From Data Structures ๐ฒ Deriving Secrets With Secrets Seed +1 State 1 +1 โ Secret 1 State 2 โ โ Secret 2 +1 State 3 โ Secret 3 +1 State 4 โ Secret 4 +1 State 5 โ Secret 5
Security Who Hashes the Hashers? ๐
Security ๐ Zeroing & Epochs
Security ๐ Zeroing & Epochs 10 11 โฆ 18 19 20 21 22 โฆ
Security ๐ Zeroing & Epochs 10 11 โฆ 18 19 20 21 22 โฆ 1x10
Security ๐ Zeroing & Epochs 10 11 โฆ 18 19 20 21 22 โฆ 1x10 Zero 0
Security ๐ Zeroing & Epochs 10 11 โฆ 18 19 20 21 22 โฆ 1x10 Zero +1 0 1
Security ๐ Zeroing & Epochs 10 11 โฆ 18 19 20 21 22 โฆ 1x10 Zero +1 0 1 8
Security ๐ Zeroing & Epochs 10 11 โฆ 18 19 20 21 22 โฆ 1x10 Zero +1 0 +1 1 8 9
Security ๐ Zeroing & Epochs 10 11 โฆ 18 19 20 21 22 โฆ 1x10 2x10 Zero +1 0 +1 1 8 9
Security ๐ Zeroing & Epochs 10 11 โฆ 18 19 20 21 22 โฆ 1x10 2x10 Zero Zero +1 0 +1 1 8 9 0
Security ๐ Zeroing & Epochs 10 11 โฆ 18 19 20 21 22 โฆ 1x10 2x10 Zero Zero +1 0 +1 1 8 9 0 +1 1
Security ๐ Zeroing & Epochs L hash h(L) M hash h(M)
Security ๐ Zeroing & Epochs L Salt hash h(L) M hash h(M)
Security ๐ Zeroing & Epochs L Salt Merge hash h(L) M hash h(M)
Security ๐ Zeroing & Epochs L Salt Merge hash hash h(L) M hash h(M)
Security ๐ Zeroing & Epochs L Merge Salt M-1 ๐ h(M-1) hash hash h(L) M hash h(M)
Security ๐ Setup Seed hash hash pre-L Merge hash pre-M L @ 1/2 hash L @ 1/2 L @ 1/2 M @ 1/2 M @ 1/2 hash Merge Salt Merge hash S @ 1/2 hash S @ 2/2 M @ 2/2 hash Sโ @ 1/2
Security ๐ Random Start ๐๐ฒ
Security ๐ Random Start ๐๐ฒ L
Security ๐ Random Start ๐๐ฒ L-1 +1 L
Security ๐ Random Start ๐๐ฒ L-1 +1 L M
Security ๐ Random Start ๐๐ฒ ๐ฒ5 L-1 +1 L M
Security ๐ Random Start ๐๐ฒ ๐ฒ5 L-1 +1 L M +4
Security ๐ Random Start ๐๐ฒ ๐ฒ5 L-1 +1 L M +4 M+4
Security ๐ Random Start ๐๐ฒ ๐ฒ5 L-1 +1 L M +4 M+4 +1 M+5
Security ๐ Random Start ๐๐ฒ ๐ฒ5 L-1 +1 L M +4 M+4 M+5 +1 S
Security ๐ Random Start ๐๐ฒ ๐ฒ5 L-1 ๐ฒ 42 +1 L M +4 M+4 M+5 +1 S
Security ๐ Random Start ๐๐ฒ ๐ฒ5 L-1 ๐ฒ 42 +1 L M +4 M+4 M+5 +1 S +42 S+42
Security ๐ Unary + Positional
Security ๐ Unary + Positional L-1 h(M) h(S) L+1 L M Sโ h(M) h(Sโ) Sโ Mโ h2(M) h(Sโ) Sโโ h(Sโโ) Sโโ h(M) h(Sโโ) Sโโโ h(S)
Security ๐ Unary + Positional Unary L-1 h(M) h(S) L+1 L M Sโ h(M) h(Sโ) Sโ Mโ h2(M) h(Sโ) Sโโ h(Sโโ) Sโโ h(M) h(Sโโ) Sโโโ h(S)
Security ๐ Unary + Positional Unary L-1 h(M) h(S) L+1 L M Sโ h(M) h(Sโ) Sโ Mโ h2(M) h(Sโ) Sโโ Positional h(Sโโ) Sโโ h(M) h(Sโโ) Sโโโ h(S)
Security ๐ Limiting Ranges ๐
Security ๐ Limiting Ranges ๐ G L M S
Security ๐ Limiting Ranges ๐ G L G+L M S
Security ๐ Limiting Ranges ๐ G G G G L L L L G+L G+L G+L G+L M M h(M) h(M) S h(S) Sโ h(Sโ)
Security ๐ Limiting Ranges ๐ G G G G G G L L L L h(L) h(L) G+L G+L G+L G+L G + h(L) G + h(L) M M h(M) h(M) Mโ Mโ S h(S) Sโ h(Sโ) Sโ h(Sโ)
Security ๐ Range Access G+(L-1) h(M) h(S) G+(L+1) G+L M Sโ h(M) h(Sโ) Sโ Mโ h2(M) h(Sโ) Sโโ h(Sโโ) Sโโ h(M) h(Sโโ) Sโโโ h(S)
Wrap Up ๐
Wrap Up ๐ Skip Ratchet Seed +1 State 1 โ Secret 1 +1 State 2 โ Secret 2 +1 State 3 โ Secret 3 +1 State 4 โ Secret 4 +1 State 5 โ Secret 5
Wrap Up ๐ Takeaways
Wrap Up ๐ Takeaways Really fast secrets thanks to positional structure In production in several systems, still finding more uses Very disparate ideas share some common core Many ways to tackle a problem Thereโs still tons of low hanging fruit out there!
Wrap Up ๐ WNFS: Skip Ratchet In Situ B C A Z W X Y
Wrap Up ๐ WNFS: Skip Ratchet In Situ PB PC PA PZ PW PX B PY C A Z W X Y
๐ Thank You, Strange Loop @expede brooklyn@fission.codes https://eprint.iacr.org/2022/1078.pdf
View Skip Ratchet: Massive Hash Chains Without All The Waiting on Notist.
Dismiss
The following resources were mentioned during the presentation or are useful additional information.