Coder Social home page Coder Social logo

altpass's Introduction

AltPass

Generate a password:

$ python altpass.py
FhvWu+zT[+2!-:

The principle here is that the passphrase can be typed on a QWERTY keyboard alternating hands each stroke, which is a nice memory trick, and fun to do.

Entropy Benchmarks

The passphrases generated have log2(1092/47)~4.5 bits of entropy per character.

A completely random password on the same character set has log2(94)~6.55 bits per character

A randomly selected English phrase has ~ 1 bit per character (Shannon 1948)

An xkcd password has ~ 1.6 bits per character

Randomness

The randomness is supplied by your operating system's urandom. This ought to be cryptographically secure.

How many characters should you use?

Apparently, the state of the art of cracking passwords is 300 billion guesses per second. So, we want our password space to be pretty big. With n bits of entropy, if someone were targetting you with this much power, it would take an average of (300 billion)*2^(n-1) seconds to crack your password.

In other terms, the probability of them cracking your password after t seconds is (300 billion)*t / 2^n. We can set this probability arbitrarily low for a given t with a sufficiently large number of bits, n.

Suppose we require that the probability of cracking before 6 months is less than 1%, then we should have n = log2((300*10^9)*(6*30*24*60*60)/0.01)~69 bits of entropy in our password. In our algorithm's case, the corresponding number of characters is c=n/4.5, so 15 characters is sufficient in this case.

I can't remember this password!

It just takes a little practice! However, maybe xkcd passwords are more your speed (about 3 times as many characters, but actual words!).

altpass's People

Contributors

sidequestboy avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.