Skip to content

BlockchainLabFudan/cc-set-intersection

Repository files navigation

cc-set-intersection

Confidential computing example - Set-Intersection

@ref - research gate

Kissner L , Song D . Private and threshold set-intersection[J]. Advances in Cryptology – Crypto ’, 2004.

problem

Alice has Set A (SA)

Bob has Set B (SB)

Alice and Bob want to compute the set-intersection of SA and SB, but they do not want to leak any information about their set.

This protocol is used for confidential computing.

Alice and Bob both run this protocol with their set's as input, at the end of this protocol, they both have the intersection of their sets.

In this protocol, Set is defined as a collection of big numbers. For other type of elements, we can map them to big numbers.

base knowledge

Additively Homomorphic Cryptosystem

Paillier’s cryptosystem

TODO:: 找 golang 的 Paillier 库, 或者自行实现(推荐)

the encryption function with public key pk:

  • Epk(·)

The cryptosystem supports the following two operations, which can be performed without knowledge of the private key:

  • Epk(a + b) := Epk(a) +h Epk(b)

    • Given the encryptions of a and b, Epk(a) and Epk(b), we can efficiently compute the encryption of a + b

    • 加同态

  • Epk(c · a) := c ×h Epk(a)

    • Given a constant c and the encryption of a, Epk(a), we can efficiently compute the encryption of c · a,

    • 标量乘同态

We also require that the homomorphic public-key cryptosystem support secure (n, n)- threshold decryption.

Polynomials Over Rings

TODO:: 需要一人确定是否用到此部分

Commitment

TODO:: 需要具体方案

Hash Function

SHA

TODO:: 需要确定使用哪种hash

  • h(·)

    • a hash function from {0, 1}* to {0, 1}l ( l = lg(1 / ε) ), where ε is a probability parameter chosen to be negligable)

Zero-Knowledge Proofs

TODO:: 确定是否均为标准 ZKP 流程

  • POPK{C = Epk(x)}

    • V: 拥有数字 x 的密文 C = Epk(x)
    • P: 证明知道秘密 x
  • ZKPK{f | p' = fh Epk(p)}

    • V: 拥有多项式 p 的密文 p' = fh Epk(p)
    • P: 证明知道多项式 p
  • ZKPK{f | (p' = fh Epk(p)) ∧ (y = Epk (f))}

    • V: 拥有多项式 p 的密文 p' = fh Epk(p)
    • V: 拥有乘法系数 f 的密文 y = Epk (f))
    • P: 证明知道多项式 p 和 乘法系数 f

protocol

TODO:: 理清流程, 将上方的内容对号入座

The protocol is based on section 6.2 of Private and threshold set-intersection, named Intersection-Mal.

input

About

Confidential computing example - Set-Intersection

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages