how to use SecFld.array() correctly #84
-
I've been having trouble creating a secure field array these past few days. I want to implement operations done in bytes and the only way I see in the demos is to use an array in a secure field. But the program never terminates. Consider the following program, which receives two strings as inputs, converts them into an array in a secure field, and outputs the secure objects created. This program is stuck in the loop. I thought it had something to do with numpy instances used, and I tried using different numpy instances, but this still does not work. Am I missing something? Originally I wanted to concatenate these two bytes, but even outputting those bytes is impossible. I appreciate any help you can provide.
|
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 1 reply
-
If I run the program with one party, there is no problem. So, I think you mean you experience this problem if you run the program with more than one party? For instance, with In that case, you may add |
Beta Was this translation helpful? Give feedback.
-
Right, I see. Both parties input a string of possibly different lengths, but they don't know the input length used by the other party. To fix this you can set a maximum length for both parties, and let each party pad its input string Another thing is that |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Your program works for me, but when I run it with MPyC v0.9 the same issue arises. So, if you update to the latest version, e.g., using |
Beta Was this translation helpful? Give feedback.
-
Yeah, that seemed to be the problem :D, thank you so much for your help. |
Beta Was this translation helpful? Give feedback.
Your program works for me, but when I run it with MPyC v0.9 the same issue arises.
So, if you update to the latest version, e.g., using
pip install git+https://github.com/lschoe/mpyc
the problem will probably be gone.