secret sharing nisarg raval sep 24, 2014 material is adapted from cs513 lecture notes

31
Secret Sharing Nisarg Raval Sep 24, 2014 http://www.cs.cornell.edu/courses/cs513/2000sp/ SecretSharing.html Material is adapted from CS513 lecture notes (Cornell) CPS 290 - Computer Security

Upload: esmond-hill

Post on 20-Jan-2016

216 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

Secret Sharing

Nisarg Raval

Sep 24, 2014

http://www.cs.cornell.edu/courses/cs513/2000sp/SecretSharing.html

Material is adapted from CS513 lecture notes (Cornell)

CPS 290 - Computer Security

Page 2: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

Why share a secret?

http://s3.amazonaws.com/rapgenius/1604757_1306648362304.08res_250_319.jpg

Page 3: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

Goal• Given a secret s and n parties

a. All n parties together recover s

b. Less than n parties can not recover s

Page 4: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

https://c2.staticflickr.com/8/7158/6761951167_54f2d69fb6_z.jpg

Naive Scheme

S=10011S1 = 100 S2 = 11

• Concat shares to reveal secret - S = (S1)(S2) = (100)(11) = 10011

High Order Low Order

• What is the problem? - Think of a salary or password

Page 5: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

Partial Disclosure• Given a secret s and n parties

a. All n parties together recover s

b. Less than n can not recover any information about s

Page 6: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

Generate Shares using XOR

S=10011

10100 00111

S1 = Rand S2 = S XOR S1

S = S1 XOR S2

10011

https://c2.staticflickr.com/8/7158/6761951167_54f2d69fb6_z.jpg

Page 7: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

General Scheme• Given a secret s and n parties

a. Generate n-1 random strings as first n-1 shares

b. Last share is the bitwise XORing of s with all the other n-1 shares

Page 8: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

General Scheme• Given a secret s and n parties

a. Generate n-1 random strings as first n-1 shares

b. Last share is the bitwise XORing of s with all the other n-1 shares

• Security Check

a. Can n parties generate s?

Page 9: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

General Scheme• Given a secret s and n parties

a. Generate n-1 random strings as first n-1 shares

b. Last share is the bitwise XORing of s with all the other n-1 shares

• Security Check

a. Can n parties generate s?

b. Can any n-1 parties generate s?

Page 10: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

Example

S=10011

S1S2

S3

S2 S

https://c2.staticflickr.com/8/7158/6761951167_54f2d69fb6_z.jpg

Page 11: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

Problem?

S=10011

S1S2

S3

S2 ?

• S can be constructed by 2 or more generals

• Less than 2 generals can not construct s

https://c2.staticflickr.com/8/7158/6761951167_54f2d69fb6_z.jpg

Page 12: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

(n,t) Secret Sharing• Given a secret s and n parties

a. Any t or more parties can recover s

b. Less than t parties have no information about s

S=10011

S1S2

S3

S2 S

(3,2) secret sharing

Page 13: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

(n,2) Secret Sharing

(0,S)

x

y

Page 14: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

(n,2) Secret Sharing

(0,S)

(x1,y1)(x2,y2)

(xn-1,yn-1) (xn,yn)

x

y

Page 15: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

(n,2) Secret Sharing

(0,S)

(x1,y1)(x2,y2)

(xn-1,yn-1) (xn,yn)

x

yShares

Page 16: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

(n,2) Secret Sharing

(0,S)

(x1,y1)

(xn-1,yn-1)

x

y

Page 17: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

(n,2) Secret Sharing

(0,S)

(x1,y1)

x

yExist a line for every S

Page 18: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

(n,3) Secret Sharing

(0,S) (x1,y1)

(x2,y2)

(xn-1,yn-1)

(xn,yn)

Page 19: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

Shamir’s Secret Sharing

• It takes t points to define a polynomial of degree t-1

• Create a (t-1)-degree polynomial with secret as the first coefficient and the remaining coefficient picked at random

• Find n points on the curve and give one to each of the parties.

• At least t points are required to fit the polynomial and hence to recover secret

Shamir, Adi (1979), "How to share a secret", Communications of the ACM

y = at-1 * xt-1 + at-2 * xt-2 + … + a1 * x + a0

Page 20: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

Use Case

S1

S3

S2(3,2) Secret

Sharing Scheme

Private Key

Page 21: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

Problem?

Time

S1

S3

S2

S1 compromised

S2 compromised

S1 + S2 = Secret

Page 22: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

Refresh Shares

S1

S3

S2

Time

Trusted

Third Party

S’1

S’3

S’2

S’’1

S’’3

S’’2

Page 23: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

Refresh Shares

S1

S3

S2

Time

Trusted

Third Party

S’1

S’3

S’2

S’’1

S’’3

S’’2

S1 compromised

S’2 compromised

can not construct secret

Page 24: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

Proactive Secret Sharing

S1

S

S2

Server 1 Server 2

Goal: without changing the secret, periodically update shares in a way that old shares are in-validated.

Page 25: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

Proactive Secret Sharing

S1

S

S2

S11 S12 S21 S22

Server 1 Server 2

Goal: without changing the secret, periodically update shares in a way that old shares are in-validated.

Page 26: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

Proactive Secret Sharing

S1

S

S2

S11 S12 S21 S22

S21 S12

Exchange Partial Shares

Server 1 Server 2

Goal: without changing the secret, periodically update shares in a way that old shares are in-validated.

Page 27: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

Proactive Secret Sharing

S1

S

S2

S11 S12 S21 S22

S21 S12

Exchange Partial Shares

S’1S’2

Server 1 Server 2

Goal: without changing the secret, periodically update shares in a way that old shares are in-validated.

Page 28: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

Proactive Secret Sharing

S1

S

S2

S11 S12 S21 S22

S21 S12

Exchange Partial Shares

S’1S’2

S

Server 1 Server 2

(S11 + S21) + (S12 + S22)

Recover S

Page 29: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

BitCoin Multi-Signature Addresses

• Related to, but different than secret sharing.

• Secret sharing: break a single secret into multiple shares.

• Multi-signature address: requires multiple signatures with different private keys (secrets) to authorize a transaction.

• Examples: 2 out of 2, 2 out of 3, 3 out of 5.

Page 30: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

Opening the Vault

Page 31: Secret Sharing Nisarg Raval Sep 24, 2014  Material is adapted from CS513 lecture notes

Summary• Useful technique to distribute secret

• Confidentiality

• Reliability

• Each share must be as long as the secret itself

• Require random bits of length proportional to the number of parties as well as length of the secret