The Naked Scientists
  • Login
  • Register
  • Podcasts
      • The Naked Scientists
      • eLife
      • Naked Genetics
      • Naked Astronomy
      • In short
      • Naked Neuroscience
      • Ask! The Naked Scientists
      • Question of the Week
      • Archive
      • Video
      • SUBSCRIBE to our Podcasts
  • Articles
      • Science News
      • Features
      • Interviews
      • Answers to Science Questions
  • Get Naked
      • Donate
      • Do an Experiment
      • Science Forum
      • Ask a Question
  • About
      • Meet the team
      • Our Sponsors
      • Site Map
      • Contact us

User menu

  • Login
  • Register
  • Home
  • Help
  • Search
  • Tags
  • Recent Topics
  • Login
  • Register
  1. Naked Science Forum
  2. Non Life Sciences
  3. Geek Speak
  4. What's the best way to generate a truly random password?
« previous next »
  • Print
Pages: [1]   Go Down

What's the best way to generate a truly random password?

  • 15 Replies
  • 10556 Views
  • 0 Tags

0 Members and 1 Guest are viewing this topic.

Offline syhprum (OP)

  • Naked Science Forum King!
  • ******
  • 5198
  • Activity:
    0%
  • Thanked: 74 times
What's the best way to generate a truly random password?
« on: 11/10/2013 20:22:53 »
I understand that to be safe from the really sophisticated code crackers one needs to generate a truly random password of say 20 alphanumeric characters.
could this be produced by shaking 17 dice 20 times and deducting 17 each time from the spot count.
would this be overkill or defenceless against thousands of GPU's

I calculate this would give 3.876*10^38 combinations but how truly random would it be ?
« Last Edit: 13/10/2013 11:17:48 by chris »
Logged
 



Offline RD

  • Naked Science Forum GOD!
  • *******
  • 9094
  • Activity:
    0%
  • Thanked: 163 times
Re: Gererating a truly random password
« Reply #1 on: 11/10/2013 21:07:12 »
Dice can be used as a truly random number generator ... http://en.wikipedia.org/wiki/Diceware

10 truly random characters* are sufficient for an on-line password , as cracking it by brute-force would take about ten million years with the speed of current technology ... 
 [ Invalid Attachment ]  
https://www.grc.com/haystack.htm

[ * upper case , lower case and numbers , definitely not containing a word in any dictionary ]

Trying to remember a truly random sequence is easier said than done.

* 10 really random characters is safe enough for an on-line log-in.png (21.74 kB, 891x666 - viewed 2137 times.)
« Last Edit: 11/10/2013 21:31:57 by RD »
Logged
 

Offline RD

  • Naked Science Forum GOD!
  • *******
  • 9094
  • Activity:
    0%
  • Thanked: 163 times
Re: Generating a truly random password
« Reply #2 on: 11/10/2013 21:56:24 »
Quote from: syhprum on 11/10/2013 20:22:53
I understand that to be safe from the really sophisticated code crackers one needs to generate a truly random password of say 20 alphanumeric characters.
could this be produced by shaking 17 dice 20 times and deducting 17 each time from the spot count.
would this be overkill or defenceless against thousands of GPU's

I calculate this would give 3.876*10^38 combinations but how truly random would it be ?

Anything generated by fair dice will be truly random , (even if it were just one digit).

The search space for 20 alphanumeric characters (using upper and lower case) is 7.16 x 1035
which would take trillions of years to crack offline via brute-force.

« Last Edit: 11/10/2013 22:05:07 by RD »
Logged
 

Offline CliffordK

  • Naked Science Forum King!
  • ******
  • 6596
  • Activity:
    0%
  • Thanked: 61 times
  • Site Moderator
Re: Generating a truly random password
« Reply #3 on: 12/10/2013 00:07:02 »
A few problems with passwords occur.

If you use the same password on all websites, then if one is cracked, then they are all cracked.  Always keep your core financial passwords different from something like a social media password.

However, if you have a dozen super-secure 20+ random character passwords, can you remember them all, or do they have to be written down?  How secure is your password tracking system?

What about password recovery systems?  Say you crack an e-mail system, then you send "recovery passwords" to that e-mail system.
Logged
 

Offline RD

  • Naked Science Forum GOD!
  • *******
  • 9094
  • Activity:
    0%
  • Thanked: 163 times
Re: Generating a truly random password
« Reply #4 on: 12/10/2013 02:35:07 »
Quote from: CliffordK on 12/10/2013 00:07:02
However, if you have a dozen super-secure 20+ random character passwords,
 can you remember them all, or do they have to be written down?

A possible solution ... use md5(password+salt)

so you can write down a password, say "thenakedscientists" and commit the salt* to memory, say BI4IS926SB

so although you've written the password down as "thenakedscientists" the real password is ...
   md5(password+salt)
= md5(thenakedscientistsBI4IS926SB)
= cf151b0faa504e1af002c609e4f18802

If you're fussy convert the md5 result [which is hexadecimal] to base 64 ...

 cf151b0faa504e1af002c609e4f18802 [hexadecimal] =  zxUbD6pQThrwAsYJ5PGIAg==  [base 64]

Base64 can include upper and lower case letters, numbers and [a few] special characters,
 and will be 24 characters long if the input is a 32 character hexadecimal number, (md5 result always is). 

[ * you should make the salt a long as possible , preferably 14+ random characters ]


If you're wearing a tin-foil hat, iterate the above process ...

Quote from: wikipedia.org/Key_stretching
key = ""
for 1 to 65536 do
  key = hash(key + password + salt)
http://en.wikipedia.org/wiki/Key_stretching
« Last Edit: 12/10/2013 03:26:10 by RD »
Logged
 



Offline CliffordK

  • Naked Science Forum King!
  • ******
  • 6596
  • Activity:
    0%
  • Thanked: 61 times
  • Site Moderator
Re: Generating a truly random password
« Reply #5 on: 12/10/2013 04:37:02 »
If you know the encoding system, then your two-level encryption is no benefit.

So, for example, some wireless routers had a "pass phrase" that one could use to generate a WEP key.  But, then, knowing the primary encoding of the WEP key, then one would only need to search for the pass phrase.

Hex, of course, looks cryptic, but of course only uses 16 distinct characters, numbers from 0 to 9, and letters a to f.
-
Logged
 

Offline RD

  • Naked Science Forum GOD!
  • *******
  • 9094
  • Activity:
    0%
  • Thanked: 163 times
Re: Generating a truly random password
« Reply #6 on: 12/10/2013 05:25:03 »
Quote from: CliffordK on 12/10/2013 04:37:02
If you know the encoding system, then your two-level encryption is no benefit.

Some passwords systems only allow 20 character passwords, (or less) ,
 in which case converting from hex to base64 would produce a more secure password.
 Truncating both to the first 20 characters ...
 cf151b0faa504e1af002     zxUbD6pQThrwAsYJ5PGI ,
the 20 character hexadecimal version has a much smaller search space ,
( Using the off-line "massive Cracking Array Scenario" : 20 character hex =>1 year , 20 character base64 => trillion centuries )
« Last Edit: 12/10/2013 05:29:51 by RD »
Logged
 

Offline evan_au

  • Global Moderator
  • Naked Science Forum GOD!
  • ********
  • 11033
  • Activity:
    8%
  • Thanked: 1486 times
Re: What's the best way to generate a truly random password?
« Reply #7 on: 13/10/2013 20:44:49 »
Cracking a password with 20 alphanumeric characters is tough.
It is likely that an intruder would attack a more vulnerable part of the system, such as placing a keystroke recorder on your computer so it can forward the password to those wishing to monitor the communications.
Logged
 

Offline RD

  • Naked Science Forum GOD!
  • *******
  • 9094
  • Activity:
    0%
  • Thanked: 163 times
Re: What's the best way to generate a truly random password?
« Reply #8 on: 14/10/2013 01:36:23 »
Quote from: evan_au on 13/10/2013 20:44:49
... an intruder would attack a more vulnerable part of the system ...

e.g. http://en.wikipedia.org/wiki/Rubber-hose_cryptanalysis
Logged
 



Offline SimpleEngineer

  • Sr. Member
  • ****
  • 117
  • Activity:
    0%
Re: What's the best way to generate a truly random password?
« Reply #9 on: 21/10/2013 14:41:15 »
I would pay good money (well money anyway) for a USB that I carried around with me that..

a) created unique passwords for me
b) Remembered all passwords for all sites
c) changed that password each time i logged in
d) went on my key ring

Make this and you will make a fortune..

(A bit like the chip and pin machines you get from banks nowadays for internet banking)
 
Logged
 

Offline RD

  • Naked Science Forum GOD!
  • *******
  • 9094
  • Activity:
    0%
  • Thanked: 163 times
Re: What's the best way to generate a truly random password?
« Reply #10 on: 21/10/2013 17:17:18 »
Quote from: SimpleEngineer on 21/10/2013 14:41:15
I would pay good money (well money anyway) for a USB that I carried around with me that..

a) created unique passwords for me
b) Remembered all passwords for all sites
c) changed that password each time i logged in
d) went on my key ring


a)  Keepass ,random.org , DuckDuckGo
b) Firefox sync (which is free), but personally I don't use it : I'd prefer to store and encrypt my passwords myself.   
c) N/A
d)


http://www.amazon.co.uk/gp/customer-media/product-gallery/B005SP91UW/ref=cm_ciu_pdp_images_2/276-8359459-9890748?ie=UTF8&index=2
« Last Edit: 21/10/2013 17:25:05 by RD »
Logged
 

Offline Pmb

  • Naked Science Forum King!
  • ******
  • 1838
  • Activity:
    0%
  • Thanked: 1 times
  • Physicist
    • New England Science Constortium
Re: What's the best way to generate a truly random password?
« Reply #11 on: 22/10/2013 01:43:44 »
Quote from: syhprum on 11/10/2013 20:22:53
I understand that to be safe from the really sophisticated code crackers one needs to generate a truly random password of say 20 alphanumeric characters.
could this be produced by shaking 17 dice 20 times and deducting 17 each time from the spot count.
would this be overkill or defenceless against thousands of GPU's

I calculate this would give 3.876*10^38 combinations but how truly random would it be ?
If I were to take you litterally then I'd say the best way is to use a sample of radioactive material and set up around it a set of particle detectors, each of which stands for an alpha numeric character. Adjust the dosage so that the dectors will detect a particle every second or so. Since this is truly random the password generated by a sequence of such detections will be perfectly random.
Logged
 

Offline RD

  • Naked Science Forum GOD!
  • *******
  • 9094
  • Activity:
    0%
  • Thanked: 163 times
Re: What's the best way to generate a truly random password?
« Reply #12 on: 22/10/2013 02:38:36 »
Quote from: Pete on 22/10/2013 01:43:44
If I were to take you litterally then I'd say the best way is to use a sample of radioactive material and set up around it a set of particle detectors, each of which stands for an alpha numeric character. Adjust the dosage so that the dectors will detect a particle every second or so. Since this is truly random the password generated by a sequence of such detections will be perfectly random.

Someone has beaten you to it ... http://www.fourmilab.ch/hotbits/
Logged
 



Offline Pmb

  • Naked Science Forum King!
  • ******
  • 1838
  • Activity:
    0%
  • Thanked: 1 times
  • Physicist
    • New England Science Constortium
Re: What's the best way to generate a truly random password?
« Reply #13 on: 22/10/2013 02:48:55 »
Quote from: RD on 22/10/2013 02:38:36
Quote from: Pete on 22/10/2013 01:43:44
If I were to take you litterally then I'd say the best way is to use a sample of radioactive material and set up around it a set of particle detectors, each of which stands for an alpha numeric character. Adjust the dosage so that the dectors will detect a particle every second or so. Since this is truly random the password generated by a sequence of such detections will be perfectly random.

Someone has beaten you to it ... http://www.fourmilab.ch/hotbits/

They've hardly beaten me since I never expected anybody to think I originated the idea. I heard of this being done decades ago. My only goal here was to merely say what the best way to do it was.
Logged
 

Offline SimpleEngineer

  • Sr. Member
  • ****
  • 117
  • Activity:
    0%
Re: What's the best way to generate a truly random password?
« Reply #14 on: 22/10/2013 14:59:13 »
Quote from: RD on 21/10/2013 17:17:18
Quote from: SimpleEngineer on 21/10/2013 14:41:15
I would pay good money (well money anyway) for a USB that I carried around with me that..

a) created unique passwords for me
b) Remembered all passwords for all sites
c) changed that password each time i logged in
d) went on my key ring


a)  Keepass ,random.org , DuckDuckGo
b) Firefox sync (which is free), but personally I don't use it : I'd prefer to store and encrypt my passwords myself.   
c) N/A
d)


http://www.amazon.co.uk/gp/customer-media/product-gallery/B005SP91UW/ref=cm_ciu_pdp_images_2/276-8359459-9890748?ie=UTF8&index=2

LOL.. I did mean that it did it all with no input or interaction with myself other than putting in the slot (although for added layer of security a fingerprint scanner would be nice)
Logged
 

Offline RD

  • Naked Science Forum GOD!
  • *******
  • 9094
  • Activity:
    0%
  • Thanked: 163 times
Re: What's the best way to generate a truly random password?
« Reply #15 on: 22/10/2013 16:29:13 »
Quote from: SimpleEngineer on 22/10/2013 14:59:13
LOL.. I did mean that it did it all with no input or interaction with myself other than putting in the slot ...

Having an entire Operating System on a USB stick would be close.
I have Puppy Linux OS on a USB stick which uses "heavy" encryption.
[ don't bother with "light" encryption on Puppy Linux ]

Quote from: SimpleEngineer on 22/10/2013 14:59:13
... a fingerprint scanner would be nice ...

I did see a USB memory stick with an inbuilt fingerprint scanner.
However if the the window on the fingerprint-scanner got sufficiently scratched it wouldn't be able to recognise your fingerprint and you'd be locked out.
« Last Edit: 22/10/2013 17:27:20 by RD »
Logged
 



  • Print
Pages: [1]   Go Up
« previous next »
Tags:
 
There was an error while thanking
Thanking...
  • SMF 2.0.15 | SMF © 2017, Simple Machines
    Privacy Policy
    SMFAds for Free Forums
  • Naked Science Forum ©

Page created in 1.619 seconds with 62 queries.

  • Podcasts
  • Articles
  • Get Naked
  • About
  • Contact us
  • Advertise
  • Privacy Policy
  • Subscribe to newsletter
  • We love feedback

Follow us

cambridge_logo_footer.png

©The Naked Scientists® 2000–2017 | The Naked Scientists® and Naked Science® are registered trademarks created by Dr Chris Smith. Information presented on this website is the opinion of the individual contributors and does not reflect the general views of the administrators, editors, moderators, sponsors, Cambridge University or the public at large.