Top Banner
Hash-based Signatures and SPHINCS Andreas Hülsing
65

Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Jul 28, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Hash-based Signatures

and SPHINCS

Andreas Hülsing

Page 2: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Post-Quantum Signatures

PAGE 120-1-2015

Lattice, MQ, Coding

Signature and/or key sizes

Runtimes

Secure parameters

...

1

3

14232

2

32

34121

2

11

y

xxxxxxy

xxxxxxy

Page 3: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Hash-based Signature Schemes [Mer89]

PAGE 220-1-2015

Post quantum

Only secure hash function

Security well understood

Fast

Stateful

Page 4: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Basic Construction

PAGE 320-1-2015

Page 5: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Lamport-Diffie OTS [Lam79]

Message M = b1,…,bm, OWF H = n bit

SK

PK

Sig

PAGE 420-1-2015

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

*

Muxb1 Muxb2 Muxbm

Page 6: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Merkle’s Hash-based Signatures

PAGE 520-1-2015

Cryptography

Digital Signature

Encryption

Hash Function

MAC

Legality

OTS

OTS OTS OTS OTS OTS OTS OTS

HH H H H H H H

H H H H

H H

H

PK

SIG = (i=2, , , , , )

OTS

SK

Page 7: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

XMSS:

A practical signature scheme with

minimal security assumptionsJohannes Buchmann, Carlos Coronado, Erik

Dahmen, Andreas Hülsing

Page 8: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

XMSS Security

Security parameter n

Requires family of functions

Requires family of functions

Requires family of functions

Theorem:

XMSS is existentially unforgeable under adaptive chosen message attacks if F is a 2nd-preimage-

resistant family of undetectable one-way functions, G

is a pseudorandom function family, and H is a 2nd-

preimage-resistant function family.

nnn }1,0{}1,0{}1,0{: F

nnn }1,0{}1,0{}1,0{: Gnnn }1,0{}1,0{}1,0{: 2 H

Page 9: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

XMSS Tree

• Hashing one-time PK‘s using tree

• Requirements: CRHF -> SPRHF

• PK includes ~h additional values

H bi

H

Page 10: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

XMSS uses Winternitz OTS

Security level b

| | = | | = m * | | = m*b

1. = f ( )

2. Trade-off between runtime and signature size

| | ~ m/log w * | |

SIG = (i, , , , , )

Page 11: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Winternitz OTS (WOTS)

First idea: Winternitz (Mer89)

Full scheme: Even et al. (EGM96)

Security Proofs: Hevia & Micciancio (HM02)

Dods et al. (DSS05)

Requires collision-resistant undetectable one-way function family.

WOTS$: Buchmann et al. (BDEH+11)

Requires pseudorandom function family.

WOTS+: Hülsing (Hül13)

Requires second preimage resistant undetectable one-way function family.

Page 12: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

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

*

Muxb1 Muxb2 Muxbn

Page 13: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Trivial Optimization

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

sig1,0

*

Muxb1

sig1,1

Mux ¬b1

sigm,0

Muxbm

sigm,1

Mux ¬bm

Page 14: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Non-trivial Optimization

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‘ = b1,…,bm,¬b1,…,¬bm

ski , if bi = 1

Sig: sigi =

H(ski) , otherwise

Checksum with bad

performance!

Page 15: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Non-trivial Optimization, cont‘d

Message M = b1,…,bm, OWF H

SK: sk1,…,skm,skm+1,…,skm+log m

PK: H(sk1),…,H(skm),H(skm+1),…,H(skm+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

Page 16: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Function family:

Formerly:

WOTS+

For w ≥ 2 select R = (r1, …, rw-1)

WOTS

Function Chain

c0(x) = x

c1(x) = cw-1 (x)

}}1,0{|}1,0{}1,0{:{ 'nnn

Kn KF F

'1 }1,0{,}1,0{ nwn K

ri

KF

)( 1rxFK

'1 }1,0{,)())(()( n

timesi

KKK

i

K

i KxFFFxcFxc

))(()( 1

i

i

K

i rxcFxc ci-1 (x) ci (x)

Page 17: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Winternitz parameter w, security parameter n, message

length m, function family

Key Generation: Compute l , sample K, sample R

WOTS+

c0(skl ) = skl

c1(skl ) pkl = cw-1(skl )

}}1,0{|}1,0{}1,0{:{ 'nnn

Kn KF F

c0(sk1) = sk1

c1(sk1)

pk1 = cw-1(sk1)

Page 18: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

WOTS+ Signature generation

M

b1 b2 b3 b4 … … … … … … … bm‘bm‘+1 bm‘+2 … … bl

C

c0(skl ) = skl

pkl = cw-1(skl )

c0(sk1) = sk1pk1 = cw-1(sk1)

σ1=cb1(sk1)

σl =cbl (skl )

Signature:

σ = (σ1, …, σl )

Page 19: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

WOTS+ Signature Verification

b1 b2 b3 b4 … … … … … … … bm‘bm‘+1 bl 1+2 … … bl

pkl

pk1

Signature:

σ = (σ1, …, σl )

σ1

σl

c1 (σ1)

c2(σ1)

c3(σ1)

cw-1-b1(σ1)

cw-1-bl (σl )

=?

=?

Verifier knows: M, w

Page 20: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

WOTS Function Chains

For define and

• WOTS:

• WOTS$:

• WOTS+:

nx }1,0{

))(()( 1 iiKi rxcFxc

))(()( 1 xcFxc iKi

)()( )(1rFxc xci i

xxc )(0

Page 21: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

WOTS Security

Theorem (informally):

W-OTS is strongly unforgeable under chosen message attacks

if F is a collision resistant family of undetectable one-way

functions.

W-OTS$ is existentially unforgeable under chosen message

attacks if F is a pseudorandom function family.

W-OTS+ is strongly unforgeable under chosen message attacks

if F is a 2nd-preimage resistant family of undetectable one-

way functions.

Page 22: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

WOTS Sizes and Runtimes

Lamport-

DiffieWOTS WOTS$ WOTS+

Public Key

Size 2bml 2b

~ 2bm/log w

l b (+b)

~ bm/log w

l b ( +(w-1)b )

~ bm/log w

Secret Key

Size 2bml 2b

~ 2bm/log w

l b

~ bm/log w

l b

~ bm/log w

Signature

Size bml 2b

~ 2bm/log w

l b

~ bm/log w

l b

~ bm/log w

Key

Generation

Time

~ 2ml w

~ wm/log w

l w

~wm/log w

l w

~ wm/log w

Security level b, Winternitz parameter w, Message Length m,

l = l (w,m) ~ m / log w

WOTS$:

Securitly loss linear in w

-> Only small w

Page 23: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Secret Key Generation

PAGE 2220-1-2015

Page 24: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Secret Key Size: 2hl b → b

XMSS – Secret key

GG G G G G

Page 25: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

XMSS forward secure

FSPRG FSPRG FSPRG FSPRGFSPRG

PRG

G G G G G

Page 26: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Tree Chaining

PAGE 2520-1-2015

Page 27: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

XMSS Public Key Generation

=

H H H H H H H H

hRequires computation of 2h nodes in

Merkle tree

Page 28: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Two LayerKey generation

Requires computation of 2*2h/2 nodes

in Merkle trees

Page 29: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Two LayerSigning

j, , ,

i

=

i

Signature = (i, , ,

j

j

, , ,

, , )

Page 30: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Two LayerVerifying

Public Key =

?,i

H

j, , ,

Signature = (i, , , , , ,

, , )

?, jH

= ?

Page 31: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

XMSS Public Key Generation

Security level b, tree height h

MSS

• Generate tree of size 2h

• Cost ~ 2h

XMSS

• Tree chaining

• Use d layers of trees of height h/t

• Generate d trees of height 2h/d

• Cost ~ d*2h/d

• Example: h = 40, d = 2, costs ~ 2*220 = 221

• Slightly increased signature size (+d-1 one-time sigs)

Page 32: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

XMSS Authentication Path Generation

PAGE 3120-1-2015

Straight forward: 2h-1 leaf + 2h-h node computations

BDS Algorithm:

Runtime

(h−k)/2+1 leaf and

3(h−k−1)/2+1 node computations.

+(h−k) calls to FSPRG for forward secure XMSS in the worst case.

Storage

n bit nodes

n bit seeds for forward secure XMSS.

kkh

h 2232

3

kh 22

Page 33: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

C Implementation, using OpenSSL [BDH2011]

Sign

(ms)

Verify

(ms)

Signature (bit) Public Key

(bit)

Secret Key

(byte)

Bit Security Comment

XMSS-SHA-2 35.60 1.98 16,672 13,600 3,364 157 h = 20,

w = 64,

XMSS-AES-NI 0.52 0.07 19,616 7,328 1,684 84 h = 20,

w = 4

XMSS-AES 1.06 0.11 19,616 7,328 1,684 84 h = 20,

w = 4

RSA 2048 3.08 0.09 ≤ 2,048 ≤ 4,096 ≤ 512 87

Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz with Intel AES-NI

XMSS Implementations

C Implementation

Page 34: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Sign

(ms)

Verify

(ms)

Keygen

(ms)

Signature

(byte)

Public Key

(byte)

Secret

Key (byte)

Bit Sec. Comment

XMSS 134 23 925,400 2,388 800 2,448 92 H = 16,

w = 4

XMSS+ 106 25 5,600 3,476 544 3,760 94 H = 16,

w = 4

RSA

2048

190 7 11,000 ≤ 256 ≤ 512 ≤ 512 87

Infineon SLE78 16Bit-CPU@33MHz, 8KB RAM, TRNG, sym. & asym. co-processor

NVM: Card 16.5 million write cycles/ sector,

XMSS+ < 5 million write cycles (h=20)

[HBB12]

XMSS ImplementationsSmartcard Implementation

Page 35: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

SPHINCS: Stateless Practical Hash-based

Incredibly Nice Cryptographic Signatures

PAGE 3420-1-2015

Joint work with Daniel J. Bernstein, Daira Hopwood, Tanja Lange,

Ruben Niederhagen, Louiza Papachristodoulou, Michael Schneider,

Peter Schwabe, Zooko Wilcox O’Hearn

Page 36: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Long-Standing Problem: Statefulness

• No problem in many cases.

• Qualified signatures,

• Keys on smartcard, ...

• Necessary for forward-security!

But:

• Key back-ups undermine security

• Parallel use of key problematic

• Multi-threading,

• Load balancing...

• Do not fit standard API

PAGE 3520-1-2015

Page 37: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

SPHINCS Properties

Stateless

128bit Quantum Security

Practical Speed

Practical Signature Size

PAGE 3620-1-2015

Page 38: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

How to Eliminate the State

PAGE 3720-1-2015

Page 39: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Protest?

PAGE 3820-1-2015

Page 40: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Straight Forward

• Run MSS without State

PAGE 3920-1-2015

MAC

SIG = (i=2, , , , , )

Cryptography

Digital Signature

Encryption

Hash FunctionLegality

OTS OTS OTS OTS OTS OTS OTS

HH H H H H H H

H H H H

H H

H

PK

OTS

SK

Page 41: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Approach 1: Message Hash

i = Hash(Message);

128bit Quantum Sec.

→ n = 256 bit Hash [Ber09]

→ #Indices = 2256

→ h = n = 256

h depends on n!

Best we can do:

tSign ≈ n3 / log n tHash= 2M tHash ≈ 15 min*

|Sig| ≈ n3 / log n > 256 kb

* (OpenSSL SHA2)

PAGE 4020-1-2015

Page 42: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Approach 2: Random Index

PAGE 4120-1-2015

IndicesU #$I

128bit Quantum Sec.

→ Sampled by Signer

→ #Indices ← collision prob.

→ #Indices = 2256

→ h = 256

Impossible to make this efficient, again…

BUT:

h independent of n

Statistical collision probability

NOT collision resistance

Page 43: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Few-Time Signature Schemes

PAGE 4220-1-2015

Page 44: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Recap LD-OTS

Message M = b1,…,bn, OWF H = n bit

SK

PK

Sig

PAGE 4320-1-2015

sk1,0 sk1,1 skn,0 skn,1

pk1,0 pk1,1 pkn,0 pkn,1

H H H H H H

sk1,b1 skn,bn

*

Muxb1 Muxb2 Muxbn

Page 45: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

HORS [RR02]

Message M, OWF H, CRHF H’ = n bit

Parameters t=2a,k, with m = ka (typical a=16, k=32)

SK

PK

PAGE 4420-1-2015

sk1 sk2 skt-1 skt

pk1 pk1 pkt-1 pkt

H H H H H H

*

Page 46: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

HORS mapping function

PAGE 4520-1-2015

b1 b2 ba bar

M

H’

i1ik

Message M, OWF H, CRHF H’ = n bit

Parameters t=2a,k, with m = ka (typical a=16, k=32)

*

Page 47: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

HORS

Message M, OWF H, CRHF H’ = n bit

Parameters t=2a,k, with m = ka (typical a=16, k=32)

SK

PK

H’(M)

Sig

PAGE 4620-1-2015

sk1 sk2 skt-1 skt

pk1 pk1 pkt-1 pkt

H H H H H H

*

b1 b2 ba ba+1 bka-2 bka-1 bka

i1 ik

ski1 skik

Mux Mux

Page 48: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

HORS Security

• M mapped to k element index set Mi є {1,..,t}k

• Each signature publishes k out of t secrets

• Either break one-wayness or…

• r-Subset-Resilience: After seeing index sets Mij for r

messages msgj, 1 <= j <= r, hard to find msgr+1 ≠ msgj

such that Mir+1 є U1<=j<=r M

ij .

• Best generic attack: Succr-SSR(A,q) = q(rk / t)k

→ Security shrinks with each signature!

PAGE 4720-1-2015

Page 49: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

HORST

Using HORS with MSS requires adding PK (tn) to MSS

signature.

HORST: Merkle Tree on top of HORS-PK

• New PK = Root

• Publish Authentication Paths for HORS signature

values

• PK can be computed from Sig

• With optimizations: tn → (k(log t − x + 1) + 2x)n

• E.g. SPHINCS-256: 2 MB → 16 KB

• Use randomized message hash

PAGE 4820-1-2015

Page 50: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Assembling SPHINCS

PAGE 4920-1-2015

Page 51: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

SPHINCS Signature

PAGE 5020-1-2015

Page 52: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

SPHINCS Key Ideas

Use HORST key pairs to sign messages

Authenticate HORST key pairs

using hypertree (of XMSS trees)

Use random index

Select Parameters such that

sumr є [0,∞)(Pr[r-times index collision] *

Succr-SSR(A)) = negl(n)

PAGE 5120-1-2015

Page 53: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

SPHINCS Sign

PAGE 5220-1-2015

1. Select (pseudo-)random HORST sk

2. Sign message using this HORST sk

3. Build parent tree

4. Use tree to sign HORST pk

5. If tree != top, goto 3.

6. Output Sig:

1. Index

2. HORST signature

3. XMSS signature chain

Page 54: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

SPHINCS-256

PAGE 5320-1-2015

Page 55: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

SPHINCS-256 Speed

• Key generation: 3,051,562 cycles

• Verification: 1,369,060 cycles

• Signature: 47,466,005 cycles

• Still hundreds of messages per second on a modern

4-core 3.5GHz Intel CPU (13.56 ms / Sig on 1 Core)

• Remember: Optimized Folklore

tSign ≈ 15 min*

|Sig| > 256 kb

PAGE 5420-1-2015

Page 56: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

In Paper (http://eprint.iacr.org/2014/795)

+ Standard model security reduction without collision

resistance

+ Complexity of generic quantum attacks

+ Efficient fixed-input length hashing

+ Optimized implementation

PAGE 5520-1-2015

Page 57: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Advantages of

Hash-based

Signatures

PAGE 5620-1-2015

Page 58: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

RSA – DSA – EC-DSA...

PAGE 5720-1-2015

Intractability

Assumption

Digital

signature

scheme

Collision resistant

hash function

RSA, DH, SVP,

MQ, …

Page 59: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Early Warning System (only XMSS & SPHINCS)Hash-function properties

PAGE 5820-1-2015

Collision-Resistance

2nd-Preimage-

Resistance

One-way Pseudorandom

As

su

mp

tio

n

/ A

tta

ck

sstronger /

easier to

break

weaker /

harder to

break

Page 60: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Early Warning System (only XMSS & SPHINCS)Attacks on Hash Functions

PAGE 5920-1-2015

2004 2005 2008

MD5

Collisions

(theo.)

SHA-1

Collisions

(theo.)

MD5

Collisions

(practical!)

2015

MD5 & SHA-1

No (Second-)

Preimage Attacks!

Page 61: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Easy Redundancy

PAGE 6020-1-2015

Hash-Combiner

- Collision-Resistance / 2nd-Preimage-Resistance:

- PRF:

• No sudden break

• Replaces double signature

• Signature size only grows by h*n

• Runtime ~ doubled

)(||)()( xfxgxh kkk

)()()( xfxgxh kkk

Page 62: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Forward Security (only XMSS)

PAGE 6120-1-2015

Page 63: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Forward Security - cont‘d

PAGE 6220-1-2015

time

classical

pk

sk

Key g

en

.

forward sec

pk

sk

sk1 sk2 skiskT

t1 t2 ti tT

ijjMGoal ),,(:

Page 64: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Conclusion

• Hash-based signatures currently most confidence

inspiring pq-signature scheme

• If you can live with a state: Go for XMSS.

• Otherwise:

• Go for Sphincs-256!

• First stateless signature scheme

with post-quantum secure parameters

• Practical speed and sizes

PAGE 6320-1-2015

Page 65: Hash-based Signatures and SPHINCS · Hash-based Signature Schemes [Mer89] 20-1-2015 PAGE 2 Post quantum Only secure hash function Security well understood Fast Stateful

Thank you!

Questions?

PAGE 6420-1-2015

For references & further literature see

https://huelsing.wordpress.com/hash-based-signature-schemes/literature/