21

Can there be an algorithm such that, given plaintext data P,Q, and compression function e,

Such that if we treat P and Q as a number (a series of bits): $$\begin{eqnarray*}e(P + Q)& =& e(P) + e(Q)\\ e(P*Q) &=& e(P)*e(Q)\end{eqnarray*}\hspace{10pt}?$$

The idea is closely related to homomorphic encryption, but instead of information security, the context is is compressing data while preserving malleability. Is there a theoretical limit to how much data can be compressed while maintaining the homomorphic property?

To clarify, let P and Q be binary strings (aka numbers expressed in binary), and $$log_2(e(u)) \le log_2(u)$$ for any number $u$.

  • What is your definition of a "compression function"? – hmakholm left over Monica Nov 11 '13 at 15:11
  • A function $f$: defined over some set $A$ such that the length of strings expressing $f(u)$ is smaller than the length of strings expressing $u$ – Sidharth Ghoshal Nov 11 '13 at 15:52
  • 3
    @frogeyedpeas Assuming that the strings are comprised of the same elements before and after compression (e.g. ${0,1}$) there will be some input string $u_1$ for which the output $f(u_1)$ will be longer, by pigeonhole principle. Or am I not understanding your definition correctly? – nanofarad Oct 16 '14 at 10:28
  • 1
    This is correct I believe. When I asked the original question I hadnt taken that into consideration, it was a bit more naively motivated. I think formally defining which strings I want to compress and which should be left unchanged/expanded needs to be defined. – Sidharth Ghoshal Oct 18 '14 at 05:18

2 Answers2

1

It works with lossy compression. Let $e_n\colon\mathbb{Z} \to \mathbb{Z}_{2^n}$. Then $$e_n(P +_\mathbb{Z}Q) = e_n(P) +_{\mathbb{Z}_{2^n}} e_n(Q)$$ $$e_n(P \cdot_\mathbb{Z}Q) = e_n(P) \cdot_{\mathbb{Z}_{2^n}} e_n(Q)$$

Mike Stay
  • 321
0

This is what so-called order-preserving hash functions. A similar problem was, Order-preserving encryption OPE that leaks min and maximum element. And, if you access an oracle you can find all the elements by binary search.

In the literature, there is one such hash function called Pearson's Hash

kelalaka
  • 1,679