public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Rich Freeman <rich0@gentoo.org>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Password questions, looking for opinions. cryptsetup question too.
Date: Tue, 19 Sep 2023 06:00:58 -0400	[thread overview]
Message-ID: <CAGfcS_kV0GmqH3-vxpLOVM+kbNR5kocUqKp0tGhJPeFm3p8eOQ@mail.gmail.com> (raw)
In-Reply-To: <3185768.5fSG56mABF@rogueboard>

On Tue, Sep 19, 2023 at 4:26 AM Michael <confabulate@kintzios.com> wrote:
>
> On Tuesday, 19 September 2023 06:36:13 BST Dale wrote:
> > Howdy,
> >
> A strong
> password, like a strong door lock, buys you time.  Hence the general
> recommendation to change your passwords frequently.

While that can help on websites, it is of no use for full disk
encryption passwords - at least not without jumping through some big
hoops.

In order to crack your LUKS password somebody obviously needs to be
able to read the encrypted contents of your disk.  They cannot begin
cracking it until they have a copy of the LUKS headers.  However, once
they do have it, they can make a copy and crack it at their leisure.
If they manage to crack it, then it will give them the volume key.  At
that point if they were able to make a full copy of your disk they can
read whatever was on it at the time.  If they can make a fresh copy of
your disk then changing the passphrase will not change the volume key,
and so they'll be able to read what is currently on your disk.

Changing the volume key would defeat this, but requires running
cryptsetup-reencrypt which will take considerable time/CPU, though it
sounds like it can be done online.

> > In the real world tho, how do people reading this make passwords that no
> > one could ever guess?

You didn't ask this question, but I'll just note that most
organizations don't use human-readable passwords to implement full
disk encryption. The most commonly used solution is to use a TPM to
measure the boot process and secure the disk encryption keys.  If the
system is booted normally, the bootloader can read the encryption keys
from the TPM and can decrypt the disk without any user interaction (or
even awareness it is happening).  If the system is booted from
alternative media, or the on-disk bootloader is tampered with, or even
if the firmware is tampered with, then the TPM measurements will not
agree with those used to store the key, and the TPM will not allow the
keys to be read.

This is how solutions like Bitlocker work.

The components for this exist in the Linux world, but I'm not aware of
any distro/etc actually implementing this with a pretty front-end, and
there are obviously details that need to be carefully handled so that
a bootloader or firmware update doesn't render your disk unreadable.
Typically software implementations have ways to store "recovery keys"
for these situations (just another copy of the disk key stored outside
the TPM).

> You can use gpg, or openssl, or app-admin/apg, or app-admin/pwgen, to generate
> random enough strings to use as passwords.

You might want to also consider app-admin/xkcdpass

> > Also, I use  cryptsetup luksFormat -s 512 ... to encrypt things.  Is
> > that 512 a good number?  Can it be something different?  I'd think since
> > it is needed as a option, it can have different values and encrypt
> > stronger or weaker.  Is that the case?  I've tried to find out but it
> > seems everyone uses 512.  If that is the only value, why make it a
> > option?  I figure it can have other values but how does that work?

You can use a different size, but 512b is the recommended value for
the default cipher.  It is also the default I believe, so there isn't
much point in passing it.  Actually, I'd consider passing that
parameter harmful unless you also specify the cipher.  If in the
future the default changes to some other cipher, perhaps 512b will no
longer be appropriate, and you'll weaken it by specifying one and not
the other.

If you just want to trust the defaults, then trust the defaults.

As to why 512b is the recommendation, that seems like it would require
a LOT more reading.  Apparently it is in an IEEE standard and I'd need
to grok a lot more crypto to appreciate it.

-- 
Rich


  parent reply	other threads:[~2023-09-19 10:01 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-19  5:36 [gentoo-user] Password questions, looking for opinions. cryptsetup question too Dale
2023-09-19  8:26 ` Michael
2023-09-19  9:10   ` Jude DaShiell
2023-09-20  2:41     ` Dale
2023-09-20  2:59       ` [gentoo-user] " Grant Edwards
2023-09-20  4:49         ` Dale
2023-09-20 20:22           ` Frank Steinmetzger
2023-09-20 20:51             ` Rich Freeman
2023-09-20 21:56               ` Frank Steinmetzger
2023-09-20  6:47       ` [gentoo-user] " hitachi303
2023-09-23 10:57     ` Wols Lists
2023-09-19 10:00   ` Rich Freeman [this message]
2023-09-19 11:13     ` Dale
2023-09-19 11:47       ` Michael
2023-09-19 13:30         ` hitachi303
2023-09-20  2:52         ` Dale
2023-09-20  4:19   ` Dale
2023-09-20 12:28     ` Michael
2023-09-20 18:05       ` Frank Steinmetzger
2023-09-23 12:39         ` Wols Lists
2023-09-23 13:35           ` Dale
2023-09-23 14:00             ` Wol
2023-09-23 15:05               ` Dale
2023-09-23 16:08                 ` Rich Freeman
2023-09-19  9:03 ` hitachi303
2023-09-19  9:13   ` Dale
2023-09-23 12:47     ` Wols Lists
2023-09-23 13:42       ` Dale
2023-09-23 15:44         ` Håkon Alstadheim
2023-09-19  9:16   ` Jude DaShiell
2023-09-19 11:22     ` Dale
2023-09-20 16:18 ` Hoël Bézier
2023-09-20 16:39   ` Jack
2023-09-20 17:54   ` Jude DaShiell
2023-09-27  9:43 ` [gentoo-user] " Nikos Chantziaras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGfcS_kV0GmqH3-vxpLOVM+kbNR5kocUqKp0tGhJPeFm3p8eOQ@mail.gmail.com \
    --to=rich0@gentoo.org \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox