We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Build/Install
Yes
我参考了 #963 ,但是它不是实际两方进行运算的过程。 下面是我的例子: import spu import secretflow as sf import numpy as np
cluster_def = { 'nodes': [ { 'party': 'alice', 'address': '127.0.0.1:50051', # Alice 的通信地址 'listen_addr': '0.0.0.0:50051' # Alice 的监听地址 }, { 'party': 'bob', 'address': '127.0.0.1:50052', # Bob 的通信地址 'listen_addr': '0.0.0.0:50052' # Bob 的监听地址 }, ], 'runtime_config': { 'protocol': spu.spu_pb2.CHEETAH, # 协议类型,例如SEMI2K 'field': spu.spu_pb2.FM64, # 字段类型,例如FM128 'beaver_type': spu.spu_pb2.RuntimeConfig.MultiParty, 'enable_pphlo_profile' : True , # 开启调试模式 'enable_action_trace' : True } }
spu = sf.SPU(cluster_def=cluster_def)
alice, bob = sf.PYU('alice'), sf.PYU('bob')
def data_a(): return np.array([5,4])
alice_data =alice(data_a)()
def data_b(): return np.array([1,2])
bob_data = bob(data_b)()
def secure_multiply(x,y): return x*y
result = spu(secure_multiply)(alice_data, bob_data) 现在我想知道Alice和Bob分别拿到的share是多少,因为两方需要接下来对share进行一些特殊的运算
我想要了解如何提取 Alice 和 Bob 在执行 secure_multiply 时分别持有的秘密共享数据,有这个接口可以得到吗?
A clear and concise description of any alternative solutions or features you've considered.
The text was updated successfully, but these errors were encountered:
“Alice和Bob分别拿到的share是多少”?????这会导致秘密泄露,不支持。
Sorry, something went wrong.
请问alice或者bob无法输出自己持有的share吗?
如果使用的是spu Python API,那么每方(Alice/Bob)可以拿到自己这方的share,但是这个share是经过了protobuf编码的,没有提供解码的API; 如果使用的是spu C++ API,那么同样可以拿到,各自的是Value类型数据。
谢谢回复!
w-gc
wangzul
No branches or pull requests
Feature Request Type
Build/Install
Have you searched existing issues?
Yes
Is your feature request related to a problem?
我参考了 #963 ,但是它不是实际两方进行运算的过程。
下面是我的例子:
import spu
import secretflow as sf
import numpy as np
cluster_def = {
'nodes': [
{
'party': 'alice',
'address': '127.0.0.1:50051', # Alice 的通信地址
'listen_addr': '0.0.0.0:50051' # Alice 的监听地址
},
{
'party': 'bob',
'address': '127.0.0.1:50052', # Bob 的通信地址
'listen_addr': '0.0.0.0:50052' # Bob 的监听地址
},
],
'runtime_config': {
'protocol': spu.spu_pb2.CHEETAH, # 协议类型,例如SEMI2K
'field': spu.spu_pb2.FM64, # 字段类型,例如FM128
'beaver_type': spu.spu_pb2.RuntimeConfig.MultiParty,
'enable_pphlo_profile' : True , # 开启调试模式
'enable_action_trace' : True
}
}
spu = sf.SPU(cluster_def=cluster_def)
alice, bob = sf.PYU('alice'), sf.PYU('bob')
def data_a():
return np.array([5,4])
alice_data =alice(data_a)()
def data_b():
return np.array([1,2])
bob_data = bob(data_b)()
def secure_multiply(x,y):
return x*y
result = spu(secure_multiply)(alice_data, bob_data)
现在我想知道Alice和Bob分别拿到的share是多少,因为两方需要接下来对share进行一些特殊的运算
Describe features you want to add to SPU
我想要了解如何提取 Alice 和 Bob 在执行 secure_multiply 时分别持有的秘密共享数据,有这个接口可以得到吗?
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: