Use EncryptedScalar from client, ClearScalar from server in circuit

(First of all: This question comes after a long day, I need to get home, and will look more into it tomorrow. Feel free to reply with a short “RTFM”.)

I’m building a small demo where a client will encrypt a value (EncryptedScalar), and the server will supply a privat value (ClearScalar), and compute a private* circuit on the values.

So, I want to do

serialized_args: bytes = client.encrypt(<client_int>).serialize()

on one side, and then (server side) append a ClearScalar to the resulting PublicArguments instance. How can I do that?

Having said that: I’m looking forward to a functional implementation of multiplication (or, equivalently, AND gates) between two ciphertexts. That would actually be … FHE, and my demo would be a lot richer for it!

*) I don’t expect the wash-and-rinse routine to be implemented yet, though :wink:

Hey @MartinStrand,

That’s not possible with the current library but it’s in our roadmap. You’ll be able to encrypt each argument separately in the upcoming releases.

Multiplication and AND gates are also coming. One is being worked on by us, and the other one is one of our bounties and there are people working on it (bounty-program/add-bitwise-operations.md at main · zama-ai/bounty-program · GitHub) :wink:

Hope this helps!

1 Like

Perfect answer, it saves me loads of time of trying and failing.

Looking forward to the new releases!