Skip to main content
Some clarification and examples.
Source Link
Paul Uszak
  • 16k
  • 2
  • 32
  • 83

There was a recent question answered where the accepted solution was a double Pearson hash. It consisted of the following pseudo code:- h = T1[h ^ x[i]] followed immediately by h = T2[h ^ x[i]] so effectively you run one lookup table into the other. Tables T1 and T2 are unique random 8 bit permutations. Output collisions can occur at the classic $ 1 \over e $ rate given the presence of the 2nd table, with the hash behaving as a pseudo random function.

Developing this construction further, assume that the permutation tables are $ \pi $, giving a more general form for hashing a message $m$ with multiple consecutive but but unique permutations:-

$$ h_{i} = \pi_j [h_{i-1} \oplus m[i]]; recursive $$

creating a functional composite as in:-

$$ h = \pi_1 [h \oplus m[i]] $$ $$ h = \pi_2 [...] $$ $$ h = \pi_3 [...] $$ $$ h = \pi_N [...] $$$$ h = \pi_3[(\pi_2[(\pi_1 [h \oplus m[i]]) \oplus m[i])]) \oplus m[i]] $$

andif $j=3$ . And let's call each calculation of $h$ for any given $\pi$ a 'step'. Overall, we get $ output = H_N(m) $ for this cool/weird hash consisting of $N$ tables/steps. As an example, it might be that $ H_3(3512)=110 $ for a hash with 3 permutation tables. In the linked question we used 2 tables.

  1. Can a new $\pi$ or set of $\pi$s be constructed to arrive at an identialidentical output for a given messageall messages with $<N$ steps? In other words can multiple $\pi$ permutations be reduced or merged somehow into new ones, even theoretically? Clearly they can in the special and trivial case of $|m| = 1$. What about generally for $|m| > 1$?
  2. Considering the trivial case mentioned above, is there some relationship between $N$ and $|m|$ that determines the answer?
  3. If a reduced set of new $\pi$s might theoretically exist, how might it found in practice?

Notes:

  1. Some of this question is clearly on topic here, but not sure about it's entirely.

    Some of this question is clearly on topic here, but not sure about it's entirely.

  2. I see small parallels with permutations and non linearity, construction of S boxes, and their combinations.

    I see small parallels with permutations and non linearity, construction of S boxes, and their combinations.

  3. I'm happy to be migrated outa here.

    Whilst hallucinating one might assume values of $\pi_j$ be likened to multiple keys $k_j$, so the answer to Security of a block cipher if double encryption $E_{K_2} \circ E_{K_1}$ is always single encryption $E_{f(K_1,K_2)}$ comes to mind as there is an attempt at a similar(?) reduction.

  4. I'm happy to be migrated outa here.

There was a recent question answered where the accepted solution was a double Pearson hash. It consisted of the following pseudo code:- h = T1[h ^ x[i]] followed immediately by h = T2[h ^ x[i]] so effectively you run one lookup table into the other. Tables T1 and T2 are unique random 8 bit permutations. Output collisions can occur at the classic $ 1 \over e $ rate given the presence of the 2nd table, with the hash behaving as a pseudo random function.

Developing this construction further, assume that the permutation tables are $ \pi $, giving a more general form for hashing a message $m$ with multiple consecutive but unique permutations:-

$$ h_{i} = \pi_j [h_{i-1} \oplus m[i]]; recursive $$

as in:-

$$ h = \pi_1 [h \oplus m[i]] $$ $$ h = \pi_2 [...] $$ $$ h = \pi_3 [...] $$ $$ h = \pi_N [...] $$

and let's call each calculation of $h$ for any given $\pi$ a 'step'. Overall, we get $ output = H_N(m) $ for this cool/weird hash consisting of $N$ tables/steps.

  1. Can a new $\pi$ or set of $\pi$s be constructed to arrive at an idential output for a given message with $<N$ steps? In other words can multiple $\pi$ permutations be reduced or merged somehow into new ones, even theoretically? Clearly they can in the special and trivial case of $|m| = 1$. What about generally for $|m| > 1$?
  2. Considering the trivial case mentioned above, is there some relationship between $N$ and $|m|$ that determines the answer?
  3. If a reduced set of new $\pi$s might theoretically exist, how might it found in practice?

Notes:

  1. Some of this question is clearly on topic here, but not sure about it's entirely.
  2. I see small parallels with permutations and non linearity, construction of S boxes, and their combinations.
  3. I'm happy to be migrated outa here.

There was a recent question answered where the accepted solution was a double Pearson hash. It consisted of the following pseudo code:- h = T1[h ^ x[i]] followed immediately by h = T2[h ^ x[i]] so effectively you run one lookup table into the other. Tables T1 and T2 are unique random 8 bit permutations. Output collisions can occur at the classic $ 1 \over e $ rate given the presence of the 2nd table, with the hash behaving as a pseudo random function.

Developing this construction further, assume that the permutation tables are $ \pi $, giving a more general form for hashing a message $m$ with multiple consecutive but unique permutations:-

$$ h_{i} = \pi_j [h_{i-1} \oplus m[i]]; recursive $$

creating a functional composite as in:-

$$ h = \pi_3[(\pi_2[(\pi_1 [h \oplus m[i]]) \oplus m[i])]) \oplus m[i]] $$

if $j=3$ . And let's call each calculation of $h$ for any given $\pi$ a 'step'. Overall, we get $ output = H_N(m) $ for this cool/weird hash consisting of $N$ tables/steps. As an example, it might be that $ H_3(3512)=110 $ for a hash with 3 permutation tables. In the linked question we used 2 tables.

  1. Can a new $\pi$ or set of $\pi$s be constructed to arrive at an identical output for all messages with $<N$ steps? In other words can multiple $\pi$ permutations be reduced or merged somehow into new ones, even theoretically? Clearly they can in the special and trivial case of $|m| = 1$. What about generally for $|m| > 1$?
  2. Considering the trivial case mentioned above, is there some relationship between $N$ and $|m|$ that determines the answer?
  3. If a reduced set of new $\pi$s might theoretically exist, how might it found in practice?

Notes:

  1. Some of this question is clearly on topic here, but not sure about it's entirely.

  2. I see small parallels with permutations and non linearity, construction of S boxes, and their combinations.

  3. Whilst hallucinating one might assume values of $\pi_j$ be likened to multiple keys $k_j$, so the answer to Security of a block cipher if double encryption $E_{K_2} \circ E_{K_1}$ is always single encryption $E_{f(K_1,K_2)}$ comes to mind as there is an attempt at a similar(?) reduction.

  4. I'm happy to be migrated outa here.

Source Link
Paul Uszak
  • 16k
  • 2
  • 32
  • 83

Can multiple Pearson permutation tables be reduced or merged?

There was a recent question answered where the accepted solution was a double Pearson hash. It consisted of the following pseudo code:- h = T1[h ^ x[i]] followed immediately by h = T2[h ^ x[i]] so effectively you run one lookup table into the other. Tables T1 and T2 are unique random 8 bit permutations. Output collisions can occur at the classic $ 1 \over e $ rate given the presence of the 2nd table, with the hash behaving as a pseudo random function.

Developing this construction further, assume that the permutation tables are $ \pi $, giving a more general form for hashing a message $m$ with multiple consecutive but unique permutations:-

$$ h_{i} = \pi_j [h_{i-1} \oplus m[i]]; recursive $$

as in:-

$$ h = \pi_1 [h \oplus m[i]] $$ $$ h = \pi_2 [...] $$ $$ h = \pi_3 [...] $$ $$ h = \pi_N [...] $$

and let's call each calculation of $h$ for any given $\pi$ a 'step'. Overall, we get $ output = H_N(m) $ for this cool/weird hash consisting of $N$ tables/steps.

  1. Can a new $\pi$ or set of $\pi$s be constructed to arrive at an idential output for a given message with $<N$ steps? In other words can multiple $\pi$ permutations be reduced or merged somehow into new ones, even theoretically? Clearly they can in the special and trivial case of $|m| = 1$. What about generally for $|m| > 1$?
  2. Considering the trivial case mentioned above, is there some relationship between $N$ and $|m|$ that determines the answer?
  3. If a reduced set of new $\pi$s might theoretically exist, how might it found in practice?

Notes:

  1. Some of this question is clearly on topic here, but not sure about it's entirely.
  2. I see small parallels with permutations and non linearity, construction of S boxes, and their combinations.
  3. I'm happy to be migrated outa here.