Commit 6fda4d7e authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

PR: 1887

Submitted by: "Victor B. Wagner" <vitus@cryptocom.ru>
Approved by: steve@openssl.org

Document/clarify use of some options and include details of GOST algorihthm
usage.
parent 36a252ea
Loading
Loading
Loading
Loading
+37 −0
Original line number Diff line number Diff line
@@ -251,6 +251,33 @@ cipher suites using MD5.

cipher suites using SHA1.

=item B<aGOST> 

cipher suites using GOST R 34.10 (either 2001 or 94) for authenticaction
(needs an engine supporting GOST algorithms). 

=item B<aGOST01>

cipher suites using GOST R 34.10-2001 authentication.

=item B<aGOST94>

cipher suites using GOST R 34.10-94 authentication (note that R 34.10-94
standard has been expired so use GOST R 34.10-2001)

=item B<kGOST>

cipher suites, using VKO 34.10 key exchange, specified in the RFC 4357.

=item B<GOST94>

cipher suites, using HMAC based on GOST R 34.11-94.

=item B<GOST89MAC>

cipher suites using GOST 28147-89 MAC B<instead of> HMAC.


=back

=head1 CIPHER SUITE NAMES
@@ -376,6 +403,16 @@ e.g. DES-CBC3-SHA. In these cases, RSA authentication is used.

 TLS_DH_anon_WITH_SEED_CBC_SHA          ADH-SEED-SHA

=head2 GOST ciphersuites from draft-chudov-cryptopro-cptls, extending TLS v1.0

Note: these ciphers require an engine which including GOST cryptographic
algorithms, such as the B<ccgost> engine, included in the OpenSSL distribution.

 TLS_GOSTR341094_WITH_28147_CNT_IMIT GOST94-GOST89-GOST89
 TLS_GOSTR341001_WITH_28147_CNT_IMIT GOST2001-GOST89-GOST89
 TLS_GOSTR341094_WITH_NULL_GOSTR3411 GOST94-NULL-GOST94
 TLS_GOSTR341001_WITH_NULL_GOSTR3411 GOST2001-NULL-GOST94

=head2 Additional Export 1024 and other cipher suites

Note: these ciphers can also be used in SSL v3.
+11 −16
Original line number Diff line number Diff line
@@ -36,17 +36,7 @@ B<openssl> B<cms>
[B<-CAfile file>]
[B<-CApath dir>]
[B<-md digest>]
[B<-des>]
[B<-des3>]
[B<-rc2-40>]
[B<-rc2-64>]
[B<-rc2-128>]
[B<-aes128>]
[B<-aes192>]
[B<-aes256>]
[B<-camellia128>]
[B<-camellia192>]
[B<-camellia256>]
[B<-[cipher]>]
[B<-nointern>]
[B<-no_signer_cert_verify>]
[B<-nocerts>]
@@ -253,13 +243,13 @@ to each certificate.
digest algorithm to use when signing or resigning. If not present then the
default digest algorithm for the signing key will be used (usually SHA1).

=item B<-des -des3 -rc2-40 -rc2-64 -rc2-128 -aes128 -aes192 -aes256 -camellia128 -camellia192 -camellia256>
=item B<-[cipher]>

the encryption algorithm to use. DES (56 bits), triple DES (168 bits), 40, 64
or 128 bit RC2, 128, 192 or 256 bit AES, or 128, 192 or 256 bit Camellia
respectively. Any other cipher name (as recognized by the
the encryption algorithm to use. For example triple DES (168 bits) - B<-des3>
or 256 bit AES - B<-aes256>. Any standard algorithm name (as used by the
EVP_get_cipherbyname() function) can also be used preceded by a dash, for 
example B<-aes_128_cbc>.
example B<-aes_128_cbc>. See L<B<enc>|enc(1)> for a list of ciphers
supported by your version of OpenSSL.

If not specified triple DES is used. Only used with B<-encrypt> and 
B<-EncryptedData_create> commands.
@@ -411,6 +401,11 @@ portion of a message so they may be included manually. If signing
then many S/MIME mail clients check the signers certificate's email
address matches that specified in the From: address.

=item B<-purpose, -ignore_critical, -issuer_checks, -crl_check, -crl_check_all, -policy_check, -extended_crl, -x509_strict, -policy>

Set various certificate chain valiadition option. See the
L<B<verify>|verify(1)> manual page for details.

=back

=head1 NOTES
+47 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ B<openssl> B<dgst>
[B<-binary>]
[B<-out filename>]
[B<-sign filename>]
[B<-keyform arg>]
[B<-passin arg>]
[B<-verify filename>]
[B<-prverify filename>]
@@ -61,6 +62,23 @@ filename to output to, or standard output by default.

digitally sign the digest using the private key in "filename".

=item B<-keyform arg>

Specifies the key format to sign digest with. Only PEM and ENGINE
formats are supported by the B<dgst> command.

=item B<-engine id>

Use engine B<id> for operations (including private key storage).
This engine is not used as source for digest algorithms, unless it is
also specified in the configuration file.

=item B<-sigopt nm:v>

Pass options to the signature algorithm during sign or verify operations.
Names and values of these options are algorithm-specific.


=item B<-passin arg>

the private key password source. For more information about the format of B<arg>
@@ -83,6 +101,35 @@ the actual signature to verify.

create a hashed MAC using "key".

=item B<-mac alg>

create MAC (keyed Message Authentication Code). The most popular MAC
algorithm is HMAC (hash-based MAC), but there are other MAC algorithms
which are not based on hash, for instance B<gost-mac> algorithm,
supported by B<ccgost> engine. MAC keys and other options should be set
via B<-macopt> parameter.

=item B<-macopt nm:v>

Passes options to MAC algorithm, specified by B<-mac> key.
Following options are supported by both by B<HMAC> and B<gost-mac>:

=over 8

=item B<key:string>
	
Specifies MAC key as alphnumeric string (use if key contain printable
characters only). String length must conform to any restrictions of
the MAC algorithm for example exactly 32 chars for gost-mac.

=item B<hexkey:string>

Specifies MAC key in hexadecimal form (two hex digits per byte).
Key length must conform to any restrictions of the MAC algorithm
for example exactly 32 chars for gost-mac.

=back

=item B<-rand file(s)>

a file or files containing random data used to seed the random number
+56 −4
Original line number Diff line number Diff line
@@ -12,17 +12,24 @@ B<openssl enc -ciphername>
[B<-pass arg>]
[B<-e>]
[B<-d>]
[B<-a>]
[B<-a/-base64>]
[B<-A>]
[B<-k password>]
[B<-kfile filename>]
[B<-K key>]
[B<-iv IV>]
[B<-S salt>]
[B<-salt>]
[B<-nosalt>]
[B<-z>]
[B<-md>]
[B<-p>]
[B<-P>]
[B<-bufsize number>]
[B<-nopad>]
[B<-debug>]
[B<-none>]
[B<-engine id>]

=head1 DESCRIPTION

@@ -74,6 +81,10 @@ base64 process the data. This means that if encryption is taking place
the data is base64 encoded after encryption. If decryption is set then
the input data is base64 decoded before being decrypted.

=item B<-base64>

same as B<-a>

=item B<-A>

if the B<-a> option is set then base64 process the data on one line.
@@ -89,10 +100,18 @@ read the password to derive the key from the first line of B<filename>.
This is for compatibility with previous versions of OpenSSL. Superseded by
the B<-pass> argument.

=item B<-nosalt>

do not use a salt 

=item B<-salt>

use salt (randomly generated or provide with B<-S> option) when
encrypting (this is the default).

=item B<-S salt>

the actual salt to use: this must be represented as a string comprised only
of hex digits.
the actual salt to use: this must be represented as a string of hex digits.

=item B<-K key>

@@ -131,12 +150,34 @@ disable standard block padding

debug the BIOs used for I/O.

=item B<-z>

Compress or decompress clear text using zlib before encryption or after
decryption. This option exists only if OpenSSL with compiled with zlib
or zlib-dynamic option.

=item B<-none>

Use NULL cipher (no encryption or decryption of input).

=back

=head1 NOTES

The program can be called either as B<openssl ciphername> or
B<openssl enc -ciphername>.
B<openssl enc -ciphername>. But the first form doesn't work with
engine-provided ciphers, because this form is processed before the
configuration file is read and any ENGINEs loaded.

Engines which provide entirely new encryption algorithms (such as ccgost
engine which provides gost89 algorithm) should be configured in the
configuration file. Engines, specified in the command line using -engine
options can only be used for hadrware-assisted implementations of
ciphers, which are supported by OpenSSL core or other engine, specified
in the configuration file.

When enc command lists supported ciphers, ciphers provided by engines,
specified in the configuration files are listed too.

A password will be prompted for to derive the key and IV if necessary.

@@ -169,6 +210,14 @@ Blowfish and RC5 algorithms use a 128 bit key.

=head1 SUPPORTED CIPHERS

Note that some of these ciphers can be disabled at compile time
and some are available only if an appropriate engine is configured
in the configuration file. The output of the B<enc> command run with
unsupported options (for example B<openssl enc -help>) includes a
list of ciphers, supported by your versesion of OpenSSL, including
ones provided by configured engines.


 base64             Base 64

 bf-cbc             Blowfish in CBC mode
@@ -203,6 +252,9 @@ Blowfish and RC5 algorithms use a 128 bit key.

 desx               DESX algorithm.

 gost89             GOST 28147-89 in CFB mode (provided by ccgost engine)
 gost89-cnt        `GOST 28147-89 in CNT mode (provided by ccgost engine) 

 idea-cbc           IDEA algorithm in CBC mode
 idea               same as idea-cbc
 idea-cfb           IDEA in CFB mode
+31 −0
Original line number Diff line number Diff line
@@ -138,6 +138,37 @@ the EC curve to use.

=back

=head1 GOST2001 KEY GENERATION AND PARAMETER OPTIONS

Gost 2001 support is not enabled by default. To enable this algorithm,
one should load the ccgost engine in the OpenSSL configuration file.
See README.gost file in the engines/ccgost directiry of the source
distribution for more details.

Use of a parameter file for the GOST R 34.10 algorithm is optional.
Parameters can be specified during key generation directly as well as
during generation of parameter file.

=over 4

=item B<paramset:name>

Specifies GOST R 34.10-2001 parameter set according to RFC 4357.
Parameter set can be specified using abbreviated name, object short name or
numeric OID. Following parameter sets are supported:

  paramset   OID               Usage
  A          1.2.643.2.2.35.1  Signature
  B          1.2.643.2.2.35.2  Signature
  C          1.2.643.2.2.35.3  Signature
  XA         1.2.643.2.2.36.0  Key exchange
  XB         1.2.643.2.2.36.1  Key exchange
  test       1.2.643.2.2.35.0  Test purposes

=back



=head1 NOTES

The use of the genpkey program is encouraged over the algorithm specific
Loading