danger/u/
This thread is permanently archived
bruteforce plain /dev/urandom keyfile for LUKS

| Assuming I have an LUKS encrypted device, and there existed an unprotected plaintext keyfile generated with exactly these parameters:
>dd if=/dev/urandom bs=512 count=4
Do you thinkt it's possible to crack it?


| Are you asking whether you can guess a 2KB sequence of random bytes? I don't think that's going to happen.


| >>299761
actually, yes...


| >>299765
Alright. Let's assume those 2000 random bytes contain a combination of the ASCII characters 0-9 and a-z, so 36 characters in total. And now please correct me if I'm totally wrong on this, but wouldn't the chance of guessing such a sequence be 36 to the power of 2000? So (36^2000)


| isn't it ~ 2^16k possibilities?


| >>299770
Why ^16k ?


| >>299771
n-bit=2^n possibilities
1Byte=8bit
2Kbyte=2048byte=16384bit=2^16384 possibilities
Or am I wrong?
>>299769
I think /dev/urandom generates not just ASCII characters, but random bytes/bits
Maybe I'm wrong here too?


| >>299765
Thinking about the dimensions i get here, i think you may be right :(
let's hope that btrfs recover on my broken system partition works, to restore my keyfile XD
Else I'm about to loose 8TB of Media-Data which is on a LUKS encrypted device. No I unfortunatly have no backup of this keyfile (anymore) :(


| >>299792
Ok. for a 7-Byte keyfile it would take about 2 years with my hardware XD

I had a tiny hope someone heard about weakspots of urandom or luks i don't knew. I mean, there is this "pseudo-random" issue, which i never really understood...


| >>299788
I took the 36 char range to demonstrate that just that alone would be more than enough to be unguessable with a length of 2000 characters.


| >>299888
Yeah, well I'm not really used to this dimensions. It was beyond my imagination. Know I understand that it won't work. I just hoped that there is someone who knows some tricks that are also beyond my imagination.
Unfortunately the filesystem recovery did not work for the keyfile - It's lost. So is my over 12 years grown and well maintained collection of music, series and movies :-(
Now I have much free diskspace and am not prepared for the Apocalypse...


| >>299919
Why didn't you make any backups?


| >>299811
"Pseudo randomness" means that the random values are aquired by using a random number generator function and purely because it's a function, it implies that you can never achieve pure randomness and sooner or later the rng will generate a value in the same way it has generated it before. True randomness requers that the value must be evaluated "randomly"


| well let's see... n = 256 possible values for a byte, you have k = 512 * 4 = 2048 different values... n^k = 256^2048 ~= 1e4932. If you try bruteforcing it, and each attempt takes 1 second, 1e4932/(3600*24*365) ~= 3e4924 years is how long it'd take to try all of them I'm pretty sure.


| >>299937
I have backups, but guess what: They are encrypted too, with the same keyfile :P
I also have a copy of the keyfile stored on another Device, which unfortunately broke a few days ago ... It's a really unlucky coincidence. Maybe I have a chance to get access to its integrated storage somehow... Still better than waiting years for some operations...


| >>300004
well one guess per second is pretty pessimistic. On the other hand, even with 10^220 guesses per seconds I have to freeze myself to get a result^^


| >>299982
>it implies that you can never achieve pure randomness and sooner or later the rng will generate a value in the same way it has generated it before.
Which brings me to the question if this "sooner or later" is a different "sooner or later" from trying out all possibilities...
I always thought "pseudo-randomnes" means that you can exactly reproduce the generation of a ("pseudo-")random value if you know all parameters. Thats why I asked if there is a weakspot in urandom.


| Ok, I got access to an decrypted backup version with 2TB data which are also included in the still encrypted 8TB. Is there any chance to regenerate the other 6TB by pattern-matching action?


| >>300157
You could reproduce a pseudo random value by giving the function the same arguments, but I don't know of any weak points in urandom


| https://crypto.stackexchange.com/questions/11406/if-i-have-the-unencrypted-text-and-the-encrypted-text-can-i-calculate-the-key

>>301384
It probably means you can not recover your key.

Total number of posts: 20, last modified on: Mon Jan 1 00:00:00 1527727680

This thread is permanently archived