November 18th, 2022, 3:25
November 20th, 2022, 17:09
I understand that "seed" for LFSR takes much more less space then actual pattern, but anyway if there will be unique "seeds" per sector, they itself will consume a lots of flash space (in total). How many unique patterns are used per example disk? I am assuming they are reused, can anyone share example pattern of key reuse?pepe wrote:the xor key is an output of an lsfr most of the cases, with params chosen so that it has large period.
It would be nice to write code to find out parameters of the lsfr for an actual pattern, then we could generate it without the need of recovering the whole pattern from the target device, probably a small part would be sufficient...
November 20th, 2022, 20:12
November 21st, 2022, 2:09
November 26th, 2022, 22:38
November 27th, 2022, 18:49
November 28th, 2022, 11:58
fzabkar wrote:Would it make sense to use the LBA as the seed? Then you wouldn't need to store it.
November 28th, 2022, 13:17
Arch Stanton wrote:fzabkar wrote:Would it make sense to use the LBA as the seed? Then you wouldn't need to store it.
Wouldn't that result in different XOR for each LBA?
November 28th, 2022, 15:11
fzabkar wrote:Arch Stanton wrote:fzabkar wrote:Would it make sense to use the LBA as the seed? Then you wouldn't need to store it.
Wouldn't that result in different XOR for each LBA?
I was addressing "okton's" point about unique seeds for each LBA. I have no idea whether this is really the case, or why it would be necessary.
BTW, a hardware implementation of LSFR is surprisingly trivial. For a 16-bit implementation, you just need a 16-bit shift register (4 x 4-bit) plus a quad XOR gate.
https://en.wikipedia.org/wiki/LSFR
https://upload.wikimedia.org/wikipedia/commons/a/a8/31_bit_Fibonacci_linear_feedback_shift_register.webm
August 20th, 2023, 12:57
Arch Stanton wrote:rec wrote:Arch Stanton wrote:Maybe for same reason hard drive manufacturers do this.
Also I have been wondering if encryption accomplishes the same as XOR scrambling.. XOR scrambling serves a purpose, say increase of entropy. Could encryption do the same?
I don't understand why a XOR operation increases entropy. Could you explain?
As for your encryption question the answer is yes if you use the right mode, see here:
https://github.com/pakesson/diy-ecb-penguin
Maybe I should have avoided that word, but if we XOR block of zeros with XOR key or block, do we not increase entropy? AIUI storing very similar data close is more prone to corruption and to avoid this XOR is applied to introduce noise and avoid worst case patterns. I assumed this increase in noise leve translates to high Shannon entropy. But I am no expert on the matter, it's what I read everywhere (NAND Flash Data Recovery Cook Book and other places / documents). If we look at typical XOR-ed block of repeating bytes in VNR we see
Which seems to me higher entropy data than a repeating pattern. If the same is already accomplished by some form of encryption XOR scrambling seems like an un-needed extra step. So maybe reasoning is, encryption gives us required noise AND we can position/market encryption as a feature. I do not know, I am simply guessing, thinking out loud.
August 20th, 2023, 15:34
August 20th, 2023, 17:43
Powered by phpBB © phpBB Group.