Score:-1

Simple Precomputed Ciphertext operations table instead of Homomorphic encryption

in flag

Let's say I want to perform addition on "small" numbers (if it matters, let's say integers between 1-10K) without decrypting the numbers -- i.e. I have E(A) (the encryption of A in a crypto system under a given key) and E(B) and I want to compute E(A+B) without decrypting A or B.

The state of the art would be to use a homomorphic encryption (like in the Pallier Cryptosystem for addition). However, these are slow by orders of magnitude compared to regular addition and only work for limited operations -- I would need a different crypto system for multiplication, for example. But they do provide well-understood security guarantees in the presence of an adversary who can fully observe the addition operation.

In my case, my threat model is such that while I do want to reduce access to plaintext and the crypto keys, I am not concerned about an adversary accessing the addition operation. So, what if I precompute all 10K x 10K tuples ( E(A), E(B), E(A+B) ), and use them to compute E(A+B)? (Ignore overflow, let's say it's modular arithmetic). I understand this would be very insecure if anyone got a hold of the tuple table, or observed enough additions. None of those are of concern to me. Yes, I need E(A) to be deterministic, which in itself leaks information -- even that is not of concern in my threat model.

My security goal literally is to avoid access to plaintext and keys while still providing operations. Everything else is "someone else's problem"

This seems too obvious and so I'm wondering what I'm missing. If, given my generous assumptions, this works I'm wondering if there is a formal model for this -- what assumptions are essential, what security guarantees I get?

Any help and pointers appreciated.

fgrieu avatar
ng flag
As a toy example, A and B are in {0,1,2}: the encoding for A is 0/b 1/a 2/c; the encoding for B is 0/d 1/f 2/e; the encoding for the sum is 0/h 1/g 2/i; thus the modular addition table is ad/g ae/h af/i bd/h be/i bf/g cd/i ce/g cf/h. Which of these 3 tables is assumed known to adversaries? And which of these tables are reused?
Manish avatar
in flag
@fgrieu-onstrike, the encoding (for both A & B and A+B) is `E()`, so it is not known to anyone without the key. The modular addition table in my threat model is secure from an adversary. Hence, the adversary knows non of the 3 tables in your question.
fgrieu avatar
ng flag
OK encoding table E is the same for A, B and A+B, missed that; and E and it's inverse are unknown to adversaries. Is the addition table itself known to adversaries? How many times are the tables reused? Is it to fear adversaries can make Chosen Plaintext Attacks, Chosen Ciphertext Attacks, how many?
Manish avatar
in flag
No, the addition table itself is not known to adversaries. Not sure I understand "how many times are the tables reused?". There is only 1 addition table, so it is used for each addition operation (so `E(A+(B+C))` would use it twice). Are you getting at some kind of frequency based attack?
Command Master avatar
in flag
Is there a reason you don't want to decrypt `A` or `B`? Instead of having the table not known to adversaries you can have the key in its place.
Manish avatar
in flag
@CommandMaster, I have a compliance headache if I touch the keys. Compliance standards are a little more forgiving if you use a leaky, weak encryption of the tables -- as long as you don't decrypt -- since the compute environment has been vetted by compliance. Touching the keys throws the existing security assumptions off.
Score:0
ru flag

This sounds like an implementation of garbled circuits with larger look-up tables used. I'm not sure of the trade-offs between space and functionality, but the capabilities and limitations should be the same in both cases.

Manish avatar
in flag
Thanks for the pointer @DanielS
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.