Tag Info

New answers tagged

0

Alright, so using per-round validation in almost all cases causes a decrease in performance. Simple probability tells us that after each round, there is a 1/x chance that the round will fall within the "valid" data set. This means that for any cycle through a Feistel network, the output has this 1/x chance of being correct. Likewise, any Feistel network ...


0

I don't think this would break correctness, but it's possible you might actually slow your algorithm down on average. You'd need a more rigorous combinatorial analysis of the expected number of repeated rounds vs. the expected number of full cycle walks. That really depends on the specific algorithm; are you using FFX? You'd also need to show that doing ...


5

So, in the comments, you state that I'm using the original date as the key This is the reason for the duplicate dates. The encryption is entirely deterministic for a fixed key. When you change the key, however, it is not. So it is entirely plausible that encrypting the number 215 with the key 215 could result in the same ciphertext as encrypting the ...


3

One potential reason you might be running into duplicates is if you encrypt 'December 31' of a leap year; that makes it day 366, and that's out of range for your FPE method. The obvious way to address this (and encrypt both days and years together) would be to convert the value into "days since January 1, 1901", encrypt that as a value between 0 and 42003 ...



Top 50 recent answers are included