Berkeley CS276 & MIT 6.875 Secret sharing and applications - - PowerPoint PPT Presentation

β–Ά
berkeley cs276 mit 6 875
SMART_READER_LITE
LIVE PREVIEW

Berkeley CS276 & MIT 6.875 Secret sharing and applications - - PowerPoint PPT Presentation

Berkeley CS276 & MIT 6.875 Secret sharing and applications Lecturer: Raluca Ada Popa Starting to record Nuclear launch codes A judge, president and general receive shares ! , " , # of a secret from a


slide-1
SLIDE 1

Berkeley CS276 & MIT 6.875

Secret sharing and applications Lecturer: Raluca Ada Popa

slide-2
SLIDE 2
  • Starting to record
slide-3
SLIDE 3

Nuclear launch codes

  • A judge, president and general receive shares 𝑑!, 𝑑", 𝑑# of a secret 𝑑

from a dealer. If the nuke station receives 𝑑, it launches the nuke

  • If any two come together, their shares together should reveal no info

about about 𝑑

3

𝑑! 𝑑" 𝑑# 𝑑

Ideas?

slide-4
SLIDE 4

Nuclear launch codes: xor secret sharing

  • A trusted dealer chooses 𝑑! and 𝑑" randomly in 0,1 $, and

computes 𝑑# = 𝑑 βŠ• 𝑑! βŠ• 𝑑"

  • The parties recover 𝑑 by computing 𝑑! βŠ• 𝑑" βŠ• 𝑑#

4

𝑑! 𝑑" 𝑑# 𝑑

slide-5
SLIDE 5
  • A trusted dealer chooses 𝑑! and 𝑑" randomly in 0,1 $, and

computes 𝑑# = 𝑑 βŠ• 𝑑! βŠ• 𝑑"

  • The parties recover 𝑑 by computing 𝑑! βŠ• 𝑑" βŠ• 𝑑#

Claim: nothing is learned about 𝑑 from any one or two shares Pr 𝑑 shares ] = Pr[𝑑] (information theoretic security)

Nuclear launch codes: xor secret sharing

5

slide-6
SLIDE 6
  • A trusted dealer chooses 𝑑! and 𝑑" randomly in 0,1 $, and

computes 𝑑# = 𝑑 βŠ• 𝑑! βŠ• 𝑑"

  • The parties recover 𝑑 by computing 𝑑! βŠ• 𝑑" βŠ• 𝑑#

Nuclear launch codes: xor secret sharing

6

3-out-of-3 secret sharing

How about π‘œ-out-of-π‘œ xor secret sharing? Similarly, choose 𝑑!, … , 𝑑"#! ← 0,1 $, and set 𝑑" = 𝑑 βŠ• 𝑑! βŠ• β‹― βŠ• 𝑑"#!.

slide-7
SLIDE 7

How about 1-out-of-3 xor secret sharing?

  • Trivial: 𝑑+ = 𝑑, = 𝑑- = 𝑑

7

slide-8
SLIDE 8

Shamir secret sharing

  • 𝑒-out-of-π‘œ: any 𝑒 shares out of π‘œ shares can recover the

secret

  • Shamir, Adi (1979), "How to share a secret"

8

slide-9
SLIDE 9

Syntax

Let 𝐺 be a finite field of size 𝑄 a prime number. Let 0<𝑒 ≀ π‘œ < 𝑄. A 𝑒-out-of-π‘œ secret sharing scheme for 𝐺 is a pair of PPT algorithms (Share, Recover):

  • Share(𝑑 ∈ F) outputs 𝑑!, 𝑑%, … , 𝑑"
  • Recover (𝑑&$, 𝑑&%, … , 𝑑&%) outputs 𝑑

Correctness: βˆ€π‘‘ ∈ 𝐺, βˆ€ 𝑑!, 𝑑%, … , 𝑑" ←Share(𝑑), for any subset of 𝑒 distinct indices 𝑗!, … , 𝑗' of size 𝑒: Recover(𝑑&$, … , 𝑑&%) = 𝑑.

9

slide-10
SLIDE 10

Security

Given any < 𝑒 shares, absolutely nothing is learned about 𝑑.

10

βˆ€π‘€ ∈ 𝐺, βˆ€ distinct 𝑗", … , 𝑗#$" ∈ 1, π‘œ Pr[𝑑 = 𝑀 | 𝑑%!, … , 𝑑%"#!; 𝑑", 𝑑&, … , 𝑑' ←Share(𝑑)] = Pr[𝑑 = 𝑀] How would you formalize this? Namely, the conditional distribution given the known shares for 𝑑 should be the a priori distribution for 𝑑:

slide-11
SLIDE 11

Shamir’s intuition

  • 𝑒 distinct points in 𝐺 determine precisely one

polynomial of degree 𝑒 βˆ’ 1

  • 𝑒 βˆ’ 1 points could belong to an exponential

number of polynomials of degree 𝑒 in 𝐺

11

How would you design it?

slide-12
SLIDE 12

Shamir’s 𝑒-out-of-π‘œ scheme

Let 𝛽" … 𝛽' ∈ 𝐺 be distinct non-zero elements known to all parties Share(𝑑):

  • sample 𝑏", … 𝑏#$" ← 𝐺 independently and uniformly at

random.

  • let 𝑄(𝑦) = 𝑑 + βˆ‘%("

#$" 𝑏%𝑦%

  • for each 𝑗, set share 𝑑% = (𝑗, 𝑄 𝛽% )

12

How to recover?

slide-13
SLIDE 13

Shamir’s 𝑒-out-of-π‘œ scheme

Let 𝛽" … 𝛽' ∈ 𝐺 be distinct non-zero elements known to all parties Share(𝑑): 𝑑% = 𝑄 𝛽% Recover(𝑑%!, … , 𝑑%"):

  • find a polynomial π‘Ÿ of degree 𝑒 βˆ’ 1 such that π‘Ÿ 𝛽%$

= 𝑑%$,βˆ€π‘˜

  • output 𝑑 to be π‘Ÿ(0)

13

Theorem: Shamir’s scheme is correct and secure

Why?

slide-14
SLIDE 14

Lagrange interpolation

Theorem: βˆ€πΊ, βˆ€π‘’ distinct values 𝑦!, … , 𝑦", and every 𝑒 values 𝑧!, … , 𝑧", there exists a unique polynomial 𝑅 of degree at most 𝑒 βˆ’ 1 s.t. 𝑅 𝑦# = 𝑧# βˆ€π‘˜

14

𝑅 𝑦 = 9

β„“)! '

𝑑&β„“ :

!*+*' +,β„“

𝛽&' βˆ’ 𝑦 𝛽&' βˆ’ 𝛽&β„“

Lagrange interpolation in our case:

slide-15
SLIDE 15

Homomorphism of shares

Share(𝑑): 𝑑. = 𝑄 𝛽.

Additively homomorphic, 𝑑$ + 𝑑′$ is the 𝑗-th share for 𝑑 + 𝑑′ because the Lagrange interpolation of the sum

  • f the shares is the sum of 𝑄(𝑦) + 𝑄’(𝑦) which

evaluates to 𝑑 + 𝑑’ for 𝑦 = 0

15

homomorphic?

𝑄 𝑦 + 𝑄′(𝑦) = 9

β„“)! '

(𝑑&β„“+𝑑&β„“

  • ) :

!*+*' +,β„“

𝛽&' βˆ’ 𝑦 𝛽&' βˆ’ 𝛽&β„“

slide-16
SLIDE 16

How about xor secret sharing?

Shares of 𝑑 are 𝑑+, … , 𝑑/ s.t. 𝑑+ βŠ• β‹― βŠ• 𝑑/ = 𝑑

16

Homomorphic for XOR: 𝑑.βŠ• 𝑑.

0 for 𝑗 ∈ 1, π‘œ are shares of 𝑑 βŠ• 𝑑’

slide-17
SLIDE 17

What are some problems with using Shamir secret sharing with malicious parties?

  • If a participants cheats during recover, the wrong

secret is recovered. The other participants cannot even tell this is the case.

  • There is total trust in the dealer of the shares.
  • The scheme is one time.
  • The scheme only allows revealing the secret and

not computing on it without revealing.

17

slide-18
SLIDE 18

Verifiable Secret Sharing (VSS)

  • The players can verify that their shares are

consistent to some committed value

  • Concept first introduced in 1985 by Benny Chor,

Shafi Goldwasser, and Silvio Micali

  • We will look at Feldman scheme based on

Pedersen commitments

18

slide-19
SLIDE 19

Setup

  • Dealer publishes a commitment to 𝑑 and to the

polynomial used for the shares 𝑄(𝑦)

  • The dealer signs all messages it sends to the

parties

  • Each party receiving a share 𝑑$ can check their

share against the commitment

19

slide-20
SLIDE 20

Construction

Recall Pedersen commitments:

𝑑𝑝𝑛𝑛 𝑦 = 𝑕%β„Ž& ∈ 𝐻 for 𝑠 random, 𝑕, β„Ž public

Dealer publishes a commitment to 𝑑 and to the polynomial used for the shares 𝑄(𝑦) = 𝑑 + a!x + β‹― + 𝑏"%!𝑦"%!

𝑑𝑝𝑛𝑛 𝑑 = 𝑕&β„Ž'., 𝑑𝑝𝑛𝑛 𝑏! , … , 𝑑𝑝𝑛𝑛 𝑏"%! , signed by

the dealer Let 𝑆(𝑦) be the polynomial with the randomness from these commitments 𝑆 𝑦 = 𝑠) + 𝑠

"𝑦 + β‹― + 𝑠#$"x*$"

20

slide-21
SLIDE 21

Construction

The dealer gives to each party 𝑗: its share 𝑑. = 𝑄 𝛽. and 𝑆 𝛽. . Party 𝑗 checks that 𝑑𝑝𝑛𝑛 𝑑 βˆ— 𝑑𝑝𝑛𝑛 𝑏+ :! βˆ— β‹― βˆ— comm a;<+ :!

"#$

equals 𝑕= :! β„Ž> :!

21

slide-22
SLIDE 22

Security properties

  • What malicious behavior of a dealer would this

prevent?

  • What malicious behavior of the parties would this

prevent?

  • What malicious behavior would it not prevent?

22

slide-23
SLIDE 23

Security properties (informally)

  • Parties know their shares are consistent (different

subsets of 𝑒 shares will reveal the same value 𝑑), or prove misbehavior of the dealer.

  • Party 𝑗 can check that it indeed received share 𝑗
  • Upon reveal, a party can check the share of another

party, so a malicious party cannot affect a reveal

  • Dealer can still commit to 𝑑 of its choice
  • Still assumes trusted setup of public parameters?

23

slide-24
SLIDE 24

Why do the security properties hold? (informally)

  • Parties know their shares are consistent (different

subsets of 𝑒 shares will reveal the same value 𝑑), or prove misbehavior of the dealer

– Because the commitment is binding

  • Upon reveal, a party can check the share of another

party

– Because the commitment is binding

24

What is the hiding property used for?

Secrecy of the secret sharing scheme

slide-25
SLIDE 25

Applications

What applications come to mind?

25

slide-26
SLIDE 26

Applications

  • Key recovery for end-to-end encryption
  • Custody of secrets for cryptocurrencies

26

slide-27
SLIDE 27

Hello K&4!f Hello K&4!f

End-to-end encryption

The server cannot decrypt user data

Server

The server is not a central point of attack, does not have the decryption key

slide-28
SLIDE 28

Hello K&4!f Hello K&4!f

End-to-end encryption

The server cannot decrypt user data

Server

slide-29
SLIDE 29

usability end-to- end security key recovery

Key recovery is challenging

slide-30
SLIDE 30

Key recovery challenge

Secret

client server

Usability issue: If Alice loses her key, she loses access to her data (e.g., PGP) Security issue: Existing solutions prefer to compromise on security: save key at the server!

backup:

Ideas?

slide-31
SLIDE 31

Secret sharing keys

  • Each user chooses a set of trusted users who can reconstruct her lost key
  • None of the users in the group can reconstruct the key by itself

Alice Alice’s boss admin 1 admin 2

Alice’s approval group: 2 out of 3 must agree

slide-32
SLIDE 32

Richer policies for organizations

How would you implement this?

OR AND 2/2 AND 3/4

Alice’s Boss Admin1 Bob Chris Dan Matt

slide-33
SLIDE 33

Cryptocurrency application

  • We saw that secret keys control assets in Bitcoin,

Zcash, etc.

  • Need to back these secret keys to prevent asset

loss

  • Ideas?

– Some crypto custodians offer secret sharing

33

slide-34
SLIDE 34

Cryptocurrency application

Even storing the secret on the user device that performs payments is worrisome, so newer technologies store the secret key secret shared and sign transactions using it by recovering the secret from shares β€œunder encryption” – we will learn how to do this in secure-multi party computation

34

Another huge application of secret sharing

slide-35
SLIDE 35

Summary

𝑒-out-of-π‘œ secret sharing enables splitting a secret into π‘œ shares such that any less than 𝑒 cannot reconstruct any information about the secret, but 𝑒 shares can determine the secret Secret sharing schemes can be homomorphic They have many real-world applications

35