Do "a+b", how to provide an encrypted a and an encrypted b for execute?
ChanryLimmy opened this issue · comments
Limmy commented
with poly:
c = Input('a').__add__(Input('b'))
Output('c', c)
……
inputs_a = { 'a': [1] }
inputs_b = { 'b' : [2] }
encInputs_a = public_ctx.encrypt(inputs_a, signature)
encInputs_b = public_ctx.encrypt(inputs_b, signature)
# how can i get the result now?
# like this? it doesn't work for me.
encOutputs = public_ctx.execute(compiled_poly, [encInputs_a, encInputs_b])
Limmy commented
#5 (comment)
I saw this issues just now.
so in this case what i need to do in the newly defined function?
just merge the std::unordered_map<std::string, SchemeValue> values;
together?
how to deal with the seal::EncryptionParameters params;
then? @olsaarik
thx
TopFox commented
I think you can make what you want by giving a and b in the same dictionary:
with poly:
a = Input('a')
b = Input('b')
Output('c', a+b)
inputs = {'a': [1], 'b': [2]}
encInputs = public_ctx.encrypt(inputs, signature)
compiler = CKKSCompiler()
compiled_poly, params, signature = compiler.compile(poly)
encOutputs = public_ctx.execute(poly, encInputs)
...