Berkeley CS276 & MIT 6.875 Secret sharing and applications - - PowerPoint PPT Presentation
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
- Starting to record
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?
Nuclear launch codes: xor secret sharing
- A trusted dealer chooses π‘! and π‘" randomly in 0,1 $, and
computes π‘# = π‘ β π‘! β π‘"
- The parties recover π‘ by computing π‘! β π‘" β π‘#
4
π‘! π‘" π‘# π‘
- 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
- 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 π‘" = π‘ β π‘! β β― β π‘"#!.
How about 1-out-of-3 xor secret sharing?
- Trivial: π‘+ = π‘, = π‘- = π‘
7
Shamir secret sharing
- π’-out-of-π: any π’ shares out of π shares can recover the
secret
- Shamir, Adi (1979), "How to share a secret"
8
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
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 π‘:
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?
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?
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?
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:
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
β)! '
(π‘&β+π‘&β
- ) :
!*+*' +,β
π½&' β π¦ π½&' β π½&β
How about xor secret sharing?
Shares of π‘ are π‘+, β¦ , π‘/ s.t. π‘+ β β― β π‘/ = π‘
16
Homomorphic for XOR: π‘.β π‘.
0 for π β 1, π are shares of π‘ β π‘β
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
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
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
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
Construction
The dealer gives to each party π: its share π‘. = π π½. and π π½. . Party π checks that ππππ π‘ β ππππ π+ :! β β― β comm a;<+ :!
"#$
equals π= :! β> :!
21
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
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
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
Applications
What applications come to mind?
25
Applications
- Key recovery for end-to-end encryption
- Custody of secrets for cryptocurrencies
26
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
Hello K&4!f Hello K&4!f
End-to-end encryption
The server cannot decrypt user data
Server
usability end-to- end security key recovery
Key recovery is challenging
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?
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
Richer policies for organizations
How would you implement this?
OR AND 2/2 AND 3/4
Aliceβs Boss Admin1 Bob Chris Dan Matt
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
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
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