Authen::Passphrase::Crypt16

Passphrases using Ultrix crypt16 algorithm
Download

Authen::Passphrase::Crypt16 Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Andrew Main
  • Publisher web site:
  • http://search.cpan.org/~zefram/

Authen::Passphrase::Crypt16 Tags


Authen::Passphrase::Crypt16 Description

Passphrases using Ultrix crypt16 algorithm Authen::Passphrase::Crypt16 is a Perl module with passphrases using Ultrix crypt16 algorithm.SYNOPSIS use Authen::Passphrase::Crypt16; $ppr = Authen::Passphrase::Crypt16->new( salt_base64 => "qi", hash_base64 => "8H8R7OM4xMUNMPuRAZxlY."); $ppr = Authen::Passphrase::Crypt16->new( salt_random => 12, passphrase => "passphrase"); $salt = $ppr->salt; $salt_base64 = $ppr->salt_base64_2; $hash = $ppr->hash; $hash_base64 = $ppr->hash_base64; $ppr0 = $ppr->first_half; $ppr1 = $ppr->second_half; if($ppr->match($passphrase)) { ...An object of this class encapsulates a passphrase hashed using the "crypt16" hash function found in Ultrix and Tru64. Do not confuse this with the "bigcrypt" found on HP-UX, Digital Unix, and OSF/1 (for which see Authen::Passphrase::BigCrypt). This is a subclass of Authen::Passphrase, and this document assumes that the reader is familiar with the documentation for that class.This is a derivation of the original DES-based crypt function found on all Unices (see Authen::Passphrase::DESCrypt). The first eight bytes of the passphrase are used as a DES key to encrypt the all-bits-zero block through 20 rounds of (12-bit) salted DES. (The standard crypt function does this, but with 25 encryption rounds instead of 20.) Then the next eight bytes, or the null string if the passphrase is eight bytes or shorter, are used as a DES key to encrypt the all-bits-zero block through 5 rounds of salted DES with the same salt. The two eight-byte ciphertexts are concatenated to form the sixteen-byte hash.A password hash of this scheme is conventionally represented in ASCII as a 24-character string using a base 64 encoding. The first two characters give the salt, the next eleven give the hash of the first half, and the last eleven give the hash of the second half. A hash thus encoded is used as a crypt string, on those systems where the crypt16 algorithm is part of crypt(), but the syntax clashes with that of bigcrypt. This module does not treat it as a crypt string syntax.Because the two halves of the passphrase are hashed separately, it is possible to manipulate (e.g., crack) a half hash in isolation. See Authen::Passphrase::DESCrypt for handling of a single half. Requirements: · Perl


Authen::Passphrase::Crypt16 Related Software