[IT-Security-2] Secure Multi-Party-Computation (SMPC)

 Secure Multi-Party-Computation (SMPC)


Notes from RWTH Aachen University course 
“IT security 2” Wintersemester 2019/20
professor: Meyer, Ulrike Michaela

:cactus: Goal

  • Traditional
    • trust
    • insecure channel
  • Multi-party computation
    • do NOT trust
    • distributed
    • private

:cactus: Millionaire Problem

  • :droplet: Problem

    • if ij ?
    • {yA=yB=1jiyA=yB=0j>i
  • :droplet: Solution

    • 假設 1<i,j<10
    1. :boy: B 有 j million

      隨機選擇 N-bit 的 x
      計算 EA(x)
      把 EA(x)j+1 傳給 :girl: A

    2. :girl: A 有 i million

      對於 u=1,...,10 計算
      yu=DA(EA(x)j+u)

      若 u=j,則 yu=x

      隨機選則 N/2-bit 的質數 p
      對於 u=1,...,10 計算
      zu=yu mod p

      若 u=jzu=x mod p

      把 p,z1,...zi,zi+1,...,z10+1 傳給 :boy: B

      若 zu 的差沒有超過2
      重新選擇 p
      確保 za+1zb

    3. :boy: B

      檢查第 j 個值是否等於 x mod p
      如果是: ji
      else: j>i
      告訴 :girl: A 結果

      Note:
      {if j in (z1,...,zi),zj=yj=DA(EA(x)) mod p=x mod pj th=x mod pjiother zu=yu mod p=DA(EA(x)j+u) mod punknown to Bif j in (zi+1+1,...,z10+1),zi+1+1=yi+1+1=DA(EA(x)j+i+1)+1 mod punknown to B
      可以是 random order,B 只要檢查 x mod p 是否在裡面

  • :droplet: Leakage

    • 定義
      :girl: A 的回傳值 wu={zu , if uizu+1 , if u>i
    • 若存在 u 使得 wu,wu+1 差剛好 2,且 wu<wu+1
      則 :boy: B 可以知道 iu
      因為 wi<wi+1 永遠不會相差 2 :question:

:cactus: Semi-honest & malicious

  • :droplet: Semi-honest (honest-but-curious/ passive)
    • follow protocol
    • 但想知道更多 information
  • :droplet: Malicious
    • 違反protocol
      • 使違反 unattractive
    • 說謊
      • 無法避免

:cactus: Correctness & Security

  • :droplet: Correctness
    • 正確計算 function f
    • 像有trusted third party一樣

  • :droplet: Security
    • 違反者不能得到更多訊息 (從input/ 結果得知)
    • example
      • 三人投票,一人說no,兩人說yes
      • 則說no的會知道其他人說yes
  • :droplet: Terms
    • :watermelon: Distance
      • 兩個在 set X 中離散機率分佈 A,B 的 Distance為
        • 12×x(|Pr(A=x)Pr(B=x)|)
    • :watermelon: Probability ensemble
      • ensemble Ai,(iI) 是一個離散機率分佈的set
    • :watermelon: negligible
      • 一個函數 f(n) 逐漸小於多項式 p 的倒數
      • for each p(n),  mp such that
        |f(n)|<1p(n),n>mp
    • :watermelon: equal
      • ensembles Ai,Bi are equal
    • :watermelon: statistically close
      • dist(Ai,Bi) 對所有 I 中的 i 是 negligible function
    • :watermelon: computationally indistinguishable AiBi
      • 對所有 probabilistic polynomial-time algorithm D
        |Pr(D(Ai)=1)Pr(D(Bi)=1)| 對 i 是 negligible function

:cactus: SMC definition

  • :droplet: First Attemp
    • 計算 f(XA,XB) 是安全的
    • 如果有 Simulator algorithm SA,SB
    • Correctness
      • (yA,yB)f(xA,xB)
    • Security
      • viewA(real protocol)SA(xA,yA)
        viewB(real protocol)SB(xB,yB)
      • corrupt party 的 view 可以由他的 input/output simulate
    • 不能用在 randomized functionaility
      • f(b),其中 b 是 random bit
      • A 隨機選 random bit
      • A 送 b 給 B
      • A 輸出 b
      • 正確但 insecure 因為 B 不能知道任何訊息
  • :droplet: 定義
    • Security
      • viewA(real protocol,yB)(SA(xA,yA),yB)
        viewB(real protocol,yA)(SB(xB,yB),yA)

      如果違反者的 view 跟 honest 的人的 output 相關
      simulator 可以 capture 此相關性

:cactus: Homomorphic Encryption

  • :droplet: Semantic Secure
    • 實驗流程
      1. A 選擇一組 plaintext (m0,m1)
      2. 隨機選擇 b{0,1}
        計算 c=E(mb)
        傳給 A
      3. A 猜測 b{0,1}
      4. return{1,if b=b0,otherwise
    • semantic secure  任何 polynomial-time 的 A,存在一個 negligible function μ 使得
      Pr[b=b]12μ(n)

      需要 E 是 probabilistic

  • :droplet: Homomorphic Encryption
    • plaintext (P,+)
    • ciphertext (C,)
    • E:PC
    • additively homomorphic
      • E(m1+m2)=E(m1)E(m2)
    • fully homomorphic encryption
      • additively and multiplicatively
  • :droplet: Paillier
    • public key: (N,g)
      • N is a RSA modulus
      • gZN2
    • plaintext (ZN,+)
    • ciphertext (ZN2,)
    • E(m,r)=gmrN mod N2
      • rZN
    • Homomorphic addition
      • E(m1)+hE(m2):=E(m1)E(m2)=E(m1+m2)
    • Homomorphic scalarm multiplication
      • a×hE(m):=(E(m))a=E(a×m) for aZ\{0}
    • Ciphertext blinding
      • Blind(E(m)):=E(m)+hE(0)


:cactus: Private equality checking

  • :droplet: Goal
    • B 和 A 想要 A 確認是否 a=b
  • :droplet: Protocol
    1. :girl: A

      計算 E(a)

    2. :boy: B

      選擇隨機數 r
      計算 E(b)
      計算 E(ba)
      計算 E(r(ba))
      計算 E(r(ba)+b)

      皆用 additively homomorphic

    3. :girl: A

      解密 E(r(ba)+b)
      若為 b==a ,則 a=b
      反之為一隨機數

:cactus: Private set intersection

  • :droplet: Goal
    • B 和 A 想要 A 找出 SASB
  • :droplet: Protocol
    1. :girl: A

      計算多項式 f(X)=Π(Xai)(i=1,...,k)=Xk+ak1Xk1+...+a0
      計算 E(ai) 並傳給 B

    2. :boy: B

      選擇隨機數 ri(i=1,...,k)
      計算 ci=E(rif(bi)+bi) 並傳給 A

      A 和 B 的 set 個數相等為 k

    3. :girl: A

      解密 E(rif(bi)+bi)
      看哪個對應到自己的 ai

      f(bi)=0 如果 bi=aj



:cactus: Binary Less-Than Protocol

  • :droplet: Threshold Paillier
    • Idea: split the private key
    • 用 Shamir’s secret sharing
  • :droplet: Less than with shared output
    • Goal: A 知道 oAB 知道 oB
      oAoB 隱含 b<b
      (但 A,B 都不知道 b,b)
    • Idea: b<bb(1b)=1
    • Assumption:
      πMult(E(x),E(y))=E(xy)
      所有人可以知道結果但不能知道 x,y
  • :droplet: Protocol
    1. :girl: A :boy: B

      input: E(b),E(b)
      計算 πMult(E(1b),E(b))=E(c)

    2. :boy: B

      oBrnd{0,1}
      E(c):={blind(E(c)) , if ob=0blind(E(1c)) , otherwise

    3. :girl: A :boy: B

      解密 E(c)
      只有 :girl: A 知道 c
      :girl: 設 oA=c
      :girl: A output oA
      :boy: B output oB


Readings
Goldwasser: Multi-Party Computations: Past and Present
Yao: Protocols for Secure Computation
    § Contains the original Millionaires Problem description and a more general result on computing any integer-valued function on the integer-values from a bounded range
Even Goldreich Lemple: A randomized Protocol for Signing contracts 
    § Contain the description of the “One-out-of-two Oblivious Transfer”
Freedman: Efficient Private Matching and set intersection
    § Contains the private set intersection protocol (and other operations on
sets)
§ Cramer and Damgard: Multiparty Computation, an Introduction
§ Goldreich: Foudations of Cryptography, Volume 2, Chapter 7 (CS library)

留言

這個網誌中的熱門文章