Page 5 of 17 FirstFirst ... 3456715 ... LastLast
Results 41 to 50 of 169

Thread: Manual Full System Encryption has been updated and simplified

  1. #41
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    5,263
    Distro
    Ubuntu

    Re: Manual Full System Encryption has been updated and simplified

    Thanks, 3-david-o. That was useful information indeed.

    The default iteration time for cryptsetup is 2 seconds. On my machine, for SHA512, this works out at 0.9 to 1.5 million iterations (depending, I suppose, on what was happening on the machine at the time).

    If the decrypt time is, like yours, ten times slower, my decryption of roughly half a minute fits your observations.

    I could allow the iteration time to be specified as part of the encryption script, although I worry that doing so would reduce security if people chose (as you have) just ½ second or even less.
    Always make regular backups of your data (and test them).
    Visit Full Circle Magazine for beginners and seasoned Linux enthusiasts.

  2. #42
    Join Date
    Sep 2018
    Beans
    6

    Re: Manual Full System Encryption has been updated and simplified

    Quote Originally Posted by Paddy Landau View Post
    ... I could allow the iteration time to be specified as part of the encryption script, although I worry that doing so would reduce security if people chose (as you have) just ½ second or even less.
    There's certainly an impact on security, which is why I mentioned that, and linked to a more authoritative document on the matter. But reducing the iter-time by a (mere) factor of 10 can be more than compensated for by making the passphrase 1 character longer - and typing one more character is likely to be quicker than waiting 20 seconds for a million hashing iterations.

    According to the aforesaid document, if you have an iteration count of 100K (which is what I get on my machine with an iter-time of 100ms), and a 12-character passphrase composed of randomly-chosen letters, digits and punctuation, then a brute-force attacker would need to spend $20 TRILLION to find your passphrase. I think that's pretty secure.

    I think that the bigger problem with allowing the iter-time to be specified as part of the encryption script is that people wont know, in advance, what would be a suitable value to specify. It so much depends on their hardware. So, it isnt until you've completed the encrypted installation and rebooted that you'll find out how long you need to wait when you boot. And, if you discover it is unreasonably long, then it would be daft to go though the whole installation process all over again simply to revise the iter-time. A much simpler approach would be to provide a utility script that allows it to be adjusted, following the steps I mentioned before (and providing suitable warnings about security). Obviously the process could be improved by prompting for the passphrase just a couple of times to begin with, and then passing it in as an argument to the other commands as required.

  3. #43
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    5,263
    Distro
    Ubuntu

    Re: Manual Full System Encryption has been updated and simplified

    Quote Originally Posted by 3-david-o View Post
    There's certainly an impact on security…
    Thanks for the link to the article. It's already a bit outdated (such is the speed of technology change!), but a good article nonetheless.

    I understand what you say about the importance of the quality of the passphrase, and using SHA512 rather than the default SHA256, thereby allowing the iterations to be decreased. (The encryption script uses SHA512.)

    When I have time, which might not be for a long while, I'll look at adding iteration-time to the script.
    Always make regular backups of your data (and test them).
    Visit Full Circle Magazine for beginners and seasoned Linux enthusiasts.

  4. #44
    Join Date
    Sep 2018
    Beans
    8

    Re: Manual Full System Encryption has been updated and simplified

    Hello, looking at your scripts, it looks like you create an encryption keyfile (everything okay there) but copy it to initramfs later on.
    What will protect the keyfile once stored on initramfs? Did I miss an initramfs encryption part? If so, how do it gets decrypted?

  5. #45
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    5,263
    Distro
    Ubuntu

    Re: Manual Full System Encryption has been updated and simplified

    Quote Originally Posted by archphoenix View Post
    … it looks like you create an encryption keyfile (everything okay there) but copy it to initramfs later on.
    If I'm doing that, it's a big mistake! Can you point out where exactly this happens, please, because it certainly isn't intentional.

    EDIT: I presume you specifically mean that it's copied to the EFI partition, because everything else is encrypted.
    Last edited by Paddy Landau; October 9th, 2018 at 07:59 AM. Reason: Clarification
    Always make regular backups of your data (and test them).
    Visit Full Circle Magazine for beginners and seasoned Linux enthusiasts.

  6. #46
    Join Date
    Jun 2007
    Location
    Hikkaduwa, Sri Lanka
    Beans
    3,449
    Distro
    Ubuntu 22.04 Jammy Jellyfish

    Re: Manual Full System Encryption has been updated and simplified

    Does this mean that Full disk encryption is now working with Full installs to flash drive?
    That would sure be a boost for bootable pendrive security.

  7. #47
    Join Date
    Sep 2018
    Beans
    8

    Re: Manual Full System Encryption has been updated and simplified

    Quote Originally Posted by Paddy Landau View Post
    If I'm doing that, it's a big mistake! Can you point out where exactly this happens, please, because it certainly isn't intentional.

    EDIT: I presume you specifically mean that it's copied to the EFI partition, because everything else is encrypted.
    "cp /etc/crypt.system "${DESTDIR}"/etc/"
    line 1481
    Part of "/etc/initramfs-tools/hooks/loadinitramfskey.sh"

    If this is only copying to EFI partition, then EFI partition must be on removable media, but I don't see mentions of EFI in this part.

  8. #48
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    5,263
    Distro
    Ubuntu

    Re: Manual Full System Encryption has been updated and simplified

    Quote Originally Posted by C.S.Cameron View Post
    Does this mean that Full disk encryption is now working with Full installs to flash drive?
    That would sure be a boost for bootable pendrive security.
    It has worked in my test. However, because of varying hardware and lack of support from Canonical, I can't guarantee that it will work for you. I wish that I could guarantee it!
    Always make regular backups of your data (and test them).
    Visit Full Circle Magazine for beginners and seasoned Linux enthusiasts.

  9. #49
    Join Date
    May 2008
    Location
    United Kingdom
    Beans
    5,263
    Distro
    Ubuntu

    Re: Manual Full System Encryption has been updated and simplified

    Quote Originally Posted by archphoenix View Post
    "cp /etc/crypt.system "${DESTDIR}"/etc/"
    line 1481
    Part of "/etc/initramfs-tools/hooks/loadinitramfskey.sh"

    If this is only copying to EFI partition, then EFI partition must be on removable media, but I don't see mentions of EFI in this part.
    That's fine. The folder /etc is on the system partition, so to access crypt.system, you would have had to decrypt the system partition anyway. It's not on the EFI System Partition (ESP).
    Last edited by Paddy Landau; October 10th, 2018 at 12:12 PM. Reason: Clarification
    Always make regular backups of your data (and test them).
    Visit Full Circle Magazine for beginners and seasoned Linux enthusiasts.

  10. #50
    Join Date
    Sep 2018
    Beans
    8

    Re: Manual Full System Encryption has been updated and simplified

    Then i fail to understand why one would copy a file from etc to itself, as the source of the copy is already there.

Page 5 of 17 FirstFirst ... 3456715 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •