LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-17-2015, 07:14 AM   #1
jr_bob_dobbs
Member
 
Registered: Mar 2009
Distribution: Slackware,Linux From Scratch
Posts: 556
Blog Entries: 97

Rep: Reputation: 156Reputation: 156
oddness while entering luks password


I've been away from Slackware for many years and have recently been tryingit again in an emulator (virtualbox). I installed it succesfully with everything but /boot in an LVM inside a LUKS-incrypted partition, using default cypher and hash. That worked well.

I deleted that machine and did a new install, this time using twofish as the cypher and ripemd160 as the hash. As before, this was succesful. One thing is different: when entering the password to unlock the encrypted partition, some text is printed while I am still entering the password. Boot continues as normal, however.

Repeated rebooting reveals some strange facts. One: the text is displayed as I enter the sixth character of the password. Always the sixth. Two: if I type very slowly, just waiting, the text still does not appear until the sixth character. Three: the text is always, "[ 37.551298] random: nonblocking pool is initialized"

Actually, that number probably varies. I only screencapped the message once.

Apparently it is not an error but it is disconcerting to have text start streaming when oe is entering a password.

I am wondering why the text appears in this second install of Slackware but not the first? is it because of the different cypher & hash?

I am also wondering how to make it stop.

Thank you in advance.
 
Old 04-17-2015, 07:54 AM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
The message is generated by kernel. You can ignore it. Or use 'dmesg' command to set kernel message level.
 
Old 04-17-2015, 08:45 AM   #3
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,307
Blog Entries: 4

Rep: Reputation: Disabled
Quote:
Originally Posted by jr_bob_dobbs View Post
I am wondering why the text appears in this second install of Slackware but not the first? is it because of the different cypher & hash?
Yes, indirectly.

Linux provides two sources for (pseudo)random numbers.

One of them is /dev/random. This provides high-quality random numbers, but to produce them needs a certain amount of "entropy" (external events with a high degree of unpredictability, like the timing of your keypresses). /dev/random can actually run out of entropy, and when it does, it needs to wait for enough external activity before it can produce any more random numbers.

And there's your explanation: the different cypher and hash will demand more random numbers from /dev/random, at a time when the supply of entropy is very low (because the system hasn't been up long, it has experienced very few external events). So that is why /dev/random wants your keypresses, and becomes happy when it receives enough of them.

Now that you hopefully understand what's going on, maybe you don't want the message to go away.

By the way, the other source of random numbers is /dev/urandom. This is a more conventional (relatively lower quality) seed-based RNG that doesn't suffer from entropy starvation.
 
3 members found this post helpful.
Old 04-17-2015, 09:23 AM   #4
jr_bob_dobbs
Member
 
Registered: Mar 2009
Distribution: Slackware,Linux From Scratch
Posts: 556

Original Poster
Blog Entries: 97

Rep: Reputation: 156Reputation: 156
That might explain the --use-random and --use-urandom options in the man page for cryptsetup. Thank you.

Odd, though, as I thought randomness was only needed when generating the key when first initializing the partition.
 
Old 04-17-2015, 04:30 PM   #5
mlslk31
Member
 
Registered: Mar 2013
Location: Florida, USA
Distribution: Slackware, FreeBSD
Posts: 210

Rep: Reputation: 76
I noticed the message after the kernel was modified to wait for more entropy in /dev/random for boot-time situations.

Does it work OK outside an emulator? I'm sure that cryptsetup uses a random generator somewhere. I've stayed away from /dev/random with cryptsetup after my old Intel hardware RNG didn't generate enough entropy for real FIPS-style crypto. ("Open, you crypt! [Waves mouse around until crypt opens.] Open, you next crypt! [Waves mouse around some more.]...")
 
Old 04-17-2015, 08:12 PM   #6
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,559

Rep: Reputation: 2091Reputation: 2091Reputation: 2091Reputation: 2091Reputation: 2091Reputation: 2091Reputation: 2091Reputation: 2091Reputation: 2091Reputation: 2091Reputation: 2091
Quote:
Originally Posted by jr_bob_dobbs View Post
Odd, though, as I thought randomness was only needed when generating the key when first initializing the partition.
That is true, but the message is not necessarily related to any current request for output from /dev/random. It's just an informational message about the status of the entropy pool.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
entering without root password shanecaldeiro Linux - Newbie 8 05-29-2009 09:52 AM
[SOLVED] Entering passphrase on LUKS partition with USB brooky9999 Slackware 7 04-09-2009 04:22 AM
Tntrepid does not allow entering any password jdtiede Ubuntu 1 01-18-2009 10:18 PM
Entering Password with a Space via CLI username132 Linux - Software 2 04-01-2006 09:57 PM
Bash scripting: entering a password sibtay Programming 1 12-27-2005 11:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration