Open zzzhhhlll opened 3 months ago
please see examples here: https://github.com/fairmath/polycircuit/tree/main/examples
please see examples here: https://github.com/fairmath/polycircuit/tree/main/examples
Thank you, but I'm a bit slow. I want to use this to compare encrypted texts. How can I achieve this? Is there any interface or function I can call to use it quickly?
Hello! Have you tried running signum.cc
from examples? https://github.com/fairmath/polycircuit/tree/main/examples/signum_usage In a nutshell, this example sets up command-line options to specify locations for the cryptographic context, input ciphertext, and output ciphertext. It deserializes the cryptographic context and input ciphertext from files, applies the Signum function to the ciphertext, and then serializes the result back to a file.
@zzzhhhlll you can implement comparison function using SIGN component. Just use sign(a - b).
Hello! Have you tried running
signum.cc
from examples? https://github.com/fairmath/polycircuit/tree/main/examples/signum_usage In a nutshell, this example sets up command-line options to specify locations for the cryptographic context, input ciphertext, and output ciphertext. It deserializes the cryptographic context and input ciphertext from files, applies the Signum function to the ciphertext, and then serializes the result back to a file.
ok,I would like to ask what the purpose of the move function inside is, and why it is used
terminate called after throwing an instance of 'lbcrypto::OpenFHEException' what(): /home/zhl/download/openfhe-development-main/openfhe-development-main/src/core/include/lattice/hal/default/dcrtpoly-impl.h:l.698:DropLastElement(): DropLastElement: Removing last element of DCRTPoly renders it inlid.
Hello! Have you tried running
signum.cc
from examples? https://github.com/fairmath/polycircuit/tree/main/examples/signum_usage In a nutshell, this example sets up command-line options to specify locations for the cryptographic context, input ciphertext, and output ciphertext. It deserializes the cryptographic context and input ciphertext from files, applies the Signum function to the ciphertext, and then serializes the result back to a file.
ok,I would like to ask what the purpose of the move function inside is, and why it is used The following error occurs when executing a function with the move function:
terminate called after throwing an instance of 'lbcrypto::OpenFHEException' what(): /home/zhl/download/openfhe-development-main/openfhe-development-main/src/core/include/lattice/hal/default/dcrtpoly-impl.h:l.698:DropLastElement(): DropLastElement: Removing last element of DCRTPoly renders it inlid.
I don't want to use any other parameters, I just want to use this P to get the output result
P:polycircuit::Signum
Hello! Have you tried running
signum.cc
from examples? https://github.com/fairmath/polycircuit/tree/main/examples/signum_usage In a nutshell, this example sets up command-line options to specify locations for the cryptographic context, input ciphertext, and output ciphertext. It deserializes the cryptographic context and input ciphertext from files, applies the Signum function to the ciphertext, and then serializes the result back to a file.ok,I would like to ask what the purpose of the move function inside is, and why it is used The following error occurs when executing a function with the move function:
terminate called after throwing an instance of 'lbcrypto::OpenFHEException' what(): /home/zhl/download/openfhe-development-main/openfhe-development-main/src/core/include/lattice/hal/default/dcrtpoly-impl.h:l.698:DropLastElement(): DropLastElement: Removing last element of DCRTPoly renders it inlid.
I don't want to use any other parameters, I just want to use this P to get the output result P:polycircuit::Signumlbcrypto::DCRTPoly(std::move(cc), std::move(c1)).evaluate() Is the function of p a sign function approximation?
I succeeded, but I have some other issues. How can I control this precision, and does the content of the vector I input have to be between -1 and 1? If the content of my vector is something like [25, -100, 1000], how should I adjust other parameters, such as multiplication depth, modulus, etc.?
Let me check and get back to you
m_cc->Enable(ADVANCEDSHE);
Could you explain these codes, please? By the way, how should I use it to compare two ciphertexts, what is the required multiplication depth, and how is the precision controlled?"Thank you very much.