-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: 如何在emulator.run中打开一个秘密共享值,从而更灵活地设计协议 #912
Comments
理论上你这个 reveal 后做 public indexing 不是纯 mpc 程序,你只能 reveal 前后分别在 spu 上跑 |
我是想实现这篇文章里的Dijkstra算法:A Fast, Practical and Simple Shortest Path Protocol for Multiparty Computation。它通过事先的洗牌打乱原始输入的位置,后续reveal后做public indexing泄露的是洗牌后的数据分布,与原始输入的数据分布无关,从而保证安全性。 如果只能reveal 前后分别在 spu 上跑的话,我不想reveal的值如何在两个emulator.run之间保持密文状态? |
没明白你的意思,reveal 后不就是明文值了吗 |
比如emulator.run里跑的程序有值v和数组A,我想把v reveal,然后再创建一个emulator.run把明文的v和密文的A作输入。怎么让A一直保持密文状态? |
没 reveal 就是密文,另外你的需求在 secretflow 里做似乎更方便 |
hello,我理解你可以尝试这样做: def func1(inputs):
return compute_v()
def func2(inputs, v):
A = compute_A()
return do_things(v, A)
seal_inputs = emulator.seal(inputs)
# get plaintext v
v = emulator.run(func1)(seal_inputs)
# use plaintext v
ret = emulator.run(func2, static_argnums=(1,))(seal_inputs, v) BTW,同觉得你这个算法用SecretFlow实现会更直接。 |
好的,十分感谢!有空我也去了解一下SecretFlow |
Feature Request Type
Usability
Have you searched existing issues?
Yes
Is your feature request related to a problem?
我想在emulator.run中打开一个秘密共享值,并用于数组位置索引,然而我不知道如何在SPU中实现这个能力
Describe features you want to add to SPU
A clear and concise description of what you want to happen.
Describe features you want to add to SPU
A clear and concise description of any alternative solutions or features you've considered.
The text was updated successfully, but these errors were encountered: