All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arno Wagner <arno@wagner.name>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] Basics
Date: Sun, 27 Sep 2015 16:08:14 +0200	[thread overview]
Message-ID: <20150927140814.GC13009@tansi.org> (raw)
In-Reply-To: <20150927110859.GA31821@manjaro.chello.hu>

On Sun, Sep 27, 2015 at 13:08:59 CEST, Mike Nagie wrote:
> Thank you for your answer!
> Let me summarize what I have learned so far.
> 
> The cipher key size doesn't impact on disk space. Maybe it might impact 
> on speed; aes-xts 256b was 141.5MiB/s while aes-xts 512b was 108.5MiB/s. 
> Twofish is a riddle why it's so fast.

It is also less secure because less studied than AES. It is still
a good cipher, as are all that made it into the AES content finals.
And that "less secure" will only be against the NSA and its ilk
that have the skill to break ciphers on their own.

On modern hardware, you will often have AES acceleration though
and then AES will be faster.

> I don't know how reliable this is, but
> dd bs=1M count=512 if=/dev/zero of=test conv=fdatasync gave me this 
> result:
> 536870912 bytes (537 MB) copied, 18.2785 s, 29.4 MB/s
> (Without fdatasync I got 572 MB/s, which obviously is not true)
> So according to the dd result, I could choose any cipher, even serpent 
> would not slow my system down.

Not a surprise. You do never get raw disk-speed when you have
a filesystem in there. 
 
> Since iteration time means millisecond here, it doesn't matter which 
> hash I choose.

Basically, yes.

> cryptsetup -h sha1   -i 1000 ... 
> cryptsetup -h sha512 -i 1000 ... 
> both should take 1 second, just sha1 has 644088 iterations per second 
> (on my computer) while sha512 only 321254.
> Isn't sha1 safer in this case? I thought the more iterations, the 
> better/safer.

It might be. It might also be because it is older and its implementation
will be better optimized. That is one reason to use the cryptsetup
defaults.

> I still don't understand if -i just the number of milliseconds, why does 
> it differ if I change the CPU. Isn't 1000 milliseconds, 1000 milliseconds 
> everywhere?

Yes, but the speed of the hash is different for a different CPU.

> Thank you for the hint about passwords/passphrases.
> Whether is 'cleft cam synod lacy yr wok' more secure than 'nXRUzbL6' (a 
> random 'pwgen' generated password)?

Also refer to FAQ Item 5.1. The first pasphrase will have something
like 13...29 bits of entropy, which is entirely breakable when
attacking crypto (it is not when attacking a log-in, as they 
allow far less trial-attacks per second). The second one has
abouy 48 bits of entropy and is much stronger. It is still a
bit on the weak side for encryption, even with LUKS.

> I thought I was going to use the same password as my login password, so 
> I wouldn't have to enter 2 passwords during every boot.

Do _not_ do that. Your login is a conceptually entirely different
protection with different characteristics. It can be much weaker
than a crypto passphrase, but it can also be attacked in entirely
different ways.

Regards,
Arno
 
-- 
Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: arno@wagner.name
GnuPG: ID: CB5D9718  FP: 12D6 C03B 1B30 33BB 13CF  B774 E35C 5FA1 CB5D 9718
----
A good decision is based on knowledge and not on numbers. -- Plato

If it's in the news, don't worry about it.  The very definition of 
"news" is "something that hardly ever happens." -- Bruce Schneier

  parent reply	other threads:[~2015-09-27 14:08 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-25 17:33 [dm-crypt] Basics Mike Nagie
2015-09-25 17:55 ` Mistave
2015-09-25 19:44 ` Michael Kjörling
2015-09-25 19:48   ` Michael Kjörling
2015-09-25 21:48   ` Mike Nagie
2015-09-25 22:24     ` Michael Kjörling
2015-09-25 23:03       ` Arno Wagner
2015-09-26  7:14       ` Mike Nagie
2015-09-26  7:32         ` Mistave
2015-09-26  8:27           ` Mike Nagie
2015-09-26 10:24             ` Mistave
2015-09-26 13:12         ` Robert Nichols
2015-09-26 15:38         ` Michael Kjörling
2015-09-27 11:08           ` Mike Nagie
2015-09-27 13:47             ` Michael Kjörling
2015-09-27 14:08             ` Arno Wagner [this message]
2015-09-27 14:15               ` Michael Kjörling
2015-09-27 14:34                 ` Arno Wagner
2015-09-27 16:12                 ` Mike Nagie
2015-09-27 16:51                   ` Michael Kjörling
2015-09-27 18:20                     ` Mike Nagie
2015-09-27 18:55                   ` Heinz Diehl
2015-09-27 18:57                     ` Heinz Diehl
2015-09-27 21:50                     ` Mike Nagie
2015-09-27 22:08                       ` Michael Kjörling
2015-09-28 20:11                       ` Heinz Diehl
2015-09-29 10:52                         ` Mike Nagie
2015-09-30 12:16                         ` Mike Nagie
2015-09-30 15:00                           ` Arno Wagner
2015-09-30 17:49                             ` Mike Nagie
2015-09-30 19:27                               ` Arno Wagner
2015-09-30 15:40                           ` Heinz Diehl
2015-09-25 20:12 ` Arno Wagner

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=20150927140814.GC13009@tansi.org \
    --to=arno@wagner.name \
    --cc=dm-crypt@saout.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.