Brian Dickson

NAME

Crypt::PW44 - Perl password generator - generate 44-bit passwords using OPIE dictionary from RFC 1760.

SYNOPSIS

  # In perl script:
  use Crypt::PW44 qw(generate_password);
  # 44 bit (4 word) password
  $output = generate_password(pack("Ll",int(rand(2**32)),int(rand(2**16))),3);
  # $output = generate_password($random_binary_data,$number_of_ascii_text_words_minus_1);
  # return value is N-word password of ascii text, with space delimiters between words
  

DESCRIPTION

This module contains a simple password generator, based on the S/Key calculator (as described in RFC 1760) implemented in Perl. It exports the function generate_password.

This was inspired by the XKCD web comic "Password Strength", permalink http://xkcd.com/936/ .

INSTALLATION

perl Makefile.PL make make test make install

FUNCTIONS

generate_password($random_data, $count)

Given two arguments, uses provided entropic data, computes the hash value, and returns it as a string containing N+1 words separated by spaces. The meanings of the arguments is as follows:

  • random_data

    User/script-provided random data, must be binary, and more than N*11 bits in size

  • count

    AKA "N". Counting from zero, not 1, is number of ASCII words in the password generated.

NOTES

Derived (heavily) from the S/Key module, written by

Ken Williams, kwilliams@cpan.org

AUTHOR

Brian Dickson, brian.peter.dickson@gmail.com

COPYRIGHT

Copyright 2011-2017 Brian Dickson. All rights reserved.

Copyright 2000-2009 Ken Williams. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO perl(1). RFC 1760. Digest::MD4(1). Digest::MD5(1). Term::ReadKey(1).