How fast can you find the seed and prng of a disc that has been wiped with one of nwipe's current prngs. #625
Replies: 7 comments 3 replies
-
The Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz [x86 Family 6 Model 158 Stepping 9] 70 Can achieve something like 47 GFLOPS per second using all eight of it's cores. Greater speed could be achieved by analysis of the block using a different prng in each core, so the program would also need to be multi threaded. |
Beta Was this translation helpful? Give feedback.
-
Hey, i hope you are doing fine :) It would be an incredibly demanding task, as we use 64-bit seeds. Brute-Forcing PRNG Seeds in nwipe with a 64-Bit SeedA 64-bit seed significantly increases the complexity of brute-forcing compared to a 32-bit seed. The total number of possible seeds with a 64-bit seed is: This exponential growth renders brute-force attempts practically infeasible with current technology. Revised Computation Time Estimation Total Number of Seeds per PRNG: Per-Seed Computation Time: Assuming an optimized C program processes one seed in approximately 500 CPU cycles on a 3 GHz processor: Seeds Processed per Second per Core: Total Time per PRNG per Core: Parallel Processing: Even with significant parallelization, the time remains eternal.
Using 1 Million Cores: Astronomical Computational Requirements: The vast number of seeds makes exhaustive search impractical. In a paper i've found following approaches.Given the impracticality of brute-forcing a 64-bit seed, consider the following alternatives:
Conclusion
|
Beta Was this translation helpful? Give feedback.
-
I'm doing good thanks. Hope all went well at the hospital for you. :-) Going from a 32 bit seed to 64 bits makes all the difference. So if we had been using a 32 bit seed and using you calculation of 6x10⁶ seeds/second, it might take at most 11.9 seconds to find the first matching word. And as you mention above in your calculations, if using a 64 bit seed it could take 97,490 years to find that first matching word on a single core. Do we use 64 bit seeds on all our prngs? |
Beta Was this translation helpful? Give feedback.
-
I suggest we create a tools folder in the Github repo, for useful tools for nwipe and disk analysis. I am also willing to create such tools, just for curiosity. I've done some research, there is also a document about this exact case. |
Beta Was this translation helpful? Give feedback.
-
@PartialVolume Instead of brute-forcing something it uses probabilities and does statistical analysis. $ ./prng_analysis ../prng_benchmark/XORoshiro-256.bin ../sampes/
Reading PRNG sample files from directory: ../sampes/
Processing sample file: ../sampes/AES-256-CTR_OpenSSL.bin for PRNG: AES-256-CTR (OpenSSL)
Error: Cannot open file: ../sampes/AES-256-CTR_OpenSSL.bin
Warning: Skipping PRNG: AES-256-CTR (OpenSSL)
Processing sample file: ../sampes/ISAAC_rand.c_20010626.bin for PRNG: ISAAC (rand.c 20010626)
Error: Cannot open file: ../sampes/ISAAC_rand.c_20010626.bin
Warning: Skipping PRNG: ISAAC (rand.c 20010626)
Processing sample file: ../sampes/ISAAC-64_isaac64.c.bin for PRNG: ISAAC-64 (isaac64.c)
Error: Cannot open file: ../sampes/ISAAC-64_isaac64.c.bin
Warning: Skipping PRNG: ISAAC-64 (isaac64.c)
Processing sample file: ../sampes/Lagged_Fibonacci_Generator.bin for PRNG: Lagged Fibonacci Generator
Processing sample file: ../sampes/Mersenne_Twister_mt19937ar-cok.bin for PRNG: Mersenne Twister (mt19937ar-cok)
Error: Cannot open file: ../sampes/Mersenne_Twister_mt19937ar-cok.bin
Warning: Skipping PRNG: Mersenne Twister (mt19937ar-cok)
Processing sample file: ../sampes/XORoshiro-256.bin for PRNG: XORoshiro-256
Reading unknown data file: ../prng_benchmark/XORoshiro-256.bin
Comparing actual data to PRNG samples...
Distance to Lagged Fibonacci Generator: 0.249513
Distance to XORoshiro-256: 0
The actual data is most similar to: XORoshiro-256 |
Beta Was this translation helpful? Give feedback.
-
Interesting question PartialVolume. Taking it further... assume it was found that nwipe was used to wipe the disc with PRNG how would that benefit an adversary given the data was overwritten? The last research papers I read concluded there is no way to recover meaningful data if at all. |
Beta Was this translation helpful? Give feedback.
-
I doubt it would be of any benefit what so ever. With reference to my question about prng or encrypted data, it was whether it was feasible to add a verification for prng. Could nwipe determine a prng and it's seed so it could verify it after the fact, I e somebody leaves a disc laying about and your unsure whether it's been fully wiped. It's really just academic as I doubt it would get used much. The feature would have worked with a 32 seed but not with 64. However @Knogle 's method using probability would be fine for determining which prng it was but doesn't solve determining the original seed, due to the vast amount of computation required. It's not something that's worth spending any further time on in my opinion. I tend to wipe with a prng followed by a blanking pass, so for me it wouldn't have been much use. I shouldn't be spending any time on this anyway as I've got too many other jobs that need doing. 😁 |
Beta Was this translation helpful? Give feedback.
-
@Knogle
You know how we have two methods for verification that can be run on their own, e.g. ones and zeros.
Assuming a disc has been wiped with nwipe using one of its prngs, How hard do you think it would be to brute force that disc to determine which prng was used. Ie basically we are analysing the disc to determine whether it contains prng data from nwipe or something else such as encrypted data.
So in summary a verification method that could analyse the first block determine the seed by presumably checking upto 4 billion seeds and determine which prng was used ?
The code would need to be in C, no assembler or special processor specific instructions.
The code would start with a seed value of zero and run a given prng once to generate the first word, then compare with the first word from block 0 on the disc, if a match it runs the prng again and compares the second word in block 0 of the disc and so on.
Once it had determined the prng it could verify the whole disc having found the correct seed to start the process.
I'm not suggesting we add this as a feature, however if the code was fast enough to determine the prng and the seed it would certainly be a cool feature to have. Probably rarely used but interesting.
I guess the bottle neck is the speed of the prng to calculate a word.
Certainly, if it could determine the prng and seed in less than 30 minutes I would find that useful.
Maybe I'm over estimating the speed of the prng calculation but I would have thought the prng and seed could be found in a matter of minutes, but maybe the prng calculation is just not fast enough to make that a feasible proposition?
Beta Was this translation helpful? Give feedback.
All reactions