summaryrefslogtreecommitdiff
path: root/sbin/wpa-psk/wpa-psk.8
blob: c4d1ca9f6e16c2d34419a4033616c2dad84f61c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
.\" $OpenBSD: wpa-psk.8,v 1.2 2008/04/16 17:27:54 jmc Exp $
.\"
.\" Copyright (c) 2008 Damien Bergamini <damien.bergamini@free.fr>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: April 16 2008 $
.Os
.Dt WPA-PSK 8
.Sh NAME
.Nm wpa-psk
.Nd passphrase to WPA pre-shared key mapping
.Sh SYNOPSIS
.Nm
.Ar ssid
.Ar passphrase
.Sh DESCRIPTION
.Nm
generates a 256-bit pre-shared key from a service set identifier (SSID) and
a passphrase.
The passphrase must be a sequence of between 8 and 63 ASCII-encoded
characters.
The length of the SSID must be between 1 and 32 octets.
.Pp
.Nm
prints the generated pre-shared key to stdout as a series of 64 hexadecimal
digits preceded by
.So 0x Sc .
The output is intended to be passed to
.Xr ifconfig 8
via the
.Cm wpapsk
option.
The
.Ar ssid
parameter should be the same as the
.Ar nwid
parameter passed to
.Xr ifconfig 8
via the
.Cm nwid
option.
.Pp
To generate the pre-shared key,
.Nm
uses the Password-Based Key Derivation Function 2 (PBKDF2).
The passphrase is hashed 4096 times using HMAC-SHA1.
.Sh SEE ALSO
.Xr ifconfig 8
.Rs
.%R IEEE Std 802.11i
.%T Medium Access Control (MAC) Security Enhancements
.%D 2004
.Re
.Rs
.%R PKCS #5 v2.0
.%T Password-Based Cryptography Standard
.%D 1999
.Re
.Rs
.%R RFC 3174
.%T US Secure Hash Algorithm 1 (SHA1)
.%D 2001
.Re