summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/usr.sbin/openssl/openssl.1246
1 files changed, 121 insertions, 125 deletions
diff --git a/src/usr.sbin/openssl/openssl.1 b/src/usr.sbin/openssl/openssl.1
index bfa12fe451..9da8f52fce 100644
--- a/src/usr.sbin/openssl/openssl.1
+++ b/src/usr.sbin/openssl/openssl.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: openssl.1,v 1.25 2003/12/13 20:10:38 jmc Exp $ 1.\" $OpenBSD: openssl.1,v 1.26 2003/12/19 14:52:15 jmc Exp $
2.\" ==================================================================== 2.\" ====================================================================
3.\" Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. 3.\" Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
4.\" 4.\"
@@ -2404,26 +2404,21 @@ DSA parameters is often used to generate several distinct keys.
2404.Nm openssl enc 2404.Nm openssl enc
2405.Bk -words 2405.Bk -words
2406.Fl ciphername 2406.Fl ciphername
2407.Op Fl in Ar filename 2407.Op Fl AadePp
2408.Op Fl out Ar filename 2408.Op Fl debug
2409.Op Fl pass Ar arg 2409.Op Fl engine Ar id
2410.Op Fl salt 2410.Op Fl nopad
2411.Op Fl nosalt 2411.Op Fl nosalt
2412.Op Fl e 2412.Op Fl salt
2413.Op Fl d 2413.Op Fl bufsize Ar number
2414.Op Fl a 2414.Op Fl in Ar filename
2415.Op Fl A 2415.Op Fl iv Ar IV
2416.Op Fl K Ar key
2416.Op Fl k Ar password 2417.Op Fl k Ar password
2417.Op Fl kfile Ar filename 2418.Op Fl kfile Ar filename
2419.Op Fl out Ar filename
2420.Op Fl pass Ar arg
2418.Op Fl S Ar salt 2421.Op Fl S Ar salt
2419.Op Fl K Ar key
2420.Op Fl iv Ar IV
2421.Op Fl p
2422.Op Fl P
2423.Op Fl bufsize Ar number
2424.Op Fl nopad
2425.Op Fl debug
2426.Op Fl engine Ar id
2427.Ek 2422.Ek
2428.Pp 2423.Pp
2429The symmetric cipher commands allow data to be encrypted or decrypted 2424The symmetric cipher commands allow data to be encrypted or decrypted
@@ -2434,79 +2429,53 @@ or in addition to the encryption or decryption.
2434.Pp 2429.Pp
2435The options are as follows: 2430The options are as follows:
2436.Bl -tag -width "XXXX" 2431.Bl -tag -width "XXXX"
2437.It Fl in Ar filename 2432.It Fl A
2438The input 2433If the
2439.Ar filename , 2434.Fl a
2440standard input by default. 2435option is set, then base64 process the data on one line.
2441.It Fl out Ar filename
2442The output
2443.Ar filename ,
2444standard output by default.
2445.It Fl pass Ar arg
2446The password source.
2447For more information about the format of
2448.Ar arg ,
2449see the
2450.Sx PASS PHRASE ARGUMENTS
2451section above.
2452.It Fl salt
2453Use a
2454.Ar salt
2455in the key derivation routines.
2456This option should
2457.Em ALWAYS
2458be used unless compatibility with previous versions of
2459.Nm OpenSSL
2460or
2461.Nm SSLeay
2462is required.
2463This option is only present on
2464.Nm OpenSSL
2465versions 0.9.5 or above.
2466.It Fl nosalt
2467Don't use a
2468.Ar salt
2469in the key derivation routines.
2470This is the default for compatibility with previous versions of
2471.Nm OpenSSL
2472and
2473.Nm SSLeay .
2474.It Fl e
2475Encrypt the input data: this is the default.
2476.It Fl d
2477Decrypt the input data.
2478.It Fl a 2436.It Fl a
2479Base64 process the data. 2437Base64 process the data.
2480This means that if encryption is taking place, the data is base64 encoded 2438This means that if encryption is taking place, the data is base64 encoded
2481after encryption. 2439after encryption.
2482If decryption is set, then the input data is base64 decoded before 2440If decryption is set, then the input data is base64 decoded before
2483being decrypted. 2441being decrypted.
2484.It Fl A 2442.It Fl bufsize Ar number
2485If the 2443Set the buffer size for I/O.
2486.Fl a 2444.It Fl d
2487option is set, then base64 process the data on one line. 2445Decrypt the input data.
2488.It Fl k Ar password 2446.It Fl debug
2489The 2447Debug the BIOs used for I/O.
2490.Ar password 2448.It Fl e
2491to derive the key from. 2449Encrypt the input data: this is the default.
2492This is for compatibility with previous versions of 2450.It Fl engine Ar id
2493.Nm OpenSSL . 2451Specifying an engine (by it's unique
2494Superseded by the 2452.Ar id
2495.Fl pass 2453string) will cause
2496option. 2454.Nm enc
2497.It Fl kfile Ar filename 2455to attempt to obtain a functional reference to the specified engine,
2498Read the password to derive the key from the first line of 2456thus initialising it if needed.
2499.Ar filename . 2457The engine will then be set as the default for all available algorithms.
2500This is for compatibility with previous versions of 2458.It Fl in Ar filename
2501.Nm OpenSSL . 2459The input
2502Superseded by the 2460.Ar filename ;
2503.Fl pass 2461standard input by default.
2504option. 2462.It Fl iv Ar IV
2505.It Fl S Ar salt
2506The actual 2463The actual
2507.Ar salt 2464.Ar IV
2465.Pq initialisation vector
2508to use: 2466to use:
2509this must be represented as a string comprised only of hex digits. 2467this must be represented as a string comprised only of hex digits.
2468When only the
2469.Ar key
2470is specified using the
2471.Fl K
2472option, the
2473.Ar IV
2474must explicitly be defined.
2475When a password is being specified using one of the other options,
2476the
2477.Ar IV
2478is generated from this password.
2510.It Fl K Ar key 2479.It Fl K Ar key
2511The actual 2480The actual
2512.Ar key 2481.Ar key
@@ -2514,7 +2483,7 @@ to use:
2514this must be represented as a string comprised only of hex digits. 2483this must be represented as a string comprised only of hex digits.
2515If only the key is specified, the 2484If only the key is specified, the
2516.Ar IV 2485.Ar IV
2517must additionally specified using the 2486must be additionally specified using the
2518.Fl iv 2487.Fl iv
2519option. 2488option.
2520When both a 2489When both a
@@ -2532,47 +2501,78 @@ It probably does not make much sense to specify both
2532.Ar key 2501.Ar key
2533and 2502and
2534.Ar password . 2503.Ar password .
2535.It Fl iv Ar IV 2504.It Fl k Ar password
2536The actual 2505The
2537.Ar IV 2506.Ar password
2538to use: 2507to derive the key from.
2539this must be represented as a string comprised only of hex digits. 2508This is for compatibility with previous versions of
2540When only the 2509.Nm OpenSSL .
2541.Ar key 2510Superseded by the
2542is specified using the 2511.Fl pass
2543.Fl K 2512option.
2544option, the 2513.It Fl kfile Ar filename
2545.Ar IV 2514Read the password to derive the key from the first line of
2546must explicitly be defined. 2515.Ar filename .
2547When a password is being specified using one of the other options, 2516This is for compatibility with previous versions of
2548the 2517.Nm OpenSSL .
2549.Ar IV 2518Superseded by the
2550is generated from this password. 2519.Fl pass
2551.It Fl p 2520option.
2552Print out the key and 2521.It Fl nopad
2553.Ar IV 2522Disable standard block padding.
2554used. 2523.It Fl nosalt
2524Don't use a
2525.Ar salt
2526in the key derivation routines.
2527This is the default for compatibility with previous versions of
2528.Nm OpenSSL
2529and
2530.Nm SSLeay .
2531.It Fl out Ar filename
2532The output
2533.Ar filename ,
2534standard output by default.
2555.It Fl P 2535.It Fl P
2556Print out the 2536Print out the
2557.Ar key 2537.Ar salt ,
2538.Ar key ,
2558and 2539and
2559.Ar IV 2540.Ar IV
2560used then immediately exit: 2541used, then immediately exit;
2561don't do any encryption or decryption. 2542don't do any encryption or decryption.
2562.It Fl bufsize Ar number 2543.It Fl p
2563Set the buffer size for I/O. 2544Print out the
2564.It Fl nopad 2545.Ar salt ,
2565Disable standard block padding. 2546.Ar key ,
2566.It Fl debug 2547and
2567Debug the BIOs used for I/O. 2548.Ar IV
2568.It Fl engine Ar id 2549used.
2569Specifying an engine (by it's unique 2550.It Fl pass Ar arg
2570.Ar id 2551The password source.
2571string) will cause 2552For more information about the format of
2572.Nm enc 2553.Ar arg ,
2573to attempt to obtain a functional reference to the specified engine, 2554see the
2574thus initialising it if needed. 2555.Sx PASS PHRASE ARGUMENTS
2575The engine will then be set as the default for all available algorithms. 2556section above.
2557.It Fl S Ar salt
2558The actual
2559.Ar salt
2560to use:
2561this must be represented as a string comprised only of hex digits.
2562.It Fl salt
2563Use a
2564.Ar salt
2565in the key derivation routines.
2566This option should
2567.Em ALWAYS
2568be used unless compatibility with previous versions of
2569.Nm OpenSSL
2570or
2571.Nm SSLeay
2572is required.
2573This option is only present on
2574.Nm OpenSSL
2575versions 0.9.5 or above.
2576.El 2576.El
2577.Sh ENC NOTES 2577.Sh ENC NOTES
2578The program can be called either as 2578The program can be called either as
@@ -2668,8 +2668,8 @@ cast5-ofb CAST5 in OFB mode
2668des-cbc DES in CBC mode 2668des-cbc DES in CBC mode
2669des Alias for des-cbc 2669des Alias for des-cbc
2670des-cfb DES in CBC mode 2670des-cfb DES in CBC mode
2671des-ofb DES in OFB mode
2672des-ecb DES in ECB mode 2671des-ecb DES in ECB mode
2672des-ofb DES in OFB mode
2673 2673
2674des-ede-cbc Two key triple DES EDE in CBC mode 2674des-ede-cbc Two key triple DES EDE in CBC mode
2675des-ede Alias for des-ede 2675des-ede Alias for des-ede
@@ -2711,7 +2711,7 @@ Encrypt a file using triple DES in CBC mode using a prompted password:
2711.Pp 2711.Pp
2712Decrypt a file using a supplied password: 2712Decrypt a file using a supplied password:
2713.Pp 2713.Pp
2714.Dl "$ openssl des3 -d -salt -in file.des3 -out file.txt -k mypassword" 2714.Dl "$ openssl des3 -d -in file.des3 -out file.txt -k mypassword"
2715.Pp 2715.Pp
2716Encrypt a file then base64 encode it 2716Encrypt a file then base64 encode it
2717(so it can be sent via mail for example) 2717(so it can be sent via mail for example)
@@ -2721,11 +2721,7 @@ using Blowfish in CBC mode:
2721.Pp 2721.Pp
2722Base64 decode a file then decrypt it: 2722Base64 decode a file then decrypt it:
2723.Pp 2723.Pp
2724.Dl "$ openssl bf -d -salt -a -in file.bf -out file.txt" 2724.Dl "$ openssl bf -d -a -in file.bf -out file.txt"
2725.Pp
2726Decrypt some data using a supplied 40-bit RC4 key:
2727.Pp
2728.Dl $ openssl rc4-40 -in file.rc4 -out file.txt -K 0102030405
2729.Sh ENC BUGS 2725.Sh ENC BUGS
2730The 2726The
2731.Fl A 2727.Fl A