PSI阈值如何界定长尾词效果?

2026-04-11 05:281阅读0评论SEO教程
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计724个文字,预计阅读时间需要3分钟。

PSI阈值如何界定长尾词效果?

若PSI集合数量超过预设阈值时,允许分布式的各个参与方在与自身集合中找到交集,同时排除交集合外的其他信息。实现论文:多党制阈值隐私集合交集

阈值PSI

若交集数量超过某个给定阈值时,允许分布式的各个参与方在自己集合中找到交集,且除了交集外,得不到其他额外信息。

实现论文: Multi-Party Threshold Private Set Intersection with Sublinear Communication

源码地址:github.com/ontanj/tpsi

其中\(F_{TPSI-int}\)做出部分修改,因为基于TFHE无法实现自举(bootstrapping)技术。

用到的加密算法:

PSI阈值如何界定长尾词效果?

\(TAHE\):Paillier-github.com/niclabs/tcpaillier

\(TFHE\):BFV-github.com/ldsec/lattigo

接口:

(1)AHE_CryptosystemFHE_Cryptosystem实现同态运算

type AHE_Cryptosystem interface { // 密文+密文 Add(Ciphertext, Ciphertext) (sum Ciphertext, err error) // 密文^{明文} Scale(cipher Ciphertext, factor *big.Int) (product Ciphertext, err error) // 加密 Encrypt(*big.Int) (Ciphertext, error) // 聚合明文 CombinePartials([]Partial_decryption) (*big.Int, error) // 计算加密矩阵 EvaluationSpace() gm.Space // 明文空间大小 N() *big.Int } type FHE_Cryptosystem interface { AHE_Cryptosystem // 密文*密文 Multiply(Ciphertext, Ciphertext) (Ciphertext, error) }

(2)AHE_settingFHE_setting包含参与方数量、阈值大小和通信方式

type AHE_setting interface { // 阈值 Threshold() int // 参与方 Parties() int // AHE AHE_cryptosystem() AHE_Cryptosystem // central方发布消息给其他方 Distribute(interface{}) // 其他方给central方传递消息 Send(interface{}) // central方给指定方发送消息 SendTo(int, interface{}) // central方等待来其他方的消息,并将其(按顺序)分组 ReceiveAll() []interface{} // 接手central方的消息 Receive() interface{} // 判断是否为central方 IsCentral() bool } type FHE_setting interface { AHE_setting // FHE FHE_cryptosystem() FHE_Cryptosystem }

本实验是在一台机器上模拟多方通信,通过goroutine实现。

goroutine:在go语言中,每一个并发的执行单元叫做goroutine,如果一个程序中包含多个goroutine,对两个函数的调用则可能发生在同一时刻。

运行:

go run main/main.go diff dj 7 main/elements

其中FTPSI-diff使用的是TAHE,阈值为7。

功能:

(1)TPSIdiffWorker,在交集测试下求交集和差集

(2)TPSIintWorker:在差集测试下求交集和差集

测试:

P1:0,3,6,9,13,16 P2:0,3,6,9,14,17 P3:0,3,6,9,14,15 P4:0,3,6,9,12,17 P5:0,3,6,9,13,15 T=7 //交集大时用TFHE求 go run main/main.go int bfv 7 main/elements //差集小时用TAHE求 go run main/main.go diff dj 7 main/elements //差集小时用TFHE求 go run main/main.go diff bfv 7 main/elements s/秒 int diff TFHE 515.532007 2391.952714 TAHE / 26.436323

总结
用FHE实现,效率是显而易见的!

本文共计724个文字,预计阅读时间需要3分钟。

PSI阈值如何界定长尾词效果?

若PSI集合数量超过预设阈值时,允许分布式的各个参与方在与自身集合中找到交集,同时排除交集合外的其他信息。实现论文:多党制阈值隐私集合交集

阈值PSI

若交集数量超过某个给定阈值时,允许分布式的各个参与方在自己集合中找到交集,且除了交集外,得不到其他额外信息。

实现论文: Multi-Party Threshold Private Set Intersection with Sublinear Communication

源码地址:github.com/ontanj/tpsi

其中\(F_{TPSI-int}\)做出部分修改,因为基于TFHE无法实现自举(bootstrapping)技术。

用到的加密算法:

PSI阈值如何界定长尾词效果?

\(TAHE\):Paillier-github.com/niclabs/tcpaillier

\(TFHE\):BFV-github.com/ldsec/lattigo

接口:

(1)AHE_CryptosystemFHE_Cryptosystem实现同态运算

type AHE_Cryptosystem interface { // 密文+密文 Add(Ciphertext, Ciphertext) (sum Ciphertext, err error) // 密文^{明文} Scale(cipher Ciphertext, factor *big.Int) (product Ciphertext, err error) // 加密 Encrypt(*big.Int) (Ciphertext, error) // 聚合明文 CombinePartials([]Partial_decryption) (*big.Int, error) // 计算加密矩阵 EvaluationSpace() gm.Space // 明文空间大小 N() *big.Int } type FHE_Cryptosystem interface { AHE_Cryptosystem // 密文*密文 Multiply(Ciphertext, Ciphertext) (Ciphertext, error) }

(2)AHE_settingFHE_setting包含参与方数量、阈值大小和通信方式

type AHE_setting interface { // 阈值 Threshold() int // 参与方 Parties() int // AHE AHE_cryptosystem() AHE_Cryptosystem // central方发布消息给其他方 Distribute(interface{}) // 其他方给central方传递消息 Send(interface{}) // central方给指定方发送消息 SendTo(int, interface{}) // central方等待来其他方的消息,并将其(按顺序)分组 ReceiveAll() []interface{} // 接手central方的消息 Receive() interface{} // 判断是否为central方 IsCentral() bool } type FHE_setting interface { AHE_setting // FHE FHE_cryptosystem() FHE_Cryptosystem }

本实验是在一台机器上模拟多方通信,通过goroutine实现。

goroutine:在go语言中,每一个并发的执行单元叫做goroutine,如果一个程序中包含多个goroutine,对两个函数的调用则可能发生在同一时刻。

运行:

go run main/main.go diff dj 7 main/elements

其中FTPSI-diff使用的是TAHE,阈值为7。

功能:

(1)TPSIdiffWorker,在交集测试下求交集和差集

(2)TPSIintWorker:在差集测试下求交集和差集

测试:

P1:0,3,6,9,13,16 P2:0,3,6,9,14,17 P3:0,3,6,9,14,15 P4:0,3,6,9,12,17 P5:0,3,6,9,13,15 T=7 //交集大时用TFHE求 go run main/main.go int bfv 7 main/elements //差集小时用TAHE求 go run main/main.go diff dj 7 main/elements //差集小时用TFHE求 go run main/main.go diff bfv 7 main/elements s/秒 int diff TFHE 515.532007 2391.952714 TAHE / 26.436323

总结
用FHE实现,效率是显而易见的!