当前位置:网站首页>Threshold psi code
Threshold psi code
2022-07-18 03:00:00 【xuhss_ com】
High quality resource sharing
| Learning route guidance ( Click unlock ) | Knowledge orientation | Crowd positioning |
|---|---|---|
| 🧡 Python Actual wechat ordering applet 🧡 | Progressive class | This course is python flask+ Perfect combination of wechat applet , From the deployment of Tencent to the launch of the project , Create a full stack ordering system . |
| Python Quantitative trading practice | beginner | Take you hand in hand to create an easy to expand 、 More secure 、 More efficient quantitative trading system |
threshold PSI
If the number of intersections exceeds a given threshold , Allow the distributed participants to find the intersection in their own set , Besides the intersection , No additional information is available .
Realize the thesis : Multi-Party Threshold Private Set Intersection with Sublinear Communication
Source code address :https://github.com/ontanj/tpsi
among FTPSI−intFTPSI−intF_{TPSI-int} Make some modifications , Because it is based on TFHE Unable to bootstrap (bootstrapping) technology .
The encryption algorithm used :
TAHETAHETAHE:Paillier-https://github.com/niclabs/tcpaillier
TFHETFHETFHE:BFV-https://github.com/ldsec/lattigo
Interface :
(1)AHE_Cryptosystem and FHE_Cryptosystem Realize homomorphic operation
type AHE_Cryptosystem interface {
// Ciphertext + Ciphertext
Add(Ciphertext, Ciphertext) (sum Ciphertext, err error)
// Ciphertext ^{ Plaintext }
Scale(cipher Ciphertext, factor *big.Int) (product Ciphertext, err error)
// encryption
Encrypt(*big.Int) (Ciphertext, error)
// Aggregate plaintext
CombinePartials([]Partial_decryption) (*big.Int, error)
// Calculate the encryption matrix
EvaluationSpace() gm.Space
// Clear text space size
N() *big.Int
}
type FHE_Cryptosystem interface {
AHE_Cryptosystem
// Ciphertext * Ciphertext
Multiply(Ciphertext, Ciphertext) (Ciphertext, error)
}
(2)AHE_setting and FHE_setting Include the number of participants 、 Threshold size and communication mode
type AHE_setting interface {
// threshold
Threshold() int
// Participant
Parties() int
// AHE
AHE\_cryptosystem() AHE_Cryptosystem
// central Party releases information to others
Distribute(interface{})
// Others give central Party delivers messages
Send(interface{})
// central Party sends a message to the designated party
SendTo(int, interface{})
// central We are waiting for news from others , And its ( According to the order ) grouping
ReceiveAll() []interface{}
// To take over central Party's message
Receive() interface{}
// Judge whether it is central Fang
IsCentral() bool
}
type FHE_setting interface {
AHE_setting
// FHE
FHE\_cryptosystem() FHE_Cryptosystem
}
This experiment simulates multi-party communication on a machine , adopt goroutine Realization .
goroutine: stay go In language , Each concurrent execution unit is called goroutine, If a program contains multiple goroutine, Calls to two functions may occur at the same time .
function :
go run main/main.go diff dj 7 main/elements
among FTPSI-diff It uses TAHE, The threshold for 7.
function :
(1)TPSIdiffWorker, Find the intersection and difference set under the intersection test
(2)TPSIintWorker: Find the intersection and difference set under the difference set test
test :
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
// When the intersection is large TFHE seek
go run main/main.go int bfv 7 main/elements
// The difference set hour is used TAHE seek
go run main/main.go diff dj 7 main/elements
// The difference set hour is used TFHE seek
go run main/main.go diff bfv 7 main/elements
| s/ second | int | diff |
|---|---|---|
| TFHE | 515.532007 | 2391.952714 |
| TAHE | / | 26.436323 |
summary :
use FHE Realization , Efficiency is obvious !
边栏推荐
- Defi中的关键,智能合约是什么?
- Recurrence of two CVE vulnerabilities
- 金融市场暴跌忍不住想抄底?劝你看完本文再做决定
- UMI 3.0 template
- 【MySQL】表的内外链接
- Vector
- torch.max()和numpy.max()使用辨析
- Xpath实战之爬取学习猿地的猿著(下)
- 基于eTS高效开发HarmonyOS课程类应用
- To realize the remote direct electromagnetic communication of consciousness, the Dongda team, together with the National University of Singapore and others, is expected to build an electromagnetic bra
猜你喜欢

MQTT---Connect

To realize the remote direct electromagnetic communication of consciousness, the Dongda team, together with the National University of Singapore and others, is expected to build an electromagnetic bra

C language · function

解析协同办公“协同”为何意,数字化办公又如何轻松“破题”?

Recurrence of two CVE vulnerabilities

Xpath实战之爬取学习猿地的猿著(下)

Unit MySQL appears in MySQL Solution of service could not be found

Valuing space over safety, Highlander and link 09, who do you choose

Using PostgreSQL on PostgreSQL 15_ FDW performs parallel commit of transactions

CCF 202012-1 期末预测之安全指数
随机推荐
Traverse the file (txt) under the folder and delete the last line
HCIP笔记(1)
HCIP笔记(3)
Shanghai port shipping AI container AI Unicorn gathers flying pupils, and the market share of port and shipping AI products is leading, driving the development of the whole industrial chain of port an
RobotFramework进阶(二)集成Pycharm及Api自动化用例编写
Number formatting
51nod 1413 权势二进制
美财政部批准与俄罗斯进行化肥、农产品交易
[google] goodbye SharedPreferences embrace jetpack datastore
Mqtt--- subscribe and suback
July 11, 2022 - July 17, 2022 (UE4 video tutorials and documents)
MQTT---Connect
C language · function
基于eTS高效开发HarmonyOS课程类应用
XPath actual combat: climbing the learning ape land (Part 1)
埃森哲22年《技术展望》报告:数字化转型将迎来下一个十年
04 exit interrupt detection key
第九十八期:Flutter学习(一)
How to choose the two tracks of shengteng AI innovation competition? Just take this introduction!
[the road of Exile - Chapter 1]
