1Authen::Passphrase::LANUMsaenragCeorn(t3r)ibuted Perl DoAcuutmheennt:a:tPiaosnsphrase::LANManager(3)
2
3
4

NAME

6       Authen::Passphrase::LANManager - passphrases using the LAN Manager hash
7       algorithm
8

SYNOPSIS

10               use Authen::Passphrase::LANManager;
11
12               $ppr = Authen::Passphrase::LANManager->new(
13                       hash_hex => "855c3697d9979e78ac404c4ba2c66533");
14
15               $ppr = Authen::Passphrase::LANManager->new(
16                       passphrase => "passphrase");
17
18               $ppr = Authen::Passphrase::LANManager->from_rfc2307(
19                       "{LANMAN}855c3697d9979e78ac404c4ba2c66533");
20
21               $hash = $ppr->hash;
22               $hash_hex = $ppr->hash_hex;
23
24               $ppr0 = $ppr->first_half;
25               $ppr1 = $ppr->second_half;
26
27               if($ppr->match($passphrase)) { ...
28
29               $userPassword = $ppr->as_rfc2307;
30

DESCRIPTION

32       An object of this class encapsulates a passphrase hashed using the
33       Microsoft LAN Manager hash function.  This is a subclass of
34       Authen::Passphrase, and this document assumes that the reader is
35       familiar with the documentation for that class.
36
37       The hash algorithm can be used on up to fourteen Latin-1 characters of
38       passphrase.  First the passphrase is folded to uppercase, and zero-
39       padded to fourteen bytes.  Then it is split into two halves.  Each
40       seven-byte half is used as a 56-bit DES key, to encrypt the fixed
41       plaintext block "KGS!@#$%".  The eight-byte ciphertexts are
42       concatenated to form the sixteen-byte hash.  There is no salt.
43
44       Because the two halves of the passphrase are hashed separately, it is
45       possible to manipulate (e.g., crack) a half hash in isolation.  See
46       Authen::Passphrase::LANManagerHalf.
47
48       Warning: Don't even think about using this seriously.  It's an
49       exceptionally weak design, flawed in pretty much every respect.
50

CONSTRUCTORS

52       Authen::Passphrase::LANManager->new(ATTR => VALUE, ...)
53           Generates a new passphrase recogniser object using the LAN Manager
54           hash algorithm.  The following attributes may be given:
55
56           hash
57               The hash, as a string of 16 bytes.
58
59           hash_hex
60               The hash, as a string of 32 hexadecimal digits.
61
62           passphrase
63               A passphrase that will be accepted.
64
65           Either the hash or the passphrase must be given.
66
67       Authen::Passphrase::LANManager->from_rfc2307(USERPASSWORD)
68           Generates a LAN Manager passphrase recogniser from the supplied
69           RFC2307 encoding.  The string must consist of "{LANMAN}" (or its
70           synonym "{LANM}") followed by the hash in hexadecimal; case is
71           ignored.
72

METHODS

74       $ppr->hash
75           Returns the hash value, as a string of 16 bytes.
76
77       $ppr->hash_hex
78           Returns the hash value, as a string of 32 hexadecimal digits.
79
80       $ppr->first_half
81           Returns the hash of the first half of the passphrase, as an
82           Authen::Passphrase::LANManagerHalf passphrase recogniser.
83
84       $ppr->second_half
85           Returns the hash of the second half of the passphrase, as an
86           Authen::Passphrase::LANManagerHalf passphrase recogniser.
87
88       $ppr->match(PASSPHRASE)
89       $ppr->as_rfc2307
90           These methods are part of the standard Authen::Passphrase
91           interface.
92

SEE ALSO

94       Authen::Passphrase, Authen::Passphrase::LANManagerHalf, 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.34.0                      2021-07-22 Authen::Passphrase::LANManager(3)
Impressum