I lost my OpenBSD full-disk encryption password
blog.filippo.io
blog.filippo.io
I later found a nice article documenting the entire system. It
also includes references to JohnTheRipper having a module for
this. Well, this was more fun.
--Wonder how many times are the same items posted: https://news.ycombinator.com/from?site=filippo.io
https://news.ycombinator.com/from?site=lcamtuf.blogspot.com
https://news.ycombinator.com/from?site=coredump.cx
The process seems quite random; sometimes, the same link is submitted four times and lingers at score 1, and then some random dude's fifth attempt goes to #1. May be an interesting thing to graph (and get a #1 story on HN out of =).
And early votes (like within the first hour) will more likely propel it to the first page.
I've had submissions several times now that had been totally ignored and dropped off /newest, only to see them on the front page hours later.
Certainly these are more interesting for me than news about whatever the big tech companies are doing right now.
Do you think I should post it again myself or try and find somebody else to?
When they post something, it's always interesting and very often innovating.
Feeling proud of myself, I scrolled farther down the page that described it only to read that most NICs will automatically do it for you and you don't need to make crossover cables any more. I'm still glad I took the time.
I wish I could tell you anything better than "in my defense, I seem to forget only one vital password per year..."
(But seriously, I never risked data: the WD didn't have FDE, it was just a matter of salvaging the hardware; the OpenBSD was still in the middle of a migration and I had the source still accessible, so it was a matter of saving time. And it's fun.)
I imagine the password was "too short".
PS - My POV is fully critical. Please, do not be personally offended. [emoticon smile]
Off-the shelf NAS' security is shit.
For me, it helps to enter the passwords from time to time. The easiest way to do this is to reboot.
If you have moral issues with rebooting a system where rebooting is not necessary, maybe run just the password checker, e.g. by unlocking a second volume that has the same password, or something.
> Turns out all the password fields except the login form have maxlength=16, so when resetting the password I pasted it from the password manager and it got cut without me knowing.
So it could have been another WTF on the NAS that was silently truncating his passwords.
...or he could have become a super-hacker because his memory for passwords is terrible. :P
Necessity is the mother of invention. :)
(The password trunction is quite a "WTF" though. Thanks for mentioning that.)
I tend to forget passphrases very soon after creating them, around the time I am memorizing or changing a new passphrase, or after a month or so of not using one (depending on how long I have used it for.) Other people may have other patterns.
I have a fair number of passphrases that cannot be reasonably stored in password managers. As we know, it's hard to memorize a lot of high-entropy strings. I suspect that memorizing new ones tends to push out old ones.
I don't see how taking the effort to write a more compelling story is 'disrespectful' to the reader.
This sort of lie doesn't hurt the reader; this isn't the news, and the writer hasn't distorted any of the technical facts.
/* Check that the key decrypted properly. */
sr_crypto_calculate_check_hmac_sha1(sd->mds.mdd_crypto.scr_maskkey,
Does this mean it's using Mac-Then-Encrypt? And if so, is it likely doomed [1]?[1] https://moxie.org/blog/the-cryptographic-doom-principle/
FDE doesn't have space for and can't afford (because of the random read patterns) authentication tags, so it uses modes like AES-XTS instead.
What that HMAC does is just confirming that the passphrase is the right one. Think of it as a checksum, not as authentication.
This explains better than I could the whole point of doing encryption in bcachefs:
https://bcache.evilpiepirate.org/Encryption/ https://news.ycombinator.com/item?id=12410798
The real problem is that FDE in the usual sense is (from the strict cryptological sense) very weak encryption, because it cannot afford to expand the encrypted data and has to allow random access (so no random IVs, no authentication tags...). It's relatively trivial to design FDE scheme that is fully secure, but it has 2x block io-op amplification for both read and write, which means unusable performance (certainly on rotating disks, probably even on SSD). Various wide-block encryption modes (AES-XTS etc.) attempt to mitigate attack vectors caused by this, but are secure only under certain FDE-specific attack models.
[Edit: formatting and last sentence]
Does anyone know if this is the default? If I'm understanding this correctly, it's around 10 ms of key derivation time; on FreeBSD we default to 2 s, which should make cracking disk encryption 200x more expensive.
How many times stronger would scrypt targeting 2s be compared to PBKDF2 targeting 2s? If using scrypt for many disks would it then be safe to target 10-100ms so as not to impact on reboot times?
1. The process has a single passphrase entered at startup.
2. This passphrase is then used to derive the master key encryption key for each disk using the disk's own parameters (KDF_SALT, KDF_ITERATIONS) which are generated and estimated when the disk is formatted and added to the array (disks may come and go).
3. The master key encryption key for each disk is then used to decrypt the AF-split master key for each disk, similar to LUKS.
For those reading along at home, what is being done here is a run-of-the-mill bruteforce, this article could be about any FDE implementation.
So now the real question .. what was the password? :-)
Recovery was a matter of finding the right metadata bit on the disk that tells softraid about the disk's status. That was the hardest part (and not that hard, but it certainly felt like reverse-engineering the system). I flipped a byte with dd and my brought the raid up again.
I've been known to do dumb things, and going down the rabbit hole of cryptocurrencies and how to securely use said currencies was one of them. These days I put everything of importance into Google drive, Dropbox, and/or git (not github...a privately hosted git that I access via ssh and runs on a VM on hardware I own in a data center I trust). If it is sensitive, it is encrypted with a passphrase I've been using for a couple decades, and so it unlikely to be forgotten. A high capability attacker could thwart my protections, I'm sure, but I don't have any reason to believe a high capability attacker has any interest in me.
And, I don't hold much cryptocurrency, and what I do hold is at Coinbase, just sitting there on the off chance Bitcoin really does take over the world and a small amount turns into a big value.
Note what George Smiley is known to reply: "There was every reason":
Peter Guillam: Well, at the time there was no reason to suppose the phone was tapped... George Smiley: There was every reason.
(from http://www.imdb.com/character/ch0030043/quotes as well as the book)
For example, if you choose your daughter's middle name your favorite animal, and the street you grew up on, then you have a small amount of entropy, and you'll be screwed in an offline attack scenario like this. The attacker can narrow it down to combinations of words and numbers related to you, and the brute force becomes feasible. If you use four randomly chosen words from a dictionary of 2000 words, then cracking it is roughly equivalent to cracking 13 random digits.
Side note: cycling through multiple random pass-phrases of this type until you find something memorable has difficult-to-analyze negative effects on the final entropy. Ideally, you should be using the first output it gives you.
None of this would have helped if he wasn't sure exactly which error he'd made with a password like %)]5ZJ'HDb]n.'Y&4P-dMZMvS
The complication is finding out the algorithm used and the parameters applied to the algorithm. Once figured out, he wrote the small program to brute force the small enumeration.
This is a very good illustration of the need for long and non-trivial password; otherwise, it can be easily guessed.
1) store passwords in the password manager, even the ones you think aren't important.
2) backup your data
Losing the password that unlocks full disk encryption (FDE) is like losing the password that unlocks your password manager. At some point you have to have something stored only in your mind.
Now sure you could have your FDE password stored in a password manager as well but that's probably not a good idea. Also, compared to just about everything else saved in a password manager, you'd have to manually type the FDE password at boot. You can't copy/paste it as if anything your password manager would be running on a different computer.
A sticky note at home is reasonably safe, unless you're legitimately worried that a dedicated person may target you specifically.
Not "nation state" secure, but I'm reasonable sure it's well beyond petty thief, curious cow-orker, 4chan/anonymous, or local LEO's capability to subvert.
"Not Passwords" :D
How the hell do you remember randomly generated gibberish of a length that would be cryptographically secure?
Multi-word passphrases work great for me for everything that has to be kept in my mind safe. If I had to remember things like "LOZOktjR33IxVbACQsgicUtDubOyz9o2" I'd definitely have to drink less.