SlideShare a Scribd company logo
1 of 49
Hash-based Signatures
Andreas Hülsing
CAST Workshop
03/05/2018
Darmstadt
Post-Quantum Signatures
Lattice, MQ, Coding
Signature and/or key sizes
Runtimes
Secure parameters
17-10-2023 PAGE 2
...
1
3
1
4
2
3
2
2
3
2
3
4
1
2
1
2
1
1










y
x
x
x
x
x
x
y
x
x
x
x
x
x
y
Hash-based Signature Schemes
[Mer89]
17-10-2023 PAGE 3
Post quantum
Only secure hash function
Security well understood
Fast
RSA – DSA – EC-DSA...
17-10-2023 PAGE 4
Intractability
Assumption
Digital
signature
scheme
Cryptographic
hash function
RSA, DH, SVP,
MQ, …
Hash function families
(Hash) function families
• 𝐻𝑛 ≔ ℎ𝑘: {0,1}𝑚 𝑛
→ {0,1}𝑛
• 𝑚(𝑛) ≥ 𝑛
• „efficient“
ℎ𝑘
{0,1}𝑚 𝑛
{0,1}𝑛
One-wayness
𝐻𝑛 ≔ ℎ𝑘: {0,1}𝑚 𝑛
→ {0,1}𝑛
ℎ𝑘
$
𝐻𝑛
𝑥
$
{0,1}𝑚 𝑛
𝑦𝑐 ℎ𝑘 𝑥
Success if ℎ𝑘 𝑥∗ = 𝑦𝑐
𝑦𝑐, 𝑘
𝑥∗
Collision resistance
𝐻𝑛 ≔ ℎ𝑘: {0,1}𝑚 𝑛
→ {0,1}𝑛
ℎ𝑘
$
𝐻𝑛
Success if
ℎ𝑘 𝑥1
∗
= ℎ𝑘 𝑥2
∗
and
𝑥1
∗
≠ 𝑥2
∗
𝑘
(𝑥1
∗
, 𝑥2
∗
)
Second-preimage resistance
𝐻𝑛 ≔ ℎ𝑘: {0,1}𝑚 𝑛
→ {0,1}𝑛
ℎ𝑘
$
𝐻𝑛
𝑥𝑐
$
{0,1}𝑚 𝑛
Success if
ℎ𝑘 𝑥𝑐 = ℎ𝑘 𝑥∗ and
𝑥𝑐 ≠ 𝑥∗
𝑥𝑐, 𝑘
𝑥∗
Undetectability
𝐻𝑛 ≔ ℎ𝑘: {0,1}𝑚 𝑛
→ {0,1}𝑛
ℎ𝑘
$
𝐻𝑛
𝑏
$
{0,1}
If 𝑏 = 1
𝑥
$
{0,1}𝑚 𝑛
𝑦𝑐 ℎ𝑘(𝑥)
else
𝑦𝑐
$
{0,1}𝑛
𝑦𝑐, 𝑘
𝑏*
Pseudorandomness
𝐻𝑛 ≔ ℎ𝑘: {0,1}𝑚 𝑛
→ {0,1}𝑛
1𝑛
g
𝑏
𝑥
𝑦 = 𝑔(𝑥)
𝑏*
If 𝑏 = 1
𝑔
$
𝐻𝑛
else
𝑔
$
𝑈𝑚 𝑛 ,𝑛
Generic security
• „Black Box“ security (best we can do without
looking at internals)
• For hash functions: Security of random function family
• (Often) expressed in #queries (query complexity)
• Hash functions not meeting generic security
considered insecure
Generic Security - OWF
Classically:
• No query: Output random guess
𝑆𝑢𝑐𝑐𝐴
𝑂𝑊
=
1
2𝑛
• One query: Guess, check, output new guess
𝑆𝑢𝑐𝑐𝐴
𝑂𝑊
=
2
2𝑛
• q-queries: Guess, check, repeat q-times, output new
guess
𝑆𝑢𝑐𝑐𝐴
𝑂𝑊
=
𝑞+1
2𝑛
• Query bound: Θ(2𝑛)
Generic Security - OWF
Quantum:
• More complex
• Reduction from quantum search for random 𝐻
• Know lower & upper bounds for quantum search!
• Query bound: Θ(2𝑛/2)
• Upper bound uses variant of Grover
(Disclaimer: Currently only proof for 2𝑚 ≫ 2𝑛)
Generic Security
OW SPR CR UD* PRF*
Classical Θ(2𝑛
) Θ(2𝑛
) Θ(2𝑛/2) Θ(2𝑛
) Θ(2𝑛
)
Quantum Θ(2𝑛/2
) Θ(2𝑛/2
) Θ(2𝑛/3
) Θ(2𝑛/2
) Θ(2𝑛/2
)
* conjectured, no proof
Hash-function properties
17-10-2023 PAGE 16
Collision-Resistance
2nd-Preimage-
Resistance
One-way Pseudorandom
Assumption
/
Attacks
stronger /
easier to
break
weaker /
harder to
break
Attacks on Hash Functions
17-10-2023 PAGE 17
2004 2005 2008
MD5
Collisions
(theo.)
SHA1
Collisions
(theo.)
MD5
Collisions
(practical!)
2017
MD5 & SHA-1
No (Second-) Preimage
Attacks!
SHA1
Collisions
(practical!)
Basic Construction
17-10-2023 PAGE 18
Lamport-Diffie OTS [Lam79]
Message M = b1,…,bm, OWF H = n bit
SK
PK
Sig
17-10-2023 PAGE 19
sk1,0 sk1,1 skm,0 skm,1
pk1,0 pk1,1 pkm,0 pkm,1
H H H H H H
sk1,b1 skm,bm
*
Mux
b1 Mux
b2 Mux
bm
Security
Theorem:
If H is one-way then LD-OTS is one-time eu-cma-
secure.
Merkle’s Hash-based Signatures
17-10-2023 PAGE 21
OTS
OTS OTS OTS OTS OTS OTS OTS
H
H H H H H H H
H H H H
H H
H
PK
SIG = (i=2, , , , , )
OTS
SK
Security
Theorem:
MSS is eu-cma-secure if OTS is a one-time eu-cma
secure signature scheme and H is a random element
from a family of collision resistant hash functions.
Winternitz-OTS
Recap LD-OTS [Lam79]
Message M = b1,…,bm, OWF H = n bit
SK
PK
Sig
sk1,0 sk1,1 skm,0 skm,1
pk1,0 pk1,1 pkm,0 pkm,1
H H H H H H
sk1,b1 skm,bm
*
Mux
b1 Mux
b2 Mux
bn
LD-OTS in MSS
Verification:
1. Verify
2. Verify authenticity of
We can do better!
SIG = (i=2, , , , , )
Trivial Optimization
Message M = b1,…,bm, OWF H = n bit
sk1,0 sk1,1 skm,0 skm,1
pk1,0 pk1,1 pkm,0 pkm,1
H H H H H H
sig1,0
*
Mux
b1
sig1,1
Mux ¬b1
sigm,0
Mux
bm
sigm,1
Mux ¬bm
Sig
PK
SK
Optimized LD-OTS in MSS
Verification:
1. Compute from
2. Verify authenticity of
Steps 1 + 2 together verify
SIG = (i=2, , , , , )
X
Let‘s sort this
Message M = b1,…,bm, OWF H
SK: sk1,…,skm,skm+1,…,sk2m
PK: H(sk1),…,H(skm),H(skm+1),…,H(sk2m)
Encode M: M‘ = M||¬M = b1,…,bm,¬b1,…,¬bm
(instead of b1, ¬b1,…,bm,¬bm )
ski , if bi = 1
Sig: sigi =
H(ski) , otherwise
Checksum with bad
performance!
Optimized LD-OTS
Message M = b1,…,bm, OWF H
SK: sk1,…,skm,skm+1,…,skm+1+log m
PK: H(sk1),…,H(skm),H(skm+1),…,H(skm+1+log m)
Encode M: M‘ = b1,…,bm,¬ 1
𝑚
𝑏𝑖
ski , if bi = 1
Sig: sigi =
H(ski) , otherwise
IF one bi is flipped from 1 to 0, another bj will flip from 0 to 1
Function chains
Function family: 𝐻𝑛≔ ℎ𝑘: {0,1}𝑛
→ {0,1}𝑛
ℎ𝑘
$
𝐻𝑛
Parameter 𝑤
Chain: 𝑐𝑖
𝑥 = ℎ𝑘 𝑐𝑖−1
𝑥 = ℎ𝑘 ∘ ℎ𝑘 ∘ ⋯ ∘ ℎ𝑘
c0(x) = x
𝑐1(𝑥) = ℎ𝑘(𝑥)
𝒄𝒘−𝟏(𝑥)
i-times
WOTS
Winternitz parameter w, security parameter n,
message length m, function family 𝐻𝑛
Key Generation: Compute 𝑙, sample ℎ𝑘
c0(skl ) = skl
c1(skl ) pkl = cw-1(skl )
c0(sk1) = sk1
c1(sk1)
pk1 = cw-1(sk1)
WOTS Signature generation
M
b1 b2 b3 b4 … … … … … … … bm‘
bm‘+1 bm‘+2 … … bl
C
c0(skl ) = skl
pkl = cw-1(skl )
c0(sk1) = sk1
pk1 = cw-1(sk1)
σ1=cb1(sk1)
σl =cbl (skl )
Signature:
σ = (σ1, …, σl )
WOTS Signature Verification
b1 b2 b3 b4 … … … … … … … bm‘
bm‘+1 bl 1+2 … … bl
pkl
pk1
Signature:
σ = (σ1, …, σl )
σ1
σl
𝒄𝟏
(σ1)
𝒄𝟐
(σ1)
𝒄𝟑
(σ1)
𝒄𝒘−𝟏−𝒃𝟏 (σ1)
𝒄𝒘−𝟏−𝒃𝒍 (σl )
=?
=?
Verifier knows: M, w
WOTS Function Chains
For 𝑥 ∈ 0,1 𝑛 define 𝑐0 𝑥 = 𝑥 and
• WOTS: 𝑐𝑖
𝑥 = ℎ𝑘(𝑐𝑖−1
𝑥 )
• WOTS+: 𝑐𝑖 𝑥 = ℎ𝑘(𝑐𝑖−1 𝑥 ⨁ 𝑟𝑖)
WOTS Security
Theorem (informally):
W-OTS is strongly unforgeable under chosen message attacks
if 𝐻𝑛 is a collision resistant family of undetectable one-way
functions.
W-OTS+ is strongly unforgeable under chosen message attacks
if 𝐻𝑛 is a 2nd-preimage resistant family of undetectable one-
way functions.
XMSS
XMSS
Applies several tricks to achieve collision-resilience
-> signature size halved
Tree: Uses bitmasks
Leafs: Use binary tree
with bitmasks
OTS: WOTS+
Mesage digest:
Randomized hashing
H
bi
H
Multi-Tree XMSS
Uses multiple layers of trees to reduce key
generation time
-> Key generation
(= Building first tree on each layer)
Θ(2h) → Θ(d*2h/d)
-> Allows to reduce
worst-case signing times
Θ(h/2) → Θ(h/2d)
XMSS in practice
XMSS Internet-Draft
(draft-irtf-cfrg-xmss-hash-based-signatures)
• Protecting against multi-target attacks / tight
security
• n-bit hash => n bit security
• Small public key (2n bit)
• At the cost of ROM for proving PK compression secure
• Function families based on SHA2
• Equal to XMSS-T [HRS16] up-to message digest
XMSS / XMSS-T Implementation
C Implementation, using OpenSSL [HRS16]
Sign (ms) Signature (kB) Public Key
(kB)
Secret Key
(kB)
Bit Security
classical/
quantum
Comment
XMSS 3.24 2.8 1.3 2.2 236 /
118
h = 20,
d = 1,
XMSS-T 9.48 2.8 0.064 2.2 256 /
128
h = 20,
d = 1
XMSS 3.59 8.3 1.3 14.6 196 /
98
h = 60,
d = 3
XMSS-T 10.54 8.3 0.064 14.6 256 /
128
h = 60,
d = 3
Intel(R) Core(TM) i7 CPU @ 3.50GHz
XMSS-T uses message digest from Internet-Draft
All using SHA2-256, w = 16 and k = 2
SPHINCS
About the statefulness
• Works great for some settings
• However....
... back-up
... multi-threading
... load-balancing
How to Eliminate the State
SPHINCS
• Stateless Scheme
• XMSSMT + HORST
+ (pseudo-)random index
• Collision-resilient
• Deterministic signing
• SPHINCS-256:
• 128-bit post-quantum secure
• Hundrest of signatures / sec
• 41 kb signature
• 1 kb keys
SPHINCS+ (our NIST submission)
• Strengthened security gives smaller signatures
• Collision- and multi-target attack resilient
• Small keys, medium size signatures (lv 3: 17kB)
• THE conservative choice
• No citable speeds yet
46
https://sphincs.org
Instantiations
• SPHINCS+-SHAKE256
• SPHINCS+-SHA-256
• SPHINCS+-Haraka
47
https://sphincs.org
Instantiations (small vs fast)
48
https://sphincs.org
Thank you!
Questions?
17-10-2023 PAGE 49
For references, literature & longer lectures see https://huelsing.net

More Related Content

Similar to 20180503_hash_based.pptx

Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)Svetlin Nakov
 
Hash Techniques in Cryptography
Hash Techniques in CryptographyHash Techniques in Cryptography
Hash Techniques in CryptographyBasudev Saha
 
Digital Signatures: Reassessing security of randomizable signatures
Digital Signatures: Reassessing security of randomizable signaturesDigital Signatures: Reassessing security of randomizable signatures
Digital Signatures: Reassessing security of randomizable signaturesPriyanka Aash
 
Blockchain Cryptography for Developers (Nakov @ BGWebSummit 2018)
Blockchain Cryptography for Developers (Nakov @ BGWebSummit 2018)Blockchain Cryptography for Developers (Nakov @ BGWebSummit 2018)
Blockchain Cryptography for Developers (Nakov @ BGWebSummit 2018)Svetlin Nakov
 
Cryptography for Smalltalkers 2 - ESUG 2006
Cryptography for Smalltalkers 2 - ESUG 2006Cryptography for Smalltalkers 2 - ESUG 2006
Cryptography for Smalltalkers 2 - ESUG 2006Martin Kobetic
 
Tsn linux elce17
Tsn linux elce17Tsn linux elce17
Tsn linux elce17henrikau
 
Academy PRO: Cryptography 3
Academy PRO: Cryptography 3Academy PRO: Cryptography 3
Academy PRO: Cryptography 3Binary Studio
 
introduction to cryptography (basics of it)
introduction to cryptography (basics of it)introduction to cryptography (basics of it)
introduction to cryptography (basics of it)neonaveen
 
Everything I always wanted to know about crypto, but never thought I'd unders...
Everything I always wanted to know about crypto, but never thought I'd unders...Everything I always wanted to know about crypto, but never thought I'd unders...
Everything I always wanted to know about crypto, but never thought I'd unders...Codemotion
 
Executing Boolean Queries on an Encrypted Bitmap Index
Executing Boolean Queries on an Encrypted Bitmap IndexExecuting Boolean Queries on an Encrypted Bitmap Index
Executing Boolean Queries on an Encrypted Bitmap IndexMohamed Ahmed Abdelraheem
 
Blockchain and Smart Contract Simulation
Blockchain and Smart Contract SimulationBlockchain and Smart Contract Simulation
Blockchain and Smart Contract SimulationJun Furuse
 
Message Authentication using Message Digests and the MD5 Algorithm
Message Authentication using Message Digests and the MD5 AlgorithmMessage Authentication using Message Digests and the MD5 Algorithm
Message Authentication using Message Digests and the MD5 AlgorithmAjay Karri
 

Similar to 20180503_hash_based.pptx (20)

Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
Blockchain Cryptography for Developers (Nakov @ BlockWorld 2018, San Jose)
 
Hash Techniques in Cryptography
Hash Techniques in CryptographyHash Techniques in Cryptography
Hash Techniques in Cryptography
 
Digital Signatures: Reassessing security of randomizable signatures
Digital Signatures: Reassessing security of randomizable signaturesDigital Signatures: Reassessing security of randomizable signatures
Digital Signatures: Reassessing security of randomizable signatures
 
Common Crypto Pitfalls
Common Crypto PitfallsCommon Crypto Pitfalls
Common Crypto Pitfalls
 
Chapter 15 - Security
Chapter 15 - SecurityChapter 15 - Security
Chapter 15 - Security
 
Blockchain Cryptography for Developers (Nakov @ BGWebSummit 2018)
Blockchain Cryptography for Developers (Nakov @ BGWebSummit 2018)Blockchain Cryptography for Developers (Nakov @ BGWebSummit 2018)
Blockchain Cryptography for Developers (Nakov @ BGWebSummit 2018)
 
Pgp smime
Pgp smimePgp smime
Pgp smime
 
BCH Codes
BCH CodesBCH Codes
BCH Codes
 
Cryptography for Smalltalkers 2 - ESUG 2006
Cryptography for Smalltalkers 2 - ESUG 2006Cryptography for Smalltalkers 2 - ESUG 2006
Cryptography for Smalltalkers 2 - ESUG 2006
 
Tsn linux elce17
Tsn linux elce17Tsn linux elce17
Tsn linux elce17
 
Academy PRO: Cryptography 3
Academy PRO: Cryptography 3Academy PRO: Cryptography 3
Academy PRO: Cryptography 3
 
crypto1.ppt
crypto1.pptcrypto1.ppt
crypto1.ppt
 
needed.ppt
needed.pptneeded.ppt
needed.ppt
 
introduction to cryptography (basics of it)
introduction to cryptography (basics of it)introduction to cryptography (basics of it)
introduction to cryptography (basics of it)
 
crypto.ppt
crypto.pptcrypto.ppt
crypto.ppt
 
Everything I always wanted to know about crypto, but never thought I'd unders...
Everything I always wanted to know about crypto, but never thought I'd unders...Everything I always wanted to know about crypto, but never thought I'd unders...
Everything I always wanted to know about crypto, but never thought I'd unders...
 
Executing Boolean Queries on an Encrypted Bitmap Index
Executing Boolean Queries on an Encrypted Bitmap IndexExecuting Boolean Queries on an Encrypted Bitmap Index
Executing Boolean Queries on an Encrypted Bitmap Index
 
Blockchain and Smart Contract Simulation
Blockchain and Smart Contract SimulationBlockchain and Smart Contract Simulation
Blockchain and Smart Contract Simulation
 
Secure hashing algorithm
Secure hashing algorithmSecure hashing algorithm
Secure hashing algorithm
 
Message Authentication using Message Digests and the MD5 Algorithm
Message Authentication using Message Digests and the MD5 AlgorithmMessage Authentication using Message Digests and the MD5 Algorithm
Message Authentication using Message Digests and the MD5 Algorithm
 

Recently uploaded

Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of PlayPooky Knightsmith
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfPondicherry University
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfstareducators107
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17Celine George
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxEsquimalt MFRC
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...EADTU
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptxJoelynRubio1
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Celine George
 

Recently uploaded (20)

Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of Play
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdf
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17
 

20180503_hash_based.pptx

  • 1. Hash-based Signatures Andreas Hülsing CAST Workshop 03/05/2018 Darmstadt
  • 2. Post-Quantum Signatures Lattice, MQ, Coding Signature and/or key sizes Runtimes Secure parameters 17-10-2023 PAGE 2 ... 1 3 1 4 2 3 2 2 3 2 3 4 1 2 1 2 1 1           y x x x x x x y x x x x x x y
  • 3. Hash-based Signature Schemes [Mer89] 17-10-2023 PAGE 3 Post quantum Only secure hash function Security well understood Fast
  • 4. RSA – DSA – EC-DSA... 17-10-2023 PAGE 4 Intractability Assumption Digital signature scheme Cryptographic hash function RSA, DH, SVP, MQ, …
  • 6. (Hash) function families • 𝐻𝑛 ≔ ℎ𝑘: {0,1}𝑚 𝑛 → {0,1}𝑛 • 𝑚(𝑛) ≥ 𝑛 • „efficient“ ℎ𝑘 {0,1}𝑚 𝑛 {0,1}𝑛
  • 7. One-wayness 𝐻𝑛 ≔ ℎ𝑘: {0,1}𝑚 𝑛 → {0,1}𝑛 ℎ𝑘 $ 𝐻𝑛 𝑥 $ {0,1}𝑚 𝑛 𝑦𝑐 ℎ𝑘 𝑥 Success if ℎ𝑘 𝑥∗ = 𝑦𝑐 𝑦𝑐, 𝑘 𝑥∗
  • 8. Collision resistance 𝐻𝑛 ≔ ℎ𝑘: {0,1}𝑚 𝑛 → {0,1}𝑛 ℎ𝑘 $ 𝐻𝑛 Success if ℎ𝑘 𝑥1 ∗ = ℎ𝑘 𝑥2 ∗ and 𝑥1 ∗ ≠ 𝑥2 ∗ 𝑘 (𝑥1 ∗ , 𝑥2 ∗ )
  • 9. Second-preimage resistance 𝐻𝑛 ≔ ℎ𝑘: {0,1}𝑚 𝑛 → {0,1}𝑛 ℎ𝑘 $ 𝐻𝑛 𝑥𝑐 $ {0,1}𝑚 𝑛 Success if ℎ𝑘 𝑥𝑐 = ℎ𝑘 𝑥∗ and 𝑥𝑐 ≠ 𝑥∗ 𝑥𝑐, 𝑘 𝑥∗
  • 10. Undetectability 𝐻𝑛 ≔ ℎ𝑘: {0,1}𝑚 𝑛 → {0,1}𝑛 ℎ𝑘 $ 𝐻𝑛 𝑏 $ {0,1} If 𝑏 = 1 𝑥 $ {0,1}𝑚 𝑛 𝑦𝑐 ℎ𝑘(𝑥) else 𝑦𝑐 $ {0,1}𝑛 𝑦𝑐, 𝑘 𝑏*
  • 11. Pseudorandomness 𝐻𝑛 ≔ ℎ𝑘: {0,1}𝑚 𝑛 → {0,1}𝑛 1𝑛 g 𝑏 𝑥 𝑦 = 𝑔(𝑥) 𝑏* If 𝑏 = 1 𝑔 $ 𝐻𝑛 else 𝑔 $ 𝑈𝑚 𝑛 ,𝑛
  • 12. Generic security • „Black Box“ security (best we can do without looking at internals) • For hash functions: Security of random function family • (Often) expressed in #queries (query complexity) • Hash functions not meeting generic security considered insecure
  • 13. Generic Security - OWF Classically: • No query: Output random guess 𝑆𝑢𝑐𝑐𝐴 𝑂𝑊 = 1 2𝑛 • One query: Guess, check, output new guess 𝑆𝑢𝑐𝑐𝐴 𝑂𝑊 = 2 2𝑛 • q-queries: Guess, check, repeat q-times, output new guess 𝑆𝑢𝑐𝑐𝐴 𝑂𝑊 = 𝑞+1 2𝑛 • Query bound: Θ(2𝑛)
  • 14. Generic Security - OWF Quantum: • More complex • Reduction from quantum search for random 𝐻 • Know lower & upper bounds for quantum search! • Query bound: Θ(2𝑛/2) • Upper bound uses variant of Grover (Disclaimer: Currently only proof for 2𝑚 ≫ 2𝑛)
  • 15. Generic Security OW SPR CR UD* PRF* Classical Θ(2𝑛 ) Θ(2𝑛 ) Θ(2𝑛/2) Θ(2𝑛 ) Θ(2𝑛 ) Quantum Θ(2𝑛/2 ) Θ(2𝑛/2 ) Θ(2𝑛/3 ) Θ(2𝑛/2 ) Θ(2𝑛/2 ) * conjectured, no proof
  • 16. Hash-function properties 17-10-2023 PAGE 16 Collision-Resistance 2nd-Preimage- Resistance One-way Pseudorandom Assumption / Attacks stronger / easier to break weaker / harder to break
  • 17. Attacks on Hash Functions 17-10-2023 PAGE 17 2004 2005 2008 MD5 Collisions (theo.) SHA1 Collisions (theo.) MD5 Collisions (practical!) 2017 MD5 & SHA-1 No (Second-) Preimage Attacks! SHA1 Collisions (practical!)
  • 19. Lamport-Diffie OTS [Lam79] Message M = b1,…,bm, OWF H = n bit SK PK Sig 17-10-2023 PAGE 19 sk1,0 sk1,1 skm,0 skm,1 pk1,0 pk1,1 pkm,0 pkm,1 H H H H H H sk1,b1 skm,bm * Mux b1 Mux b2 Mux bm
  • 20. Security Theorem: If H is one-way then LD-OTS is one-time eu-cma- secure.
  • 21. Merkle’s Hash-based Signatures 17-10-2023 PAGE 21 OTS OTS OTS OTS OTS OTS OTS OTS H H H H H H H H H H H H H H H PK SIG = (i=2, , , , , ) OTS SK
  • 22. Security Theorem: MSS is eu-cma-secure if OTS is a one-time eu-cma secure signature scheme and H is a random element from a family of collision resistant hash functions.
  • 24. Recap LD-OTS [Lam79] Message M = b1,…,bm, OWF H = n bit SK PK Sig sk1,0 sk1,1 skm,0 skm,1 pk1,0 pk1,1 pkm,0 pkm,1 H H H H H H sk1,b1 skm,bm * Mux b1 Mux b2 Mux bn
  • 25. LD-OTS in MSS Verification: 1. Verify 2. Verify authenticity of We can do better! SIG = (i=2, , , , , )
  • 26. Trivial Optimization Message M = b1,…,bm, OWF H = n bit sk1,0 sk1,1 skm,0 skm,1 pk1,0 pk1,1 pkm,0 pkm,1 H H H H H H sig1,0 * Mux b1 sig1,1 Mux ¬b1 sigm,0 Mux bm sigm,1 Mux ¬bm Sig PK SK
  • 27. Optimized LD-OTS in MSS Verification: 1. Compute from 2. Verify authenticity of Steps 1 + 2 together verify SIG = (i=2, , , , , ) X
  • 28. Let‘s sort this Message M = b1,…,bm, OWF H SK: sk1,…,skm,skm+1,…,sk2m PK: H(sk1),…,H(skm),H(skm+1),…,H(sk2m) Encode M: M‘ = M||¬M = b1,…,bm,¬b1,…,¬bm (instead of b1, ¬b1,…,bm,¬bm ) ski , if bi = 1 Sig: sigi = H(ski) , otherwise Checksum with bad performance!
  • 29. Optimized LD-OTS Message M = b1,…,bm, OWF H SK: sk1,…,skm,skm+1,…,skm+1+log m PK: H(sk1),…,H(skm),H(skm+1),…,H(skm+1+log m) Encode M: M‘ = b1,…,bm,¬ 1 𝑚 𝑏𝑖 ski , if bi = 1 Sig: sigi = H(ski) , otherwise IF one bi is flipped from 1 to 0, another bj will flip from 0 to 1
  • 30. Function chains Function family: 𝐻𝑛≔ ℎ𝑘: {0,1}𝑛 → {0,1}𝑛 ℎ𝑘 $ 𝐻𝑛 Parameter 𝑤 Chain: 𝑐𝑖 𝑥 = ℎ𝑘 𝑐𝑖−1 𝑥 = ℎ𝑘 ∘ ℎ𝑘 ∘ ⋯ ∘ ℎ𝑘 c0(x) = x 𝑐1(𝑥) = ℎ𝑘(𝑥) 𝒄𝒘−𝟏(𝑥) i-times
  • 31. WOTS Winternitz parameter w, security parameter n, message length m, function family 𝐻𝑛 Key Generation: Compute 𝑙, sample ℎ𝑘 c0(skl ) = skl c1(skl ) pkl = cw-1(skl ) c0(sk1) = sk1 c1(sk1) pk1 = cw-1(sk1)
  • 32. WOTS Signature generation M b1 b2 b3 b4 … … … … … … … bm‘ bm‘+1 bm‘+2 … … bl C c0(skl ) = skl pkl = cw-1(skl ) c0(sk1) = sk1 pk1 = cw-1(sk1) σ1=cb1(sk1) σl =cbl (skl ) Signature: σ = (σ1, …, σl )
  • 33. WOTS Signature Verification b1 b2 b3 b4 … … … … … … … bm‘ bm‘+1 bl 1+2 … … bl pkl pk1 Signature: σ = (σ1, …, σl ) σ1 σl 𝒄𝟏 (σ1) 𝒄𝟐 (σ1) 𝒄𝟑 (σ1) 𝒄𝒘−𝟏−𝒃𝟏 (σ1) 𝒄𝒘−𝟏−𝒃𝒍 (σl ) =? =? Verifier knows: M, w
  • 34. WOTS Function Chains For 𝑥 ∈ 0,1 𝑛 define 𝑐0 𝑥 = 𝑥 and • WOTS: 𝑐𝑖 𝑥 = ℎ𝑘(𝑐𝑖−1 𝑥 ) • WOTS+: 𝑐𝑖 𝑥 = ℎ𝑘(𝑐𝑖−1 𝑥 ⨁ 𝑟𝑖)
  • 35. WOTS Security Theorem (informally): W-OTS is strongly unforgeable under chosen message attacks if 𝐻𝑛 is a collision resistant family of undetectable one-way functions. W-OTS+ is strongly unforgeable under chosen message attacks if 𝐻𝑛 is a 2nd-preimage resistant family of undetectable one- way functions.
  • 36. XMSS
  • 37. XMSS Applies several tricks to achieve collision-resilience -> signature size halved Tree: Uses bitmasks Leafs: Use binary tree with bitmasks OTS: WOTS+ Mesage digest: Randomized hashing H bi H
  • 38. Multi-Tree XMSS Uses multiple layers of trees to reduce key generation time -> Key generation (= Building first tree on each layer) Θ(2h) → Θ(d*2h/d) -> Allows to reduce worst-case signing times Θ(h/2) → Θ(h/2d)
  • 40. XMSS Internet-Draft (draft-irtf-cfrg-xmss-hash-based-signatures) • Protecting against multi-target attacks / tight security • n-bit hash => n bit security • Small public key (2n bit) • At the cost of ROM for proving PK compression secure • Function families based on SHA2 • Equal to XMSS-T [HRS16] up-to message digest
  • 41. XMSS / XMSS-T Implementation C Implementation, using OpenSSL [HRS16] Sign (ms) Signature (kB) Public Key (kB) Secret Key (kB) Bit Security classical/ quantum Comment XMSS 3.24 2.8 1.3 2.2 236 / 118 h = 20, d = 1, XMSS-T 9.48 2.8 0.064 2.2 256 / 128 h = 20, d = 1 XMSS 3.59 8.3 1.3 14.6 196 / 98 h = 60, d = 3 XMSS-T 10.54 8.3 0.064 14.6 256 / 128 h = 60, d = 3 Intel(R) Core(TM) i7 CPU @ 3.50GHz XMSS-T uses message digest from Internet-Draft All using SHA2-256, w = 16 and k = 2
  • 43. About the statefulness • Works great for some settings • However.... ... back-up ... multi-threading ... load-balancing
  • 44. How to Eliminate the State
  • 45. SPHINCS • Stateless Scheme • XMSSMT + HORST + (pseudo-)random index • Collision-resilient • Deterministic signing • SPHINCS-256: • 128-bit post-quantum secure • Hundrest of signatures / sec • 41 kb signature • 1 kb keys
  • 46. SPHINCS+ (our NIST submission) • Strengthened security gives smaller signatures • Collision- and multi-target attack resilient • Small keys, medium size signatures (lv 3: 17kB) • THE conservative choice • No citable speeds yet 46 https://sphincs.org
  • 47. Instantiations • SPHINCS+-SHAKE256 • SPHINCS+-SHA-256 • SPHINCS+-Haraka 47 https://sphincs.org
  • 48. Instantiations (small vs fast) 48 https://sphincs.org
  • 49. Thank you! Questions? 17-10-2023 PAGE 49 For references, literature & longer lectures see https://huelsing.net

Editor's Notes

  1. One promissing group of candidates are hash-based signature schemes They start from an OTS – a signature scheme where a key pair can only be used for one signature. The central idea – proposed by Merkle - is to authenticate many OTS keypairs using a binary hash tree These schemes have many advantages over the beforementioned Quantum computers do not harm their security – the best known quantum attack is Grovers algorithm – allowing exhaustiv search in a set with n elements in time squareroot of n using log n space. They are provably secure in the standard model And they can be instantiated using any secure hash function. On the downside, they produce long signatures.
  2. Well, this work is concerned with the OTS. There are several OTS schemes. LD, Merkle-OTS which is a specific instance of the W-OTS, the BM-OTS and Biba and HORS. The most interesting one is the Winternitz OTS as it allows for a time-memory trade-off and even more important - It is possible to compute the public verification key given a signature. This reduces the signature size of a hash based signature scheme as normaly the public key of the OTS has to be included in a signature of the scheme. Now for WOTS this isn‘t necessary anymore.
  3. Well, this work is concerned with the OTS. There are several OTS schemes. LD, Merkle-OTS which is a specific instance of the W-OTS, the BM-OTS and Biba and HORS. The most interesting one is the Winternitz OTS as it allows for a time-memory trade-off and even more important - It is possible to compute the public verification key given a signature. This reduces the signature size of a hash based signature scheme as normaly the public key of the OTS has to be included in a signature of the scheme. Now for WOTS this isn‘t necessary anymore.
  4. In our work we showed that we can slightly change the original WOTS construction, such that it uses a function family instead of the hash function family. The resulting scheme is existentially unforgeable under chosen message attacks, if the function family is pseudorandom. This result has two implications:
  5. 2013: 80 bit 84 -> 2019 87 -> 2022 157 -> 2113