1Authen::Passphrase::LANUMsaenragCeornHtarlifb(u3t)ed PerAlutDhoecnu:m:ePnatsastpihornase::LANManagerHalf(3)
2
3
4

NAME

6       Authen::Passphrase::LANManagerHalf - passphrases using half the LAN
7       Manager algorithm
8

SYNOPSIS

10               use Authen::Passphrase::LANManagerHalf;
11
12               $ppr = Authen::Passphrase::LANManagerHalf->new(
13                       hash_hex => "855c3697d9979e78");
14
15               $ppr = Authen::Passphrase::LANManagerHalf->new(
16                       passphrase => "passphr");
17
18               $ppr = Authen::Passphrase::LANManagerHalf->from_crypt(
19                       '$LM$855c3697d9979e78');
20
21               $ppr = Authen::Passphrase::LANManagerHalf->from_rfc2307(
22                       '{CRYPT}$LM$855c3697d9979e78');
23
24               $hash = $ppr->hash;
25               $hash_hex = $ppr->hash_hex;
26
27               if($ppr->match($passphrase)) { ...
28
29               $passwd = $ppr->as_crypt;
30               $userPassword = $ppr->as_rfc2307;
31

DESCRIPTION

33       An object of this class encapsulates half of a passphrase hashed using
34       the Microsoft LAN Manager hash function.  This is a subclass of
35       Authen::Passphrase, and this document assumes that the reader is
36       familiar with the documentation for that class.  For the complete LAN
37       Manager hash function, see Authen::Passphrase::LANManager.
38
39       In a spectacularly bad design decision, the Microsoft LAN Manager hash
40       function splits the passphrase into two parts and hashes them
41       separately.  It is therefore possible to separate the halves of a LAN
42       Manager hash, and do things with them (such as crack them) separately.
43       This class is about using such a hash half on its own.
44
45       The half hash algorithm can be used on up to seven Latin-1 characters
46       of passphrase.  First the passphrase is folded to uppercase, and zero-
47       padded to seven bytes.  Then the seven bytes are used as a 56-bit DES
48       key, to encrypt the fixed plaintext block "KGS!@#$%".  The eight byte
49       ciphertext block is the half hash.  There is no salt.
50
51       Warning: Don't even think about using this seriously.  It's an
52       exceptionally weak design, flawed in pretty much every respect.
53

CONSTRUCTORS

55       Authen::Passphrase::LANManagerHalf->new(ATTR => VALUE, ...)
56           Generates a new passphrase recogniser object using the LAN Manager
57           half hash algorithm.  The following attributes may be given:
58
59           hash
60               The hash, as a string of 8 bytes.
61
62           hash_hex
63               The hash, as a string of 16 hexadecimal digits.
64
65           passphrase
66               A passphrase that will be accepted.
67
68           Either the hash or the passphrase must be given.
69
70       Authen::Passphrase::LANManagerHalf->from_crypt(PASSWD)
71           Generates a new LAN Manager half passphrase recogniser object from
72           a crypt string.  The crypt string must consist of "$LM$" followed
73           by the hash in lowercase hexadecimal.
74
75       Authen::Passphrase::LANManagerHalf->from_rfc2307(USERPASSWORD)
76           Generates a new LAN Manager half passphrase recogniser object from
77           an RFC 2307 string.  The string must consist of "{CRYPT}" (case
78           insensitive) followed by an acceptable crypt string.
79

METHODS

81       $ppr->hash
82           Returns the hash value, as a string of 8 bytes.
83
84       $ppr->hash_hex
85           Returns the hash value, as a string of 16 hexadecimal digits.
86
87       $ppr->match(PASSPHRASE)
88       $ppr->as_crypt
89       $ppr->as_rfc2307
90           These methods are part of the standard Authen::Passphrase
91           interface.
92

SEE ALSO

94       Authen::Passphrase, Authen::Passphrase::LANManager, Crypt::DES
95

AUTHOR

97       Andrew Main (Zefram) <zefram@fysh.org>
98
100       Copyright (C) 2006, 2007, 2009, 2010, 2012 Andrew Main (Zefram)
101       <zefram@fysh.org>
102

LICENSE

104       This module is free software; you can redistribute it and/or modify it
105       under the same terms as Perl itself.
106
107
108
109perl v5.30.1                      2020-01-A2u9then::Passphrase::LANManagerHalf(3)
Impressum