[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.18

1.18    ! millert     1: .\"    $OpenBSD: encrypt.1,v 1.17 2001/07/31 18:12:02 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: .\"
1.10      alex       26: .Dd May 18, 1999
1.1       downsj     27: .Dt ENCRYPT 1
1.11      aaron      28: .Os
1.1       downsj     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.18    ! millert    36: .Op Fl c Ar class
1.1       downsj     37: .Op Fl m
                     38: .Op Fl s Ar salt
1.10      alex       39: .Op Fl p | Ar string
1.4       downsj     40: .Nm makekey
1.1       downsj     41: .Sh DESCRIPTION
1.12      aaron      42: .Nm
1.1       downsj     43: prints the encrypted form of
                     44: .Ar string
1.15      aaron      45: to the standard output.
                     46: This is mostly useful for encrypting passwords from within scripts.
1.1       downsj     47: .Pp
1.13      aaron      48: The options are as follows:
1.16      aaron      49: .Bl -tag -width Ds
1.4       downsj     50: .It Fl k
                     51: Run in
                     52: .Nm makekey
                     53: compatible mode; a single combined key and salt are read from standard
                     54: input and the DES encrypted result is written to standard output without a
                     55: terminating newline.
1.5       provos     56: .It Fl b Ar rounds
                     57: Encrypt the string using Blowfish hashing with the specified
                     58: .Ar rounds .
1.18    ! millert    59: .It Fl c Ar class
        !            60: Use the cipher type specified in the given user login class.
        !            61: See
        !            62: .Xr login.conf 5
        !            63: for more information.
1.1       downsj     64: .It Fl m
                     65: Encrypt the string using MD5.
1.10      alex       66: .It Fl p
                     67: Prompt for a single string with echo turned off.
1.1       downsj     68: .It Fl s Ar salt
                     69: Encrypt the string using DES, with the specified
                     70: .Ar salt .
                     71: .El
                     72: .Pp
                     73: If no
                     74: .Ar string
                     75: is specified,
1.12      aaron      76: .Nm
1.7       deraadt    77: reads one string per line from standard input, encrypting each one
1.14      aaron      78: with the chosen algorithm from above.
1.18    ! millert    79: In the case where no specific algorithm or specific user login class was given
        !            80: as a command line option, the algorithm specified in the default class in
1.17      millert    81: .Pa /etc/login.conf
                     82: will be used.
1.5       provos     83: .Pp
1.18    ! millert    84: For MD5 and Blowfish, a new random salt is automatically generated for each
1.5       provos     85: password.
                     86: .Pp
1.11      aaron      87: Specifying the
1.3       downsj     88: .Ar string
                     89: on the command line should be discouraged; using the
                     90: standard input is more secure.
1.5       provos     91: .Sh FILES
1.17      millert    92: .Bl -tag -width /etc/login.conf -compact
                     93: .It Pa /etc/login.conf
1.5       provos     94: .El
1.1       downsj     95: .Sh SEE ALSO
1.5       provos     96: .Xr crypt 3 ,
1.17      millert    97: .Xr login.conf 5
1.1       downsj     98: .Sh HISTORY
1.12      aaron      99: .Nm
1.6       millert   100: first appeared in
                    101: .Ox 1.2 .
1.4       downsj    102: .Pp
                    103: A
                    104: .Nm makekey
1.11      aaron     105: command appeared in
1.4       downsj    106: .At v7 .