You are not logged in.

#1 2009-02-16 14:40:37

chrispoole
Member
Registered: 2008-12-30
Posts: 121

Good Random Password Generator? (CLI or GUI)

I've started storing my passwords in a plain text file, secured with GPG.

Does anyone know of a well-tested (i.e., produces good randomness and frequently used) password generator?

I don't care if it's CLI or GUI, but I would want it to be able to use symbols (if asked for), alphanumerics, variable length, etc.

Thanks.

Offline

#2 2009-02-16 14:53:05

buttons
Member
From: NJ, USA
Registered: 2007-08-04
Posts: 620

Re: Good Random Password Generator? (CLI or GUI)

cat /dev/urandom | guuencode -m "" | head -n 2 | tail -n 1

Cut to desired length.  I use this for all my passwords.


Cthulhu For President!

Offline

#3 2009-02-16 15:23:05

chrispoole
Member
Registered: 2008-12-30
Posts: 121

Re: Good Random Password Generator? (CLI or GUI)

You assume that /dev/urandom is more random than /dev/random?

I guess this is true if the entropy of /dev/random is overestimated, but I don't know how true this is in general (and I may be using this on a Mac OS X box as well as Linux).

Offline

#4 2009-02-16 15:23:53

whompus
Member
From: Durham. UK
Registered: 2005-08-09
Posts: 256

Re: Good Random Password Generator? (CLI or GUI)

pwgen is in the extra repository.

Offline

#5 2009-02-16 16:21:07

buttons
Member
From: NJ, USA
Registered: 2007-08-04
Posts: 620

Re: Good Random Password Generator? (CLI or GUI)

chrispoole wrote:

You assume that /dev/urandom is more random than /dev/random?

I guess this is true if the entropy of /dev/random is overestimated, but I don't know how true this is in general (and I may be using this on a Mac OS X box as well as Linux).

It's not, no.  But /dev/random works just as well.

When read, the /dev/random device will only return random bytes within the estimated number of bits of noise in the entropy pool. /dev/random should be suitable for uses that need very high quality randomness such as one-time pad or key generation. When the entropy pool is empty, reads from /dev/random will block until additional environmental noise is gathered. (Source: Linux Programmer's Manual, section 4)

The intent is to serve as a true random number generator, delivering real entropy for the most random data possible. This is suggested for use in generating cryptographic keys for high-value or long-term protection.

A counterpart to /dev/random is /dev/urandom ("unlocked" random source) which reuses the internal pool to produce more pseudo-random bits. This means that the call will not block, but the output may contain less entropy than the corresponding read from /dev/random.

From the wikipedia page.


Cthulhu For President!

Offline

#6 2009-02-16 18:33:53

initbox
Member
Registered: 2008-09-27
Posts: 172

Re: Good Random Password Generator? (CLI or GUI)

buttons wrote:

cat /dev/urandom | guuencode -m "" | head -n 2 | tail -n 1

Cut to desired length.  I use this for all my passwords.

< /dev/urandom tr -dc A-Za-z0-9_ | head -c8

replace -c8 with -c charactercount tongue

Offline

#7 2009-02-16 20:56:27

Berticus
Member
Registered: 2008-06-11
Posts: 731

Re: Good Random Password Generator? (CLI or GUI)

I wrote a C program... Very easy to write.

One thing I would like to throw out there is do people consider which hand is used to type the password? Because once the password generator spat out a password that required only my left hand. Thought that would make it too easy, so now the program provides a little more spread while keeping some clusters. Not sure if I still have it, wrote it 5 years ago.

Offline

#8 2009-02-16 21:48:13

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Good Random Password Generator? (CLI or GUI)

whompus wrote:

pwgen is in the extra repository.

i use pwgen multiple times a week. great program.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#9 2009-02-17 12:54:58

bluewind
Administrator
From: Austria
Registered: 2008-07-13
Posts: 172
Website

Re: Good Random Password Generator? (CLI or GUI)

apg is also nice.

Offline

#10 2009-02-17 13:43:05

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Good Random Password Generator? (CLI or GUI)

chrispoole wrote:

I've started storing my passwords in a plain text file, secured with GPG.

Does anyone know of a well-tested (i.e., produces good randomness and frequently used) password generator?

I don't care if it's CLI or GUI, but I would want it to be able to use symbols (if asked for), alphanumerics, variable length, etc.

Thanks.

One question - how do you store passwords to that file ?
That is, do you for any moment save it to disk in unencrypted form ?


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#11 2009-02-17 14:27:21

scj
Member
From: Sweden
Registered: 2007-09-23
Posts: 158

Re: Good Random Password Generator? (CLI or GUI)

I'm using keepassx, mostly because it has a windows version and it's sort of nice, except the linux version can't merge password databases.

Offline

#12 2009-02-17 14:32:13

dyscoria
Member
Registered: 2008-01-10
Posts: 1,007

Re: Good Random Password Generator? (CLI or GUI)

I feel the command line password manager pwsafe should get a mention, and it has it's own random password generator function.


flack 2.0.6: menu-driven BASH script to easily tag FLAC files (AUR)
knock-once 1.2: BASH script to easily create/send one-time sequences for knockd (forum/AUR)

Offline

#13 2009-02-17 15:20:05

chrispoole
Member
Registered: 2008-12-30
Posts: 121

Re: Good Random Password Generator? (CLI or GUI)

moljac024 wrote:
chrispoole wrote:

I've started storing my passwords in a plain text file, secured with GPG.

Does anyone know of a well-tested (i.e., produces good randomness and frequently used) password generator?

I don't care if it's CLI or GUI, but I would want it to be able to use symbols (if asked for), alphanumerics, variable length, etc.

Thanks.

One question - how do you store passwords to that file ?
That is, do you for any moment save it to disk in unencrypted form ?

Yes, I'm afraid so.

I realise this isn't exactly great security, but I do at least attempt to securely erase the plaintext file with srm.

I've just struggled to find a program that's free software, still under development, and used by trusted people so that I trust it not to have flaws in its implementation.

Offline

#14 2009-02-17 15:54:38

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: Good Random Password Generator? (CLI or GUI)

chrispoole wrote:

Yes, I'm afraid so.

I realise this isn't exactly great security, but I do at least attempt to securely erase the plaintext file with srm.

I've just struggled to find a program that's free software, still under development, and used by trusted people so that I trust it not to have flaws in its implementation.

You could decrypt it to a temporary location, make the changes, and then save the new encrypted file to the permament location. When editing my GPG'd passwords file I decrypt it to /tmp, which is tmpfs.

Offline

#15 2009-02-17 16:01:08

chrispoole
Member
Registered: 2008-12-30
Posts: 121

Re: Good Random Password Generator? (CLI or GUI)

Barrucadu wrote:

You could decrypt it to a temporary location, make the changes, and then save the new encrypted file to the permament location. When editing my GPG'd passwords file I decrypt it to /tmp, which is tmpfs.

Is this for the standard Arch kernel build? (Or indeed, the standard Linux setting?)

I understand it's stored in RAM. While I do use a laptop (so restart far more frequently than any server), I should still use srm to securely erase the file after I've finished using it?

Offline

#16 2009-02-17 16:12:15

Barrucadu
Member
From: York, England
Registered: 2008-03-30
Posts: 1,158
Website

Re: Good Random Password Generator? (CLI or GUI)

tmpfs is in the Arch kernel, you just have to mount /tmp as tmpfs in /etc/fstab to use it. I wouldn't think srm is necessary, as RAM is lost on power off anyway, and other things will be written over it.

Offline

#17 2009-02-17 16:17:25

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Good Random Password Generator? (CLI or GUI)

How does srm compare to shred ?
In what other way could GPG be safely used in this manner for us that don't have a tmpfs ?


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#18 2009-02-17 16:55:28

chrispoole
Member
Registered: 2008-12-30
Posts: 121

Re: Good Random Password Generator? (CLI or GUI)

moljac024 wrote:

How does srm compare to shred ?

Last time I checked (few months ago), shred and srm were very similar in functionality and operation.

I believe they both implement the Guttman method for secure erasure on magnetic media.

I chose srm because it comes as standard on Mac OS X too, which I also use.

Offline

#19 2009-02-17 20:29:59

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

Re: Good Random Password Generator? (CLI or GUI)

/dev/shm is by default a tmpfs, you could use that.

Last edited by Ranguvar (2009-02-17 20:30:09)

Offline

#20 2009-02-17 20:45:17

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Good Random Password Generator? (CLI or GUI)

How does "wipe" compare to srm and shred?

*after reading the project web site*

Wipe specifically mentions PGP:

http://wipe.sourceforge.net/ wrote:

Utilities such as PGP and the GNU Privacy Guard provide strong encryption, but encryption is useless if the original plaintext can be recovered. When using PGP and GPG, temporary files that are disk-backed should be stored on an encrypted file system. That way, the plaintext never hits the platters. Wipe is designed for situations where an encrypted file system isn't practical.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#21 2009-02-18 03:30:11

fumbles
Member
Registered: 2006-12-22
Posts: 246

Re: Good Random Password Generator? (CLI or GUI)

You could always use fist, fist is the best for of randomness.

First grab fist
Then move downward towards the keyboard

You password is then generated.

An example:

u8fvt674rxd

Offline

#22 2009-02-18 12:21:26

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Good Random Password Generator? (CLI or GUI)

My fist just generated this:

DKLsgsdyw4UI#tyV:vucxgyp4etP(F&SD&)Ve6rwaydchSEGGUE$QO;"x"ysa*r#< l:""CR)*C"EA"$ GPC>Sa

Doesn't look so bad...


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#23 2009-06-02 08:40:02

von_Wanderlust
Member
Registered: 2008-11-03
Posts: 67

Re: Good Random Password Generator? (CLI or GUI)

Berticus wrote:

I wrote a C program... Very easy to write.

One thing I would like to throw out there is do people consider which hand is used to type the password? Because once the password generator spat out a password that required only my left hand. Thought that would make it too easy, so now the program provides a little more spread while keeping some clusters. Not sure if I still have it, wrote it 5 years ago.

If you are interested in this type of stuff... I read that this thinking helped Bletchley Park crack the German's Enigma encrypts during WWII. The Nazi code guys believed that to have two of the same letters next to each other within the 3 character combination meant that their code wasn't random enough and would change/redo the random code for that day. Once the British heard of this through their intelligence channels, they knew that they could rule out the first ring's letter from the 2nd ring, and the 2nd ring's letter from the last ring (there being 3 rings each based on the alphabet). I guess it reduced it from 17576 (26^3) to 16250 (26*25*25) possible combinations. (I hope I got that right.)

Anyway, from a practical point of view, I don't think it'll matter that much. I believe that certain big brothers have computing power that can outdo us anyday, no matter how many hands you have.

Offline

#24 2009-06-02 09:25:43

Aprz
Member
From: Newark
Registered: 2008-05-28
Posts: 277

Re: Good Random Password Generator? (CLI or GUI)

moljac024 wrote:

My fist just generated this:

DKLsgsdyw4UI#tyV:vucxgyp4etP(F&SD&)Ve6rwaydchSEGGUE$QO;"x"ysa*r#< l:""CR)*C"EA"$ GPC>Sa

Doesn't look so bad...

Haha! I like that. wink

I use (this similar to what some folks have posted up here already):

cat /dev/urandom | tr -cd [:graph:] | fold -w $LENGTH | head -n 1

Where $LENGTH is the length you want your password to be.

Initbox, I recommend using [:alnum:] instead of a-zA-Z0-9 or better is [:graph:], which include symbols. The password to even log into my non-root account is #`o'Hyd3Ob5t. big_smile Oh no! Somebody might hack me now! :[

Offline

#25 2009-06-02 15:18:28

rine
Member
From: Germany
Registered: 2008-03-04
Posts: 217

Re: Good Random Password Generator? (CLI or GUI)

Barrucadu wrote:
chrispoole wrote:

Yes, I'm afraid so.

I realise this isn't exactly great security, but I do at least attempt to securely erase the plaintext file with srm.

I've just struggled to find a program that's free software, still under development, and used by trusted people so that I trust it not to have flaws in its implementation.

You could decrypt it to a temporary location, make the changes, and then save the new encrypted file to the permament location. When editing my GPG'd passwords file I decrypt it to /tmp, which is tmpfs.

You can also use this (if you use vim that is): http://www.vim.org/scripts/script.php?script_id=661
It's really convenient. When you open a file ending in .gpg, vim asks for the password.

Offline

Board footer

Powered by FluxBB