[BACK]Return to encrypt.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / encrypt

Annotation of src/usr.bin/encrypt/encrypt.1, Revision 1.7

1.7     ! deraadt     1: .\"    $OpenBSD: encrypt.1,v 1.6 1998/03/10 04:50:58 millert Exp $
1.1       downsj      2: .\"
                      3: .\" Copyright (c) 1996, Jason Downs.  All rights reserved.
                      4: .\"
                      5: .\" Redistribution and use in source and binary forms, with or without
                      6: .\" modification, are permitted provided that the following conditions
                      7: .\" are met:
                      8: .\" 1. Redistributions of source code must retain the above copyright
                      9: .\"    notice, this list of conditions and the following disclaimer.
                     10: .\" 2. Redistributions in binary form must reproduce the above copyright
                     11: .\"    notice, this list of conditions and the following disclaimer in the
                     12: .\"    documentation and/or other materials provided with the distribution.
                     13: .\"
                     14: .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY EXPRESS
                     15: .\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
                     16: .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
                     17: .\" DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
                     18: .\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
                     19: .\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
                     20: .\" SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
                     21: .\" CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     22: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     23: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     24: .\" SUCH DAMAGE.
                     25: .\"
                     26: .Dd August 7, 1996
                     27: .Dt ENCRYPT 1
                     28: .Os OpenBSD
                     29: .Sh NAME
                     30: .Nm encrypt
1.4       downsj     31: .Nd encrypt passwords from the command line or standard input
1.1       downsj     32: .Sh SYNOPSIS
                     33: .Nm encrypt
1.4       downsj     34: .Op Fl k
1.5       provos     35: .Op Fl b Ar rounds
1.1       downsj     36: .Op Fl m
                     37: .Op Fl s Ar salt
                     38: .Op Ar string
1.4       downsj     39: .Nm makekey
1.1       downsj     40: .Sh DESCRIPTION
                     41: .Nm encrypt
                     42: prints the encrypted form of
                     43: .Ar string
                     44: to the standard output.  This is mostly useful for encrypting passwords
1.4       downsj     45: from within scripts.
1.1       downsj     46: .Pp
                     47: The following options are supported:
1.5       provos     48: .Bl -tag -width XxXXXXXXX
1.4       downsj     49: .It Fl k
                     50: Run in
                     51: .Nm makekey
                     52: compatible mode; a single combined key and salt are read from standard
                     53: input and the DES encrypted result is written to standard output without a
                     54: terminating newline.
1.5       provos     55: .It Fl b Ar rounds
                     56: Encrypt the string using Blowfish hashing with the specified
                     57: .Ar rounds .
1.1       downsj     58: .It Fl m
                     59: Encrypt the string using MD5.
                     60: .It Fl s Ar salt
                     61: Encrypt the string using DES, with the specified
                     62: .Ar salt .
                     63: .El
                     64: .Pp
                     65: If no
                     66: .Ar string
                     67: is specified,
                     68: .Nm encrypt
1.7     ! deraadt    69: reads one string per line from standard input, encrypting each one
1.5       provos     70: with the chosen algorithm from above. In case that no specific algorithm
                     71: was given as command line option, the default will be looked up from
                     72: .Ar passwd.conf(5) .
                     73: .Pp
                     74: For MD5 and Blowfish a new random salt is automatically generated for each
                     75: password.
                     76: .Pp
1.7     ! deraadt    77: Specifying the
1.3       downsj     78: .Ar string
                     79: on the command line should be discouraged; using the
                     80: standard input is more secure.
1.5       provos     81: .Sh FILES
                     82: .Bl -tag -width /etc/passwd.conf -compact
                     83: .It Pa /etc/passwd.conf
                     84: .El
1.1       downsj     85: .Sh SEE ALSO
1.5       provos     86: .Xr crypt 3 ,
                     87: .Xr passwd.conf 5 ,
                     88: .Xr pw_getconf 3
1.1       downsj     89: .Sh HISTORY
                     90: .Nm encrypt
1.6       millert    91: first appeared in
                     92: .Ox 1.2 .
1.4       downsj     93: .Pp
                     94: A
                     95: .Nm makekey
                     96: command appeared in
                     97: .At v7 .