<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openssl.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Frukto</id>
	<title>OpenSSLWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openssl.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Frukto"/>
	<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php/Special:Contributions/Frukto"/>
	<updated>2026-04-10T14:36:04Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.13</generator>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Mailing_Lists&amp;diff=1194</id>
		<title>Mailing Lists</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Mailing_Lists&amp;diff=1194"/>
		<updated>2013-07-06T13:32:45Z</updated>

		<summary type="html">&lt;p&gt;Frukto: link to mailing lists page added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;There are four mailing lists, see [http://www.openssl.org/support/community.html mailing lists].&lt;/div&gt;</summary>
		<author><name>Frukto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Main_Page&amp;diff=1193</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Main_Page&amp;diff=1193"/>
		<updated>2013-07-06T13:27:21Z</updated>

		<summary type="html">&lt;p&gt;Frukto: OpenSSL Quick Links: 'Mailing Lists' added&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If this is your first visit or to get an account please see the [[Welcome]] page. Your participation and [[Contributions]] are valued.&lt;br /&gt;
&lt;br /&gt;
This wiki is intended as a place for collecting, organizing, and refining useful information about OpenSSL that is currently strewn among multiple locations and formats.&lt;br /&gt;
&lt;br /&gt;
== OpenSSL Quick Links ==&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;TABLE border=0&amp;gt;&lt;br /&gt;
     &amp;lt;TR&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[OpenSSL Overview]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Image:HTAB.png]][[Image:HTAB.png]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Compilation and Installation]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Image:HTAB.png]][[Image:HTAB.png]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Internals]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Image:HTAB.png]][[Image:HTAB.png]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Mailing Lists]] &amp;lt;/TD&amp;gt;&lt;br /&gt;
      &amp;lt;/TR&amp;gt;&lt;br /&gt;
      &amp;lt;TR&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[libcrypto API]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Image:HTAB.png]][[Image:HTAB.png]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[libssl API]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Image:HTAB.png]][[Image:HTAB.png]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Examples]] &amp;lt;/TD&amp;gt;&lt;br /&gt;
      &amp;lt;/TR&amp;gt;&lt;br /&gt;
      &amp;lt;TR&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[License]] &amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Image:HTAB.png]][[Image:HTAB.png]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Command Line Utilities]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Image:HTAB.png]][[Image:HTAB.png]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
        &amp;lt;TD&amp;gt;[[Related Links]]&amp;lt;/TD&amp;gt;&lt;br /&gt;
      &amp;lt;/TR&amp;gt;&lt;br /&gt;
  &amp;lt;/TABLE&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Administrivia ==&lt;br /&gt;
Site guidelines, legal and admininstrative issues.&lt;br /&gt;
:* [[Basic rules]], [[Commercial Product Disclaimer]], [[Contributions]], [[Copyright]], [[License]]&lt;br /&gt;
:* Using This Wiki&lt;br /&gt;
:: [http://meta.wikimedia.org/wiki/Help:Contents Wiki User's Guide], [http://www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list], [http://www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ], [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki Mailing List]&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
This section contains the automagically generated man pages from the OpenSSL git repository, and similar &amp;quot;man&amp;quot; style reference documentation. The man pages are automatically imported from the OpenSSL git repository and local wiki modifications are submitted as patches.&lt;br /&gt;
:* OpenSSL Manual Pages&lt;br /&gt;
::* [[Manual:Openssl(1)]], [[Manual:Ssl(3)]], [[Manual:Crypto(3)]], [[Documentation Index]]&lt;br /&gt;
:: If you wish to edit any of the Manual page content please refer to the [[Guidelines for Manual Page Authors]] page.&lt;br /&gt;
:* [[API]], [[Libcrypto API]], [[Libssl API]]&lt;br /&gt;
:* [[FIPS mode()]], [[FIPS_mode_set()]]&lt;br /&gt;
&lt;br /&gt;
== Usage and Programming ==&lt;br /&gt;
This section has discussions of practical issues in using OpenSSL&lt;br /&gt;
:* Building from Source&lt;br /&gt;
:: Where to find it, the different versions, how to build and install it.&lt;br /&gt;
:* [[OpenSSL Overview]]&lt;br /&gt;
:* [[Versioning]]&lt;br /&gt;
:* [[Compilation and Installation]]&lt;br /&gt;
:* [[EVP]]&lt;br /&gt;
:: Programming techniques and example code&lt;br /&gt;
:: Use of EVP is preferred for most applications and circumstances&lt;br /&gt;
::* [[EVP Asymmetric Encryption and Decryption of an Envelope]]&lt;br /&gt;
::* [[EVP Authenticated Encryption and Decryption]]&lt;br /&gt;
::* [[EVP Symmetric Encryption and Decryption]]&lt;br /&gt;
::* [[EVP Key and Parameter Generation]]&lt;br /&gt;
::* [[EVP Key Agreement]]&lt;br /&gt;
::* [[EVP Message Digests]]&lt;br /&gt;
::* [[EVP Key Derivation]]&lt;br /&gt;
::* [[EVP Signing and Verifying|EVP Signing and Verifying (including MAC codes)]]&lt;br /&gt;
:* Low Level APIs&lt;br /&gt;
:: More specialized non-EVP usage&lt;br /&gt;
::* [[Diffie-Hellman parameters]]&lt;br /&gt;
&lt;br /&gt;
== Concepts and Theory ==&lt;br /&gt;
Discussions of basic cryptographic theory and concepts&lt;br /&gt;
Discussions of common operational issues&lt;br /&gt;
:* [[Base64]]&lt;br /&gt;
:* [[FIPS 140-2]]&lt;br /&gt;
:* [[Random Numbers]]&lt;br /&gt;
:* [[Diffie Hellman]]&lt;br /&gt;
:* [[Elliptic Curve Diffie Hellman]]&lt;br /&gt;
:* [[Elliptic Curve Cryptography]]&lt;br /&gt;
&lt;br /&gt;
== Internals and Development ==&lt;br /&gt;
This section is for internal details of primary interest to OpenSSL maintainers and power users&lt;br /&gt;
:* [[Internals]]&lt;br /&gt;
:* [[Code Quality]]&lt;br /&gt;
:* [[Static and Dynamic Analysis]]&lt;/div&gt;</summary>
		<author><name>Frukto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Compilation_and_Installation&amp;diff=1192</id>
		<title>Compilation and Installation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Compilation_and_Installation&amp;diff=1192"/>
		<updated>2013-07-06T13:13:58Z</updated>

		<summary type="html">&lt;p&gt;Frukto: cleaned up 'getting source code' additional links and explanation added.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Get source code ==&lt;br /&gt;
&lt;br /&gt;
The OpenSSL source code can be downloaded from [http://www.openssl.org/source/ www.openssl.org/source/] or any suitable [http://www.openssl.org/source/mirror.html ftp mirror]. There are various versions including stable as well as unstable versions. &lt;br /&gt;
&lt;br /&gt;
The source code is manged via Git, the repository is&lt;br /&gt;
&lt;br /&gt;
: git://git.openssl.org/openssl.git&lt;br /&gt;
&lt;br /&gt;
The source is also available via a [https://github.com/openssl/openssl GitHub] mirror. This repository is updated every 15 minutes.&lt;br /&gt;
&lt;br /&gt;
If you don't know what Git is or how to use it, see the introduction at the [http://git-scm.com/documentation Git documentation] page. Once you installed git you can use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ git clone git://git.openssl.org/openssl.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
in an empty directory to download the latest (development) version. There are other branches available as well.&lt;br /&gt;
&lt;br /&gt;
== Compilation ==&lt;br /&gt;
&lt;br /&gt;
once you untarred source ( or got it from a source control ) best is to look at README provided in it.&lt;br /&gt;
&lt;br /&gt;
cat README&lt;br /&gt;
&lt;br /&gt;
where you will understand that you have to read another file INSTALL :&lt;br /&gt;
&lt;br /&gt;
cat INSTALL &lt;br /&gt;
&lt;br /&gt;
Depending on your platform you will have to pick up the right INSTALL by example INSTALL.W64.&lt;br /&gt;
Default is for Unix based systems.&lt;br /&gt;
&lt;br /&gt;
==== Quick ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;./config &amp;lt;nowiki&amp;gt;&amp;lt;options ...&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
make depend&lt;br /&gt;
make&lt;br /&gt;
make test&lt;br /&gt;
make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Various options can be found examining the &amp;lt;tt&amp;gt;Configure&amp;lt;/tt&amp;gt; file (there is a well commented block at its top). OpenSSL ships with SSLv2, SSLv3 and Compression enabled by default (see &amp;lt;tt&amp;gt;my $disabled&amp;lt;/tt&amp;gt;), so you might want to use &amp;lt;tt&amp;gt;-no-ssl2&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;-no-ssl3&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;-no-comp&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Platfom specific ==&lt;br /&gt;
&lt;br /&gt;
=== Linux ===&lt;br /&gt;
&lt;br /&gt;
==== Intel ====&lt;br /&gt;
&lt;br /&gt;
==== ARM ====&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
==== W32 / Windows NT - Windows 9x ====&lt;br /&gt;
&lt;br /&gt;
type INSTALL.W32&lt;br /&gt;
&lt;br /&gt;
* you need Perl for Win32.  Unless you will build on Cygwin, you will need ActiveState Perl, available from http://www.activestate.com/ActivePerl.&lt;br /&gt;
* one of the following C compilers:&lt;br /&gt;
** Visual C++&lt;br /&gt;
** Borland C&lt;br /&gt;
** GNU C (Cygwin or MinGW)&lt;br /&gt;
* Netwide Assembler, a.k.a. NASM, available from http://nasm.sourceforge.net/ is required if you intend to utilize assembler modules. Note that NASM is now the only supported assembler.&lt;br /&gt;
&lt;br /&gt;
==== W64 ====&lt;br /&gt;
&lt;br /&gt;
type INSTALL.W64&lt;br /&gt;
&lt;br /&gt;
basically some specific 64bits information, default Windows build information is still in INSTALL.W32&lt;br /&gt;
&lt;br /&gt;
==== Windows CE ====&lt;br /&gt;
&lt;br /&gt;
=== Mac ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== More ===&lt;br /&gt;
&lt;br /&gt;
==== VAX/VMS ====&lt;br /&gt;
&lt;br /&gt;
I you wonder what are files ending with .com like test/testca.com those are VAX/VMX scripts.&lt;br /&gt;
This code is still maintained.&lt;br /&gt;
&lt;br /&gt;
==== OS/2 ====&lt;br /&gt;
&lt;br /&gt;
==== NetWare ====&lt;br /&gt;
&lt;br /&gt;
5.x 6.x&lt;br /&gt;
&lt;br /&gt;
[[Category:Shell level]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Compilation]]&lt;/div&gt;</summary>
		<author><name>Frukto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Talk:Enc&amp;diff=1190</id>
		<title>Talk:Enc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Talk:Enc&amp;diff=1190"/>
		<updated>2013-07-06T12:07:24Z</updated>

		<summary type="html">&lt;p&gt;Frukto: /* Zlib compression */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Rarely Used -K option==&lt;br /&gt;
&lt;br /&gt;
&amp;quot;This is rarely used, normally you specify a password from which a key is derived.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Is this true? Does it not depend fairly heavily on your use case? Just not sure what the basis for this statement is.&lt;br /&gt;
&lt;br /&gt;
--[[User:Matt|Matt]] 21:39, 27 June 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
Probably you are right. Its a biased statement. I'll change it.&lt;br /&gt;
&lt;br /&gt;
--[[User:Frukto|Frukto]] 07:27, 28 June 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Zlib compression==&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Use this flag to enable zlib-compression. After a file is encrypted (and maybe base64 encoded) it will be compressed via zlib. Vice versa while decrypting, zlib will be applied first.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I think this happens the other way around. Doesn't compression occur '''before''' encryption, or '''after''' decryption? It doesn't make sense to do it the other way around - after encryption the data will appear indistinguishable from random data, and therefore should not have any appreciable ability to be compressed.&lt;br /&gt;
&lt;br /&gt;
--[[User:Matt|Matt]] 12:17, 5 July 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
Yes, i had the same question. But i tried it and it works actually like this: encryption -&amp;gt; base64 -&amp;gt; zlib&lt;br /&gt;
&lt;br /&gt;
encrypt + unzip:&lt;br /&gt;
&lt;br /&gt;
$ openssl enc -des -in message.plain -a -out message.enc -nosalt -z&lt;br /&gt;
&lt;br /&gt;
$ printf &amp;quot;\x1f\x8b\x08\x00\x00\x00\x00\x00&amp;quot; |cat - message.enc | gzip -dc &lt;br /&gt;
&lt;br /&gt;
gives the same as:&lt;br /&gt;
&lt;br /&gt;
$ openssl enc -des -in message.plain -a -out message.enc -nosalt &lt;br /&gt;
&lt;br /&gt;
--[[User:Frukto|Frukto]] 14:05, 5 July 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
Interesting. I checked the source code and you appear to be right. The manual page however says this about -z:&lt;br /&gt;
&amp;quot;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. &amp;quot;&lt;br /&gt;
&lt;br /&gt;
--[[User:Matt|Matt]] 11:41, 6 July 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
Maybe, I should file a bug? I mean as you pointed out, the point of encryption is, in some sense, to maximize entropy. It does not make sense to compress afterwards. I don't know what was intended, but as you cite (actually i didn't check) the man page, it is a bug? But obviously nobody is using it, it would have been noticed immediately.&lt;br /&gt;
&lt;br /&gt;
--[[User:Frukto|Frukto]] 12:07, 6 July 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Block size vs Key size==&lt;br /&gt;
&lt;br /&gt;
I changed references to block size to key size as I think that is what you meant. AES-256 has a 256-bit key. The block size is always 128 bits for AES.&lt;br /&gt;
&lt;br /&gt;
--[[User:Matt|Matt]] 11:41, 6 July 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
Yes sure, thx.&lt;br /&gt;
&lt;br /&gt;
--[[User:Frukto|Frukto]] 11:57, 6 July 2013 (UTC)&lt;/div&gt;</summary>
		<author><name>Frukto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Talk:Enc&amp;diff=1189</id>
		<title>Talk:Enc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Talk:Enc&amp;diff=1189"/>
		<updated>2013-07-06T12:06:58Z</updated>

		<summary type="html">&lt;p&gt;Frukto: /* Zlib compression */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Rarely Used -K option==&lt;br /&gt;
&lt;br /&gt;
&amp;quot;This is rarely used, normally you specify a password from which a key is derived.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Is this true? Does it not depend fairly heavily on your use case? Just not sure what the basis for this statement is.&lt;br /&gt;
&lt;br /&gt;
--[[User:Matt|Matt]] 21:39, 27 June 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
Probably you are right. Its a biased statement. I'll change it.&lt;br /&gt;
&lt;br /&gt;
--[[User:Frukto|Frukto]] 07:27, 28 June 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Zlib compression==&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Use this flag to enable zlib-compression. After a file is encrypted (and maybe base64 encoded) it will be compressed via zlib. Vice versa while decrypting, zlib will be applied first.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I think this happens the other way around. Doesn't compression occur '''before''' encryption, or '''after''' decryption? It doesn't make sense to do it the other way around - after encryption the data will appear indistinguishable from random data, and therefore should not have any appreciable ability to be compressed.&lt;br /&gt;
&lt;br /&gt;
--[[User:Matt|Matt]] 12:17, 5 July 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
Yes, i had the same question. But i tried it and it works actually like this: encryption -&amp;gt; base64 -&amp;gt; zlib&lt;br /&gt;
&lt;br /&gt;
encrypt + unzip:&lt;br /&gt;
&lt;br /&gt;
$ openssl enc -des -in message.plain -a -out message.enc -nosalt -z&lt;br /&gt;
&lt;br /&gt;
$ printf &amp;quot;\x1f\x8b\x08\x00\x00\x00\x00\x00&amp;quot; |cat - message.enc | gzip -dc &lt;br /&gt;
&lt;br /&gt;
gives the same as:&lt;br /&gt;
&lt;br /&gt;
$ openssl enc -des -in message.plain -a -out message.enc -nosalt &lt;br /&gt;
&lt;br /&gt;
--[[User:Frukto|Frukto]] 14:05, 5 July 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
Interesting. I checked the source code and you appear to be right. The manual page however says this about -z:&lt;br /&gt;
&amp;quot;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. &amp;quot;&lt;br /&gt;
&lt;br /&gt;
--[[User:Matt|Matt]] 11:41, 6 July 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
Maybe, I should file a bug? I mean as you pointed out, the point of encryption is, in some sense, to maximize entropy. It does not make sense to compress afterwards. I don't know what was intended, but as you cite (actually i didn't check) the man page, it is a bug? But obviously nobody is using it, it would have been noticed immediately.&lt;br /&gt;
&lt;br /&gt;
==Block size vs Key size==&lt;br /&gt;
&lt;br /&gt;
I changed references to block size to key size as I think that is what you meant. AES-256 has a 256-bit key. The block size is always 128 bits for AES.&lt;br /&gt;
&lt;br /&gt;
--[[User:Matt|Matt]] 11:41, 6 July 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
Yes sure, thx.&lt;br /&gt;
&lt;br /&gt;
--[[User:Frukto|Frukto]] 11:57, 6 July 2013 (UTC)&lt;/div&gt;</summary>
		<author><name>Frukto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Talk:Enc&amp;diff=1188</id>
		<title>Talk:Enc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Talk:Enc&amp;diff=1188"/>
		<updated>2013-07-06T11:57:03Z</updated>

		<summary type="html">&lt;p&gt;Frukto: /* Block size vs Key size */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Rarely Used -K option==&lt;br /&gt;
&lt;br /&gt;
&amp;quot;This is rarely used, normally you specify a password from which a key is derived.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Is this true? Does it not depend fairly heavily on your use case? Just not sure what the basis for this statement is.&lt;br /&gt;
&lt;br /&gt;
--[[User:Matt|Matt]] 21:39, 27 June 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
Probably you are right. Its a biased statement. I'll change it.&lt;br /&gt;
&lt;br /&gt;
--[[User:Frukto|Frukto]] 07:27, 28 June 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Zlib compression==&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Use this flag to enable zlib-compression. After a file is encrypted (and maybe base64 encoded) it will be compressed via zlib. Vice versa while decrypting, zlib will be applied first.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I think this happens the other way around. Doesn't compression occur '''before''' encryption, or '''after''' decryption? It doesn't make sense to do it the other way around - after encryption the data will appear indistinguishable from random data, and therefore should not have any appreciable ability to be compressed.&lt;br /&gt;
&lt;br /&gt;
--[[User:Matt|Matt]] 12:17, 5 July 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
Yes, i had the same question. But i tried it and it works actually like this: encryption -&amp;gt; base64 -&amp;gt; zlib&lt;br /&gt;
&lt;br /&gt;
encrypt + unzip:&lt;br /&gt;
&lt;br /&gt;
$ openssl enc -des -in message.plain -a -out message.enc -nosalt -z&lt;br /&gt;
&lt;br /&gt;
$ printf &amp;quot;\x1f\x8b\x08\x00\x00\x00\x00\x00&amp;quot; |cat - message.enc | gzip -dc &lt;br /&gt;
&lt;br /&gt;
gives the same as:&lt;br /&gt;
&lt;br /&gt;
$ openssl enc -des -in message.plain -a -out message.enc -nosalt &lt;br /&gt;
&lt;br /&gt;
--[[User:Frukto|Frukto]] 14:05, 5 July 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
Interesting. I checked the source code and you appear to be right. The manual page however says this about -z:&lt;br /&gt;
&amp;quot;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. &amp;quot;&lt;br /&gt;
&lt;br /&gt;
--[[User:Matt|Matt]] 11:41, 6 July 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Block size vs Key size==&lt;br /&gt;
&lt;br /&gt;
I changed references to block size to key size as I think that is what you meant. AES-256 has a 256-bit key. The block size is always 128 bits for AES.&lt;br /&gt;
&lt;br /&gt;
--[[User:Matt|Matt]] 11:41, 6 July 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
Yes sure, thx.&lt;br /&gt;
&lt;br /&gt;
--[[User:Frukto|Frukto]] 11:57, 6 July 2013 (UTC)&lt;/div&gt;</summary>
		<author><name>Frukto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Enc&amp;diff=1185</id>
		<title>Enc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Enc&amp;diff=1185"/>
		<updated>2013-07-06T11:22:49Z</updated>

		<summary type="html">&lt;p&gt;Frukto: Completed (and reordered) the option list, added an 'enc -K' example.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the command line tools for encryption and decryption. [[enc|Enc]] is used for various block and stream ciphers using keys based on passwords or explicitly provided. It can also be used for Base64 encoding or decoding.&lt;br /&gt;
&lt;br /&gt;
===Synopsis===&lt;br /&gt;
&lt;br /&gt;
The basic usage is to specify a ciphername and various options describing the actual task.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -ciphername [options]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can obtain an incomplete help message by using an invalid option, eg. '''-help'''. &lt;br /&gt;
&lt;br /&gt;
===Cipher alogorithms===&lt;br /&gt;
&lt;br /&gt;
To get a list of available ciphers you can use the '''list-cipher-algorithms''' command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl list-cipher-algorithms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output gives you a list of ciphers with its variations in [[block size]] and [[mode of operation]]. For example '''AES-256-CBC''' for [[AES]] with blocksize 256 in [[CBC|CBC-mode]]. Some ciphers also have short names, for example the one just mentioned is also known as '''aes256'''. These names are case insensitive. In addition '''none''' is a valid ciphername. This algorithms does nothing at all.&lt;br /&gt;
===Options===&lt;br /&gt;
The list of options is rather long.&lt;br /&gt;
&lt;br /&gt;
;-in ''filename''&lt;br /&gt;
:This specifies the input file.&lt;br /&gt;
&lt;br /&gt;
;-out ''filename''&lt;br /&gt;
:This specifies the output file. It will be created or overwritten if it already exists.&lt;br /&gt;
&lt;br /&gt;
;-e or -d&lt;br /&gt;
: This specifies whether to encrypt ('''-e''') or to decrypt ('''-d'''). Encryption is the default. Of course you have to get all the other options right in order for it to function properly. In particular it is necessary to give the correct cipher-name as well as '''-a''', '''-A''' or '''-z''' options.&lt;br /&gt;
&lt;br /&gt;
;-a, -A, -base64&lt;br /&gt;
: These flags tell OpenSSL to apply [[Base64]]-encoding before or after the cryptographic operation. The '''-a''' and '''-base64''' are equivalent. If you want to decode a base64 file it is necessary to use the '''-d''' option. By default the encoded file has a line break every 64 characters. To suppress this you can use ''in addition'' to '''-base64''' the '''-A''' flag. This will produce a file with no line breaks at all. You can use these flags just for [[#Base64 Encoding|encoding Base64]] without any ciphers involved.&lt;br /&gt;
&lt;br /&gt;
;-bufsize ''n''&lt;br /&gt;
: Specify the buffer size. This concerns only internal buffers. It has nothing to do with the cryptographic algorithms in question.&lt;br /&gt;
&lt;br /&gt;
;-debug&lt;br /&gt;
: Enable debugging output. This does not include any sensitive information. See also '''-P'''.&lt;br /&gt;
&lt;br /&gt;
;-engine ''id''&lt;br /&gt;
: Specify an [[engine]] for example to use special hardware.&lt;br /&gt;
&lt;br /&gt;
;-iv ''IV''&lt;br /&gt;
: This specifies the [[initialization vector]] ''IV'' as hexadecimal number. If not explicitly given it will be derived from the password. See key derivation for details.&lt;br /&gt;
&lt;br /&gt;
;-k ''password'',  -kfile ''filename''&lt;br /&gt;
: Both option are used to specify a password or a file containing the password which is used for key derivation. However '''they are deprecated'''. You should use the ''-pass'' option instead. The equivalents are '''-pass pass:'''''password'' and '''-pass: pass:'''''filename'' respectively. &lt;br /&gt;
&lt;br /&gt;
;-K ''key''&lt;br /&gt;
: This option allows you to set the ''key'' used for encryption or decryption. This is the key directly used by the cipher algorithm. If no key is given OpenSSL will derive it from a password. This process is described in PKCS5#5 (RFC-2898).&lt;br /&gt;
&lt;br /&gt;
;-md ''messagedigest''&lt;br /&gt;
: This specifies the message digest which is used for key derivation. It can take one of the values '''md2''', '''md5''', '''sha''' or '''sha1'''.&lt;br /&gt;
&lt;br /&gt;
;-nopad&lt;br /&gt;
: This disables standard padding.&lt;br /&gt;
&lt;br /&gt;
;-salt, -nosalt, -S ''salt''&lt;br /&gt;
: These options allow to switch [[Salt|salting]] on or off. With '''-S''' ''salt'' it is possible to explicitly give its value (in hexadecimal).   &lt;br /&gt;
&lt;br /&gt;
;-p, -P&lt;br /&gt;
: Additionally to any encryption tasks, this prints the key, initialization vector and salt value (if used). If '''-P''' is used just these values are printed, no encryption will take place.&lt;br /&gt;
&lt;br /&gt;
;-pass ''arg''&lt;br /&gt;
: This specifies the password source. Possible values for ''arg'' are '''pass:'''''password''''' or '''pass:'''''filename''''', where ''password'' is your password and ''filename'' file containing the password.&lt;br /&gt;
&lt;br /&gt;
;-z&lt;br /&gt;
: Use this flag to enable [http://www.zlib.net/ zlib-compression]. After a file is encrypted (and maybe base64 encoded) it will be compressed via zlib. Vice versa while decrypting, zlib will be applied first.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
====Base64 Encoding====&lt;br /&gt;
To encode a file ''text.plain'' you can use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -base64 -in text.plain -out text.base64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To decode a file the the decrypt option ('''-d''') has to be used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -d -base64 -in text.base64 -out text.plain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Encryption====&lt;br /&gt;
&lt;br /&gt;
=====Basic Usage=====&lt;br /&gt;
The most basic way to encrypt a file is this&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -aes256 -base64 -in some.secret -out some.secret.enc&lt;br /&gt;
enter aes-256-cbc encryption password :&lt;br /&gt;
Verifying - enter aes-256-cbc encryption password :&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It will encrypt the file ''some.secret'' using the [[AES|AES-cipher]] in [[CBC|CBC-mode]]. The result will be Base64 encoded and written to ''some.secret.enc''. OpenSSL will ask for password which is used to derive a key as well the initialization vector.&lt;br /&gt;
Since encryption is the default, it is not necessary to use the '''-e''' option.&lt;br /&gt;
&lt;br /&gt;
=====Use a given Key=====&lt;br /&gt;
&lt;br /&gt;
It also possible to specify the key directly. For most [[modes of operations]] (i.e. all non-ECB modes) it is then necessary to specify an initialization vector. Usually it is derived together with the key form a password. And as there is no password, also all salting options are obsolete.&lt;br /&gt;
&lt;br /&gt;
The key and the IV are given in hex. Their length depending on the cipher and block size in question.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -des-ecb -K e0e0e0e0f1f1f1f1 -in mesg.plain -out mesg.enc&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The key above is one of 16 [http://en.wikipedia.org/wiki/Weak_key weak DES keys]. It should not be used in practice.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Shell level]]&lt;/div&gt;</summary>
		<author><name>Frukto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Talk:Enc&amp;diff=1184</id>
		<title>Talk:Enc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Talk:Enc&amp;diff=1184"/>
		<updated>2013-07-05T14:05:13Z</updated>

		<summary type="html">&lt;p&gt;Frukto: /* Zlib compression */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Rarely Used -K option==&lt;br /&gt;
&lt;br /&gt;
&amp;quot;This is rarely used, normally you specify a password from which a key is derived.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Is this true? Does it not depend fairly heavily on your use case? Just not sure what the basis for this statement is.&lt;br /&gt;
&lt;br /&gt;
--[[User:Matt|Matt]] 21:39, 27 June 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
Probably you are right. Its a biased statement. I'll change it.&lt;br /&gt;
&lt;br /&gt;
--[[User:Frukto|Frukto]] 07:27, 28 June 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Zlib compression==&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Use this flag to enable zlib-compression. After a file is encrypted (and maybe base64 encoded) it will be compressed via zlib. Vice versa while decrypting, zlib will be applied first.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
I think this happens the other way around. Doesn't compression occur '''before''' encryption, or '''after''' decryption? It doesn't make sense to do it the other way around - after encryption the data will appear indistinguishable from random data, and therefore should not have any appreciable ability to be compressed.&lt;br /&gt;
&lt;br /&gt;
--[[User:Matt|Matt]] 12:17, 5 July 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
Yes, i had the same question. But i tried it and it works actually like this: encryption -&amp;gt; base64 -&amp;gt; zlib&lt;br /&gt;
&lt;br /&gt;
encrypt + unzip:&lt;br /&gt;
&lt;br /&gt;
$ openssl enc -des -in message.plain -a -out message.enc -nosalt -z&lt;br /&gt;
$ printf &amp;quot;\x1f\x8b\x08\x00\x00\x00\x00\x00&amp;quot; |cat - message.enc | gzip -dc &lt;br /&gt;
&lt;br /&gt;
gives the same as:&lt;br /&gt;
&lt;br /&gt;
$ openssl enc -des -in message.plain -a -out message.enc -nosalt &lt;br /&gt;
&lt;br /&gt;
--[[User:Frukto|Frukto]] 14:05, 5 July 2013 (UTC)&lt;/div&gt;</summary>
		<author><name>Frukto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Enc&amp;diff=1182</id>
		<title>Enc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Enc&amp;diff=1182"/>
		<updated>2013-07-05T11:29:56Z</updated>

		<summary type="html">&lt;p&gt;Frukto: added some more options, still some are missing&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the command line tools for encryption and decryption. [[enc|Enc]] is used for various block and stream ciphers using keys based on passwords or explicitly provided. It can also be used for Base64 encoding or decoding.&lt;br /&gt;
&lt;br /&gt;
===Synopsis===&lt;br /&gt;
&lt;br /&gt;
The basic usage is to specify a ciphername and various options describing the actual task.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -ciphername [options]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can obtain an incomplete help message by using an invalid option, eg. '''-help'''. &lt;br /&gt;
&lt;br /&gt;
===Cipher alogorithms===&lt;br /&gt;
&lt;br /&gt;
To get a list of available ciphers you can use the '''list-cipher-algorithms''' command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl list-cipher-algorithms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output gives you a list of ciphers with its variations in block size an mode of operation. For example '''AES-256-CBC''' for [[AES]] with blocksize 256 in [[CBC|CBC-mode]]. Some ciphers also have short names, for example the one just mentioned is also known as '''aes256'''. These names are case insensitive. In addition '''none''' is a valid ciphername. This algorithms does nothing at all.&lt;br /&gt;
===Options===&lt;br /&gt;
The list of options is rather long.&lt;br /&gt;
&lt;br /&gt;
;-in ''filename''&lt;br /&gt;
:This specifies the input file.&lt;br /&gt;
&lt;br /&gt;
;-out ''filename''&lt;br /&gt;
:This specifies the output file. It will be created or overwritten if it already exists.&lt;br /&gt;
&lt;br /&gt;
;-e or -d&lt;br /&gt;
: This specifies whether to encrypt ('''-e''') or to decrypt ('''-d'''). Encryption is the default. Of course you have to get all the other options right in order for it to function properly. In particular it is necessary to give the correct cipher-name as well as '''-a''', '''-A''' or '''-z''' options.&lt;br /&gt;
&lt;br /&gt;
;-base64, -a, -A&lt;br /&gt;
: These flags tell OpenSSL to apply [[Base64]]-encoding before or after the cryptographic operation. The '''-a''' and '''-base64''' are equivalent. If you want to decode a base64 file it is necessary to use the '''-d''' option. By default the encoded file has a line break every 64 characters. To suppress this you can use ''in addition'' to '''-base64''' the '''-A''' flag. This will produce a file with no line breaks at all. You can use these flags just for [[#Base64 Encoding|encoding Base64]] without any ciphers involved.&lt;br /&gt;
&lt;br /&gt;
;-pass ''arg''&lt;br /&gt;
: This specifies the password source. Possible values for ''arg'' are '''pass:'''''password''''' or '''pass:'''''filename''''', where ''password'' is your password and ''filename'' file containing the password.&lt;br /&gt;
&lt;br /&gt;
;-k ''password'',  -kfile ''filename''&lt;br /&gt;
: Both option are used to specify a password or a file containing the password which is used for key derivation. However '''they are deprecated'''. You should use the ''-pass'' option instead. The equivalents are '''-pass pass:'''''password'' and '''-pass: pass:'''''filename'' respectively. &lt;br /&gt;
&lt;br /&gt;
;-K ''key''&lt;br /&gt;
: This option allows you to set the ''key'' used for encryption or decryption. This is the key directly used by the cipher algorithm. If no key is given OpenSSL will derive it from a password. This process is described in PKCS5#5 (RFC-2898).&lt;br /&gt;
&lt;br /&gt;
;-md ''messagedigest''&lt;br /&gt;
: This specifies the message digest which is used for key derivation. It can take one of the values '''md2''', '''md5''', '''sha''' or '''sha1'''.&lt;br /&gt;
&lt;br /&gt;
;-iv ''IV''&lt;br /&gt;
: This specifies the initialization vector ''IV'' as hexadecimal number. If not explicitly given it will be derived from the password. See key derivation for details.&lt;br /&gt;
&lt;br /&gt;
;-salt, -nosalt, -S ''salt''&lt;br /&gt;
: These options allow to switch [[Salt|salting]] on or off. With '''-S''' ''salt'' it is possible to explicitly give its value (in hexadecimal).   &lt;br /&gt;
&lt;br /&gt;
;-p, -P&lt;br /&gt;
: Additionally to any encryption tasks, this prints the key, initialization vector and salt value (if used). If '''-P''' is used just these values are printed, no encryption will take place.&lt;br /&gt;
&lt;br /&gt;
;-nopad&lt;br /&gt;
: This disables standard padding.&lt;br /&gt;
&lt;br /&gt;
;-z&lt;br /&gt;
: Use this flag to enable [http://www.zlib.net/ zlib-compression]. After a file is encrypted (and maybe base64 encoded) it will be compressed via zlib. Vice versa while decrypting, zlib will be applied first.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
====Base64 Encoding====&lt;br /&gt;
To encode a file ''text.plain'' you can use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -base64 -in text.plain -out text.base64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To decode a file the the decrypt option ('''-d''') has to be used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -d -base64 -in text.base64 -out text.plain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Encryption====&lt;br /&gt;
&lt;br /&gt;
The most basic way to encrypt a file is this&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -des -base64 -in some.secret -out some.secret.enc&lt;br /&gt;
enter des-cbc encryption password :&lt;br /&gt;
Verifying - enter des-cbc encryption password :&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It will encrypt the file ''some.secret'' using the [[DES|DES-cipher]] in [[CBC|CBC-mode]]. The result will be base64 encoded and written to ''some.secret.enc''. OpenSSL will ask for password which is used to derive a key as well the [[initialization vector]].&lt;br /&gt;
Since encryption is the default, it is not necessary to use the '''-e''' option.&lt;/div&gt;</summary>
		<author><name>Frukto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Enc&amp;diff=1140</id>
		<title>Enc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Enc&amp;diff=1140"/>
		<updated>2013-06-28T07:47:37Z</updated>

		<summary type="html">&lt;p&gt;Frukto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the command line tools for encryption and decryption. [[enc|Enc]] is used for various block and stream ciphers using keys based on passwords or explicitly provided. It can also be used for Base64 encoding or decoding.&lt;br /&gt;
&lt;br /&gt;
===Synopsis===&lt;br /&gt;
&lt;br /&gt;
The basic usage is to specify a ciphername and various options describing the actual task.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -ciphername [options]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can obtain an incomplete help message by using an invalid option, eg. '''-help'''. &lt;br /&gt;
&lt;br /&gt;
===Cipher alogorithms===&lt;br /&gt;
&lt;br /&gt;
To get a list of available ciphers you can use the '''list-cipher-algorithms''' command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl list-cipher-algorithms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output gives you a list of ciphers with its variations in block size an mode of operation. For example '''AES-256-CBC''' for [[AES]] with blocksize 256 in [[CBC|CBC-mode]]. Some ciphers also have short names, for example the one just mentioned is also known as '''aes256'''. These names are case insensitive. In addition '''none''' is a valid ciphername. This algorithms does nothing at all.&lt;br /&gt;
===Options===&lt;br /&gt;
The list of options is rather long.&lt;br /&gt;
&lt;br /&gt;
;-in ''filename''&lt;br /&gt;
:This specifies the input file.&lt;br /&gt;
&lt;br /&gt;
;-out ''filename''&lt;br /&gt;
:This specifies the output file. It will be created or overwritten if it already exists.&lt;br /&gt;
&lt;br /&gt;
;-e or -d&lt;br /&gt;
: This specifies whether to encrypt ('''-e''') or to decrypt ('''-d'''). Encryption is the default. Of course you have to get all the other options right in order for it to function properly.&lt;br /&gt;
&lt;br /&gt;
;-base64, -a, -A&lt;br /&gt;
: These flags tell OpenSSL to apply [[Base64]]-encoding before or after the cryptographic operation. The '''-a''' and '''-base64''' are equivalent. If you want to decode a base64 file it is necessary to use the '''-d''' option. By default the encoded file has a line break every 64 characters. To suppress this you can use in addition to '''-base64''' the '''-A''' flag. This will produce a file with no line breaks at all. You can use these flags just for [[#Base64 Encoding|encoding Base64]] without any ciphers involved.&lt;br /&gt;
&lt;br /&gt;
;-pass ''arg''&lt;br /&gt;
: This specifies the password source.&lt;br /&gt;
&lt;br /&gt;
;-k ''password'',  -kfile ''filename''&lt;br /&gt;
: Both option are used to specify a password or a file containing the password which is used for key derivation. However '''they are deprecated'''. You should use the ''-pass'' option instead. The equivalents are '''-pass pass:'''''password'' and '''-pass: pass:'''''filename'' respectively. &lt;br /&gt;
&lt;br /&gt;
;-K ''key''&lt;br /&gt;
: This option allows you to set the ''key'' used for encryption or decryption. This is the key directly used by the cipher algorithm. If no key is given OpenSSL will derive it from a password. This process is described in PKCS5#5 (RFC-2898).&lt;br /&gt;
&lt;br /&gt;
;-iv ''IV''&lt;br /&gt;
: This specifies the initializaion vector ''IV'' as hexadecimal number. If not explicitly given it will be derived from the password. See key derivation for details.&lt;br /&gt;
&lt;br /&gt;
;-salt, -nosalt, -S ''salt''&lt;br /&gt;
: These options allow to switch [[Salt|salting]] on or off. With '''-S''' ''salt'' it is possible to explicitly give its value (in hexadecimal).   &lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
====Base64 Encoding====&lt;br /&gt;
To encode a file ''text.plain'' you can use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -base64 -in text.plain -out text.base64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To decode a file the the decrypt option ('''-d''') has to be used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -d -base64 -in text.base64 -out text.plain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Encryption====&lt;br /&gt;
&lt;br /&gt;
The most basic way to encrypt a file is this&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -des -base64 -in some.secret -out some.secret.enc&lt;br /&gt;
enter des-cbc encryption password :&lt;br /&gt;
Verifying - enter des-cbc encryption password :&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It will encrypt the file ''some.secret'' using the [[DES|DES-cipher]] in [[CBC|CBC-mode]]. The result will be base64 encoded and written to ''some.secret.enc''. OpenSSL will ask for password which is used to derive a key as well the [[initialization vector]].&lt;br /&gt;
Since encryption is the default, it is not necessary to use the '''-e''' option.&lt;/div&gt;</summary>
		<author><name>Frukto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Talk:Enc&amp;diff=1139</id>
		<title>Talk:Enc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Talk:Enc&amp;diff=1139"/>
		<updated>2013-06-28T07:27:13Z</updated>

		<summary type="html">&lt;p&gt;Frukto: /* Rarely Used -K option */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Rarely Used -K option==&lt;br /&gt;
&lt;br /&gt;
&amp;quot;This is rarely used, normally you specify a password from which a key is derived.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Is this true? Does it not depend fairly heavily on your use case? Just not sure what the basis for this statement is.&lt;br /&gt;
&lt;br /&gt;
--[[User:Matt|Matt]] 21:39, 27 June 2013 (UTC)&lt;br /&gt;
&lt;br /&gt;
Probably you are right. Its a biased statement. I'll change it.&lt;br /&gt;
&lt;br /&gt;
--[[User:Frukto|Frukto]] 07:27, 28 June 2013 (UTC)&lt;/div&gt;</summary>
		<author><name>Frukto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Enc&amp;diff=1134</id>
		<title>Enc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Enc&amp;diff=1134"/>
		<updated>2013-06-27T18:13:23Z</updated>

		<summary type="html">&lt;p&gt;Frukto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the command line tools for encryption and decryption. [[enc|Enc]] is used for various block and stream ciphers using keys based on passwords or explicitly provided. It can also be used for Base64 encoding or decoding.&lt;br /&gt;
&lt;br /&gt;
===Synopsis===&lt;br /&gt;
&lt;br /&gt;
The basic usage is to specify a ciphername and various options describing the actual task.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -ciphername [options]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can obtain an incomplete help message by using an invalid option, eg. '''-help'''. &lt;br /&gt;
&lt;br /&gt;
===Cipher alogorithms===&lt;br /&gt;
&lt;br /&gt;
To get a list of available ciphers you can use the '''list-cipher-algorithms''' command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl list-cipher-algorithms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output gives you a list of ciphers with its variations in block size an mode of operation. For example '''AES-256-CBC''' for [[AES]] with blocksize 256 in [[CBC|CBC-mode]]. Some ciphers also have short names, for example the one just mentioned is also known as '''aes256'''. These names are case insensitive. In addition '''none''' is a valid ciphername. This algorithms does nothing at all.&lt;br /&gt;
===Options===&lt;br /&gt;
The list of options is rather long.&lt;br /&gt;
&lt;br /&gt;
;-in ''filename''&lt;br /&gt;
:This specifies the input file.&lt;br /&gt;
&lt;br /&gt;
;-out ''filename''&lt;br /&gt;
:This specifies the output file. It will be created or overwritten if it already exists.&lt;br /&gt;
&lt;br /&gt;
;-e or -d&lt;br /&gt;
: This specifies whether to encrypt ('''-e''') or to decrypt ('''-d'''). Encryption is the default. Of course you have to get all the other options right in order for it to function properly.&lt;br /&gt;
&lt;br /&gt;
;-base64, -a, -A&lt;br /&gt;
: These flags tell OpenSSL to apply [[Base64]]-encoding before or after the cryptographic operation. The '''-a''' and '''-base64''' are equivalent. If you want to decode a base64 file it is necessary to use the '''-d''' option. By default the encoded file has a line break every 64 characters. To suppress this you can use in addition to '''-base64''' the '''-A''' flag. This will produce a file with no line breaks at all. You can use these flags just for [[#Base64 Encoding|encoding Base64]] without any ciphers involved.&lt;br /&gt;
&lt;br /&gt;
;-pass ''arg''&lt;br /&gt;
: This specifies the password source.&lt;br /&gt;
&lt;br /&gt;
;-k ''password'',  -kfile ''filename''&lt;br /&gt;
: Both option are used to specify a password or a file containing the password which is used for key derivation. However '''they are deprecated'''. You should use the ''-pass'' option instead. The equivalents are '''-pass pass:'''''password'' and '''-pass: pass:'''''filename'' respectively. &lt;br /&gt;
&lt;br /&gt;
;-K ''key''&lt;br /&gt;
: The options allows set the ''key'' used for encryption or decryption. This is the key directly used by the cipher algorithm. This is rarely used, normally you specify a password from which a key is derived.&lt;br /&gt;
&lt;br /&gt;
;-iv ''IV''&lt;br /&gt;
;-S ''salt'', -salt, -nosalt&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
====Base64 Encoding====&lt;br /&gt;
To encode a file ''text.plain'' you can use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -base64 -in text.plain -out text.base64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To decode a file the the decrypt option ('''-d''') has to be used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -d -base64 -in text.base64 -out text.plain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Encryption====&lt;br /&gt;
&lt;br /&gt;
The most basic way to encrypt a file is this&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -des -base64 -in some.secret -out some.secret.enc&lt;br /&gt;
enter des-cbc encryption password :&lt;br /&gt;
Verifying - enter des-cbc encryption password :&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It will encrypt the file ''some.secret'' using the [[DES|DES-cipher]] in [[CBC|CBC-mode]]. The result will be base64 encoded and written to ''some.secret.enc''. OpenSSL will ask for password which is used to derive a key as well the [[initialization vector]].&lt;br /&gt;
Since encryption is the default, it is not necessary to use the '''-e''' option.&lt;/div&gt;</summary>
		<author><name>Frukto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Standard_commands&amp;diff=1133</id>
		<title>Standard commands</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Standard_commands&amp;diff=1133"/>
		<updated>2013-06-27T10:33:41Z</updated>

		<summary type="html">&lt;p&gt;Frukto: page creation, a list of all standard commands&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The OpenSSL [[standard commands]] can be listed via&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl list-standard-commands&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Besides there are also [[cipher commands]] and [[message-digest commands]]. You can use these like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl command [options]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Options heavily depend on the command. Please consult the dedicated pages.&lt;br /&gt;
&lt;br /&gt;
===List of standard commands===&lt;br /&gt;
&lt;br /&gt;
*asn1parse&lt;br /&gt;
*ca&lt;br /&gt;
*ciphers&lt;br /&gt;
*cms&lt;br /&gt;
*crl&lt;br /&gt;
*crl2pkcs7&lt;br /&gt;
*dgst&lt;br /&gt;
*dh&lt;br /&gt;
*dhparam&lt;br /&gt;
*dsa&lt;br /&gt;
*dsaparam&lt;br /&gt;
*ec&lt;br /&gt;
*ecparam&lt;br /&gt;
*[[enc]] - encryption and decryption tasks with symmetric ciphers.&lt;br /&gt;
*engine&lt;br /&gt;
*errstr&lt;br /&gt;
*gendh&lt;br /&gt;
*gendsa&lt;br /&gt;
*genpkey&lt;br /&gt;
*genrsa&lt;br /&gt;
*nseq&lt;br /&gt;
*ocsp&lt;br /&gt;
*passwd&lt;br /&gt;
*pkcs12&lt;br /&gt;
*pkcs7&lt;br /&gt;
*pkcs8&lt;br /&gt;
*pkey&lt;br /&gt;
*pkeyparam&lt;br /&gt;
*pkeyutl&lt;br /&gt;
*prime&lt;br /&gt;
*rand&lt;br /&gt;
*req&lt;br /&gt;
*rsa&lt;br /&gt;
*rsautl&lt;br /&gt;
*s_client&lt;br /&gt;
*s_server&lt;br /&gt;
*s_time&lt;br /&gt;
*sess_id&lt;br /&gt;
*smime&lt;br /&gt;
*speed&lt;br /&gt;
*spkac&lt;br /&gt;
*srp&lt;br /&gt;
*ts&lt;br /&gt;
*verify&lt;br /&gt;
*version&lt;br /&gt;
*x509&lt;/div&gt;</summary>
		<author><name>Frukto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=User:Frukto&amp;diff=1131</id>
		<title>User:Frukto</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=User:Frukto&amp;diff=1131"/>
		<updated>2013-06-27T08:25:38Z</updated>

		<summary type="html">&lt;p&gt;Frukto: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am math student in Berlin, Germany. I'm interested in cryptography, its theory as well its real world applications. OpenSSL is a great tool but its documentation is a huge mess (yet). I donate some (rare) spare time to this wiki and hope some day OpenSSL is an excellent piece of well documented software.&lt;br /&gt;
&lt;br /&gt;
===Current Work===&lt;br /&gt;
&lt;br /&gt;
At the moment i try to get the command line documentation right. I think this is  one of the starting points to the world of OpenSSL. So its a good idea to do this properly not to scare off any interested newcomers.&lt;/div&gt;</summary>
		<author><name>Frukto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=User:Frukto&amp;diff=1130</id>
		<title>User:Frukto</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=User:Frukto&amp;diff=1130"/>
		<updated>2013-06-27T08:19:28Z</updated>

		<summary type="html">&lt;p&gt;Frukto: Created page with &amp;quot;I am math student in Berlin, Germany. I'm interested in cryptography, its theory as well its real world applications. OpenSSL is a great tool but its documentation is a huge mess…&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;I am math student in Berlin, Germany. I'm interested in cryptography, its theory as well its real world applications. OpenSSL is a great tool but its documentation is a huge mess (yet). I donate some (rare) spare time to this wiki and hope some day OpenSSL is an excellent piece of well documented software.&lt;/div&gt;</summary>
		<author><name>Frukto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Enc&amp;diff=1129</id>
		<title>Enc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Enc&amp;diff=1129"/>
		<updated>2013-06-27T08:10:51Z</updated>

		<summary type="html">&lt;p&gt;Frukto: added some more options and first examples, still a lot to do&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the command line tools for encryption and decryption. [[enc|Enc]] is used for various block and stream ciphers using keys based on passwords or explicitly provided. It can also be used for Base64 encoding or decoding.&lt;br /&gt;
&lt;br /&gt;
===Synopsis===&lt;br /&gt;
&lt;br /&gt;
The basic usage is to specify a ciphername and various options describing the actual task.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -ciphername [options]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can obtain an incomplete help message by using an invalid option, eg. '''-help'''. &lt;br /&gt;
&lt;br /&gt;
===Cipher alogorithms===&lt;br /&gt;
&lt;br /&gt;
To get a list of available ciphers you can use the '''list-cipher-algorithms''' command&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl list-cipher-algorithms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The output gives you a list of ciphers with its variations in block size an mode of operation. For example '''AES-256-CBC''' for [[AES]] with blocksize 256 in [[CBC|CBC-mode]]. Some ciphers also have short names, for example the one just mentioned is also known as '''aes256'''. These names are case insensitive. In addition '''none''' is a valid ciphername. This algorithms does nothing at all.&lt;br /&gt;
===Options===&lt;br /&gt;
The list of options is rather long.&lt;br /&gt;
&lt;br /&gt;
;-in ''filename''&lt;br /&gt;
:This specifies the input file.&lt;br /&gt;
&lt;br /&gt;
;-out ''filename''&lt;br /&gt;
:This specifies the output file. It will be created or overwritten if all ready existent.&lt;br /&gt;
&lt;br /&gt;
;-e or -d&lt;br /&gt;
: This specifies whether to encrypt ('''-e''') or to decrypt ('''-d'''). Encryption is the default. Of course yo have to got all other options right in order function properly.&lt;br /&gt;
&lt;br /&gt;
;-base64, -a, -A&lt;br /&gt;
: These flags tell OpenSSL to apply [[Base64]]-encoding before or after the cryptographic operation. The '''-a''' and '''-base64''' are equivalent. If you want to decode a base64 file it necessary to use the '''-d''' option. By default the encoded file has a line break every 64 characters. To suppress this you can use in addition to '''-base64''' the '''-A''' flag. This will produce a file with no line breaks at all. You can use these flags just for [[#Base64 Encoding|encoding Base64]] without any ciphers involved.&lt;br /&gt;
&lt;br /&gt;
;-pass '''arg'''&lt;br /&gt;
: This specifies the password source.&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
====Base64 Encoding====&lt;br /&gt;
To encode a file ''text.plain'' you can use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -base64 -in text.plain -out text.base64&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To decode a file the the decrypt option ('''-d''') has to be used&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -d -base64 -in text.base64 -out text.plain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Frukto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Enc&amp;diff=1128</id>
		<title>Enc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Enc&amp;diff=1128"/>
		<updated>2013-06-26T17:18:17Z</updated>

		<summary type="html">&lt;p&gt;Frukto: Page creation, its just the beginning. I started by listing some options. more will follow soon&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page describes the command line tools for encryption and decryption. [[enc|Enc]] is used for various block and stream ciphers using keys based on passwords or explicitly provided. It can also be used for Base64 encoding or decoding.&lt;br /&gt;
&lt;br /&gt;
===Synopsis===&lt;br /&gt;
&lt;br /&gt;
The basic usage is to specify a ciphername and various options describing the actual task.&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl enc -ciphername [options]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;br /&gt;
The list of options is rather long.&lt;br /&gt;
&lt;br /&gt;
====-in ''filename''====&lt;br /&gt;
This specifies the input file.&lt;br /&gt;
&lt;br /&gt;
====-out ''filename''====&lt;br /&gt;
This specifies the output file. It will be created or overwritten if all ready existent.&lt;/div&gt;</summary>
		<author><name>Frukto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Command_Line_Utilities&amp;diff=1127</id>
		<title>Command Line Utilities</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Command_Line_Utilities&amp;diff=1127"/>
		<updated>2013-06-26T16:57:31Z</updated>

		<summary type="html">&lt;p&gt;Frukto: inserted link to the 'enc' page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://www.openssl.org/docs/apps/openssl.html OpenSSL site command line tools]&lt;br /&gt;
&lt;br /&gt;
=== Getting started with your openssl toolkit ===&lt;br /&gt;
&lt;br /&gt;
When installed on your system openssl binary (usually /usr/bin/openssl on linux) is an entry point for many functions. You call it following the pattern&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl command [ command_opts ] [ command_args ] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively you can call it without arguments to enter the interactive mode with an 'OpenSSL&amp;gt;' prompt. Then you can directly type your commands. You can leave the interactive mode with Ctrl+C or Ctrl+D or by typing 'quit':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
OpenSSL&amp;gt; quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are three different kinds of commands. These are [[standard commands]], [[cipher commands]], and [[message-digest commands]]. In the following an overview over some commands is given. These are grouped by purpose and not necessarily by the classification just mentioned.&lt;br /&gt;
&lt;br /&gt;
=== Learn about your installation ===&lt;br /&gt;
&lt;br /&gt;
==== List commands by type ====&lt;br /&gt;
&lt;br /&gt;
You can get a list of available commands by calling&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl list-standard-commands&lt;br /&gt;
$ openssl list-cipher-commands&lt;br /&gt;
$ openssl list-message-digest-commands&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== version ====&lt;br /&gt;
&lt;br /&gt;
OpenSSL&amp;gt; version&lt;br /&gt;
OpenSSL 1.0.1e 11 Feb 2013&lt;br /&gt;
&lt;br /&gt;
==== ciphers ====&lt;br /&gt;
&lt;br /&gt;
returns SSL/TLS ciphers supported.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
OpenSSL&amp;gt; ciphers&lt;br /&gt;
ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:SRP-DSS-AES-256-CBC-SHA:SRP-RSA-AES-256-CBC-SHA:DHE-DSS-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA256:DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:DHE-RSA-CAMELLIA256-SHA:DHE-DSS-CAMELLIA256-SHA:ECDH-RSA-AES256-GCM-SHA384:ECDH-ECDSA-AES256-GCM-SHA384:ECDH-RSA-AES256-SHA384:ECDH-ECDSA-AES256-SHA384:ECDH-RSA-AES256-SHA:ECDH-ECDSA-AES256-SHA:AES256-GCM-SHA384:AES256-SHA256:AES256-SHA:CAMELLIA256-SHA:PSK-AES256-CBC-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:SRP-DSS-3DES-EDE-CBC-SHA:SRP-RSA-3DES-EDE-CBC-SHA:EDH-RSA-DES-CBC3-SHA:EDH-DSS-DES-CBC3-SHA:ECDH-RSA-DES-CBC3-SHA:ECDH-ECDSA-DES-CBC3-SHA:DES-CBC3-SHA:PSK-3DES-EDE-CBC-SHA:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:SRP-DSS-AES-128-CBC-SHA:SRP-RSA-AES-128-CBC-SHA:DHE-DSS-AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-SHA256:DHE-DSS-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA:DHE-RSA-SEED-SHA:DHE-DSS-SEED-SHA:DHE-RSA-CAMELLIA128-SHA:DHE-DSS-CAMELLIA128-SHA:ECDH-RSA-AES128-GCM-SHA256:ECDH-ECDSA-AES128-GCM-SHA256:ECDH-RSA-AES128-SHA256:ECDH-ECDSA-AES128-SHA256:ECDH-RSA-AES128-SHA:ECDH-ECDSA-AES128-SHA:AES128-GCM-SHA256:AES128-SHA256:AES128-SHA:SEED-SHA:CAMELLIA128-SHA:PSK-AES128-CBC-SHA:ECDHE-RSA-RC4-SHA:ECDHE-ECDSA-RC4-SHA:ECDH-RSA-RC4-SHA:ECDH-ECDSA-RC4-SHA:RC4-SHA:RC4-MD5:PSK-RC4-SHA:EDH-RSA-DES-CBC-SHA:EDH-DSS-DES-CBC-SHA:DES-CBC-SHA:EXP-EDH-RSA-DES-CBC-SHA:EXP-EDH-DSS-DES-CBC-SHA:EXP-DES-CBC-SHA:EXP-RC2-CBC-MD5:EXP-RC4-MD5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
openssl list-cipher-algorithms&lt;br /&gt;
&lt;br /&gt;
openssl list-public-key-algorithms&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Name: OpenSSL RSA method&lt;br /&gt;
	Type: Builtin Algorithm&lt;br /&gt;
	OID: rsaEncryption&lt;br /&gt;
	PEM string: RSA&lt;br /&gt;
Name: rsa&lt;br /&gt;
	Type: Alias to rsaEncryption&lt;br /&gt;
Name: OpenSSL PKCS#3 DH method&lt;br /&gt;
	Type: Builtin Algorithm&lt;br /&gt;
	OID: dhKeyAgreement&lt;br /&gt;
	PEM string: DH&lt;br /&gt;
Name: dsaWithSHA&lt;br /&gt;
	Type: Alias to dsaEncryption&lt;br /&gt;
Name: dsaEncryption-old&lt;br /&gt;
	Type: Alias to dsaEncryption&lt;br /&gt;
Name: dsaWithSHA1-old&lt;br /&gt;
	Type: Alias to dsaEncryption&lt;br /&gt;
Name: dsaWithSHA1&lt;br /&gt;
	Type: Alias to dsaEncryption&lt;br /&gt;
Name: OpenSSL DSA method&lt;br /&gt;
	Type: Builtin Algorithm&lt;br /&gt;
	OID: dsaEncryption&lt;br /&gt;
	PEM string: DSA&lt;br /&gt;
Name: OpenSSL EC algorithm&lt;br /&gt;
	Type: Builtin Algorithm&lt;br /&gt;
	OID: id-ecPublicKey&lt;br /&gt;
	PEM string: EC&lt;br /&gt;
Name: OpenSSL HMAC method&lt;br /&gt;
	Type: Builtin Algorithm&lt;br /&gt;
	OID: hmac&lt;br /&gt;
	PEM string: HMAC&lt;br /&gt;
Name: OpenSSL CMAC method&lt;br /&gt;
	Type: Builtin Algorithm&lt;br /&gt;
	OID: cmac&lt;br /&gt;
	PEM string: CMAC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== engine ====&lt;br /&gt;
&lt;br /&gt;
OpenSSL&amp;gt; engine&lt;br /&gt;
(rsax) RSAX engine support&lt;br /&gt;
(dynamic) Dynamic engine loading support&lt;br /&gt;
&lt;br /&gt;
==== speed ====&lt;br /&gt;
&lt;br /&gt;
returns informations of toolkit performance on cryptographic functions computations.&lt;br /&gt;
&lt;br /&gt;
( Ex: on Linux 3.1.0-1-amd64 #1 SMP x86_64 GNU/Linux, HP dv7 i7 4Gb )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Doing md4 for 3s on 16 size blocks: 12430613 md4's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing md5 for 3s on 16 size blocks: 8943943 md5's in 2.99s&lt;br /&gt;
Doing md5 for 3s on 64 size blocks: 6560162 md5's in 3.00s&lt;br /&gt;
Doing md5 for 3s on 256 size blocks: 3674563 md5's in 3.00s&lt;br /&gt;
Doing md5 for 3s on 1024 size blocks: 1325803 md5's in 3.00s&lt;br /&gt;
Doing md5 for 3s on 8192 size blocks: 190271 md5's in 3.00s&lt;br /&gt;
Doing hmac(md5) for 3s on 16 size blocks: 7289025 hmac(md5)'s in 3.00s&lt;br /&gt;
Doing hmac(md5) for 3s on 64 size blocks: 5519732 hmac(md5)'s in 3.00s&lt;br /&gt;
Doing hmac(md5) for 3s on 256 size blocks: 3319123 hmac(md5)'s in 3.00s&lt;br /&gt;
Doing hmac(md5) for 3s on 1024 size blocks: 1275475 hmac(md5)'s in 3.00s&lt;br /&gt;
Doing hmac(md5) for 3s on 8192 size blocks: 187134 hmac(md5)'s in 3.00s&lt;br /&gt;
Doing sha1 for 3s on 16 size blocks: 10089842 sha1's in 2.99s&lt;br /&gt;
Doing sha1 for 3s on 64 size blocks: 7033355 sha1's in 3.00s&lt;br /&gt;
Doing sha1 for 3s on 256 size blocks: 3919372 sha1's in 3.00s&lt;br /&gt;
Doing sha1 for 3s on 1024 size blocks: 1374314 sha1's in 3.00s&lt;br /&gt;
Doing sha1 for 3s on 8192 size blocks: 198808 sha1's in 3.00s&lt;br /&gt;
Doing sha256 for 3s on 16 size blocks: 6462822 sha256's in 3.00s&lt;br /&gt;
Doing sha256 for 3s on 64 size blocks: 3504641 sha256's in 3.00s&lt;br /&gt;
Doing sha256 for 3s on 256 size blocks: 1486771 sha256's in 3.00s&lt;br /&gt;
Doing sha256 for 3s on 1024 size blocks: 440613 sha256's in 3.00s&lt;br /&gt;
Doing sha256 for 3s on 8192 size blocks: 58418 sha256's in 3.00s&lt;br /&gt;
Doing sha512 for 3s on 16 size blocks: 5040453 sha512's in 2.99s&lt;br /&gt;
Doing sha512 for 3s on 64 size blocks: 5089425 sha512's in 3.00s&lt;br /&gt;
Doing sha512 for 3s on 256 size blocks: 1865240 sha512's in 3.00s&lt;br /&gt;
Doing sha512 for 3s on 1024 size blocks: 643708 sha512's in 3.00s&lt;br /&gt;
Doing sha512 for 3s on 8192 size blocks: 90615 sha512's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing whirlpool for 3s on 8192 size blocks: 33204 whirlpool's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing rmd160 for 3s on 8192 size blocks: 66719 rmd160's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing rc4 for 3s on 8192 size blocks: 238972 rc4's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing des cbc for 3s on 8192 size blocks: 19837 des cbc's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing des ede3 for 3s on 8192 size blocks: 7706 des ede3's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing aes-128 cbc for 3s on 8192 size blocks: 35217 aes-128 cbc's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing aes-192 cbc for 3s on 8192 size blocks: 29225 aes-192 cbc's in 3.01s&lt;br /&gt;
...&lt;br /&gt;
Doing aes-256 cbc for 3s on 8192 size blocks: 24414 aes-256 cbc's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing aes-256 ige for 3s on 8192 size blocks: 23331 aes-256 ige's in 2.99s&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Basic encryption ===&lt;br /&gt;
&lt;br /&gt;
The command for encryption operations is [[enc|openssl enc]]&lt;br /&gt;
&lt;br /&gt;
==== Basic file ====&lt;br /&gt;
&lt;br /&gt;
to cipher a file or data to protect and share it protected by a shared key.&lt;br /&gt;
&lt;br /&gt;
symetric cipher :&lt;br /&gt;
[[AES]] [[Blowfish]] [[RC4]] [[3DES]] [[RC2]] [[DES]] [[CAST5]] [[SEED]]&lt;br /&gt;
&lt;br /&gt;
block to stream conversion :&lt;br /&gt;
[[ECB]] [[CBC]] [[OFB]] [[CFB]] [[CTR]] [[XTS]] [[GCM]]&lt;br /&gt;
&lt;br /&gt;
compression :&lt;br /&gt;
[[ZLIB]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Cipher commands (see the `enc' command for more details)&lt;br /&gt;
aes-128-cbc       aes-128-ecb       aes-192-cbc       aes-192-ecb       &lt;br /&gt;
aes-256-cbc       aes-256-ecb       base64            bf                &lt;br /&gt;
bf-cbc            bf-cfb            bf-ecb            bf-ofb            &lt;br /&gt;
camellia-128-cbc  camellia-128-ecb  camellia-192-cbc  camellia-192-ecb  &lt;br /&gt;
camellia-256-cbc  camellia-256-ecb  cast              cast-cbc          &lt;br /&gt;
cast5-cbc         cast5-cfb         cast5-ecb         cast5-ofb         &lt;br /&gt;
des               des-cbc           des-cfb           des-ecb           &lt;br /&gt;
des-ede           des-ede-cbc       des-ede-cfb       des-ede-ofb       &lt;br /&gt;
des-ede3          des-ede3-cbc      des-ede3-cfb      des-ede3-ofb      &lt;br /&gt;
des-ofb           des3              desx              rc2               &lt;br /&gt;
rc2-40-cbc        rc2-64-cbc        rc2-cbc           rc2-cfb           &lt;br /&gt;
rc2-ecb           rc2-ofb           rc4               rc4-40            &lt;br /&gt;
seed              seed-cbc          seed-cfb          seed-ecb          &lt;br /&gt;
seed-ofb          zlib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl enc --help&lt;br /&gt;
unknown option '--help'&lt;br /&gt;
options are&lt;br /&gt;
-in &amp;lt;file&amp;gt;     input file&lt;br /&gt;
-out &amp;lt;file&amp;gt;    output file&lt;br /&gt;
-pass &amp;lt;arg&amp;gt;    pass phrase source&lt;br /&gt;
-e             encrypt&lt;br /&gt;
-d             decrypt&lt;br /&gt;
-a/-base64     base64 encode/decode, depending on encryption flag&lt;br /&gt;
-k             passphrase is the next argument&lt;br /&gt;
-kfile         passphrase is the first line of the file argument&lt;br /&gt;
-md            the next argument is the md to use to create a key&lt;br /&gt;
                 from a passphrase.  One of md2, md5, sha or sha1&lt;br /&gt;
-S             salt in hex is the next argument&lt;br /&gt;
-K/-iv         key/iv in hex is the next argument&lt;br /&gt;
-[pP]          print the iv/key (then exit if -P)&lt;br /&gt;
-bufsize &amp;lt;n&amp;gt;   buffer size&lt;br /&gt;
-nopad         disable standard block padding&lt;br /&gt;
-engine e      use engine e, possibly a hardware device.&lt;br /&gt;
Cipher Types&lt;br /&gt;
-aes-128-cbc               -aes-128-cfb               -aes-128-cfb1             &lt;br /&gt;
-aes-128-cfb8              -aes-128-ctr               -aes-128-ecb              &lt;br /&gt;
-aes-128-gcm               -aes-128-ofb               -aes-128-xts              &lt;br /&gt;
-aes-192-cbc               -aes-192-cfb               -aes-192-cfb1             &lt;br /&gt;
-aes-192-cfb8              -aes-192-ctr               -aes-192-ecb              &lt;br /&gt;
-aes-192-gcm               -aes-192-ofb               -aes-256-cbc              &lt;br /&gt;
-aes-256-cfb               -aes-256-cfb1              -aes-256-cfb8             &lt;br /&gt;
-aes-256-ctr               -aes-256-ecb               -aes-256-gcm              &lt;br /&gt;
-aes-256-ofb               -aes-256-xts               -aes128                   &lt;br /&gt;
-aes192                    -aes256                    -bf                       &lt;br /&gt;
-bf-cbc                    -bf-cfb                    -bf-ecb                   &lt;br /&gt;
-bf-ofb                    -blowfish                  -camellia-128-cbc         &lt;br /&gt;
-camellia-128-cfb          -camellia-128-cfb1         -camellia-128-cfb8        &lt;br /&gt;
-camellia-128-ecb          -camellia-128-ofb          -camellia-192-cbc         &lt;br /&gt;
-camellia-192-cfb          -camellia-192-cfb1         -camellia-192-cfb8        &lt;br /&gt;
-camellia-192-ecb          -camellia-192-ofb          -camellia-256-cbc         &lt;br /&gt;
-camellia-256-cfb          -camellia-256-cfb1         -camellia-256-cfb8        &lt;br /&gt;
-camellia-256-ecb          -camellia-256-ofb          -camellia128              &lt;br /&gt;
-camellia192               -camellia256               -cast                     &lt;br /&gt;
-cast-cbc                  -cast5-cbc                 -cast5-cfb                &lt;br /&gt;
-cast5-ecb                 -cast5-ofb                 -des                      &lt;br /&gt;
-des-cbc                   -des-cfb                   -des-cfb1                 &lt;br /&gt;
-des-cfb8                  -des-ecb                   -des-ede                  &lt;br /&gt;
-des-ede-cbc               -des-ede-cfb               -des-ede-ofb              &lt;br /&gt;
-des-ede3                  -des-ede3-cbc              -des-ede3-cfb             &lt;br /&gt;
-des-ede3-cfb1             -des-ede3-cfb8             -des-ede3-ofb             &lt;br /&gt;
-des-ofb                   -des3                      -desx                     &lt;br /&gt;
-desx-cbc                  -id-aes128-GCM             -id-aes192-GCM            &lt;br /&gt;
-id-aes256-GCM             -rc2                       -rc2-40-cbc               &lt;br /&gt;
-rc2-64-cbc                -rc2-cbc                   -rc2-cfb                  &lt;br /&gt;
-rc2-ecb                   -rc2-ofb                   -rc4                      &lt;br /&gt;
-rc4-40                    -rc4-hmac-md5              -seed                     &lt;br /&gt;
-seed-cbc                  -seed-cfb                  -seed-ecb                 &lt;br /&gt;
-seed-ofb  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Mail / SMIME ====&lt;br /&gt;
&lt;br /&gt;
===== smime v2 pkcs7 1.5 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl smime --help&lt;br /&gt;
Usage smime [options] cert.pem ...&lt;br /&gt;
where options are&lt;br /&gt;
-encrypt       encrypt message&lt;br /&gt;
-decrypt       decrypt encrypted message&lt;br /&gt;
-sign          sign message&lt;br /&gt;
-verify        verify signed message&lt;br /&gt;
-pk7out        output PKCS#7 structure&lt;br /&gt;
-des3          encrypt with triple DES&lt;br /&gt;
-des           encrypt with DES&lt;br /&gt;
-seed          encrypt with SEED&lt;br /&gt;
-rc2-40        encrypt with RC2-40 (default)&lt;br /&gt;
-rc2-64        encrypt with RC2-64&lt;br /&gt;
-rc2-128       encrypt with RC2-128&lt;br /&gt;
-aes128, -aes192, -aes256&lt;br /&gt;
               encrypt PEM output with cbc aes&lt;br /&gt;
-camellia128, -camellia192, -camellia256&lt;br /&gt;
               encrypt PEM output with cbc camellia&lt;br /&gt;
-nointern      don't search certificates in message for signer&lt;br /&gt;
-nosigs        don't verify message signature&lt;br /&gt;
-noverify      don't verify signers certificate&lt;br /&gt;
-nocerts       don't include signers certificate when signing&lt;br /&gt;
-nodetach      use opaque signing&lt;br /&gt;
-noattr        don't include any signed attributes&lt;br /&gt;
-binary        don't translate message to text&lt;br /&gt;
-certfile file other certificates file&lt;br /&gt;
-signer file   signer certificate file&lt;br /&gt;
-recip  file   recipient certificate file for decryption&lt;br /&gt;
-in file       input file&lt;br /&gt;
-inform arg    input format SMIME (default), PEM or DER&lt;br /&gt;
-inkey file    input private key (if not signer or recipient)&lt;br /&gt;
-keyform arg   input private key format (PEM or ENGINE)&lt;br /&gt;
-out file      output file&lt;br /&gt;
-outform arg   output format SMIME (default), PEM or DER&lt;br /&gt;
-content file  supply or override content for detached signature&lt;br /&gt;
-to addr       to address&lt;br /&gt;
-from ad       from address&lt;br /&gt;
-subject s     subject&lt;br /&gt;
-text          include or delete text MIME headers&lt;br /&gt;
-CApath dir    trusted certificates directory&lt;br /&gt;
-CAfile file   trusted certificates file&lt;br /&gt;
-crl_check     check revocation status of signer's certificate using CRLs&lt;br /&gt;
-crl_check_all check revocation status of signer's certificate chain using CRLs&lt;br /&gt;
-engine e      use engine e, possibly a hardware device.&lt;br /&gt;
-passin arg    input file pass phrase source&lt;br /&gt;
-rand file:file:...&lt;br /&gt;
               load the file (or the files in the directory) into&lt;br /&gt;
               the random number generator&lt;br /&gt;
cert.pem       recipient certificate(s) for encryption&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== smime v3 cms =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl cms --help&lt;br /&gt;
Usage cms [options] cert.pem ...&lt;br /&gt;
where options are&lt;br /&gt;
-encrypt       encrypt message&lt;br /&gt;
-decrypt       decrypt encrypted message&lt;br /&gt;
-sign          sign message&lt;br /&gt;
-verify        verify signed message&lt;br /&gt;
-cmsout        output CMS structure&lt;br /&gt;
-des3          encrypt with triple DES&lt;br /&gt;
-des           encrypt with DES&lt;br /&gt;
-seed          encrypt with SEED&lt;br /&gt;
-rc2-40        encrypt with RC2-40 (default)&lt;br /&gt;
-rc2-64        encrypt with RC2-64&lt;br /&gt;
-rc2-128       encrypt with RC2-128&lt;br /&gt;
-aes128, -aes192, -aes256&lt;br /&gt;
               encrypt PEM output with cbc aes&lt;br /&gt;
-camellia128, -camellia192, -camellia256&lt;br /&gt;
               encrypt PEM output with cbc camellia&lt;br /&gt;
-nointern      don't search certificates in message for signer&lt;br /&gt;
-nosigs        don't verify message signature&lt;br /&gt;
-noverify      don't verify signers certificate&lt;br /&gt;
-nocerts       don't include signers certificate when signing&lt;br /&gt;
-nodetach      use opaque signing&lt;br /&gt;
-noattr        don't include any signed attributes&lt;br /&gt;
-binary        don't translate message to text&lt;br /&gt;
-certfile file other certificates file&lt;br /&gt;
-certsout file certificate output file&lt;br /&gt;
-signer file   signer certificate file&lt;br /&gt;
-recip  file   recipient certificate file for decryption&lt;br /&gt;
-keyid         use subject key identifier&lt;br /&gt;
-in file       input file&lt;br /&gt;
-inform arg    input format SMIME (default), PEM or DER&lt;br /&gt;
-inkey file    input private key (if not signer or recipient)&lt;br /&gt;
-keyform arg   input private key format (PEM or ENGINE)&lt;br /&gt;
-out file      output file&lt;br /&gt;
-outform arg   output format SMIME (default), PEM or DER&lt;br /&gt;
-content file  supply or override content for detached signature&lt;br /&gt;
-to addr       to address&lt;br /&gt;
-from ad       from address&lt;br /&gt;
-subject s     subject&lt;br /&gt;
-text          include or delete text MIME headers&lt;br /&gt;
-CApath dir    trusted certificates directory&lt;br /&gt;
-CAfile file   trusted certificates file&lt;br /&gt;
-crl_check     check revocation status of signer's certificate using CRLs&lt;br /&gt;
-crl_check_all check revocation status of signer's certificate chain using CRLs&lt;br /&gt;
-engine e      use engine e, possibly a hardware device.&lt;br /&gt;
-passin arg    input file pass phrase source&lt;br /&gt;
-rand file:file:...&lt;br /&gt;
               load the file (or the files in the directory) into&lt;br /&gt;
               the random number generator&lt;br /&gt;
cert.pem       recipient certificate(s) for encryption&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create / Handle Public Key Certificates ===&lt;br /&gt;
&lt;br /&gt;
This requires you have a knowledge of what PKI is ( Certificate Authorities, Certificate Request, Certificate, Public Key, Private Key )&lt;br /&gt;
&lt;br /&gt;
Classical use case is to obtain a valid Certificate for a Secured Web site ( https protocol ).&lt;br /&gt;
First you create a Private Key ( will be created together with Public key ).&lt;br /&gt;
Then create a Certificate Request for that private key with some informations for purpose of future Certificate.&lt;br /&gt;
Then send that Certificate Request to a Certificate Authority ( CA ) that will issue a Certificate that CA signed. For well known CA you need to pay. &lt;br /&gt;
Up to you to install your Private key together with the received Certificate on your system. &lt;br /&gt;
&lt;br /&gt;
It exists graphical front-end to operate openssl wihtin a GUI : [http://xca.sourceforge.net/ XCA]&lt;br /&gt;
&lt;br /&gt;
==== Key Generation ====&lt;br /&gt;
&lt;br /&gt;
===== rsa / genrsa =====&lt;br /&gt;
&lt;br /&gt;
RSA is the most common type of Public/Private Key.&lt;br /&gt;
Private Key part should never be disclosed while public key part is ... public.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl genrsa --help&lt;br /&gt;
usage: genrsa [args] [numbits]&lt;br /&gt;
 -des            encrypt the generated key with DES in cbc mode&lt;br /&gt;
 -des3           encrypt the generated key with DES in ede cbc mode (168 bit key)&lt;br /&gt;
 -seed&lt;br /&gt;
                 encrypt PEM output with cbc seed&lt;br /&gt;
 -aes128, -aes192, -aes256&lt;br /&gt;
                 encrypt PEM output with cbc aes&lt;br /&gt;
 -camellia128, -camellia192, -camellia256&lt;br /&gt;
                 encrypt PEM output with cbc camellia&lt;br /&gt;
 -out file       output the key to 'file&lt;br /&gt;
 -passout arg    output file pass phrase source&lt;br /&gt;
 -f4             use F4 (0x10001) for the E value&lt;br /&gt;
 -3              use 3 for the E value&lt;br /&gt;
 -engine e       use engine e, possibly a hardware device.&lt;br /&gt;
 -rand file:file:...&lt;br /&gt;
                 load the file (or the files in the directory) into&lt;br /&gt;
                 the random number generator&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rsa help&lt;br /&gt;
unknown option help&lt;br /&gt;
rsa [options] &amp;lt;infile &amp;gt;outfile&lt;br /&gt;
where options are&lt;br /&gt;
 -inform arg     input format - one of DER NET PEM&lt;br /&gt;
 -outform arg    output format - one of DER NET PEM&lt;br /&gt;
 -in arg         input file&lt;br /&gt;
 -sgckey         Use IIS SGC key format&lt;br /&gt;
 -passin arg     input file pass phrase source&lt;br /&gt;
 -out arg        output file&lt;br /&gt;
 -passout arg    output file pass phrase source&lt;br /&gt;
 -des            encrypt PEM output with cbc des&lt;br /&gt;
 -des3           encrypt PEM output with ede cbc des using 168 bit key&lt;br /&gt;
 -seed           encrypt PEM output with cbc seed&lt;br /&gt;
 -aes128, -aes192, -aes256&lt;br /&gt;
                 encrypt PEM output with cbc aes&lt;br /&gt;
 -camellia128, -camellia192, -camellia256&lt;br /&gt;
                 encrypt PEM output with cbc camellia&lt;br /&gt;
 -text           print the key in text&lt;br /&gt;
 -noout          don't print key out&lt;br /&gt;
 -modulus        print the RSA key modulus&lt;br /&gt;
 -check          verify key consistency&lt;br /&gt;
 -pubin          expect a public key in input file&lt;br /&gt;
 -pubout         output a public key&lt;br /&gt;
 -engine e       use engine e, possibly a hardware device.&lt;br /&gt;
error in rsa&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== dsa / gendsa=====&lt;br /&gt;
&lt;br /&gt;
dsa is a less common Public/Private key scheme, but can be seen anyway, so ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl gendsa&lt;br /&gt;
usage: gendsa [args] dsaparam-file&lt;br /&gt;
 -out file - output the key to 'file'&lt;br /&gt;
 -des      - encrypt the generated key with DES in cbc mode&lt;br /&gt;
 -des3     - encrypt the generated key with DES in ede cbc mode (168 bit key)&lt;br /&gt;
 -seed&lt;br /&gt;
                 encrypt PEM output with cbc seed&lt;br /&gt;
 -aes128, -aes192, -aes256&lt;br /&gt;
                 encrypt PEM output with cbc aes&lt;br /&gt;
 -camellia128, -camellia192, -camellia256&lt;br /&gt;
                 encrypt PEM output with cbc camellia&lt;br /&gt;
 -engine e - use engine e, possibly a hardware device.&lt;br /&gt;
 -rand file:file:...&lt;br /&gt;
           - load the file (or the files in the directory) into&lt;br /&gt;
             the random number generator&lt;br /&gt;
 dsaparam-file&lt;br /&gt;
           - a DSA parameter file as generated by the dsaparam command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
OpenSSL&amp;gt; dsa help&lt;br /&gt;
unknown option help&lt;br /&gt;
dsa [options] &amp;lt;infile &amp;gt;outfile&lt;br /&gt;
where options are&lt;br /&gt;
 -inform arg     input format - DER or PEM&lt;br /&gt;
 -outform arg    output format - DER or PEM&lt;br /&gt;
 -in arg         input file&lt;br /&gt;
 -passin arg     input file pass phrase source&lt;br /&gt;
 -out arg        output file&lt;br /&gt;
 -passout arg    output file pass phrase source&lt;br /&gt;
 -engine e       use engine e, possibly a hardware device.&lt;br /&gt;
 -des            encrypt PEM output with cbc des&lt;br /&gt;
 -des3           encrypt PEM output with ede cbc des using 168 bit key&lt;br /&gt;
 -aes128, -aes192, -aes256&lt;br /&gt;
                 encrypt PEM output with cbc aes&lt;br /&gt;
 -camellia128, -camellia192, -camellia256&lt;br /&gt;
                 encrypt PEM output with cbc camellia&lt;br /&gt;
 -seed           encrypt PEM output with cbc seed&lt;br /&gt;
 -text           print the key in text&lt;br /&gt;
 -noout          don't print key out&lt;br /&gt;
 -modulus        print the DSA public value&lt;br /&gt;
error in dsa&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Elliptic Curves / ec ecparam =====&lt;br /&gt;
&lt;br /&gt;
[[Elliptic_Curve_Cryptography]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl ecparam --help&lt;br /&gt;
unknown option --help&lt;br /&gt;
ecparam [options] &amp;lt;infile &amp;gt;outfile&lt;br /&gt;
where options are&lt;br /&gt;
 -inform arg       input format - default PEM (DER or PEM)&lt;br /&gt;
 -outform arg      output format - default PEM&lt;br /&gt;
 -in  arg          input file  - default stdin&lt;br /&gt;
 -out arg          output file - default stdout&lt;br /&gt;
 -noout            do not print the ec parameter&lt;br /&gt;
 -text             print the ec parameters in text form&lt;br /&gt;
 -check            validate the ec parameters&lt;br /&gt;
 -C                print a 'C' function creating the parameters&lt;br /&gt;
 -name arg         use the ec parameters with 'short name' name&lt;br /&gt;
 -list_curves      prints a list of all currently available curve 'short names'&lt;br /&gt;
 -conv_form arg    specifies the point conversion form &lt;br /&gt;
                   possible values: compressed&lt;br /&gt;
                                    uncompressed (default)&lt;br /&gt;
                                    hybrid&lt;br /&gt;
 -param_enc arg    specifies the way the ec parameters are encoded&lt;br /&gt;
                   in the asn1 der encoding&lt;br /&gt;
                   possible values: named_curve (default)&lt;br /&gt;
                                    explicit&lt;br /&gt;
 -no_seed          if 'explicit' parameters are chosen do not use the seed&lt;br /&gt;
 -genkey           generate ec key&lt;br /&gt;
 -rand file        files to use for random number input&lt;br /&gt;
 -engine e         use engine e, possibly a hardware device&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ec [options] &amp;lt;infile &amp;gt;outfile&lt;br /&gt;
where options are&lt;br /&gt;
 -inform arg     input format - DER or PEM&lt;br /&gt;
 -outform arg    output format - DER or PEM&lt;br /&gt;
 -in arg         input file&lt;br /&gt;
 -passin arg     input file pass phrase source&lt;br /&gt;
 -out arg        output file&lt;br /&gt;
 -passout arg    output file pass phrase source&lt;br /&gt;
 -engine e       use engine e, possibly a hardware device.&lt;br /&gt;
 -des            encrypt PEM output, instead of 'des' every other &lt;br /&gt;
                 cipher supported by OpenSSL can be used&lt;br /&gt;
 -text           print the key&lt;br /&gt;
 -noout          don't print key out&lt;br /&gt;
 -param_out      print the elliptic curve parameters&lt;br /&gt;
 -conv_form arg  specifies the point conversion form &lt;br /&gt;
                 possible values: compressed&lt;br /&gt;
                                  uncompressed (default)&lt;br /&gt;
                                   hybrid&lt;br /&gt;
 -param_enc arg  specifies the way the ec parameters are encoded&lt;br /&gt;
                 in the asn1 der encoding&lt;br /&gt;
                 possible values: named_curve (default)&lt;br /&gt;
                                  explicit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Certificate Authority / ca ====&lt;br /&gt;
&lt;br /&gt;
When you want to act as a Certificate Authority.&lt;br /&gt;
&lt;br /&gt;
OpenSSL&amp;gt; ca&lt;br /&gt;
Using configuration from /usr/lib/ssl/openssl.cnf&lt;br /&gt;
Error opening CA private key ./demoCA/private/cakey.pem&lt;br /&gt;
140492277311144:error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('./demoCA/private/cakey.pem','r')&lt;br /&gt;
140492277311144:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:&lt;br /&gt;
unable to load CA private key&lt;br /&gt;
error in ca&lt;br /&gt;
&lt;br /&gt;
By default you don't have ca created...&lt;br /&gt;
&lt;br /&gt;
==== Certificate Request / pkcs10 / req ====&lt;br /&gt;
&lt;br /&gt;
OpenSSL&amp;gt; req ?&lt;br /&gt;
unknown option ?&lt;br /&gt;
req [options] &amp;lt;infile &amp;gt;outfile&lt;br /&gt;
where options  are&lt;br /&gt;
 -inform arg    input format - DER or PEM&lt;br /&gt;
 -outform arg   output format - DER or PEM&lt;br /&gt;
 -in arg        input file&lt;br /&gt;
 -out arg       output file&lt;br /&gt;
 -text          text form of request&lt;br /&gt;
 -pubkey        output public key&lt;br /&gt;
 -noout         do not output REQ&lt;br /&gt;
 -verify        verify signature on REQ&lt;br /&gt;
 -modulus       RSA modulus&lt;br /&gt;
 -nodes         don't encrypt the output key&lt;br /&gt;
 -engine e      use engine e, possibly a hardware device&lt;br /&gt;
 -subject       output the request's subject&lt;br /&gt;
 -passin        private key password source&lt;br /&gt;
 -key file      use the private key contained in file&lt;br /&gt;
 -keyform arg   key file format&lt;br /&gt;
 -keyout arg    file to send the key to&lt;br /&gt;
 -rand file:file:...&lt;br /&gt;
                load the file (or the files in the directory) into&lt;br /&gt;
                the random number generator&lt;br /&gt;
 -newkey rsa:bits generate a new RSA key of 'bits' in size&lt;br /&gt;
 -newkey dsa:file generate a new DSA key, parameters taken from CA in 'file'&lt;br /&gt;
 -newkey ec:file generate a new EC key, parameters taken from CA in 'file'&lt;br /&gt;
 -[digest]      Digest to sign with (md5, sha1, md2, mdc2, md4)&lt;br /&gt;
 -config file   request template file.&lt;br /&gt;
 -subj arg      set or modify request subject&lt;br /&gt;
 -multivalue-rdn enable support for multivalued RDNs&lt;br /&gt;
 -new           new request.&lt;br /&gt;
 -batch         do not ask anything during request generation&lt;br /&gt;
 -x509          output a x509 structure instead of a cert. req.&lt;br /&gt;
 -days          number of days a certificate generated by -x509 is valid for.&lt;br /&gt;
 -set_serial    serial number to use for a certificate generated by -x509.&lt;br /&gt;
 -newhdr        output &amp;quot;NEW&amp;quot; in the header lines&lt;br /&gt;
 -asn1-kludge   Output the 'request' in a format that is wrong but some CA's&lt;br /&gt;
                have been reported as requiring&lt;br /&gt;
 -extensions .. specify certificate extension section (override value in config file)&lt;br /&gt;
 -reqexts ..    specify request extension section (override value in config file)&lt;br /&gt;
 -utf8          input characters are UTF8 (default ASCII)&lt;br /&gt;
 -nameopt arg    - various certificate name options&lt;br /&gt;
 -reqopt arg    - various request text options&lt;br /&gt;
&lt;br /&gt;
error in req&lt;br /&gt;
&lt;br /&gt;
==== Certificates AKA x509  ====&lt;br /&gt;
&lt;br /&gt;
x509 command allows you to display content of a x509 certificate and to convert it from/to [[PEM]], [[NET]] or [[DER]] formats.&lt;br /&gt;
&lt;br /&gt;
OpenSSL&amp;gt; x509 help&lt;br /&gt;
unknown option help&lt;br /&gt;
usage: x509 args&lt;br /&gt;
 -inform arg     - input format - default PEM (one of DER, NET or PEM)&lt;br /&gt;
 -outform arg    - output format - default PEM (one of DER, NET or PEM)&lt;br /&gt;
 -keyform arg    - private key format - default PEM&lt;br /&gt;
 -CAform arg     - CA format - default PEM&lt;br /&gt;
 -CAkeyform arg  - CA key format - default PEM&lt;br /&gt;
 -in arg         - input file - default stdin&lt;br /&gt;
 -out arg        - output file - default stdout&lt;br /&gt;
 -passin arg     - private key password source&lt;br /&gt;
 -serial         - print serial number value&lt;br /&gt;
 -subject_hash   - print subject hash value&lt;br /&gt;
 -subject_hash_old   - print old-style (MD5) subject hash value&lt;br /&gt;
 -issuer_hash    - print issuer hash value&lt;br /&gt;
 -issuer_hash_old    - print old-style (MD5) issuer hash value&lt;br /&gt;
 -hash           - synonym for -subject_hash&lt;br /&gt;
 -subject        - print subject DN&lt;br /&gt;
 -issuer         - print issuer DN&lt;br /&gt;
 -email          - print email address(es)&lt;br /&gt;
 -startdate      - notBefore field&lt;br /&gt;
 -enddate        - notAfter field&lt;br /&gt;
 -purpose        - print out certificate purposes&lt;br /&gt;
 -dates          - both Before and After dates&lt;br /&gt;
 -modulus        - print the RSA key modulus&lt;br /&gt;
 -pubkey         - output the public key&lt;br /&gt;
 -fingerprint    - print the certificate fingerprint&lt;br /&gt;
 -alias          - output certificate alias&lt;br /&gt;
 -noout          - no certificate output&lt;br /&gt;
 -ocspid         - print OCSP hash values for the subject name and public key&lt;br /&gt;
 -ocsp_uri       - print OCSP Responder URL(s)&lt;br /&gt;
 -trustout       - output a &amp;quot;trusted&amp;quot; certificate&lt;br /&gt;
 -clrtrust       - clear all trusted purposes&lt;br /&gt;
 -clrreject      - clear all rejected purposes&lt;br /&gt;
 -addtrust arg   - trust certificate for a given purpose&lt;br /&gt;
 -addreject arg  - reject certificate for a given purpose&lt;br /&gt;
 -setalias arg   - set certificate alias&lt;br /&gt;
 -days arg       - How long till expiry of a signed certificate - def 30 days&lt;br /&gt;
 -checkend arg   - check whether the cert expires in the next arg seconds&lt;br /&gt;
                   exit 1 if so, 0 if not&lt;br /&gt;
 -signkey arg    - self sign cert with arg&lt;br /&gt;
 -x509toreq      - output a certification request object&lt;br /&gt;
 -req            - input is a certificate request, sign and output.&lt;br /&gt;
 -CA arg         - set the CA certificate, must be PEM format.&lt;br /&gt;
 -CAkey arg      - set the CA key, must be PEM format&lt;br /&gt;
                   missing, it is assumed to be in the CA file.&lt;br /&gt;
 -CAcreateserial - create serial number file if it does not exist&lt;br /&gt;
 -CAserial arg   - serial file&lt;br /&gt;
 -set_serial     - serial number to use&lt;br /&gt;
 -text           - print the certificate in text form&lt;br /&gt;
 -C              - print out C code forms&lt;br /&gt;
 -md2/-md5/-sha1/-mdc2 - digest to use&lt;br /&gt;
 -extfile        - configuration file with X509V3 extensions to add&lt;br /&gt;
 -extensions     - section from config file with X509V3 extensions to add&lt;br /&gt;
 -clrext         - delete extensions before signing and input certificate&lt;br /&gt;
 -nameopt arg    - various certificate name options&lt;br /&gt;
 -engine e       - use engine e, possibly a hardware device.&lt;br /&gt;
 -certopt arg    - various certificate text options&lt;br /&gt;
&lt;br /&gt;
==== Client Certificates AKA pkcs12 ====&lt;br /&gt;
&lt;br /&gt;
Client Certificate is a language abuse, but anyway it is kind of file you need to install on your system when SSL/TLS server require Client Authentication.&lt;br /&gt;
Those kind of certificates credentials are known with .'''pkcs12''' or .'''pfx''' file extension.&lt;br /&gt;
They contains a x509 Certificate and the public/private key of client. Those files are then very sensible to handle with same security as a private key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: pkcs12 [options]&lt;br /&gt;
where options are&lt;br /&gt;
-export       output PKCS12 file&lt;br /&gt;
-chain        add certificate chain&lt;br /&gt;
-inkey file   private key if not infile&lt;br /&gt;
-certfile f   add all certs in f&lt;br /&gt;
-CApath arg   - PEM format directory of CA's&lt;br /&gt;
-CAfile arg   - PEM format file of CA's&lt;br /&gt;
-name &amp;quot;name&amp;quot;  use name as friendly name&lt;br /&gt;
-caname &amp;quot;nm&amp;quot;  use nm as CA friendly name (can be used more than once).&lt;br /&gt;
-in  infile   input filename&lt;br /&gt;
-out outfile  output filename&lt;br /&gt;
-noout        don't output anything, just verify.&lt;br /&gt;
-nomacver     don't verify MAC.&lt;br /&gt;
-nocerts      don't output certificates.&lt;br /&gt;
-clcerts      only output client certificates.&lt;br /&gt;
-cacerts      only output CA certificates.&lt;br /&gt;
-nokeys       don't output private keys.&lt;br /&gt;
-info         give info about PKCS#12 structure.&lt;br /&gt;
-des          encrypt private keys with DES&lt;br /&gt;
-des3         encrypt private keys with triple DES (default)&lt;br /&gt;
-seed         encrypt private keys with seed&lt;br /&gt;
-aes128, -aes192, -aes256&lt;br /&gt;
              encrypt PEM output with cbc aes&lt;br /&gt;
-camellia128, -camellia192, -camellia256&lt;br /&gt;
              encrypt PEM output with cbc camellia&lt;br /&gt;
-nodes        don't encrypt private keys&lt;br /&gt;
-noiter       don't use encryption iteration&lt;br /&gt;
-nomaciter    don't use MAC iteration&lt;br /&gt;
-maciter      use MAC iteration&lt;br /&gt;
-nomac        don't generate MAC&lt;br /&gt;
-twopass      separate MAC, encryption passwords&lt;br /&gt;
-descert      encrypt PKCS#12 certificates with triple DES (default RC2-40)&lt;br /&gt;
-certpbe alg  specify certificate PBE algorithm (default RC2-40)&lt;br /&gt;
-keypbe alg   specify private key PBE algorithm (default 3DES)&lt;br /&gt;
-macalg alg   digest algorithm used in MAC (default SHA1)&lt;br /&gt;
-keyex        set MS key exchange type&lt;br /&gt;
-keysig       set MS key signature type&lt;br /&gt;
-password p   set import/export password source&lt;br /&gt;
-passin p     input file pass phrase source&lt;br /&gt;
-passout p    output file pass phrase source&lt;br /&gt;
-engine e     use engine e, possibly a hardware device.&lt;br /&gt;
-rand file:file:...&lt;br /&gt;
              load the file (or the files in the directory) into&lt;br /&gt;
              the random number generator&lt;br /&gt;
-CSP name     Microsoft CSP name&lt;br /&gt;
-LMK          Add local machine keyset attribute to private key&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SSL/TLS and Certificates ONLINE services ===&lt;br /&gt;
&lt;br /&gt;
==== s_server ====&lt;br /&gt;
&lt;br /&gt;
This implements a generic SSL/TLS server. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl s_server&lt;br /&gt;
Error opening server certificate private key file server.pem&lt;br /&gt;
139811478357672:error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('server.pem','r')&lt;br /&gt;
139811478357672:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:&lt;br /&gt;
unable to load server certificate private key file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''you need to provide certificate and private key to be able to run SSL/TLS server.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl s_server --help&lt;br /&gt;
unknown option --help&lt;br /&gt;
usage: s_server [args ...]&lt;br /&gt;
&lt;br /&gt;
 -accept arg   - port to accept on (default is 4433)&lt;br /&gt;
 -context arg  - set session ID context&lt;br /&gt;
 -verify arg   - turn on peer certificate verification&lt;br /&gt;
 -Verify arg   - turn on peer certificate verification, must have a cert.&lt;br /&gt;
 -cert arg     - certificate file to use&lt;br /&gt;
                 (default is server.pem)&lt;br /&gt;
 -crl_check    - check the peer certificate has not been revoked by its CA.&lt;br /&gt;
                 The CRL(s) are appended to the certificate file&lt;br /&gt;
 -crl_check_all - check the peer certificate has not been revoked by its CA&lt;br /&gt;
                 or any other CRL in the CA chain. CRL(s) are appened to the&lt;br /&gt;
                 the certificate file.&lt;br /&gt;
 -certform arg - certificate format (PEM or DER) PEM default&lt;br /&gt;
 -key arg      - Private Key file to use, in cert file if&lt;br /&gt;
                 not specified (default is server.pem)&lt;br /&gt;
 -keyform arg  - key format (PEM, DER or ENGINE) PEM default&lt;br /&gt;
 -pass arg     - private key file pass phrase source&lt;br /&gt;
 -dcert arg    - second certificate file to use (usually for DSA)&lt;br /&gt;
 -dcertform x  - second certificate format (PEM or DER) PEM default&lt;br /&gt;
 -dkey arg     - second private key file to use (usually for DSA)&lt;br /&gt;
 -dkeyform arg - second key format (PEM, DER or ENGINE) PEM default&lt;br /&gt;
 -dpass arg    - second private key file pass phrase source&lt;br /&gt;
 -dhparam arg  - DH parameter file to use, in cert file if not specified&lt;br /&gt;
                 or a default set of parameters is used&lt;br /&gt;
 -named_curve arg  - Elliptic curve name to use for ephemeral ECDH keys.&lt;br /&gt;
                 Use &amp;quot;openssl ecparam -list_curves&amp;quot; for all names&lt;br /&gt;
                 (default is nistp256).&lt;br /&gt;
 -nbio         - Run with non-blocking IO&lt;br /&gt;
 -nbio_test    - test with the non-blocking test bio&lt;br /&gt;
 -crlf         - convert LF from terminal into CRLF&lt;br /&gt;
 -debug        - Print more output&lt;br /&gt;
 -msg          - Show protocol messages&lt;br /&gt;
 -state        - Print the SSL states&lt;br /&gt;
 -CApath arg   - PEM format directory of CA's&lt;br /&gt;
 -CAfile arg   - PEM format file of CA's&lt;br /&gt;
 -nocert       - Don't use any certificates (Anon-DH)&lt;br /&gt;
 -cipher arg   - play with 'openssl ciphers' to see what goes here&lt;br /&gt;
 -serverpref   - Use server's cipher preferences&lt;br /&gt;
 -quiet        - No server output&lt;br /&gt;
 -no_tmp_rsa   - Do not generate a tmp RSA key&lt;br /&gt;
 -psk_hint arg - PSK identity hint to use&lt;br /&gt;
 -psk arg      - PSK in hex (without 0x)&lt;br /&gt;
 -srpvfile file      - The verifier file for SRP&lt;br /&gt;
 -srpuserseed string - A seed string for a default user salt.&lt;br /&gt;
 -ssl2         - Just talk SSLv2&lt;br /&gt;
 -ssl3         - Just talk SSLv3&lt;br /&gt;
 -tls1_2       - Just talk TLSv1.2&lt;br /&gt;
 -tls1_1       - Just talk TLSv1.1&lt;br /&gt;
 -tls1         - Just talk TLSv1&lt;br /&gt;
 -dtls1        - Just talk DTLSv1&lt;br /&gt;
 -timeout      - Enable timeouts&lt;br /&gt;
 -mtu          - Set link layer MTU&lt;br /&gt;
 -chain        - Read a certificate chain&lt;br /&gt;
 -no_ssl2      - Just disable SSLv2&lt;br /&gt;
 -no_ssl3      - Just disable SSLv3&lt;br /&gt;
 -no_tls1      - Just disable TLSv1&lt;br /&gt;
 -no_tls1_1    - Just disable TLSv1.1&lt;br /&gt;
 -no_tls1_2    - Just disable TLSv1.2&lt;br /&gt;
 -no_dhe       - Disable ephemeral DH&lt;br /&gt;
 -no_ecdhe     - Disable ephemeral ECDH&lt;br /&gt;
 -bugs         - Turn on SSL bug compatibility&lt;br /&gt;
 -www          - Respond to a 'GET /' with a status page&lt;br /&gt;
 -WWW          - Respond to a 'GET /&amp;lt;path&amp;gt; HTTP/1.0' with file ./&amp;lt;path&amp;gt;&lt;br /&gt;
 -HTTP         - Respond to a 'GET /&amp;lt;path&amp;gt; HTTP/1.0' with file ./&amp;lt;path&amp;gt;&lt;br /&gt;
                 with the assumption it contains a complete HTTP response.&lt;br /&gt;
 -engine id    - Initialise and use the specified engine&lt;br /&gt;
 -id_prefix arg - Generate SSL/TLS session IDs prefixed by 'arg'&lt;br /&gt;
 -rand file:file:...&lt;br /&gt;
 -servername host - servername for HostName TLS extension&lt;br /&gt;
 -servername_fatal - on mismatch send fatal alert (default warning alert)&lt;br /&gt;
 -cert2 arg    - certificate file to use for servername&lt;br /&gt;
                 (default is server2.pem)&lt;br /&gt;
 -key2 arg     - Private Key file to use for servername, in cert file if&lt;br /&gt;
                 not specified (default is server2.pem)&lt;br /&gt;
 -tlsextdebug  - hex dump of all TLS extensions received&lt;br /&gt;
 -no_ticket    - disable use of RFC4507bis session tickets&lt;br /&gt;
 -legacy_renegotiation - enable use of legacy renegotiation (dangerous)&lt;br /&gt;
 -nextprotoneg arg - set the advertised protocols for the NPN extension (comma-separated list)&lt;br /&gt;
 -use_srtp profiles - Offer SRTP key management with a colon-separated profile list&lt;br /&gt;
 -keymatexport label   - Export keying material using label&lt;br /&gt;
 -keymatexportlen len  - Export len bytes of keying material (default 20)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== s_client ====&lt;br /&gt;
&lt;br /&gt;
This implements a generic SSL/TLS client&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
unknown option --help&lt;br /&gt;
usage: s_client args&lt;br /&gt;
&lt;br /&gt;
 -host host     - use -connect instead&lt;br /&gt;
 -port port     - use -connect instead&lt;br /&gt;
 -connect host:port - who to connect to (default is localhost:4433)&lt;br /&gt;
 -verify arg   - turn on peer certificate verification&lt;br /&gt;
 -cert arg     - certificate file to use, PEM format assumed&lt;br /&gt;
 -certform arg - certificate format (PEM or DER) PEM default&lt;br /&gt;
 -key arg      - Private key file to use, in cert file if&lt;br /&gt;
                 not specified but cert file is.&lt;br /&gt;
 -keyform arg  - key format (PEM or DER) PEM default&lt;br /&gt;
 -pass arg     - private key file pass phrase source&lt;br /&gt;
 -CApath arg   - PEM format directory of CA's&lt;br /&gt;
 -CAfile arg   - PEM format file of CA's&lt;br /&gt;
 -reconnect    - Drop and re-make the connection with the same Session-ID&lt;br /&gt;
 -pause        - sleep(1) after each read(2) and write(2) system call&lt;br /&gt;
 -showcerts    - show all certificates in the chain&lt;br /&gt;
 -debug        - extra output&lt;br /&gt;
 -msg          - Show protocol messages&lt;br /&gt;
 -nbio_test    - more ssl protocol testing&lt;br /&gt;
 -state        - print the 'ssl' states&lt;br /&gt;
 -nbio         - Run with non-blocking IO&lt;br /&gt;
 -crlf         - convert LF from terminal into CRLF&lt;br /&gt;
 -quiet        - no s_client output&lt;br /&gt;
 -ign_eof      - ignore input eof (default when -quiet)&lt;br /&gt;
 -no_ign_eof   - don't ignore input eof&lt;br /&gt;
 -psk_identity arg - PSK identity&lt;br /&gt;
 -psk arg      - PSK in hex (without 0x)&lt;br /&gt;
 -srpuser user     - SRP authentification for 'user'&lt;br /&gt;
 -srppass arg      - password for 'user'&lt;br /&gt;
 -srp_lateuser     - SRP username into second ClientHello message&lt;br /&gt;
 -srp_moregroups   - Tolerate other than the known g N values.&lt;br /&gt;
 -srp_strength int - minimal mength in bits for N (default 1024).&lt;br /&gt;
 -ssl2         - just use SSLv2&lt;br /&gt;
 -ssl3         - just use SSLv3&lt;br /&gt;
 -tls1_2       - just use TLSv1.2&lt;br /&gt;
 -tls1_1       - just use TLSv1.1&lt;br /&gt;
 -tls1         - just use TLSv1&lt;br /&gt;
 -dtls1        - just use DTLSv1&lt;br /&gt;
 -mtu          - set the link layer MTU&lt;br /&gt;
 -no_tls1_2/-no_tls1_1/-no_tls1/-no_ssl3/-no_ssl2 - turn off that protocol&lt;br /&gt;
 -bugs         - Switch on all SSL implementation bug workarounds&lt;br /&gt;
 -serverpref   - Use server's cipher preferences (only SSLv2)&lt;br /&gt;
 -cipher       - preferred cipher to use, use the 'openssl ciphers'&lt;br /&gt;
                 command to see what is available&lt;br /&gt;
 -starttls prot - use the STARTTLS command before starting TLS&lt;br /&gt;
                 for those protocols that support it, where&lt;br /&gt;
                 'prot' defines which one to assume.  Currently,&lt;br /&gt;
                 only &amp;quot;smtp&amp;quot;, &amp;quot;pop3&amp;quot;, &amp;quot;imap&amp;quot;, &amp;quot;ftp&amp;quot; and &amp;quot;xmpp&amp;quot;&lt;br /&gt;
                 are supported.&lt;br /&gt;
 -engine id    - Initialise and use the specified engine&lt;br /&gt;
 -rand file:file:...&lt;br /&gt;
 -sess_out arg - file to write SSL session to&lt;br /&gt;
 -sess_in arg  - file to read SSL session from&lt;br /&gt;
 -servername host  - Set TLS extension servername in ClientHello&lt;br /&gt;
 -tlsextdebug      - hex dump of all TLS extensions received&lt;br /&gt;
 -status           - request certificate status from server&lt;br /&gt;
 -no_ticket        - disable use of RFC4507bis session tickets&lt;br /&gt;
 -nextprotoneg arg - enable NPN extension, considering named protocols supported (comma-separated list)&lt;br /&gt;
 -legacy_renegotiation - enable use of legacy renegotiation (dangerous)&lt;br /&gt;
 -use_srtp profiles - Offer SRTP key management with a colon-separated profile list&lt;br /&gt;
 -keymatexport label   - Export keying material using label&lt;br /&gt;
 -keymatexportlen len  - Export len bytes of keying material (default 20)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== ocsp ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Signing / Digest and Timestamping ===&lt;br /&gt;
&lt;br /&gt;
==== Signing / Digest ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl dgst --help&lt;br /&gt;
unknown option '--help'&lt;br /&gt;
options are&lt;br /&gt;
-c              to output the digest with separating colons&lt;br /&gt;
-r              to output the digest in coreutils format&lt;br /&gt;
-d              to output debug info&lt;br /&gt;
-hex            output as hex dump&lt;br /&gt;
-binary         output in binary form&lt;br /&gt;
-hmac arg       set the HMAC key to arg&lt;br /&gt;
-non-fips-allow allow use of non FIPS digest&lt;br /&gt;
-sign   file    sign digest using private key in file&lt;br /&gt;
-verify file    verify a signature using public key in file&lt;br /&gt;
-prverify file  verify a signature using private key in file&lt;br /&gt;
-keyform arg    key file format (PEM or ENGINE)&lt;br /&gt;
-out filename   output to filename rather than stdout&lt;br /&gt;
-signature file signature to verify&lt;br /&gt;
-sigopt nm:v    signature parameter&lt;br /&gt;
-hmac key       create hashed MAC with key&lt;br /&gt;
-mac algorithm  create MAC (not neccessarily HMAC)&lt;br /&gt;
-macopt nm:v    MAC algorithm parameters or key&lt;br /&gt;
-engine e       use engine e, possibly a hardware device.&lt;br /&gt;
-md4            to use the md4 message digest algorithm&lt;br /&gt;
-md5            to use the md5 message digest algorithm&lt;br /&gt;
-ripemd160      to use the ripemd160 message digest algorithm&lt;br /&gt;
-sha            to use the sha message digest algorithm&lt;br /&gt;
-sha1           to use the sha1 message digest algorithm&lt;br /&gt;
-sha224         to use the sha224 message digest algorithm&lt;br /&gt;
-sha256         to use the sha256 message digest algorithm&lt;br /&gt;
-sha384         to use the sha384 message digest algorithm&lt;br /&gt;
-sha512         to use the sha512 message digest algorithm&lt;br /&gt;
-whirlpool      to use the whirlpool message digest algorithm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== timestamping ====&lt;br /&gt;
&lt;br /&gt;
openssl ts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
usage:&lt;br /&gt;
ts -query [-rand file:file:...] [-config configfile] [-data file_to_hash] [-digest digest_bytes][-md2|-md4|-md5|-sha|-sha1|-mdc2|-ripemd160] [-policy object_id] [-no_nonce] [-cert] [-in request.tsq] [-out request.tsq] [-text]&lt;br /&gt;
or&lt;br /&gt;
ts -reply [-config configfile] [-section tsa_section] [-queryfile request.tsq] [-passin password] [-signer tsa_cert.pem] [-inkey private_key.pem] [-chain certs_file.pem] [-policy object_id] [-in response.tsr] [-token_in] [-out response.tsr] [-token_out] [-text] [-engine id]&lt;br /&gt;
or&lt;br /&gt;
ts -verify [-data file_to_hash] [-digest digest_bytes] [-queryfile request.tsq] -in response.tsr [-token_in] -CApath ca_path -CAfile ca_file.pem -untrusted cert_file.pem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data handling ===&lt;br /&gt;
&lt;br /&gt;
==== ASN.1 ====&lt;br /&gt;
&lt;br /&gt;
[[DER]] decoding &lt;br /&gt;
&lt;br /&gt;
openssl asn1parse&lt;br /&gt;
&lt;br /&gt;
==== Base64 ====&lt;br /&gt;
&lt;br /&gt;
base64 encoding / decoding&lt;br /&gt;
&lt;br /&gt;
[[Base64]]&lt;br /&gt;
&lt;br /&gt;
===== a String =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl base64 -e &amp;lt;&amp;lt;&amp;lt; 'Welcome to openssl wiki'&lt;br /&gt;
V2VsY29tZSB0byBvcGVuc3NsIHdpa2kK&lt;br /&gt;
openssl base64 -d &amp;lt;&amp;lt;&amp;lt; 'V2VsY29tZSB0byBvcGVuc3NsIHdpa2kK'&lt;br /&gt;
Welcome to openssl wiki&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
warning '''base64 line length is limited to 76 characters by default in openssl''' ( and generated with 64 characters / line ).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl base64 -e &amp;lt;&amp;lt;&amp;lt; 'Welcome to openssl wiki with a very long line that splits...'&lt;br /&gt;
V2VsY29tZSB0byBvcGVuc3NsIHdpa2kgd2l0aCBhIHZlcnkgbG9uZyBsaW5lIHRo&lt;br /&gt;
YXQgc3BsaXRzLi4uCg==&lt;br /&gt;
openssl base64 -d &amp;lt;&amp;lt;&amp;lt; 'V2VsY29tZSB0byBvcGVuc3NsIHdpa2kgd2l0aCBhIHZlcnkgbG9uZyBsaW5lIHRoYXQgc3BsaXRzLi4uCg=='&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=&amp;gt; NOTHING !&lt;br /&gt;
&lt;br /&gt;
to be able to decode a base64 line without line feed that exceed 76 characters use -A option :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl base64 -d -A &amp;lt;&amp;lt;&amp;lt; 'V2VsY29tZSB0byBvcGVuc3NsIHdpa2kgd2l0aCBhIHZlcnkgbG9uZyBsaW5lIHRoYXQgc3BsaXRzLi4uCg=='&lt;br /&gt;
Welcome to openssl wiki with a very long line that splits...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is anyway better to actualy split base64 result in 64 characters lines since -A option is BUGGY ( limit with long files ).&lt;br /&gt;
&lt;br /&gt;
==== DER &amp;lt;-&amp;gt; PEM conversion ====&lt;br /&gt;
&lt;br /&gt;
on each command handling PEM and DER format an '''inform''' and '''outform''' options are provided to specify it.&lt;br /&gt;
Then it is easy to read it in format and write it in another&lt;br /&gt;
&lt;br /&gt;
==== pkcs8 / pkcs5 ====&lt;br /&gt;
&lt;br /&gt;
pkcs8 is a format to store private keys.&lt;br /&gt;
pkcs8 uses various pkcs5 version as subformat.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl pkcs8 --help&lt;br /&gt;
Usage pkcs8 [options]&lt;br /&gt;
where options are&lt;br /&gt;
-in file        input file&lt;br /&gt;
-inform X       input format (DER or PEM)&lt;br /&gt;
-passin arg     input file pass phrase source&lt;br /&gt;
-outform X      output format (DER or PEM)&lt;br /&gt;
-out file       output file&lt;br /&gt;
-passout arg    output file pass phrase source&lt;br /&gt;
-topk8          output PKCS8 file&lt;br /&gt;
-nooct          use (nonstandard) no octet format&lt;br /&gt;
-embed          use (nonstandard) embedded DSA parameters format&lt;br /&gt;
-nsdb           use (nonstandard) DSA Netscape DB format&lt;br /&gt;
-noiter         use 1 as iteration count&lt;br /&gt;
-nocrypt        use or expect unencrypted private key&lt;br /&gt;
-v2 alg         use PKCS#5 v2.0 and cipher &amp;quot;alg&amp;quot;&lt;br /&gt;
-v1 obj         use PKCS#5 v1.5 and cipher &amp;quot;alg&amp;quot;&lt;br /&gt;
 -engine e       use engine e, possibly a hardware device.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Diagnostics ===&lt;br /&gt;
&lt;br /&gt;
==== SSL/TLS session information ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl sess_id --help&lt;br /&gt;
unknown option --help&lt;br /&gt;
usage: sess_id args&lt;br /&gt;
&lt;br /&gt;
 -inform arg     - input format - default PEM (DER or PEM)&lt;br /&gt;
 -outform arg    - output format - default PEM&lt;br /&gt;
 -in arg         - input file - default stdin&lt;br /&gt;
 -out arg        - output file - default stdout&lt;br /&gt;
 -text           - print ssl session id details&lt;br /&gt;
 -cert           - output certificate &lt;br /&gt;
 -noout          - no CRL output&lt;br /&gt;
 -context arg    - set the session ID context&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Shell level]]&lt;/div&gt;</summary>
		<author><name>Frukto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Command_Line_Utilities&amp;diff=1122</id>
		<title>Command Line Utilities</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Command_Line_Utilities&amp;diff=1122"/>
		<updated>2013-06-20T17:10:47Z</updated>

		<summary type="html">&lt;p&gt;Frukto: /* Getting started with your openssl toolkit */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://www.openssl.org/docs/apps/openssl.html OpenSSL site command line tools]&lt;br /&gt;
&lt;br /&gt;
=== Getting started with your openssl toolkit ===&lt;br /&gt;
&lt;br /&gt;
When installed on your system openssl binary (usually /usr/bin/openssl on linux) is an entry point for many functions. You call it following the pattern&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl command [ command_opts ] [ command_args ] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively you can call it without arguments to enter the interactive mode with an 'OpenSSL&amp;gt;' prompt. Then you can directly type your commands. You can leave the interactive mode with Ctrl+C or Ctrl+D or by typing 'quit':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
OpenSSL&amp;gt; quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are three different kinds of commands. These are [[standard commands]], [[cipher commands]], and [[message-digest commands]]. In the following an overview over some commands is given. These are grouped by purpose and not necessarily by the classification just mentioned.&lt;br /&gt;
&lt;br /&gt;
=== Learn about your installation ===&lt;br /&gt;
&lt;br /&gt;
==== List commands by type ====&lt;br /&gt;
&lt;br /&gt;
You can get a list of available commands by calling&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl list-standard-commands&lt;br /&gt;
$ openssl list-cipher-commands&lt;br /&gt;
$ openssl list-message-digest-commands&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== version ====&lt;br /&gt;
&lt;br /&gt;
OpenSSL&amp;gt; version&lt;br /&gt;
OpenSSL 1.0.1e 11 Feb 2013&lt;br /&gt;
&lt;br /&gt;
==== ciphers ====&lt;br /&gt;
&lt;br /&gt;
returns SSL/TLS ciphers supported.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
OpenSSL&amp;gt; ciphers&lt;br /&gt;
ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:SRP-DSS-AES-256-CBC-SHA:SRP-RSA-AES-256-CBC-SHA:DHE-DSS-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA256:DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:DHE-RSA-CAMELLIA256-SHA:DHE-DSS-CAMELLIA256-SHA:ECDH-RSA-AES256-GCM-SHA384:ECDH-ECDSA-AES256-GCM-SHA384:ECDH-RSA-AES256-SHA384:ECDH-ECDSA-AES256-SHA384:ECDH-RSA-AES256-SHA:ECDH-ECDSA-AES256-SHA:AES256-GCM-SHA384:AES256-SHA256:AES256-SHA:CAMELLIA256-SHA:PSK-AES256-CBC-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:SRP-DSS-3DES-EDE-CBC-SHA:SRP-RSA-3DES-EDE-CBC-SHA:EDH-RSA-DES-CBC3-SHA:EDH-DSS-DES-CBC3-SHA:ECDH-RSA-DES-CBC3-SHA:ECDH-ECDSA-DES-CBC3-SHA:DES-CBC3-SHA:PSK-3DES-EDE-CBC-SHA:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:SRP-DSS-AES-128-CBC-SHA:SRP-RSA-AES-128-CBC-SHA:DHE-DSS-AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-SHA256:DHE-DSS-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA:DHE-RSA-SEED-SHA:DHE-DSS-SEED-SHA:DHE-RSA-CAMELLIA128-SHA:DHE-DSS-CAMELLIA128-SHA:ECDH-RSA-AES128-GCM-SHA256:ECDH-ECDSA-AES128-GCM-SHA256:ECDH-RSA-AES128-SHA256:ECDH-ECDSA-AES128-SHA256:ECDH-RSA-AES128-SHA:ECDH-ECDSA-AES128-SHA:AES128-GCM-SHA256:AES128-SHA256:AES128-SHA:SEED-SHA:CAMELLIA128-SHA:PSK-AES128-CBC-SHA:ECDHE-RSA-RC4-SHA:ECDHE-ECDSA-RC4-SHA:ECDH-RSA-RC4-SHA:ECDH-ECDSA-RC4-SHA:RC4-SHA:RC4-MD5:PSK-RC4-SHA:EDH-RSA-DES-CBC-SHA:EDH-DSS-DES-CBC-SHA:DES-CBC-SHA:EXP-EDH-RSA-DES-CBC-SHA:EXP-EDH-DSS-DES-CBC-SHA:EXP-DES-CBC-SHA:EXP-RC2-CBC-MD5:EXP-RC4-MD5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
openssl list-cipher-algorithms&lt;br /&gt;
&lt;br /&gt;
openssl list-public-key-algorithms&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Name: OpenSSL RSA method&lt;br /&gt;
	Type: Builtin Algorithm&lt;br /&gt;
	OID: rsaEncryption&lt;br /&gt;
	PEM string: RSA&lt;br /&gt;
Name: rsa&lt;br /&gt;
	Type: Alias to rsaEncryption&lt;br /&gt;
Name: OpenSSL PKCS#3 DH method&lt;br /&gt;
	Type: Builtin Algorithm&lt;br /&gt;
	OID: dhKeyAgreement&lt;br /&gt;
	PEM string: DH&lt;br /&gt;
Name: dsaWithSHA&lt;br /&gt;
	Type: Alias to dsaEncryption&lt;br /&gt;
Name: dsaEncryption-old&lt;br /&gt;
	Type: Alias to dsaEncryption&lt;br /&gt;
Name: dsaWithSHA1-old&lt;br /&gt;
	Type: Alias to dsaEncryption&lt;br /&gt;
Name: dsaWithSHA1&lt;br /&gt;
	Type: Alias to dsaEncryption&lt;br /&gt;
Name: OpenSSL DSA method&lt;br /&gt;
	Type: Builtin Algorithm&lt;br /&gt;
	OID: dsaEncryption&lt;br /&gt;
	PEM string: DSA&lt;br /&gt;
Name: OpenSSL EC algorithm&lt;br /&gt;
	Type: Builtin Algorithm&lt;br /&gt;
	OID: id-ecPublicKey&lt;br /&gt;
	PEM string: EC&lt;br /&gt;
Name: OpenSSL HMAC method&lt;br /&gt;
	Type: Builtin Algorithm&lt;br /&gt;
	OID: hmac&lt;br /&gt;
	PEM string: HMAC&lt;br /&gt;
Name: OpenSSL CMAC method&lt;br /&gt;
	Type: Builtin Algorithm&lt;br /&gt;
	OID: cmac&lt;br /&gt;
	PEM string: CMAC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== engine ====&lt;br /&gt;
&lt;br /&gt;
OpenSSL&amp;gt; engine&lt;br /&gt;
(rsax) RSAX engine support&lt;br /&gt;
(dynamic) Dynamic engine loading support&lt;br /&gt;
&lt;br /&gt;
==== speed ====&lt;br /&gt;
&lt;br /&gt;
returns informations of toolkit performance on cryptographic functions computations.&lt;br /&gt;
&lt;br /&gt;
( Ex: on Linux 3.1.0-1-amd64 #1 SMP x86_64 GNU/Linux, HP dv7 i7 4Gb )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Doing md4 for 3s on 16 size blocks: 12430613 md4's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing md5 for 3s on 16 size blocks: 8943943 md5's in 2.99s&lt;br /&gt;
Doing md5 for 3s on 64 size blocks: 6560162 md5's in 3.00s&lt;br /&gt;
Doing md5 for 3s on 256 size blocks: 3674563 md5's in 3.00s&lt;br /&gt;
Doing md5 for 3s on 1024 size blocks: 1325803 md5's in 3.00s&lt;br /&gt;
Doing md5 for 3s on 8192 size blocks: 190271 md5's in 3.00s&lt;br /&gt;
Doing hmac(md5) for 3s on 16 size blocks: 7289025 hmac(md5)'s in 3.00s&lt;br /&gt;
Doing hmac(md5) for 3s on 64 size blocks: 5519732 hmac(md5)'s in 3.00s&lt;br /&gt;
Doing hmac(md5) for 3s on 256 size blocks: 3319123 hmac(md5)'s in 3.00s&lt;br /&gt;
Doing hmac(md5) for 3s on 1024 size blocks: 1275475 hmac(md5)'s in 3.00s&lt;br /&gt;
Doing hmac(md5) for 3s on 8192 size blocks: 187134 hmac(md5)'s in 3.00s&lt;br /&gt;
Doing sha1 for 3s on 16 size blocks: 10089842 sha1's in 2.99s&lt;br /&gt;
Doing sha1 for 3s on 64 size blocks: 7033355 sha1's in 3.00s&lt;br /&gt;
Doing sha1 for 3s on 256 size blocks: 3919372 sha1's in 3.00s&lt;br /&gt;
Doing sha1 for 3s on 1024 size blocks: 1374314 sha1's in 3.00s&lt;br /&gt;
Doing sha1 for 3s on 8192 size blocks: 198808 sha1's in 3.00s&lt;br /&gt;
Doing sha256 for 3s on 16 size blocks: 6462822 sha256's in 3.00s&lt;br /&gt;
Doing sha256 for 3s on 64 size blocks: 3504641 sha256's in 3.00s&lt;br /&gt;
Doing sha256 for 3s on 256 size blocks: 1486771 sha256's in 3.00s&lt;br /&gt;
Doing sha256 for 3s on 1024 size blocks: 440613 sha256's in 3.00s&lt;br /&gt;
Doing sha256 for 3s on 8192 size blocks: 58418 sha256's in 3.00s&lt;br /&gt;
Doing sha512 for 3s on 16 size blocks: 5040453 sha512's in 2.99s&lt;br /&gt;
Doing sha512 for 3s on 64 size blocks: 5089425 sha512's in 3.00s&lt;br /&gt;
Doing sha512 for 3s on 256 size blocks: 1865240 sha512's in 3.00s&lt;br /&gt;
Doing sha512 for 3s on 1024 size blocks: 643708 sha512's in 3.00s&lt;br /&gt;
Doing sha512 for 3s on 8192 size blocks: 90615 sha512's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing whirlpool for 3s on 8192 size blocks: 33204 whirlpool's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing rmd160 for 3s on 8192 size blocks: 66719 rmd160's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing rc4 for 3s on 8192 size blocks: 238972 rc4's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing des cbc for 3s on 8192 size blocks: 19837 des cbc's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing des ede3 for 3s on 8192 size blocks: 7706 des ede3's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing aes-128 cbc for 3s on 8192 size blocks: 35217 aes-128 cbc's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing aes-192 cbc for 3s on 8192 size blocks: 29225 aes-192 cbc's in 3.01s&lt;br /&gt;
...&lt;br /&gt;
Doing aes-256 cbc for 3s on 8192 size blocks: 24414 aes-256 cbc's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing aes-256 ige for 3s on 8192 size blocks: 23331 aes-256 ige's in 2.99s&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Basic encryption ===&lt;br /&gt;
&lt;br /&gt;
==== Basic file ====&lt;br /&gt;
&lt;br /&gt;
to cipher a file or data to protect and share it protected by a shared key.&lt;br /&gt;
&lt;br /&gt;
symetric cipher :&lt;br /&gt;
[[AES]] [[Blowfish]] [[RC4]] [[3DES]] [[RC2]] [[DES]] [[CAST5]] [[SEED]]&lt;br /&gt;
&lt;br /&gt;
block to stream conversion :&lt;br /&gt;
[[ECB]] [[CBC]] [[OFB]] [[CFB]] [[CTR]] [[XTS]] [[GCM]]&lt;br /&gt;
&lt;br /&gt;
compression :&lt;br /&gt;
[[ZLIB]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Cipher commands (see the `enc' command for more details)&lt;br /&gt;
aes-128-cbc       aes-128-ecb       aes-192-cbc       aes-192-ecb       &lt;br /&gt;
aes-256-cbc       aes-256-ecb       base64            bf                &lt;br /&gt;
bf-cbc            bf-cfb            bf-ecb            bf-ofb            &lt;br /&gt;
camellia-128-cbc  camellia-128-ecb  camellia-192-cbc  camellia-192-ecb  &lt;br /&gt;
camellia-256-cbc  camellia-256-ecb  cast              cast-cbc          &lt;br /&gt;
cast5-cbc         cast5-cfb         cast5-ecb         cast5-ofb         &lt;br /&gt;
des               des-cbc           des-cfb           des-ecb           &lt;br /&gt;
des-ede           des-ede-cbc       des-ede-cfb       des-ede-ofb       &lt;br /&gt;
des-ede3          des-ede3-cbc      des-ede3-cfb      des-ede3-ofb      &lt;br /&gt;
des-ofb           des3              desx              rc2               &lt;br /&gt;
rc2-40-cbc        rc2-64-cbc        rc2-cbc           rc2-cfb           &lt;br /&gt;
rc2-ecb           rc2-ofb           rc4               rc4-40            &lt;br /&gt;
seed              seed-cbc          seed-cfb          seed-ecb          &lt;br /&gt;
seed-ofb          zlib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl enc --help&lt;br /&gt;
unknown option '--help'&lt;br /&gt;
options are&lt;br /&gt;
-in &amp;lt;file&amp;gt;     input file&lt;br /&gt;
-out &amp;lt;file&amp;gt;    output file&lt;br /&gt;
-pass &amp;lt;arg&amp;gt;    pass phrase source&lt;br /&gt;
-e             encrypt&lt;br /&gt;
-d             decrypt&lt;br /&gt;
-a/-base64     base64 encode/decode, depending on encryption flag&lt;br /&gt;
-k             passphrase is the next argument&lt;br /&gt;
-kfile         passphrase is the first line of the file argument&lt;br /&gt;
-md            the next argument is the md to use to create a key&lt;br /&gt;
                 from a passphrase.  One of md2, md5, sha or sha1&lt;br /&gt;
-S             salt in hex is the next argument&lt;br /&gt;
-K/-iv         key/iv in hex is the next argument&lt;br /&gt;
-[pP]          print the iv/key (then exit if -P)&lt;br /&gt;
-bufsize &amp;lt;n&amp;gt;   buffer size&lt;br /&gt;
-nopad         disable standard block padding&lt;br /&gt;
-engine e      use engine e, possibly a hardware device.&lt;br /&gt;
Cipher Types&lt;br /&gt;
-aes-128-cbc               -aes-128-cfb               -aes-128-cfb1             &lt;br /&gt;
-aes-128-cfb8              -aes-128-ctr               -aes-128-ecb              &lt;br /&gt;
-aes-128-gcm               -aes-128-ofb               -aes-128-xts              &lt;br /&gt;
-aes-192-cbc               -aes-192-cfb               -aes-192-cfb1             &lt;br /&gt;
-aes-192-cfb8              -aes-192-ctr               -aes-192-ecb              &lt;br /&gt;
-aes-192-gcm               -aes-192-ofb               -aes-256-cbc              &lt;br /&gt;
-aes-256-cfb               -aes-256-cfb1              -aes-256-cfb8             &lt;br /&gt;
-aes-256-ctr               -aes-256-ecb               -aes-256-gcm              &lt;br /&gt;
-aes-256-ofb               -aes-256-xts               -aes128                   &lt;br /&gt;
-aes192                    -aes256                    -bf                       &lt;br /&gt;
-bf-cbc                    -bf-cfb                    -bf-ecb                   &lt;br /&gt;
-bf-ofb                    -blowfish                  -camellia-128-cbc         &lt;br /&gt;
-camellia-128-cfb          -camellia-128-cfb1         -camellia-128-cfb8        &lt;br /&gt;
-camellia-128-ecb          -camellia-128-ofb          -camellia-192-cbc         &lt;br /&gt;
-camellia-192-cfb          -camellia-192-cfb1         -camellia-192-cfb8        &lt;br /&gt;
-camellia-192-ecb          -camellia-192-ofb          -camellia-256-cbc         &lt;br /&gt;
-camellia-256-cfb          -camellia-256-cfb1         -camellia-256-cfb8        &lt;br /&gt;
-camellia-256-ecb          -camellia-256-ofb          -camellia128              &lt;br /&gt;
-camellia192               -camellia256               -cast                     &lt;br /&gt;
-cast-cbc                  -cast5-cbc                 -cast5-cfb                &lt;br /&gt;
-cast5-ecb                 -cast5-ofb                 -des                      &lt;br /&gt;
-des-cbc                   -des-cfb                   -des-cfb1                 &lt;br /&gt;
-des-cfb8                  -des-ecb                   -des-ede                  &lt;br /&gt;
-des-ede-cbc               -des-ede-cfb               -des-ede-ofb              &lt;br /&gt;
-des-ede3                  -des-ede3-cbc              -des-ede3-cfb             &lt;br /&gt;
-des-ede3-cfb1             -des-ede3-cfb8             -des-ede3-ofb             &lt;br /&gt;
-des-ofb                   -des3                      -desx                     &lt;br /&gt;
-desx-cbc                  -id-aes128-GCM             -id-aes192-GCM            &lt;br /&gt;
-id-aes256-GCM             -rc2                       -rc2-40-cbc               &lt;br /&gt;
-rc2-64-cbc                -rc2-cbc                   -rc2-cfb                  &lt;br /&gt;
-rc2-ecb                   -rc2-ofb                   -rc4                      &lt;br /&gt;
-rc4-40                    -rc4-hmac-md5              -seed                     &lt;br /&gt;
-seed-cbc                  -seed-cfb                  -seed-ecb                 &lt;br /&gt;
-seed-ofb  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Mail / SMIME ====&lt;br /&gt;
&lt;br /&gt;
===== smime v2 pkcs7 1.5 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl smime --help&lt;br /&gt;
Usage smime [options] cert.pem ...&lt;br /&gt;
where options are&lt;br /&gt;
-encrypt       encrypt message&lt;br /&gt;
-decrypt       decrypt encrypted message&lt;br /&gt;
-sign          sign message&lt;br /&gt;
-verify        verify signed message&lt;br /&gt;
-pk7out        output PKCS#7 structure&lt;br /&gt;
-des3          encrypt with triple DES&lt;br /&gt;
-des           encrypt with DES&lt;br /&gt;
-seed          encrypt with SEED&lt;br /&gt;
-rc2-40        encrypt with RC2-40 (default)&lt;br /&gt;
-rc2-64        encrypt with RC2-64&lt;br /&gt;
-rc2-128       encrypt with RC2-128&lt;br /&gt;
-aes128, -aes192, -aes256&lt;br /&gt;
               encrypt PEM output with cbc aes&lt;br /&gt;
-camellia128, -camellia192, -camellia256&lt;br /&gt;
               encrypt PEM output with cbc camellia&lt;br /&gt;
-nointern      don't search certificates in message for signer&lt;br /&gt;
-nosigs        don't verify message signature&lt;br /&gt;
-noverify      don't verify signers certificate&lt;br /&gt;
-nocerts       don't include signers certificate when signing&lt;br /&gt;
-nodetach      use opaque signing&lt;br /&gt;
-noattr        don't include any signed attributes&lt;br /&gt;
-binary        don't translate message to text&lt;br /&gt;
-certfile file other certificates file&lt;br /&gt;
-signer file   signer certificate file&lt;br /&gt;
-recip  file   recipient certificate file for decryption&lt;br /&gt;
-in file       input file&lt;br /&gt;
-inform arg    input format SMIME (default), PEM or DER&lt;br /&gt;
-inkey file    input private key (if not signer or recipient)&lt;br /&gt;
-keyform arg   input private key format (PEM or ENGINE)&lt;br /&gt;
-out file      output file&lt;br /&gt;
-outform arg   output format SMIME (default), PEM or DER&lt;br /&gt;
-content file  supply or override content for detached signature&lt;br /&gt;
-to addr       to address&lt;br /&gt;
-from ad       from address&lt;br /&gt;
-subject s     subject&lt;br /&gt;
-text          include or delete text MIME headers&lt;br /&gt;
-CApath dir    trusted certificates directory&lt;br /&gt;
-CAfile file   trusted certificates file&lt;br /&gt;
-crl_check     check revocation status of signer's certificate using CRLs&lt;br /&gt;
-crl_check_all check revocation status of signer's certificate chain using CRLs&lt;br /&gt;
-engine e      use engine e, possibly a hardware device.&lt;br /&gt;
-passin arg    input file pass phrase source&lt;br /&gt;
-rand file:file:...&lt;br /&gt;
               load the file (or the files in the directory) into&lt;br /&gt;
               the random number generator&lt;br /&gt;
cert.pem       recipient certificate(s) for encryption&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== smime v3 cms =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl cms --help&lt;br /&gt;
Usage cms [options] cert.pem ...&lt;br /&gt;
where options are&lt;br /&gt;
-encrypt       encrypt message&lt;br /&gt;
-decrypt       decrypt encrypted message&lt;br /&gt;
-sign          sign message&lt;br /&gt;
-verify        verify signed message&lt;br /&gt;
-cmsout        output CMS structure&lt;br /&gt;
-des3          encrypt with triple DES&lt;br /&gt;
-des           encrypt with DES&lt;br /&gt;
-seed          encrypt with SEED&lt;br /&gt;
-rc2-40        encrypt with RC2-40 (default)&lt;br /&gt;
-rc2-64        encrypt with RC2-64&lt;br /&gt;
-rc2-128       encrypt with RC2-128&lt;br /&gt;
-aes128, -aes192, -aes256&lt;br /&gt;
               encrypt PEM output with cbc aes&lt;br /&gt;
-camellia128, -camellia192, -camellia256&lt;br /&gt;
               encrypt PEM output with cbc camellia&lt;br /&gt;
-nointern      don't search certificates in message for signer&lt;br /&gt;
-nosigs        don't verify message signature&lt;br /&gt;
-noverify      don't verify signers certificate&lt;br /&gt;
-nocerts       don't include signers certificate when signing&lt;br /&gt;
-nodetach      use opaque signing&lt;br /&gt;
-noattr        don't include any signed attributes&lt;br /&gt;
-binary        don't translate message to text&lt;br /&gt;
-certfile file other certificates file&lt;br /&gt;
-certsout file certificate output file&lt;br /&gt;
-signer file   signer certificate file&lt;br /&gt;
-recip  file   recipient certificate file for decryption&lt;br /&gt;
-keyid         use subject key identifier&lt;br /&gt;
-in file       input file&lt;br /&gt;
-inform arg    input format SMIME (default), PEM or DER&lt;br /&gt;
-inkey file    input private key (if not signer or recipient)&lt;br /&gt;
-keyform arg   input private key format (PEM or ENGINE)&lt;br /&gt;
-out file      output file&lt;br /&gt;
-outform arg   output format SMIME (default), PEM or DER&lt;br /&gt;
-content file  supply or override content for detached signature&lt;br /&gt;
-to addr       to address&lt;br /&gt;
-from ad       from address&lt;br /&gt;
-subject s     subject&lt;br /&gt;
-text          include or delete text MIME headers&lt;br /&gt;
-CApath dir    trusted certificates directory&lt;br /&gt;
-CAfile file   trusted certificates file&lt;br /&gt;
-crl_check     check revocation status of signer's certificate using CRLs&lt;br /&gt;
-crl_check_all check revocation status of signer's certificate chain using CRLs&lt;br /&gt;
-engine e      use engine e, possibly a hardware device.&lt;br /&gt;
-passin arg    input file pass phrase source&lt;br /&gt;
-rand file:file:...&lt;br /&gt;
               load the file (or the files in the directory) into&lt;br /&gt;
               the random number generator&lt;br /&gt;
cert.pem       recipient certificate(s) for encryption&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create / Handle Public Key Certificates ===&lt;br /&gt;
&lt;br /&gt;
This requires you have a knowledge of what PKI is ( Certificate Authorities, Certificate Request, Certificate, Public Key, Private Key )&lt;br /&gt;
&lt;br /&gt;
Classical use case is to obtain a valid Certificate for a Secured Web site ( https protocol ).&lt;br /&gt;
First you create a Private Key ( will be created together with Public key ).&lt;br /&gt;
Then create a Certificate Request for that private key with some informations for purpose of future Certificate.&lt;br /&gt;
Then send that Certificate Request to a Certificate Authority ( CA ) that will issue a Certificate that CA signed. For well known CA you need to pay. &lt;br /&gt;
Up to you to install your Private key together with the received Certificate on your system. &lt;br /&gt;
&lt;br /&gt;
It exists graphical front-end to operate openssl wihtin a GUI : [http://xca.sourceforge.net/ XCA]&lt;br /&gt;
&lt;br /&gt;
==== Key Generation ====&lt;br /&gt;
&lt;br /&gt;
===== rsa / genrsa =====&lt;br /&gt;
&lt;br /&gt;
RSA is the most common type of Public/Private Key.&lt;br /&gt;
Private Key part should never be disclosed while public key part is ... public.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl genrsa --help&lt;br /&gt;
usage: genrsa [args] [numbits]&lt;br /&gt;
 -des            encrypt the generated key with DES in cbc mode&lt;br /&gt;
 -des3           encrypt the generated key with DES in ede cbc mode (168 bit key)&lt;br /&gt;
 -seed&lt;br /&gt;
                 encrypt PEM output with cbc seed&lt;br /&gt;
 -aes128, -aes192, -aes256&lt;br /&gt;
                 encrypt PEM output with cbc aes&lt;br /&gt;
 -camellia128, -camellia192, -camellia256&lt;br /&gt;
                 encrypt PEM output with cbc camellia&lt;br /&gt;
 -out file       output the key to 'file&lt;br /&gt;
 -passout arg    output file pass phrase source&lt;br /&gt;
 -f4             use F4 (0x10001) for the E value&lt;br /&gt;
 -3              use 3 for the E value&lt;br /&gt;
 -engine e       use engine e, possibly a hardware device.&lt;br /&gt;
 -rand file:file:...&lt;br /&gt;
                 load the file (or the files in the directory) into&lt;br /&gt;
                 the random number generator&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rsa help&lt;br /&gt;
unknown option help&lt;br /&gt;
rsa [options] &amp;lt;infile &amp;gt;outfile&lt;br /&gt;
where options are&lt;br /&gt;
 -inform arg     input format - one of DER NET PEM&lt;br /&gt;
 -outform arg    output format - one of DER NET PEM&lt;br /&gt;
 -in arg         input file&lt;br /&gt;
 -sgckey         Use IIS SGC key format&lt;br /&gt;
 -passin arg     input file pass phrase source&lt;br /&gt;
 -out arg        output file&lt;br /&gt;
 -passout arg    output file pass phrase source&lt;br /&gt;
 -des            encrypt PEM output with cbc des&lt;br /&gt;
 -des3           encrypt PEM output with ede cbc des using 168 bit key&lt;br /&gt;
 -seed           encrypt PEM output with cbc seed&lt;br /&gt;
 -aes128, -aes192, -aes256&lt;br /&gt;
                 encrypt PEM output with cbc aes&lt;br /&gt;
 -camellia128, -camellia192, -camellia256&lt;br /&gt;
                 encrypt PEM output with cbc camellia&lt;br /&gt;
 -text           print the key in text&lt;br /&gt;
 -noout          don't print key out&lt;br /&gt;
 -modulus        print the RSA key modulus&lt;br /&gt;
 -check          verify key consistency&lt;br /&gt;
 -pubin          expect a public key in input file&lt;br /&gt;
 -pubout         output a public key&lt;br /&gt;
 -engine e       use engine e, possibly a hardware device.&lt;br /&gt;
error in rsa&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== dsa / gendsa=====&lt;br /&gt;
&lt;br /&gt;
dsa is a less common Public/Private key scheme, but can be seen anyway, so ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl gendsa&lt;br /&gt;
usage: gendsa [args] dsaparam-file&lt;br /&gt;
 -out file - output the key to 'file'&lt;br /&gt;
 -des      - encrypt the generated key with DES in cbc mode&lt;br /&gt;
 -des3     - encrypt the generated key with DES in ede cbc mode (168 bit key)&lt;br /&gt;
 -seed&lt;br /&gt;
                 encrypt PEM output with cbc seed&lt;br /&gt;
 -aes128, -aes192, -aes256&lt;br /&gt;
                 encrypt PEM output with cbc aes&lt;br /&gt;
 -camellia128, -camellia192, -camellia256&lt;br /&gt;
                 encrypt PEM output with cbc camellia&lt;br /&gt;
 -engine e - use engine e, possibly a hardware device.&lt;br /&gt;
 -rand file:file:...&lt;br /&gt;
           - load the file (or the files in the directory) into&lt;br /&gt;
             the random number generator&lt;br /&gt;
 dsaparam-file&lt;br /&gt;
           - a DSA parameter file as generated by the dsaparam command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
OpenSSL&amp;gt; dsa help&lt;br /&gt;
unknown option help&lt;br /&gt;
dsa [options] &amp;lt;infile &amp;gt;outfile&lt;br /&gt;
where options are&lt;br /&gt;
 -inform arg     input format - DER or PEM&lt;br /&gt;
 -outform arg    output format - DER or PEM&lt;br /&gt;
 -in arg         input file&lt;br /&gt;
 -passin arg     input file pass phrase source&lt;br /&gt;
 -out arg        output file&lt;br /&gt;
 -passout arg    output file pass phrase source&lt;br /&gt;
 -engine e       use engine e, possibly a hardware device.&lt;br /&gt;
 -des            encrypt PEM output with cbc des&lt;br /&gt;
 -des3           encrypt PEM output with ede cbc des using 168 bit key&lt;br /&gt;
 -aes128, -aes192, -aes256&lt;br /&gt;
                 encrypt PEM output with cbc aes&lt;br /&gt;
 -camellia128, -camellia192, -camellia256&lt;br /&gt;
                 encrypt PEM output with cbc camellia&lt;br /&gt;
 -seed           encrypt PEM output with cbc seed&lt;br /&gt;
 -text           print the key in text&lt;br /&gt;
 -noout          don't print key out&lt;br /&gt;
 -modulus        print the DSA public value&lt;br /&gt;
error in dsa&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Elliptic Curves / ec ecparam =====&lt;br /&gt;
&lt;br /&gt;
[[Elliptic_Curve_Cryptography]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl ecparam --help&lt;br /&gt;
unknown option --help&lt;br /&gt;
ecparam [options] &amp;lt;infile &amp;gt;outfile&lt;br /&gt;
where options are&lt;br /&gt;
 -inform arg       input format - default PEM (DER or PEM)&lt;br /&gt;
 -outform arg      output format - default PEM&lt;br /&gt;
 -in  arg          input file  - default stdin&lt;br /&gt;
 -out arg          output file - default stdout&lt;br /&gt;
 -noout            do not print the ec parameter&lt;br /&gt;
 -text             print the ec parameters in text form&lt;br /&gt;
 -check            validate the ec parameters&lt;br /&gt;
 -C                print a 'C' function creating the parameters&lt;br /&gt;
 -name arg         use the ec parameters with 'short name' name&lt;br /&gt;
 -list_curves      prints a list of all currently available curve 'short names'&lt;br /&gt;
 -conv_form arg    specifies the point conversion form &lt;br /&gt;
                   possible values: compressed&lt;br /&gt;
                                    uncompressed (default)&lt;br /&gt;
                                    hybrid&lt;br /&gt;
 -param_enc arg    specifies the way the ec parameters are encoded&lt;br /&gt;
                   in the asn1 der encoding&lt;br /&gt;
                   possible values: named_curve (default)&lt;br /&gt;
                                    explicit&lt;br /&gt;
 -no_seed          if 'explicit' parameters are chosen do not use the seed&lt;br /&gt;
 -genkey           generate ec key&lt;br /&gt;
 -rand file        files to use for random number input&lt;br /&gt;
 -engine e         use engine e, possibly a hardware device&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ec [options] &amp;lt;infile &amp;gt;outfile&lt;br /&gt;
where options are&lt;br /&gt;
 -inform arg     input format - DER or PEM&lt;br /&gt;
 -outform arg    output format - DER or PEM&lt;br /&gt;
 -in arg         input file&lt;br /&gt;
 -passin arg     input file pass phrase source&lt;br /&gt;
 -out arg        output file&lt;br /&gt;
 -passout arg    output file pass phrase source&lt;br /&gt;
 -engine e       use engine e, possibly a hardware device.&lt;br /&gt;
 -des            encrypt PEM output, instead of 'des' every other &lt;br /&gt;
                 cipher supported by OpenSSL can be used&lt;br /&gt;
 -text           print the key&lt;br /&gt;
 -noout          don't print key out&lt;br /&gt;
 -param_out      print the elliptic curve parameters&lt;br /&gt;
 -conv_form arg  specifies the point conversion form &lt;br /&gt;
                 possible values: compressed&lt;br /&gt;
                                  uncompressed (default)&lt;br /&gt;
                                   hybrid&lt;br /&gt;
 -param_enc arg  specifies the way the ec parameters are encoded&lt;br /&gt;
                 in the asn1 der encoding&lt;br /&gt;
                 possible values: named_curve (default)&lt;br /&gt;
                                  explicit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Certificate Authority / ca ====&lt;br /&gt;
&lt;br /&gt;
When you want to act as a Certificate Authority.&lt;br /&gt;
&lt;br /&gt;
OpenSSL&amp;gt; ca&lt;br /&gt;
Using configuration from /usr/lib/ssl/openssl.cnf&lt;br /&gt;
Error opening CA private key ./demoCA/private/cakey.pem&lt;br /&gt;
140492277311144:error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('./demoCA/private/cakey.pem','r')&lt;br /&gt;
140492277311144:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:&lt;br /&gt;
unable to load CA private key&lt;br /&gt;
error in ca&lt;br /&gt;
&lt;br /&gt;
By default you don't have ca created...&lt;br /&gt;
&lt;br /&gt;
==== Certificate Request / pkcs10 / req ====&lt;br /&gt;
&lt;br /&gt;
OpenSSL&amp;gt; req ?&lt;br /&gt;
unknown option ?&lt;br /&gt;
req [options] &amp;lt;infile &amp;gt;outfile&lt;br /&gt;
where options  are&lt;br /&gt;
 -inform arg    input format - DER or PEM&lt;br /&gt;
 -outform arg   output format - DER or PEM&lt;br /&gt;
 -in arg        input file&lt;br /&gt;
 -out arg       output file&lt;br /&gt;
 -text          text form of request&lt;br /&gt;
 -pubkey        output public key&lt;br /&gt;
 -noout         do not output REQ&lt;br /&gt;
 -verify        verify signature on REQ&lt;br /&gt;
 -modulus       RSA modulus&lt;br /&gt;
 -nodes         don't encrypt the output key&lt;br /&gt;
 -engine e      use engine e, possibly a hardware device&lt;br /&gt;
 -subject       output the request's subject&lt;br /&gt;
 -passin        private key password source&lt;br /&gt;
 -key file      use the private key contained in file&lt;br /&gt;
 -keyform arg   key file format&lt;br /&gt;
 -keyout arg    file to send the key to&lt;br /&gt;
 -rand file:file:...&lt;br /&gt;
                load the file (or the files in the directory) into&lt;br /&gt;
                the random number generator&lt;br /&gt;
 -newkey rsa:bits generate a new RSA key of 'bits' in size&lt;br /&gt;
 -newkey dsa:file generate a new DSA key, parameters taken from CA in 'file'&lt;br /&gt;
 -newkey ec:file generate a new EC key, parameters taken from CA in 'file'&lt;br /&gt;
 -[digest]      Digest to sign with (md5, sha1, md2, mdc2, md4)&lt;br /&gt;
 -config file   request template file.&lt;br /&gt;
 -subj arg      set or modify request subject&lt;br /&gt;
 -multivalue-rdn enable support for multivalued RDNs&lt;br /&gt;
 -new           new request.&lt;br /&gt;
 -batch         do not ask anything during request generation&lt;br /&gt;
 -x509          output a x509 structure instead of a cert. req.&lt;br /&gt;
 -days          number of days a certificate generated by -x509 is valid for.&lt;br /&gt;
 -set_serial    serial number to use for a certificate generated by -x509.&lt;br /&gt;
 -newhdr        output &amp;quot;NEW&amp;quot; in the header lines&lt;br /&gt;
 -asn1-kludge   Output the 'request' in a format that is wrong but some CA's&lt;br /&gt;
                have been reported as requiring&lt;br /&gt;
 -extensions .. specify certificate extension section (override value in config file)&lt;br /&gt;
 -reqexts ..    specify request extension section (override value in config file)&lt;br /&gt;
 -utf8          input characters are UTF8 (default ASCII)&lt;br /&gt;
 -nameopt arg    - various certificate name options&lt;br /&gt;
 -reqopt arg    - various request text options&lt;br /&gt;
&lt;br /&gt;
error in req&lt;br /&gt;
&lt;br /&gt;
==== Certificates AKA x509  ====&lt;br /&gt;
&lt;br /&gt;
x509 command allows you to display content of a x509 certificate and to convert it from/to [[PEM]], [[NET]] or [[DER]] formats.&lt;br /&gt;
&lt;br /&gt;
OpenSSL&amp;gt; x509 help&lt;br /&gt;
unknown option help&lt;br /&gt;
usage: x509 args&lt;br /&gt;
 -inform arg     - input format - default PEM (one of DER, NET or PEM)&lt;br /&gt;
 -outform arg    - output format - default PEM (one of DER, NET or PEM)&lt;br /&gt;
 -keyform arg    - private key format - default PEM&lt;br /&gt;
 -CAform arg     - CA format - default PEM&lt;br /&gt;
 -CAkeyform arg  - CA key format - default PEM&lt;br /&gt;
 -in arg         - input file - default stdin&lt;br /&gt;
 -out arg        - output file - default stdout&lt;br /&gt;
 -passin arg     - private key password source&lt;br /&gt;
 -serial         - print serial number value&lt;br /&gt;
 -subject_hash   - print subject hash value&lt;br /&gt;
 -subject_hash_old   - print old-style (MD5) subject hash value&lt;br /&gt;
 -issuer_hash    - print issuer hash value&lt;br /&gt;
 -issuer_hash_old    - print old-style (MD5) issuer hash value&lt;br /&gt;
 -hash           - synonym for -subject_hash&lt;br /&gt;
 -subject        - print subject DN&lt;br /&gt;
 -issuer         - print issuer DN&lt;br /&gt;
 -email          - print email address(es)&lt;br /&gt;
 -startdate      - notBefore field&lt;br /&gt;
 -enddate        - notAfter field&lt;br /&gt;
 -purpose        - print out certificate purposes&lt;br /&gt;
 -dates          - both Before and After dates&lt;br /&gt;
 -modulus        - print the RSA key modulus&lt;br /&gt;
 -pubkey         - output the public key&lt;br /&gt;
 -fingerprint    - print the certificate fingerprint&lt;br /&gt;
 -alias          - output certificate alias&lt;br /&gt;
 -noout          - no certificate output&lt;br /&gt;
 -ocspid         - print OCSP hash values for the subject name and public key&lt;br /&gt;
 -ocsp_uri       - print OCSP Responder URL(s)&lt;br /&gt;
 -trustout       - output a &amp;quot;trusted&amp;quot; certificate&lt;br /&gt;
 -clrtrust       - clear all trusted purposes&lt;br /&gt;
 -clrreject      - clear all rejected purposes&lt;br /&gt;
 -addtrust arg   - trust certificate for a given purpose&lt;br /&gt;
 -addreject arg  - reject certificate for a given purpose&lt;br /&gt;
 -setalias arg   - set certificate alias&lt;br /&gt;
 -days arg       - How long till expiry of a signed certificate - def 30 days&lt;br /&gt;
 -checkend arg   - check whether the cert expires in the next arg seconds&lt;br /&gt;
                   exit 1 if so, 0 if not&lt;br /&gt;
 -signkey arg    - self sign cert with arg&lt;br /&gt;
 -x509toreq      - output a certification request object&lt;br /&gt;
 -req            - input is a certificate request, sign and output.&lt;br /&gt;
 -CA arg         - set the CA certificate, must be PEM format.&lt;br /&gt;
 -CAkey arg      - set the CA key, must be PEM format&lt;br /&gt;
                   missing, it is assumed to be in the CA file.&lt;br /&gt;
 -CAcreateserial - create serial number file if it does not exist&lt;br /&gt;
 -CAserial arg   - serial file&lt;br /&gt;
 -set_serial     - serial number to use&lt;br /&gt;
 -text           - print the certificate in text form&lt;br /&gt;
 -C              - print out C code forms&lt;br /&gt;
 -md2/-md5/-sha1/-mdc2 - digest to use&lt;br /&gt;
 -extfile        - configuration file with X509V3 extensions to add&lt;br /&gt;
 -extensions     - section from config file with X509V3 extensions to add&lt;br /&gt;
 -clrext         - delete extensions before signing and input certificate&lt;br /&gt;
 -nameopt arg    - various certificate name options&lt;br /&gt;
 -engine e       - use engine e, possibly a hardware device.&lt;br /&gt;
 -certopt arg    - various certificate text options&lt;br /&gt;
&lt;br /&gt;
==== Client Certificates AKA pkcs12 ====&lt;br /&gt;
&lt;br /&gt;
Client Certificate is a language abuse, but anyway it is kind of file you need to install on your system when SSL/TLS server require Client Authentication.&lt;br /&gt;
Those kind of certificates credentials are known with .'''pkcs12''' or .'''pfx''' file extension.&lt;br /&gt;
They contains a x509 Certificate and the public/private key of client. Those files are then very sensible to handle with same security as a private key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: pkcs12 [options]&lt;br /&gt;
where options are&lt;br /&gt;
-export       output PKCS12 file&lt;br /&gt;
-chain        add certificate chain&lt;br /&gt;
-inkey file   private key if not infile&lt;br /&gt;
-certfile f   add all certs in f&lt;br /&gt;
-CApath arg   - PEM format directory of CA's&lt;br /&gt;
-CAfile arg   - PEM format file of CA's&lt;br /&gt;
-name &amp;quot;name&amp;quot;  use name as friendly name&lt;br /&gt;
-caname &amp;quot;nm&amp;quot;  use nm as CA friendly name (can be used more than once).&lt;br /&gt;
-in  infile   input filename&lt;br /&gt;
-out outfile  output filename&lt;br /&gt;
-noout        don't output anything, just verify.&lt;br /&gt;
-nomacver     don't verify MAC.&lt;br /&gt;
-nocerts      don't output certificates.&lt;br /&gt;
-clcerts      only output client certificates.&lt;br /&gt;
-cacerts      only output CA certificates.&lt;br /&gt;
-nokeys       don't output private keys.&lt;br /&gt;
-info         give info about PKCS#12 structure.&lt;br /&gt;
-des          encrypt private keys with DES&lt;br /&gt;
-des3         encrypt private keys with triple DES (default)&lt;br /&gt;
-seed         encrypt private keys with seed&lt;br /&gt;
-aes128, -aes192, -aes256&lt;br /&gt;
              encrypt PEM output with cbc aes&lt;br /&gt;
-camellia128, -camellia192, -camellia256&lt;br /&gt;
              encrypt PEM output with cbc camellia&lt;br /&gt;
-nodes        don't encrypt private keys&lt;br /&gt;
-noiter       don't use encryption iteration&lt;br /&gt;
-nomaciter    don't use MAC iteration&lt;br /&gt;
-maciter      use MAC iteration&lt;br /&gt;
-nomac        don't generate MAC&lt;br /&gt;
-twopass      separate MAC, encryption passwords&lt;br /&gt;
-descert      encrypt PKCS#12 certificates with triple DES (default RC2-40)&lt;br /&gt;
-certpbe alg  specify certificate PBE algorithm (default RC2-40)&lt;br /&gt;
-keypbe alg   specify private key PBE algorithm (default 3DES)&lt;br /&gt;
-macalg alg   digest algorithm used in MAC (default SHA1)&lt;br /&gt;
-keyex        set MS key exchange type&lt;br /&gt;
-keysig       set MS key signature type&lt;br /&gt;
-password p   set import/export password source&lt;br /&gt;
-passin p     input file pass phrase source&lt;br /&gt;
-passout p    output file pass phrase source&lt;br /&gt;
-engine e     use engine e, possibly a hardware device.&lt;br /&gt;
-rand file:file:...&lt;br /&gt;
              load the file (or the files in the directory) into&lt;br /&gt;
              the random number generator&lt;br /&gt;
-CSP name     Microsoft CSP name&lt;br /&gt;
-LMK          Add local machine keyset attribute to private key&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SSL/TLS and Certificates ONLINE services ===&lt;br /&gt;
&lt;br /&gt;
==== s_server ====&lt;br /&gt;
&lt;br /&gt;
This implements a generic SSL/TLS server. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl s_server&lt;br /&gt;
Error opening server certificate private key file server.pem&lt;br /&gt;
139811478357672:error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('server.pem','r')&lt;br /&gt;
139811478357672:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:&lt;br /&gt;
unable to load server certificate private key file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''you need to provide certificate and private key to be able to run SSL/TLS server.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl s_server --help&lt;br /&gt;
unknown option --help&lt;br /&gt;
usage: s_server [args ...]&lt;br /&gt;
&lt;br /&gt;
 -accept arg   - port to accept on (default is 4433)&lt;br /&gt;
 -context arg  - set session ID context&lt;br /&gt;
 -verify arg   - turn on peer certificate verification&lt;br /&gt;
 -Verify arg   - turn on peer certificate verification, must have a cert.&lt;br /&gt;
 -cert arg     - certificate file to use&lt;br /&gt;
                 (default is server.pem)&lt;br /&gt;
 -crl_check    - check the peer certificate has not been revoked by its CA.&lt;br /&gt;
                 The CRL(s) are appended to the certificate file&lt;br /&gt;
 -crl_check_all - check the peer certificate has not been revoked by its CA&lt;br /&gt;
                 or any other CRL in the CA chain. CRL(s) are appened to the&lt;br /&gt;
                 the certificate file.&lt;br /&gt;
 -certform arg - certificate format (PEM or DER) PEM default&lt;br /&gt;
 -key arg      - Private Key file to use, in cert file if&lt;br /&gt;
                 not specified (default is server.pem)&lt;br /&gt;
 -keyform arg  - key format (PEM, DER or ENGINE) PEM default&lt;br /&gt;
 -pass arg     - private key file pass phrase source&lt;br /&gt;
 -dcert arg    - second certificate file to use (usually for DSA)&lt;br /&gt;
 -dcertform x  - second certificate format (PEM or DER) PEM default&lt;br /&gt;
 -dkey arg     - second private key file to use (usually for DSA)&lt;br /&gt;
 -dkeyform arg - second key format (PEM, DER or ENGINE) PEM default&lt;br /&gt;
 -dpass arg    - second private key file pass phrase source&lt;br /&gt;
 -dhparam arg  - DH parameter file to use, in cert file if not specified&lt;br /&gt;
                 or a default set of parameters is used&lt;br /&gt;
 -named_curve arg  - Elliptic curve name to use for ephemeral ECDH keys.&lt;br /&gt;
                 Use &amp;quot;openssl ecparam -list_curves&amp;quot; for all names&lt;br /&gt;
                 (default is nistp256).&lt;br /&gt;
 -nbio         - Run with non-blocking IO&lt;br /&gt;
 -nbio_test    - test with the non-blocking test bio&lt;br /&gt;
 -crlf         - convert LF from terminal into CRLF&lt;br /&gt;
 -debug        - Print more output&lt;br /&gt;
 -msg          - Show protocol messages&lt;br /&gt;
 -state        - Print the SSL states&lt;br /&gt;
 -CApath arg   - PEM format directory of CA's&lt;br /&gt;
 -CAfile arg   - PEM format file of CA's&lt;br /&gt;
 -nocert       - Don't use any certificates (Anon-DH)&lt;br /&gt;
 -cipher arg   - play with 'openssl ciphers' to see what goes here&lt;br /&gt;
 -serverpref   - Use server's cipher preferences&lt;br /&gt;
 -quiet        - No server output&lt;br /&gt;
 -no_tmp_rsa   - Do not generate a tmp RSA key&lt;br /&gt;
 -psk_hint arg - PSK identity hint to use&lt;br /&gt;
 -psk arg      - PSK in hex (without 0x)&lt;br /&gt;
 -srpvfile file      - The verifier file for SRP&lt;br /&gt;
 -srpuserseed string - A seed string for a default user salt.&lt;br /&gt;
 -ssl2         - Just talk SSLv2&lt;br /&gt;
 -ssl3         - Just talk SSLv3&lt;br /&gt;
 -tls1_2       - Just talk TLSv1.2&lt;br /&gt;
 -tls1_1       - Just talk TLSv1.1&lt;br /&gt;
 -tls1         - Just talk TLSv1&lt;br /&gt;
 -dtls1        - Just talk DTLSv1&lt;br /&gt;
 -timeout      - Enable timeouts&lt;br /&gt;
 -mtu          - Set link layer MTU&lt;br /&gt;
 -chain        - Read a certificate chain&lt;br /&gt;
 -no_ssl2      - Just disable SSLv2&lt;br /&gt;
 -no_ssl3      - Just disable SSLv3&lt;br /&gt;
 -no_tls1      - Just disable TLSv1&lt;br /&gt;
 -no_tls1_1    - Just disable TLSv1.1&lt;br /&gt;
 -no_tls1_2    - Just disable TLSv1.2&lt;br /&gt;
 -no_dhe       - Disable ephemeral DH&lt;br /&gt;
 -no_ecdhe     - Disable ephemeral ECDH&lt;br /&gt;
 -bugs         - Turn on SSL bug compatibility&lt;br /&gt;
 -www          - Respond to a 'GET /' with a status page&lt;br /&gt;
 -WWW          - Respond to a 'GET /&amp;lt;path&amp;gt; HTTP/1.0' with file ./&amp;lt;path&amp;gt;&lt;br /&gt;
 -HTTP         - Respond to a 'GET /&amp;lt;path&amp;gt; HTTP/1.0' with file ./&amp;lt;path&amp;gt;&lt;br /&gt;
                 with the assumption it contains a complete HTTP response.&lt;br /&gt;
 -engine id    - Initialise and use the specified engine&lt;br /&gt;
 -id_prefix arg - Generate SSL/TLS session IDs prefixed by 'arg'&lt;br /&gt;
 -rand file:file:...&lt;br /&gt;
 -servername host - servername for HostName TLS extension&lt;br /&gt;
 -servername_fatal - on mismatch send fatal alert (default warning alert)&lt;br /&gt;
 -cert2 arg    - certificate file to use for servername&lt;br /&gt;
                 (default is server2.pem)&lt;br /&gt;
 -key2 arg     - Private Key file to use for servername, in cert file if&lt;br /&gt;
                 not specified (default is server2.pem)&lt;br /&gt;
 -tlsextdebug  - hex dump of all TLS extensions received&lt;br /&gt;
 -no_ticket    - disable use of RFC4507bis session tickets&lt;br /&gt;
 -legacy_renegotiation - enable use of legacy renegotiation (dangerous)&lt;br /&gt;
 -nextprotoneg arg - set the advertised protocols for the NPN extension (comma-separated list)&lt;br /&gt;
 -use_srtp profiles - Offer SRTP key management with a colon-separated profile list&lt;br /&gt;
 -keymatexport label   - Export keying material using label&lt;br /&gt;
 -keymatexportlen len  - Export len bytes of keying material (default 20)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== s_client ====&lt;br /&gt;
&lt;br /&gt;
This implements a generic SSL/TLS client&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
unknown option --help&lt;br /&gt;
usage: s_client args&lt;br /&gt;
&lt;br /&gt;
 -host host     - use -connect instead&lt;br /&gt;
 -port port     - use -connect instead&lt;br /&gt;
 -connect host:port - who to connect to (default is localhost:4433)&lt;br /&gt;
 -verify arg   - turn on peer certificate verification&lt;br /&gt;
 -cert arg     - certificate file to use, PEM format assumed&lt;br /&gt;
 -certform arg - certificate format (PEM or DER) PEM default&lt;br /&gt;
 -key arg      - Private key file to use, in cert file if&lt;br /&gt;
                 not specified but cert file is.&lt;br /&gt;
 -keyform arg  - key format (PEM or DER) PEM default&lt;br /&gt;
 -pass arg     - private key file pass phrase source&lt;br /&gt;
 -CApath arg   - PEM format directory of CA's&lt;br /&gt;
 -CAfile arg   - PEM format file of CA's&lt;br /&gt;
 -reconnect    - Drop and re-make the connection with the same Session-ID&lt;br /&gt;
 -pause        - sleep(1) after each read(2) and write(2) system call&lt;br /&gt;
 -showcerts    - show all certificates in the chain&lt;br /&gt;
 -debug        - extra output&lt;br /&gt;
 -msg          - Show protocol messages&lt;br /&gt;
 -nbio_test    - more ssl protocol testing&lt;br /&gt;
 -state        - print the 'ssl' states&lt;br /&gt;
 -nbio         - Run with non-blocking IO&lt;br /&gt;
 -crlf         - convert LF from terminal into CRLF&lt;br /&gt;
 -quiet        - no s_client output&lt;br /&gt;
 -ign_eof      - ignore input eof (default when -quiet)&lt;br /&gt;
 -no_ign_eof   - don't ignore input eof&lt;br /&gt;
 -psk_identity arg - PSK identity&lt;br /&gt;
 -psk arg      - PSK in hex (without 0x)&lt;br /&gt;
 -srpuser user     - SRP authentification for 'user'&lt;br /&gt;
 -srppass arg      - password for 'user'&lt;br /&gt;
 -srp_lateuser     - SRP username into second ClientHello message&lt;br /&gt;
 -srp_moregroups   - Tolerate other than the known g N values.&lt;br /&gt;
 -srp_strength int - minimal mength in bits for N (default 1024).&lt;br /&gt;
 -ssl2         - just use SSLv2&lt;br /&gt;
 -ssl3         - just use SSLv3&lt;br /&gt;
 -tls1_2       - just use TLSv1.2&lt;br /&gt;
 -tls1_1       - just use TLSv1.1&lt;br /&gt;
 -tls1         - just use TLSv1&lt;br /&gt;
 -dtls1        - just use DTLSv1&lt;br /&gt;
 -mtu          - set the link layer MTU&lt;br /&gt;
 -no_tls1_2/-no_tls1_1/-no_tls1/-no_ssl3/-no_ssl2 - turn off that protocol&lt;br /&gt;
 -bugs         - Switch on all SSL implementation bug workarounds&lt;br /&gt;
 -serverpref   - Use server's cipher preferences (only SSLv2)&lt;br /&gt;
 -cipher       - preferred cipher to use, use the 'openssl ciphers'&lt;br /&gt;
                 command to see what is available&lt;br /&gt;
 -starttls prot - use the STARTTLS command before starting TLS&lt;br /&gt;
                 for those protocols that support it, where&lt;br /&gt;
                 'prot' defines which one to assume.  Currently,&lt;br /&gt;
                 only &amp;quot;smtp&amp;quot;, &amp;quot;pop3&amp;quot;, &amp;quot;imap&amp;quot;, &amp;quot;ftp&amp;quot; and &amp;quot;xmpp&amp;quot;&lt;br /&gt;
                 are supported.&lt;br /&gt;
 -engine id    - Initialise and use the specified engine&lt;br /&gt;
 -rand file:file:...&lt;br /&gt;
 -sess_out arg - file to write SSL session to&lt;br /&gt;
 -sess_in arg  - file to read SSL session from&lt;br /&gt;
 -servername host  - Set TLS extension servername in ClientHello&lt;br /&gt;
 -tlsextdebug      - hex dump of all TLS extensions received&lt;br /&gt;
 -status           - request certificate status from server&lt;br /&gt;
 -no_ticket        - disable use of RFC4507bis session tickets&lt;br /&gt;
 -nextprotoneg arg - enable NPN extension, considering named protocols supported (comma-separated list)&lt;br /&gt;
 -legacy_renegotiation - enable use of legacy renegotiation (dangerous)&lt;br /&gt;
 -use_srtp profiles - Offer SRTP key management with a colon-separated profile list&lt;br /&gt;
 -keymatexport label   - Export keying material using label&lt;br /&gt;
 -keymatexportlen len  - Export len bytes of keying material (default 20)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== ocsp ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Signing / Digest and Timestamping ===&lt;br /&gt;
&lt;br /&gt;
==== Signing / Digest ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl dgst --help&lt;br /&gt;
unknown option '--help'&lt;br /&gt;
options are&lt;br /&gt;
-c              to output the digest with separating colons&lt;br /&gt;
-r              to output the digest in coreutils format&lt;br /&gt;
-d              to output debug info&lt;br /&gt;
-hex            output as hex dump&lt;br /&gt;
-binary         output in binary form&lt;br /&gt;
-hmac arg       set the HMAC key to arg&lt;br /&gt;
-non-fips-allow allow use of non FIPS digest&lt;br /&gt;
-sign   file    sign digest using private key in file&lt;br /&gt;
-verify file    verify a signature using public key in file&lt;br /&gt;
-prverify file  verify a signature using private key in file&lt;br /&gt;
-keyform arg    key file format (PEM or ENGINE)&lt;br /&gt;
-out filename   output to filename rather than stdout&lt;br /&gt;
-signature file signature to verify&lt;br /&gt;
-sigopt nm:v    signature parameter&lt;br /&gt;
-hmac key       create hashed MAC with key&lt;br /&gt;
-mac algorithm  create MAC (not neccessarily HMAC)&lt;br /&gt;
-macopt nm:v    MAC algorithm parameters or key&lt;br /&gt;
-engine e       use engine e, possibly a hardware device.&lt;br /&gt;
-md4            to use the md4 message digest algorithm&lt;br /&gt;
-md5            to use the md5 message digest algorithm&lt;br /&gt;
-ripemd160      to use the ripemd160 message digest algorithm&lt;br /&gt;
-sha            to use the sha message digest algorithm&lt;br /&gt;
-sha1           to use the sha1 message digest algorithm&lt;br /&gt;
-sha224         to use the sha224 message digest algorithm&lt;br /&gt;
-sha256         to use the sha256 message digest algorithm&lt;br /&gt;
-sha384         to use the sha384 message digest algorithm&lt;br /&gt;
-sha512         to use the sha512 message digest algorithm&lt;br /&gt;
-whirlpool      to use the whirlpool message digest algorithm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== timestamping ====&lt;br /&gt;
&lt;br /&gt;
openssl ts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
usage:&lt;br /&gt;
ts -query [-rand file:file:...] [-config configfile] [-data file_to_hash] [-digest digest_bytes][-md2|-md4|-md5|-sha|-sha1|-mdc2|-ripemd160] [-policy object_id] [-no_nonce] [-cert] [-in request.tsq] [-out request.tsq] [-text]&lt;br /&gt;
or&lt;br /&gt;
ts -reply [-config configfile] [-section tsa_section] [-queryfile request.tsq] [-passin password] [-signer tsa_cert.pem] [-inkey private_key.pem] [-chain certs_file.pem] [-policy object_id] [-in response.tsr] [-token_in] [-out response.tsr] [-token_out] [-text] [-engine id]&lt;br /&gt;
or&lt;br /&gt;
ts -verify [-data file_to_hash] [-digest digest_bytes] [-queryfile request.tsq] -in response.tsr [-token_in] -CApath ca_path -CAfile ca_file.pem -untrusted cert_file.pem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data handling ===&lt;br /&gt;
&lt;br /&gt;
==== ASN.1 ====&lt;br /&gt;
&lt;br /&gt;
[[DER]] decoding &lt;br /&gt;
&lt;br /&gt;
openssl asn1parse&lt;br /&gt;
&lt;br /&gt;
==== Base64 ====&lt;br /&gt;
&lt;br /&gt;
base64 encoding / decoding&lt;br /&gt;
&lt;br /&gt;
[[Base64]]&lt;br /&gt;
&lt;br /&gt;
===== a String =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl base64 -e &amp;lt;&amp;lt;&amp;lt; 'Welcome to openssl wiki'&lt;br /&gt;
V2VsY29tZSB0byBvcGVuc3NsIHdpa2kK&lt;br /&gt;
openssl base64 -d &amp;lt;&amp;lt;&amp;lt; 'V2VsY29tZSB0byBvcGVuc3NsIHdpa2kK'&lt;br /&gt;
Welcome to openssl wiki&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
warning '''base64 line length is limited to 76 characters by default in openssl''' ( and generated with 64 characters / line ).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl base64 -e &amp;lt;&amp;lt;&amp;lt; 'Welcome to openssl wiki with a very long line that splits...'&lt;br /&gt;
V2VsY29tZSB0byBvcGVuc3NsIHdpa2kgd2l0aCBhIHZlcnkgbG9uZyBsaW5lIHRo&lt;br /&gt;
YXQgc3BsaXRzLi4uCg==&lt;br /&gt;
openssl base64 -d &amp;lt;&amp;lt;&amp;lt; 'V2VsY29tZSB0byBvcGVuc3NsIHdpa2kgd2l0aCBhIHZlcnkgbG9uZyBsaW5lIHRoYXQgc3BsaXRzLi4uCg=='&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=&amp;gt; NOTHING !&lt;br /&gt;
&lt;br /&gt;
to be able to decode a base64 line without line feed that exceed 76 characters use -A option :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl base64 -d -A &amp;lt;&amp;lt;&amp;lt; 'V2VsY29tZSB0byBvcGVuc3NsIHdpa2kgd2l0aCBhIHZlcnkgbG9uZyBsaW5lIHRoYXQgc3BsaXRzLi4uCg=='&lt;br /&gt;
Welcome to openssl wiki with a very long line that splits...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is anyway better to actualy split base64 result in 64 characters lines since -A option is BUGGY ( limit with long files ).&lt;br /&gt;
&lt;br /&gt;
==== DER &amp;lt;-&amp;gt; PEM conversion ====&lt;br /&gt;
&lt;br /&gt;
on each command handling PEM and DER format an '''inform''' and '''outform''' options are provided to specify it.&lt;br /&gt;
Then it is easy to read it in format and write it in another&lt;br /&gt;
&lt;br /&gt;
==== pkcs8 / pkcs5 ====&lt;br /&gt;
&lt;br /&gt;
pkcs8 is a format to store private keys.&lt;br /&gt;
pkcs8 uses various pkcs5 version as subformat.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl pkcs8 --help&lt;br /&gt;
Usage pkcs8 [options]&lt;br /&gt;
where options are&lt;br /&gt;
-in file        input file&lt;br /&gt;
-inform X       input format (DER or PEM)&lt;br /&gt;
-passin arg     input file pass phrase source&lt;br /&gt;
-outform X      output format (DER or PEM)&lt;br /&gt;
-out file       output file&lt;br /&gt;
-passout arg    output file pass phrase source&lt;br /&gt;
-topk8          output PKCS8 file&lt;br /&gt;
-nooct          use (nonstandard) no octet format&lt;br /&gt;
-embed          use (nonstandard) embedded DSA parameters format&lt;br /&gt;
-nsdb           use (nonstandard) DSA Netscape DB format&lt;br /&gt;
-noiter         use 1 as iteration count&lt;br /&gt;
-nocrypt        use or expect unencrypted private key&lt;br /&gt;
-v2 alg         use PKCS#5 v2.0 and cipher &amp;quot;alg&amp;quot;&lt;br /&gt;
-v1 obj         use PKCS#5 v1.5 and cipher &amp;quot;alg&amp;quot;&lt;br /&gt;
 -engine e       use engine e, possibly a hardware device.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Diagnostics ===&lt;br /&gt;
&lt;br /&gt;
==== SSL/TLS session information ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl sess_id --help&lt;br /&gt;
unknown option --help&lt;br /&gt;
usage: sess_id args&lt;br /&gt;
&lt;br /&gt;
 -inform arg     - input format - default PEM (DER or PEM)&lt;br /&gt;
 -outform arg    - output format - default PEM&lt;br /&gt;
 -in arg         - input file - default stdin&lt;br /&gt;
 -out arg        - output file - default stdout&lt;br /&gt;
 -text           - print ssl session id details&lt;br /&gt;
 -cert           - output certificate &lt;br /&gt;
 -noout          - no CRL output&lt;br /&gt;
 -context arg    - set the session ID context&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Shell level]]&lt;/div&gt;</summary>
		<author><name>Frukto</name></author>
	</entry>
	<entry>
		<id>https://wiki.openssl.org/index.php?title=Command_Line_Utilities&amp;diff=1121</id>
		<title>Command Line Utilities</title>
		<link rel="alternate" type="text/html" href="https://wiki.openssl.org/index.php?title=Command_Line_Utilities&amp;diff=1121"/>
		<updated>2013-06-20T16:19:22Z</updated>

		<summary type="html">&lt;p&gt;Frukto: how to list commands, synopsis, minor changes in the getting started section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://www.openssl.org/docs/apps/openssl.html OpenSSL site command line tools]&lt;br /&gt;
&lt;br /&gt;
=== Getting started with your openssl toolkit ===&lt;br /&gt;
&lt;br /&gt;
When installed on your system openssl binary (usually /usr/bin/openssl) is an entry point for many functions. You call it following the pattern&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl command [ command_opts ] [ command_args ] &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternatively you can call it without arguments to enter the interactive mode with an 'OpenSSL&amp;gt;' prompt. Then you can directly type your commands. You can leave the interactive mode with Ctrl+C or Ctrl+D or by typing 'quit':&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
OpenSSL&amp;gt; quit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are three different kinds of commands. These are [[standard commands]], [[cipher commands]], and [[message-digest commands]]. In the following an overview over some commands is given. These are grouped by purpose and not necessarily by the classification just mentioned.&lt;br /&gt;
&lt;br /&gt;
=== Learn about your installation ===&lt;br /&gt;
&lt;br /&gt;
==== List commands by type ====&lt;br /&gt;
&lt;br /&gt;
You can get a list of available commands by calling&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ openssl list-standard-commands&lt;br /&gt;
$ openssl list-cipher-commands&lt;br /&gt;
$ openssl list-message-digest-commands&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== version ====&lt;br /&gt;
&lt;br /&gt;
OpenSSL&amp;gt; version&lt;br /&gt;
OpenSSL 1.0.1e 11 Feb 2013&lt;br /&gt;
&lt;br /&gt;
==== ciphers ====&lt;br /&gt;
&lt;br /&gt;
returns SSL/TLS ciphers supported.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
OpenSSL&amp;gt; ciphers&lt;br /&gt;
ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:SRP-DSS-AES-256-CBC-SHA:SRP-RSA-AES-256-CBC-SHA:DHE-DSS-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA256:DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:DHE-RSA-CAMELLIA256-SHA:DHE-DSS-CAMELLIA256-SHA:ECDH-RSA-AES256-GCM-SHA384:ECDH-ECDSA-AES256-GCM-SHA384:ECDH-RSA-AES256-SHA384:ECDH-ECDSA-AES256-SHA384:ECDH-RSA-AES256-SHA:ECDH-ECDSA-AES256-SHA:AES256-GCM-SHA384:AES256-SHA256:AES256-SHA:CAMELLIA256-SHA:PSK-AES256-CBC-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:SRP-DSS-3DES-EDE-CBC-SHA:SRP-RSA-3DES-EDE-CBC-SHA:EDH-RSA-DES-CBC3-SHA:EDH-DSS-DES-CBC3-SHA:ECDH-RSA-DES-CBC3-SHA:ECDH-ECDSA-DES-CBC3-SHA:DES-CBC3-SHA:PSK-3DES-EDE-CBC-SHA:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:SRP-DSS-AES-128-CBC-SHA:SRP-RSA-AES-128-CBC-SHA:DHE-DSS-AES128-GCM-SHA256:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES128-SHA256:DHE-DSS-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA:DHE-RSA-SEED-SHA:DHE-DSS-SEED-SHA:DHE-RSA-CAMELLIA128-SHA:DHE-DSS-CAMELLIA128-SHA:ECDH-RSA-AES128-GCM-SHA256:ECDH-ECDSA-AES128-GCM-SHA256:ECDH-RSA-AES128-SHA256:ECDH-ECDSA-AES128-SHA256:ECDH-RSA-AES128-SHA:ECDH-ECDSA-AES128-SHA:AES128-GCM-SHA256:AES128-SHA256:AES128-SHA:SEED-SHA:CAMELLIA128-SHA:PSK-AES128-CBC-SHA:ECDHE-RSA-RC4-SHA:ECDHE-ECDSA-RC4-SHA:ECDH-RSA-RC4-SHA:ECDH-ECDSA-RC4-SHA:RC4-SHA:RC4-MD5:PSK-RC4-SHA:EDH-RSA-DES-CBC-SHA:EDH-DSS-DES-CBC-SHA:DES-CBC-SHA:EXP-EDH-RSA-DES-CBC-SHA:EXP-EDH-DSS-DES-CBC-SHA:EXP-DES-CBC-SHA:EXP-RC2-CBC-MD5:EXP-RC4-MD5&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
openssl list-cipher-algorithms&lt;br /&gt;
&lt;br /&gt;
openssl list-public-key-algorithms&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Name: OpenSSL RSA method&lt;br /&gt;
	Type: Builtin Algorithm&lt;br /&gt;
	OID: rsaEncryption&lt;br /&gt;
	PEM string: RSA&lt;br /&gt;
Name: rsa&lt;br /&gt;
	Type: Alias to rsaEncryption&lt;br /&gt;
Name: OpenSSL PKCS#3 DH method&lt;br /&gt;
	Type: Builtin Algorithm&lt;br /&gt;
	OID: dhKeyAgreement&lt;br /&gt;
	PEM string: DH&lt;br /&gt;
Name: dsaWithSHA&lt;br /&gt;
	Type: Alias to dsaEncryption&lt;br /&gt;
Name: dsaEncryption-old&lt;br /&gt;
	Type: Alias to dsaEncryption&lt;br /&gt;
Name: dsaWithSHA1-old&lt;br /&gt;
	Type: Alias to dsaEncryption&lt;br /&gt;
Name: dsaWithSHA1&lt;br /&gt;
	Type: Alias to dsaEncryption&lt;br /&gt;
Name: OpenSSL DSA method&lt;br /&gt;
	Type: Builtin Algorithm&lt;br /&gt;
	OID: dsaEncryption&lt;br /&gt;
	PEM string: DSA&lt;br /&gt;
Name: OpenSSL EC algorithm&lt;br /&gt;
	Type: Builtin Algorithm&lt;br /&gt;
	OID: id-ecPublicKey&lt;br /&gt;
	PEM string: EC&lt;br /&gt;
Name: OpenSSL HMAC method&lt;br /&gt;
	Type: Builtin Algorithm&lt;br /&gt;
	OID: hmac&lt;br /&gt;
	PEM string: HMAC&lt;br /&gt;
Name: OpenSSL CMAC method&lt;br /&gt;
	Type: Builtin Algorithm&lt;br /&gt;
	OID: cmac&lt;br /&gt;
	PEM string: CMAC&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== engine ====&lt;br /&gt;
&lt;br /&gt;
OpenSSL&amp;gt; engine&lt;br /&gt;
(rsax) RSAX engine support&lt;br /&gt;
(dynamic) Dynamic engine loading support&lt;br /&gt;
&lt;br /&gt;
==== speed ====&lt;br /&gt;
&lt;br /&gt;
returns informations of toolkit performance on cryptographic functions computations.&lt;br /&gt;
&lt;br /&gt;
( Ex: on Linux 3.1.0-1-amd64 #1 SMP x86_64 GNU/Linux, HP dv7 i7 4Gb )&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Doing md4 for 3s on 16 size blocks: 12430613 md4's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing md5 for 3s on 16 size blocks: 8943943 md5's in 2.99s&lt;br /&gt;
Doing md5 for 3s on 64 size blocks: 6560162 md5's in 3.00s&lt;br /&gt;
Doing md5 for 3s on 256 size blocks: 3674563 md5's in 3.00s&lt;br /&gt;
Doing md5 for 3s on 1024 size blocks: 1325803 md5's in 3.00s&lt;br /&gt;
Doing md5 for 3s on 8192 size blocks: 190271 md5's in 3.00s&lt;br /&gt;
Doing hmac(md5) for 3s on 16 size blocks: 7289025 hmac(md5)'s in 3.00s&lt;br /&gt;
Doing hmac(md5) for 3s on 64 size blocks: 5519732 hmac(md5)'s in 3.00s&lt;br /&gt;
Doing hmac(md5) for 3s on 256 size blocks: 3319123 hmac(md5)'s in 3.00s&lt;br /&gt;
Doing hmac(md5) for 3s on 1024 size blocks: 1275475 hmac(md5)'s in 3.00s&lt;br /&gt;
Doing hmac(md5) for 3s on 8192 size blocks: 187134 hmac(md5)'s in 3.00s&lt;br /&gt;
Doing sha1 for 3s on 16 size blocks: 10089842 sha1's in 2.99s&lt;br /&gt;
Doing sha1 for 3s on 64 size blocks: 7033355 sha1's in 3.00s&lt;br /&gt;
Doing sha1 for 3s on 256 size blocks: 3919372 sha1's in 3.00s&lt;br /&gt;
Doing sha1 for 3s on 1024 size blocks: 1374314 sha1's in 3.00s&lt;br /&gt;
Doing sha1 for 3s on 8192 size blocks: 198808 sha1's in 3.00s&lt;br /&gt;
Doing sha256 for 3s on 16 size blocks: 6462822 sha256's in 3.00s&lt;br /&gt;
Doing sha256 for 3s on 64 size blocks: 3504641 sha256's in 3.00s&lt;br /&gt;
Doing sha256 for 3s on 256 size blocks: 1486771 sha256's in 3.00s&lt;br /&gt;
Doing sha256 for 3s on 1024 size blocks: 440613 sha256's in 3.00s&lt;br /&gt;
Doing sha256 for 3s on 8192 size blocks: 58418 sha256's in 3.00s&lt;br /&gt;
Doing sha512 for 3s on 16 size blocks: 5040453 sha512's in 2.99s&lt;br /&gt;
Doing sha512 for 3s on 64 size blocks: 5089425 sha512's in 3.00s&lt;br /&gt;
Doing sha512 for 3s on 256 size blocks: 1865240 sha512's in 3.00s&lt;br /&gt;
Doing sha512 for 3s on 1024 size blocks: 643708 sha512's in 3.00s&lt;br /&gt;
Doing sha512 for 3s on 8192 size blocks: 90615 sha512's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing whirlpool for 3s on 8192 size blocks: 33204 whirlpool's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing rmd160 for 3s on 8192 size blocks: 66719 rmd160's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing rc4 for 3s on 8192 size blocks: 238972 rc4's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing des cbc for 3s on 8192 size blocks: 19837 des cbc's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing des ede3 for 3s on 8192 size blocks: 7706 des ede3's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing aes-128 cbc for 3s on 8192 size blocks: 35217 aes-128 cbc's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing aes-192 cbc for 3s on 8192 size blocks: 29225 aes-192 cbc's in 3.01s&lt;br /&gt;
...&lt;br /&gt;
Doing aes-256 cbc for 3s on 8192 size blocks: 24414 aes-256 cbc's in 3.00s&lt;br /&gt;
...&lt;br /&gt;
Doing aes-256 ige for 3s on 8192 size blocks: 23331 aes-256 ige's in 2.99s&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Basic encryption ===&lt;br /&gt;
&lt;br /&gt;
==== Basic file ====&lt;br /&gt;
&lt;br /&gt;
to cipher a file or data to protect and share it protected by a shared key.&lt;br /&gt;
&lt;br /&gt;
symetric cipher :&lt;br /&gt;
[[AES]] [[Blowfish]] [[RC4]] [[3DES]] [[RC2]] [[DES]] [[CAST5]] [[SEED]]&lt;br /&gt;
&lt;br /&gt;
block to stream conversion :&lt;br /&gt;
[[ECB]] [[CBC]] [[OFB]] [[CFB]] [[CTR]] [[XTS]] [[GCM]]&lt;br /&gt;
&lt;br /&gt;
compression :&lt;br /&gt;
[[ZLIB]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Cipher commands (see the `enc' command for more details)&lt;br /&gt;
aes-128-cbc       aes-128-ecb       aes-192-cbc       aes-192-ecb       &lt;br /&gt;
aes-256-cbc       aes-256-ecb       base64            bf                &lt;br /&gt;
bf-cbc            bf-cfb            bf-ecb            bf-ofb            &lt;br /&gt;
camellia-128-cbc  camellia-128-ecb  camellia-192-cbc  camellia-192-ecb  &lt;br /&gt;
camellia-256-cbc  camellia-256-ecb  cast              cast-cbc          &lt;br /&gt;
cast5-cbc         cast5-cfb         cast5-ecb         cast5-ofb         &lt;br /&gt;
des               des-cbc           des-cfb           des-ecb           &lt;br /&gt;
des-ede           des-ede-cbc       des-ede-cfb       des-ede-ofb       &lt;br /&gt;
des-ede3          des-ede3-cbc      des-ede3-cfb      des-ede3-ofb      &lt;br /&gt;
des-ofb           des3              desx              rc2               &lt;br /&gt;
rc2-40-cbc        rc2-64-cbc        rc2-cbc           rc2-cfb           &lt;br /&gt;
rc2-ecb           rc2-ofb           rc4               rc4-40            &lt;br /&gt;
seed              seed-cbc          seed-cfb          seed-ecb          &lt;br /&gt;
seed-ofb          zlib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl enc --help&lt;br /&gt;
unknown option '--help'&lt;br /&gt;
options are&lt;br /&gt;
-in &amp;lt;file&amp;gt;     input file&lt;br /&gt;
-out &amp;lt;file&amp;gt;    output file&lt;br /&gt;
-pass &amp;lt;arg&amp;gt;    pass phrase source&lt;br /&gt;
-e             encrypt&lt;br /&gt;
-d             decrypt&lt;br /&gt;
-a/-base64     base64 encode/decode, depending on encryption flag&lt;br /&gt;
-k             passphrase is the next argument&lt;br /&gt;
-kfile         passphrase is the first line of the file argument&lt;br /&gt;
-md            the next argument is the md to use to create a key&lt;br /&gt;
                 from a passphrase.  One of md2, md5, sha or sha1&lt;br /&gt;
-S             salt in hex is the next argument&lt;br /&gt;
-K/-iv         key/iv in hex is the next argument&lt;br /&gt;
-[pP]          print the iv/key (then exit if -P)&lt;br /&gt;
-bufsize &amp;lt;n&amp;gt;   buffer size&lt;br /&gt;
-nopad         disable standard block padding&lt;br /&gt;
-engine e      use engine e, possibly a hardware device.&lt;br /&gt;
Cipher Types&lt;br /&gt;
-aes-128-cbc               -aes-128-cfb               -aes-128-cfb1             &lt;br /&gt;
-aes-128-cfb8              -aes-128-ctr               -aes-128-ecb              &lt;br /&gt;
-aes-128-gcm               -aes-128-ofb               -aes-128-xts              &lt;br /&gt;
-aes-192-cbc               -aes-192-cfb               -aes-192-cfb1             &lt;br /&gt;
-aes-192-cfb8              -aes-192-ctr               -aes-192-ecb              &lt;br /&gt;
-aes-192-gcm               -aes-192-ofb               -aes-256-cbc              &lt;br /&gt;
-aes-256-cfb               -aes-256-cfb1              -aes-256-cfb8             &lt;br /&gt;
-aes-256-ctr               -aes-256-ecb               -aes-256-gcm              &lt;br /&gt;
-aes-256-ofb               -aes-256-xts               -aes128                   &lt;br /&gt;
-aes192                    -aes256                    -bf                       &lt;br /&gt;
-bf-cbc                    -bf-cfb                    -bf-ecb                   &lt;br /&gt;
-bf-ofb                    -blowfish                  -camellia-128-cbc         &lt;br /&gt;
-camellia-128-cfb          -camellia-128-cfb1         -camellia-128-cfb8        &lt;br /&gt;
-camellia-128-ecb          -camellia-128-ofb          -camellia-192-cbc         &lt;br /&gt;
-camellia-192-cfb          -camellia-192-cfb1         -camellia-192-cfb8        &lt;br /&gt;
-camellia-192-ecb          -camellia-192-ofb          -camellia-256-cbc         &lt;br /&gt;
-camellia-256-cfb          -camellia-256-cfb1         -camellia-256-cfb8        &lt;br /&gt;
-camellia-256-ecb          -camellia-256-ofb          -camellia128              &lt;br /&gt;
-camellia192               -camellia256               -cast                     &lt;br /&gt;
-cast-cbc                  -cast5-cbc                 -cast5-cfb                &lt;br /&gt;
-cast5-ecb                 -cast5-ofb                 -des                      &lt;br /&gt;
-des-cbc                   -des-cfb                   -des-cfb1                 &lt;br /&gt;
-des-cfb8                  -des-ecb                   -des-ede                  &lt;br /&gt;
-des-ede-cbc               -des-ede-cfb               -des-ede-ofb              &lt;br /&gt;
-des-ede3                  -des-ede3-cbc              -des-ede3-cfb             &lt;br /&gt;
-des-ede3-cfb1             -des-ede3-cfb8             -des-ede3-ofb             &lt;br /&gt;
-des-ofb                   -des3                      -desx                     &lt;br /&gt;
-desx-cbc                  -id-aes128-GCM             -id-aes192-GCM            &lt;br /&gt;
-id-aes256-GCM             -rc2                       -rc2-40-cbc               &lt;br /&gt;
-rc2-64-cbc                -rc2-cbc                   -rc2-cfb                  &lt;br /&gt;
-rc2-ecb                   -rc2-ofb                   -rc4                      &lt;br /&gt;
-rc4-40                    -rc4-hmac-md5              -seed                     &lt;br /&gt;
-seed-cbc                  -seed-cfb                  -seed-ecb                 &lt;br /&gt;
-seed-ofb  &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Mail / SMIME ====&lt;br /&gt;
&lt;br /&gt;
===== smime v2 pkcs7 1.5 =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl smime --help&lt;br /&gt;
Usage smime [options] cert.pem ...&lt;br /&gt;
where options are&lt;br /&gt;
-encrypt       encrypt message&lt;br /&gt;
-decrypt       decrypt encrypted message&lt;br /&gt;
-sign          sign message&lt;br /&gt;
-verify        verify signed message&lt;br /&gt;
-pk7out        output PKCS#7 structure&lt;br /&gt;
-des3          encrypt with triple DES&lt;br /&gt;
-des           encrypt with DES&lt;br /&gt;
-seed          encrypt with SEED&lt;br /&gt;
-rc2-40        encrypt with RC2-40 (default)&lt;br /&gt;
-rc2-64        encrypt with RC2-64&lt;br /&gt;
-rc2-128       encrypt with RC2-128&lt;br /&gt;
-aes128, -aes192, -aes256&lt;br /&gt;
               encrypt PEM output with cbc aes&lt;br /&gt;
-camellia128, -camellia192, -camellia256&lt;br /&gt;
               encrypt PEM output with cbc camellia&lt;br /&gt;
-nointern      don't search certificates in message for signer&lt;br /&gt;
-nosigs        don't verify message signature&lt;br /&gt;
-noverify      don't verify signers certificate&lt;br /&gt;
-nocerts       don't include signers certificate when signing&lt;br /&gt;
-nodetach      use opaque signing&lt;br /&gt;
-noattr        don't include any signed attributes&lt;br /&gt;
-binary        don't translate message to text&lt;br /&gt;
-certfile file other certificates file&lt;br /&gt;
-signer file   signer certificate file&lt;br /&gt;
-recip  file   recipient certificate file for decryption&lt;br /&gt;
-in file       input file&lt;br /&gt;
-inform arg    input format SMIME (default), PEM or DER&lt;br /&gt;
-inkey file    input private key (if not signer or recipient)&lt;br /&gt;
-keyform arg   input private key format (PEM or ENGINE)&lt;br /&gt;
-out file      output file&lt;br /&gt;
-outform arg   output format SMIME (default), PEM or DER&lt;br /&gt;
-content file  supply or override content for detached signature&lt;br /&gt;
-to addr       to address&lt;br /&gt;
-from ad       from address&lt;br /&gt;
-subject s     subject&lt;br /&gt;
-text          include or delete text MIME headers&lt;br /&gt;
-CApath dir    trusted certificates directory&lt;br /&gt;
-CAfile file   trusted certificates file&lt;br /&gt;
-crl_check     check revocation status of signer's certificate using CRLs&lt;br /&gt;
-crl_check_all check revocation status of signer's certificate chain using CRLs&lt;br /&gt;
-engine e      use engine e, possibly a hardware device.&lt;br /&gt;
-passin arg    input file pass phrase source&lt;br /&gt;
-rand file:file:...&lt;br /&gt;
               load the file (or the files in the directory) into&lt;br /&gt;
               the random number generator&lt;br /&gt;
cert.pem       recipient certificate(s) for encryption&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== smime v3 cms =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl cms --help&lt;br /&gt;
Usage cms [options] cert.pem ...&lt;br /&gt;
where options are&lt;br /&gt;
-encrypt       encrypt message&lt;br /&gt;
-decrypt       decrypt encrypted message&lt;br /&gt;
-sign          sign message&lt;br /&gt;
-verify        verify signed message&lt;br /&gt;
-cmsout        output CMS structure&lt;br /&gt;
-des3          encrypt with triple DES&lt;br /&gt;
-des           encrypt with DES&lt;br /&gt;
-seed          encrypt with SEED&lt;br /&gt;
-rc2-40        encrypt with RC2-40 (default)&lt;br /&gt;
-rc2-64        encrypt with RC2-64&lt;br /&gt;
-rc2-128       encrypt with RC2-128&lt;br /&gt;
-aes128, -aes192, -aes256&lt;br /&gt;
               encrypt PEM output with cbc aes&lt;br /&gt;
-camellia128, -camellia192, -camellia256&lt;br /&gt;
               encrypt PEM output with cbc camellia&lt;br /&gt;
-nointern      don't search certificates in message for signer&lt;br /&gt;
-nosigs        don't verify message signature&lt;br /&gt;
-noverify      don't verify signers certificate&lt;br /&gt;
-nocerts       don't include signers certificate when signing&lt;br /&gt;
-nodetach      use opaque signing&lt;br /&gt;
-noattr        don't include any signed attributes&lt;br /&gt;
-binary        don't translate message to text&lt;br /&gt;
-certfile file other certificates file&lt;br /&gt;
-certsout file certificate output file&lt;br /&gt;
-signer file   signer certificate file&lt;br /&gt;
-recip  file   recipient certificate file for decryption&lt;br /&gt;
-keyid         use subject key identifier&lt;br /&gt;
-in file       input file&lt;br /&gt;
-inform arg    input format SMIME (default), PEM or DER&lt;br /&gt;
-inkey file    input private key (if not signer or recipient)&lt;br /&gt;
-keyform arg   input private key format (PEM or ENGINE)&lt;br /&gt;
-out file      output file&lt;br /&gt;
-outform arg   output format SMIME (default), PEM or DER&lt;br /&gt;
-content file  supply or override content for detached signature&lt;br /&gt;
-to addr       to address&lt;br /&gt;
-from ad       from address&lt;br /&gt;
-subject s     subject&lt;br /&gt;
-text          include or delete text MIME headers&lt;br /&gt;
-CApath dir    trusted certificates directory&lt;br /&gt;
-CAfile file   trusted certificates file&lt;br /&gt;
-crl_check     check revocation status of signer's certificate using CRLs&lt;br /&gt;
-crl_check_all check revocation status of signer's certificate chain using CRLs&lt;br /&gt;
-engine e      use engine e, possibly a hardware device.&lt;br /&gt;
-passin arg    input file pass phrase source&lt;br /&gt;
-rand file:file:...&lt;br /&gt;
               load the file (or the files in the directory) into&lt;br /&gt;
               the random number generator&lt;br /&gt;
cert.pem       recipient certificate(s) for encryption&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Create / Handle Public Key Certificates ===&lt;br /&gt;
&lt;br /&gt;
This requires you have a knowledge of what PKI is ( Certificate Authorities, Certificate Request, Certificate, Public Key, Private Key )&lt;br /&gt;
&lt;br /&gt;
Classical use case is to obtain a valid Certificate for a Secured Web site ( https protocol ).&lt;br /&gt;
First you create a Private Key ( will be created together with Public key ).&lt;br /&gt;
Then create a Certificate Request for that private key with some informations for purpose of future Certificate.&lt;br /&gt;
Then send that Certificate Request to a Certificate Authority ( CA ) that will issue a Certificate that CA signed. For well known CA you need to pay. &lt;br /&gt;
Up to you to install your Private key together with the received Certificate on your system. &lt;br /&gt;
&lt;br /&gt;
It exists graphical front-end to operate openssl wihtin a GUI : [http://xca.sourceforge.net/ XCA]&lt;br /&gt;
&lt;br /&gt;
==== Key Generation ====&lt;br /&gt;
&lt;br /&gt;
===== rsa / genrsa =====&lt;br /&gt;
&lt;br /&gt;
RSA is the most common type of Public/Private Key.&lt;br /&gt;
Private Key part should never be disclosed while public key part is ... public.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl genrsa --help&lt;br /&gt;
usage: genrsa [args] [numbits]&lt;br /&gt;
 -des            encrypt the generated key with DES in cbc mode&lt;br /&gt;
 -des3           encrypt the generated key with DES in ede cbc mode (168 bit key)&lt;br /&gt;
 -seed&lt;br /&gt;
                 encrypt PEM output with cbc seed&lt;br /&gt;
 -aes128, -aes192, -aes256&lt;br /&gt;
                 encrypt PEM output with cbc aes&lt;br /&gt;
 -camellia128, -camellia192, -camellia256&lt;br /&gt;
                 encrypt PEM output with cbc camellia&lt;br /&gt;
 -out file       output the key to 'file&lt;br /&gt;
 -passout arg    output file pass phrase source&lt;br /&gt;
 -f4             use F4 (0x10001) for the E value&lt;br /&gt;
 -3              use 3 for the E value&lt;br /&gt;
 -engine e       use engine e, possibly a hardware device.&lt;br /&gt;
 -rand file:file:...&lt;br /&gt;
                 load the file (or the files in the directory) into&lt;br /&gt;
                 the random number generator&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
rsa help&lt;br /&gt;
unknown option help&lt;br /&gt;
rsa [options] &amp;lt;infile &amp;gt;outfile&lt;br /&gt;
where options are&lt;br /&gt;
 -inform arg     input format - one of DER NET PEM&lt;br /&gt;
 -outform arg    output format - one of DER NET PEM&lt;br /&gt;
 -in arg         input file&lt;br /&gt;
 -sgckey         Use IIS SGC key format&lt;br /&gt;
 -passin arg     input file pass phrase source&lt;br /&gt;
 -out arg        output file&lt;br /&gt;
 -passout arg    output file pass phrase source&lt;br /&gt;
 -des            encrypt PEM output with cbc des&lt;br /&gt;
 -des3           encrypt PEM output with ede cbc des using 168 bit key&lt;br /&gt;
 -seed           encrypt PEM output with cbc seed&lt;br /&gt;
 -aes128, -aes192, -aes256&lt;br /&gt;
                 encrypt PEM output with cbc aes&lt;br /&gt;
 -camellia128, -camellia192, -camellia256&lt;br /&gt;
                 encrypt PEM output with cbc camellia&lt;br /&gt;
 -text           print the key in text&lt;br /&gt;
 -noout          don't print key out&lt;br /&gt;
 -modulus        print the RSA key modulus&lt;br /&gt;
 -check          verify key consistency&lt;br /&gt;
 -pubin          expect a public key in input file&lt;br /&gt;
 -pubout         output a public key&lt;br /&gt;
 -engine e       use engine e, possibly a hardware device.&lt;br /&gt;
error in rsa&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== dsa / gendsa=====&lt;br /&gt;
&lt;br /&gt;
dsa is a less common Public/Private key scheme, but can be seen anyway, so ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl gendsa&lt;br /&gt;
usage: gendsa [args] dsaparam-file&lt;br /&gt;
 -out file - output the key to 'file'&lt;br /&gt;
 -des      - encrypt the generated key with DES in cbc mode&lt;br /&gt;
 -des3     - encrypt the generated key with DES in ede cbc mode (168 bit key)&lt;br /&gt;
 -seed&lt;br /&gt;
                 encrypt PEM output with cbc seed&lt;br /&gt;
 -aes128, -aes192, -aes256&lt;br /&gt;
                 encrypt PEM output with cbc aes&lt;br /&gt;
 -camellia128, -camellia192, -camellia256&lt;br /&gt;
                 encrypt PEM output with cbc camellia&lt;br /&gt;
 -engine e - use engine e, possibly a hardware device.&lt;br /&gt;
 -rand file:file:...&lt;br /&gt;
           - load the file (or the files in the directory) into&lt;br /&gt;
             the random number generator&lt;br /&gt;
 dsaparam-file&lt;br /&gt;
           - a DSA parameter file as generated by the dsaparam command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
OpenSSL&amp;gt; dsa help&lt;br /&gt;
unknown option help&lt;br /&gt;
dsa [options] &amp;lt;infile &amp;gt;outfile&lt;br /&gt;
where options are&lt;br /&gt;
 -inform arg     input format - DER or PEM&lt;br /&gt;
 -outform arg    output format - DER or PEM&lt;br /&gt;
 -in arg         input file&lt;br /&gt;
 -passin arg     input file pass phrase source&lt;br /&gt;
 -out arg        output file&lt;br /&gt;
 -passout arg    output file pass phrase source&lt;br /&gt;
 -engine e       use engine e, possibly a hardware device.&lt;br /&gt;
 -des            encrypt PEM output with cbc des&lt;br /&gt;
 -des3           encrypt PEM output with ede cbc des using 168 bit key&lt;br /&gt;
 -aes128, -aes192, -aes256&lt;br /&gt;
                 encrypt PEM output with cbc aes&lt;br /&gt;
 -camellia128, -camellia192, -camellia256&lt;br /&gt;
                 encrypt PEM output with cbc camellia&lt;br /&gt;
 -seed           encrypt PEM output with cbc seed&lt;br /&gt;
 -text           print the key in text&lt;br /&gt;
 -noout          don't print key out&lt;br /&gt;
 -modulus        print the DSA public value&lt;br /&gt;
error in dsa&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Elliptic Curves / ec ecparam =====&lt;br /&gt;
&lt;br /&gt;
[[Elliptic_Curve_Cryptography]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl ecparam --help&lt;br /&gt;
unknown option --help&lt;br /&gt;
ecparam [options] &amp;lt;infile &amp;gt;outfile&lt;br /&gt;
where options are&lt;br /&gt;
 -inform arg       input format - default PEM (DER or PEM)&lt;br /&gt;
 -outform arg      output format - default PEM&lt;br /&gt;
 -in  arg          input file  - default stdin&lt;br /&gt;
 -out arg          output file - default stdout&lt;br /&gt;
 -noout            do not print the ec parameter&lt;br /&gt;
 -text             print the ec parameters in text form&lt;br /&gt;
 -check            validate the ec parameters&lt;br /&gt;
 -C                print a 'C' function creating the parameters&lt;br /&gt;
 -name arg         use the ec parameters with 'short name' name&lt;br /&gt;
 -list_curves      prints a list of all currently available curve 'short names'&lt;br /&gt;
 -conv_form arg    specifies the point conversion form &lt;br /&gt;
                   possible values: compressed&lt;br /&gt;
                                    uncompressed (default)&lt;br /&gt;
                                    hybrid&lt;br /&gt;
 -param_enc arg    specifies the way the ec parameters are encoded&lt;br /&gt;
                   in the asn1 der encoding&lt;br /&gt;
                   possible values: named_curve (default)&lt;br /&gt;
                                    explicit&lt;br /&gt;
 -no_seed          if 'explicit' parameters are chosen do not use the seed&lt;br /&gt;
 -genkey           generate ec key&lt;br /&gt;
 -rand file        files to use for random number input&lt;br /&gt;
 -engine e         use engine e, possibly a hardware device&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ec [options] &amp;lt;infile &amp;gt;outfile&lt;br /&gt;
where options are&lt;br /&gt;
 -inform arg     input format - DER or PEM&lt;br /&gt;
 -outform arg    output format - DER or PEM&lt;br /&gt;
 -in arg         input file&lt;br /&gt;
 -passin arg     input file pass phrase source&lt;br /&gt;
 -out arg        output file&lt;br /&gt;
 -passout arg    output file pass phrase source&lt;br /&gt;
 -engine e       use engine e, possibly a hardware device.&lt;br /&gt;
 -des            encrypt PEM output, instead of 'des' every other &lt;br /&gt;
                 cipher supported by OpenSSL can be used&lt;br /&gt;
 -text           print the key&lt;br /&gt;
 -noout          don't print key out&lt;br /&gt;
 -param_out      print the elliptic curve parameters&lt;br /&gt;
 -conv_form arg  specifies the point conversion form &lt;br /&gt;
                 possible values: compressed&lt;br /&gt;
                                  uncompressed (default)&lt;br /&gt;
                                   hybrid&lt;br /&gt;
 -param_enc arg  specifies the way the ec parameters are encoded&lt;br /&gt;
                 in the asn1 der encoding&lt;br /&gt;
                 possible values: named_curve (default)&lt;br /&gt;
                                  explicit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Certificate Authority / ca ====&lt;br /&gt;
&lt;br /&gt;
When you want to act as a Certificate Authority.&lt;br /&gt;
&lt;br /&gt;
OpenSSL&amp;gt; ca&lt;br /&gt;
Using configuration from /usr/lib/ssl/openssl.cnf&lt;br /&gt;
Error opening CA private key ./demoCA/private/cakey.pem&lt;br /&gt;
140492277311144:error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('./demoCA/private/cakey.pem','r')&lt;br /&gt;
140492277311144:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:&lt;br /&gt;
unable to load CA private key&lt;br /&gt;
error in ca&lt;br /&gt;
&lt;br /&gt;
By default you don't have ca created...&lt;br /&gt;
&lt;br /&gt;
==== Certificate Request / pkcs10 / req ====&lt;br /&gt;
&lt;br /&gt;
OpenSSL&amp;gt; req ?&lt;br /&gt;
unknown option ?&lt;br /&gt;
req [options] &amp;lt;infile &amp;gt;outfile&lt;br /&gt;
where options  are&lt;br /&gt;
 -inform arg    input format - DER or PEM&lt;br /&gt;
 -outform arg   output format - DER or PEM&lt;br /&gt;
 -in arg        input file&lt;br /&gt;
 -out arg       output file&lt;br /&gt;
 -text          text form of request&lt;br /&gt;
 -pubkey        output public key&lt;br /&gt;
 -noout         do not output REQ&lt;br /&gt;
 -verify        verify signature on REQ&lt;br /&gt;
 -modulus       RSA modulus&lt;br /&gt;
 -nodes         don't encrypt the output key&lt;br /&gt;
 -engine e      use engine e, possibly a hardware device&lt;br /&gt;
 -subject       output the request's subject&lt;br /&gt;
 -passin        private key password source&lt;br /&gt;
 -key file      use the private key contained in file&lt;br /&gt;
 -keyform arg   key file format&lt;br /&gt;
 -keyout arg    file to send the key to&lt;br /&gt;
 -rand file:file:...&lt;br /&gt;
                load the file (or the files in the directory) into&lt;br /&gt;
                the random number generator&lt;br /&gt;
 -newkey rsa:bits generate a new RSA key of 'bits' in size&lt;br /&gt;
 -newkey dsa:file generate a new DSA key, parameters taken from CA in 'file'&lt;br /&gt;
 -newkey ec:file generate a new EC key, parameters taken from CA in 'file'&lt;br /&gt;
 -[digest]      Digest to sign with (md5, sha1, md2, mdc2, md4)&lt;br /&gt;
 -config file   request template file.&lt;br /&gt;
 -subj arg      set or modify request subject&lt;br /&gt;
 -multivalue-rdn enable support for multivalued RDNs&lt;br /&gt;
 -new           new request.&lt;br /&gt;
 -batch         do not ask anything during request generation&lt;br /&gt;
 -x509          output a x509 structure instead of a cert. req.&lt;br /&gt;
 -days          number of days a certificate generated by -x509 is valid for.&lt;br /&gt;
 -set_serial    serial number to use for a certificate generated by -x509.&lt;br /&gt;
 -newhdr        output &amp;quot;NEW&amp;quot; in the header lines&lt;br /&gt;
 -asn1-kludge   Output the 'request' in a format that is wrong but some CA's&lt;br /&gt;
                have been reported as requiring&lt;br /&gt;
 -extensions .. specify certificate extension section (override value in config file)&lt;br /&gt;
 -reqexts ..    specify request extension section (override value in config file)&lt;br /&gt;
 -utf8          input characters are UTF8 (default ASCII)&lt;br /&gt;
 -nameopt arg    - various certificate name options&lt;br /&gt;
 -reqopt arg    - various request text options&lt;br /&gt;
&lt;br /&gt;
error in req&lt;br /&gt;
&lt;br /&gt;
==== Certificates AKA x509  ====&lt;br /&gt;
&lt;br /&gt;
x509 command allows you to display content of a x509 certificate and to convert it from/to [[PEM]], [[NET]] or [[DER]] formats.&lt;br /&gt;
&lt;br /&gt;
OpenSSL&amp;gt; x509 help&lt;br /&gt;
unknown option help&lt;br /&gt;
usage: x509 args&lt;br /&gt;
 -inform arg     - input format - default PEM (one of DER, NET or PEM)&lt;br /&gt;
 -outform arg    - output format - default PEM (one of DER, NET or PEM)&lt;br /&gt;
 -keyform arg    - private key format - default PEM&lt;br /&gt;
 -CAform arg     - CA format - default PEM&lt;br /&gt;
 -CAkeyform arg  - CA key format - default PEM&lt;br /&gt;
 -in arg         - input file - default stdin&lt;br /&gt;
 -out arg        - output file - default stdout&lt;br /&gt;
 -passin arg     - private key password source&lt;br /&gt;
 -serial         - print serial number value&lt;br /&gt;
 -subject_hash   - print subject hash value&lt;br /&gt;
 -subject_hash_old   - print old-style (MD5) subject hash value&lt;br /&gt;
 -issuer_hash    - print issuer hash value&lt;br /&gt;
 -issuer_hash_old    - print old-style (MD5) issuer hash value&lt;br /&gt;
 -hash           - synonym for -subject_hash&lt;br /&gt;
 -subject        - print subject DN&lt;br /&gt;
 -issuer         - print issuer DN&lt;br /&gt;
 -email          - print email address(es)&lt;br /&gt;
 -startdate      - notBefore field&lt;br /&gt;
 -enddate        - notAfter field&lt;br /&gt;
 -purpose        - print out certificate purposes&lt;br /&gt;
 -dates          - both Before and After dates&lt;br /&gt;
 -modulus        - print the RSA key modulus&lt;br /&gt;
 -pubkey         - output the public key&lt;br /&gt;
 -fingerprint    - print the certificate fingerprint&lt;br /&gt;
 -alias          - output certificate alias&lt;br /&gt;
 -noout          - no certificate output&lt;br /&gt;
 -ocspid         - print OCSP hash values for the subject name and public key&lt;br /&gt;
 -ocsp_uri       - print OCSP Responder URL(s)&lt;br /&gt;
 -trustout       - output a &amp;quot;trusted&amp;quot; certificate&lt;br /&gt;
 -clrtrust       - clear all trusted purposes&lt;br /&gt;
 -clrreject      - clear all rejected purposes&lt;br /&gt;
 -addtrust arg   - trust certificate for a given purpose&lt;br /&gt;
 -addreject arg  - reject certificate for a given purpose&lt;br /&gt;
 -setalias arg   - set certificate alias&lt;br /&gt;
 -days arg       - How long till expiry of a signed certificate - def 30 days&lt;br /&gt;
 -checkend arg   - check whether the cert expires in the next arg seconds&lt;br /&gt;
                   exit 1 if so, 0 if not&lt;br /&gt;
 -signkey arg    - self sign cert with arg&lt;br /&gt;
 -x509toreq      - output a certification request object&lt;br /&gt;
 -req            - input is a certificate request, sign and output.&lt;br /&gt;
 -CA arg         - set the CA certificate, must be PEM format.&lt;br /&gt;
 -CAkey arg      - set the CA key, must be PEM format&lt;br /&gt;
                   missing, it is assumed to be in the CA file.&lt;br /&gt;
 -CAcreateserial - create serial number file if it does not exist&lt;br /&gt;
 -CAserial arg   - serial file&lt;br /&gt;
 -set_serial     - serial number to use&lt;br /&gt;
 -text           - print the certificate in text form&lt;br /&gt;
 -C              - print out C code forms&lt;br /&gt;
 -md2/-md5/-sha1/-mdc2 - digest to use&lt;br /&gt;
 -extfile        - configuration file with X509V3 extensions to add&lt;br /&gt;
 -extensions     - section from config file with X509V3 extensions to add&lt;br /&gt;
 -clrext         - delete extensions before signing and input certificate&lt;br /&gt;
 -nameopt arg    - various certificate name options&lt;br /&gt;
 -engine e       - use engine e, possibly a hardware device.&lt;br /&gt;
 -certopt arg    - various certificate text options&lt;br /&gt;
&lt;br /&gt;
==== Client Certificates AKA pkcs12 ====&lt;br /&gt;
&lt;br /&gt;
Client Certificate is a language abuse, but anyway it is kind of file you need to install on your system when SSL/TLS server require Client Authentication.&lt;br /&gt;
Those kind of certificates credentials are known with .'''pkcs12''' or .'''pfx''' file extension.&lt;br /&gt;
They contains a x509 Certificate and the public/private key of client. Those files are then very sensible to handle with same security as a private key.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Usage: pkcs12 [options]&lt;br /&gt;
where options are&lt;br /&gt;
-export       output PKCS12 file&lt;br /&gt;
-chain        add certificate chain&lt;br /&gt;
-inkey file   private key if not infile&lt;br /&gt;
-certfile f   add all certs in f&lt;br /&gt;
-CApath arg   - PEM format directory of CA's&lt;br /&gt;
-CAfile arg   - PEM format file of CA's&lt;br /&gt;
-name &amp;quot;name&amp;quot;  use name as friendly name&lt;br /&gt;
-caname &amp;quot;nm&amp;quot;  use nm as CA friendly name (can be used more than once).&lt;br /&gt;
-in  infile   input filename&lt;br /&gt;
-out outfile  output filename&lt;br /&gt;
-noout        don't output anything, just verify.&lt;br /&gt;
-nomacver     don't verify MAC.&lt;br /&gt;
-nocerts      don't output certificates.&lt;br /&gt;
-clcerts      only output client certificates.&lt;br /&gt;
-cacerts      only output CA certificates.&lt;br /&gt;
-nokeys       don't output private keys.&lt;br /&gt;
-info         give info about PKCS#12 structure.&lt;br /&gt;
-des          encrypt private keys with DES&lt;br /&gt;
-des3         encrypt private keys with triple DES (default)&lt;br /&gt;
-seed         encrypt private keys with seed&lt;br /&gt;
-aes128, -aes192, -aes256&lt;br /&gt;
              encrypt PEM output with cbc aes&lt;br /&gt;
-camellia128, -camellia192, -camellia256&lt;br /&gt;
              encrypt PEM output with cbc camellia&lt;br /&gt;
-nodes        don't encrypt private keys&lt;br /&gt;
-noiter       don't use encryption iteration&lt;br /&gt;
-nomaciter    don't use MAC iteration&lt;br /&gt;
-maciter      use MAC iteration&lt;br /&gt;
-nomac        don't generate MAC&lt;br /&gt;
-twopass      separate MAC, encryption passwords&lt;br /&gt;
-descert      encrypt PKCS#12 certificates with triple DES (default RC2-40)&lt;br /&gt;
-certpbe alg  specify certificate PBE algorithm (default RC2-40)&lt;br /&gt;
-keypbe alg   specify private key PBE algorithm (default 3DES)&lt;br /&gt;
-macalg alg   digest algorithm used in MAC (default SHA1)&lt;br /&gt;
-keyex        set MS key exchange type&lt;br /&gt;
-keysig       set MS key signature type&lt;br /&gt;
-password p   set import/export password source&lt;br /&gt;
-passin p     input file pass phrase source&lt;br /&gt;
-passout p    output file pass phrase source&lt;br /&gt;
-engine e     use engine e, possibly a hardware device.&lt;br /&gt;
-rand file:file:...&lt;br /&gt;
              load the file (or the files in the directory) into&lt;br /&gt;
              the random number generator&lt;br /&gt;
-CSP name     Microsoft CSP name&lt;br /&gt;
-LMK          Add local machine keyset attribute to private key&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SSL/TLS and Certificates ONLINE services ===&lt;br /&gt;
&lt;br /&gt;
==== s_server ====&lt;br /&gt;
&lt;br /&gt;
This implements a generic SSL/TLS server. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl s_server&lt;br /&gt;
Error opening server certificate private key file server.pem&lt;br /&gt;
139811478357672:error:02001002:system library:fopen:No such file or directory:bss_file.c:398:fopen('server.pem','r')&lt;br /&gt;
139811478357672:error:20074002:BIO routines:FILE_CTRL:system lib:bss_file.c:400:&lt;br /&gt;
unable to load server certificate private key file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''you need to provide certificate and private key to be able to run SSL/TLS server.'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl s_server --help&lt;br /&gt;
unknown option --help&lt;br /&gt;
usage: s_server [args ...]&lt;br /&gt;
&lt;br /&gt;
 -accept arg   - port to accept on (default is 4433)&lt;br /&gt;
 -context arg  - set session ID context&lt;br /&gt;
 -verify arg   - turn on peer certificate verification&lt;br /&gt;
 -Verify arg   - turn on peer certificate verification, must have a cert.&lt;br /&gt;
 -cert arg     - certificate file to use&lt;br /&gt;
                 (default is server.pem)&lt;br /&gt;
 -crl_check    - check the peer certificate has not been revoked by its CA.&lt;br /&gt;
                 The CRL(s) are appended to the certificate file&lt;br /&gt;
 -crl_check_all - check the peer certificate has not been revoked by its CA&lt;br /&gt;
                 or any other CRL in the CA chain. CRL(s) are appened to the&lt;br /&gt;
                 the certificate file.&lt;br /&gt;
 -certform arg - certificate format (PEM or DER) PEM default&lt;br /&gt;
 -key arg      - Private Key file to use, in cert file if&lt;br /&gt;
                 not specified (default is server.pem)&lt;br /&gt;
 -keyform arg  - key format (PEM, DER or ENGINE) PEM default&lt;br /&gt;
 -pass arg     - private key file pass phrase source&lt;br /&gt;
 -dcert arg    - second certificate file to use (usually for DSA)&lt;br /&gt;
 -dcertform x  - second certificate format (PEM or DER) PEM default&lt;br /&gt;
 -dkey arg     - second private key file to use (usually for DSA)&lt;br /&gt;
 -dkeyform arg - second key format (PEM, DER or ENGINE) PEM default&lt;br /&gt;
 -dpass arg    - second private key file pass phrase source&lt;br /&gt;
 -dhparam arg  - DH parameter file to use, in cert file if not specified&lt;br /&gt;
                 or a default set of parameters is used&lt;br /&gt;
 -named_curve arg  - Elliptic curve name to use for ephemeral ECDH keys.&lt;br /&gt;
                 Use &amp;quot;openssl ecparam -list_curves&amp;quot; for all names&lt;br /&gt;
                 (default is nistp256).&lt;br /&gt;
 -nbio         - Run with non-blocking IO&lt;br /&gt;
 -nbio_test    - test with the non-blocking test bio&lt;br /&gt;
 -crlf         - convert LF from terminal into CRLF&lt;br /&gt;
 -debug        - Print more output&lt;br /&gt;
 -msg          - Show protocol messages&lt;br /&gt;
 -state        - Print the SSL states&lt;br /&gt;
 -CApath arg   - PEM format directory of CA's&lt;br /&gt;
 -CAfile arg   - PEM format file of CA's&lt;br /&gt;
 -nocert       - Don't use any certificates (Anon-DH)&lt;br /&gt;
 -cipher arg   - play with 'openssl ciphers' to see what goes here&lt;br /&gt;
 -serverpref   - Use server's cipher preferences&lt;br /&gt;
 -quiet        - No server output&lt;br /&gt;
 -no_tmp_rsa   - Do not generate a tmp RSA key&lt;br /&gt;
 -psk_hint arg - PSK identity hint to use&lt;br /&gt;
 -psk arg      - PSK in hex (without 0x)&lt;br /&gt;
 -srpvfile file      - The verifier file for SRP&lt;br /&gt;
 -srpuserseed string - A seed string for a default user salt.&lt;br /&gt;
 -ssl2         - Just talk SSLv2&lt;br /&gt;
 -ssl3         - Just talk SSLv3&lt;br /&gt;
 -tls1_2       - Just talk TLSv1.2&lt;br /&gt;
 -tls1_1       - Just talk TLSv1.1&lt;br /&gt;
 -tls1         - Just talk TLSv1&lt;br /&gt;
 -dtls1        - Just talk DTLSv1&lt;br /&gt;
 -timeout      - Enable timeouts&lt;br /&gt;
 -mtu          - Set link layer MTU&lt;br /&gt;
 -chain        - Read a certificate chain&lt;br /&gt;
 -no_ssl2      - Just disable SSLv2&lt;br /&gt;
 -no_ssl3      - Just disable SSLv3&lt;br /&gt;
 -no_tls1      - Just disable TLSv1&lt;br /&gt;
 -no_tls1_1    - Just disable TLSv1.1&lt;br /&gt;
 -no_tls1_2    - Just disable TLSv1.2&lt;br /&gt;
 -no_dhe       - Disable ephemeral DH&lt;br /&gt;
 -no_ecdhe     - Disable ephemeral ECDH&lt;br /&gt;
 -bugs         - Turn on SSL bug compatibility&lt;br /&gt;
 -www          - Respond to a 'GET /' with a status page&lt;br /&gt;
 -WWW          - Respond to a 'GET /&amp;lt;path&amp;gt; HTTP/1.0' with file ./&amp;lt;path&amp;gt;&lt;br /&gt;
 -HTTP         - Respond to a 'GET /&amp;lt;path&amp;gt; HTTP/1.0' with file ./&amp;lt;path&amp;gt;&lt;br /&gt;
                 with the assumption it contains a complete HTTP response.&lt;br /&gt;
 -engine id    - Initialise and use the specified engine&lt;br /&gt;
 -id_prefix arg - Generate SSL/TLS session IDs prefixed by 'arg'&lt;br /&gt;
 -rand file:file:...&lt;br /&gt;
 -servername host - servername for HostName TLS extension&lt;br /&gt;
 -servername_fatal - on mismatch send fatal alert (default warning alert)&lt;br /&gt;
 -cert2 arg    - certificate file to use for servername&lt;br /&gt;
                 (default is server2.pem)&lt;br /&gt;
 -key2 arg     - Private Key file to use for servername, in cert file if&lt;br /&gt;
                 not specified (default is server2.pem)&lt;br /&gt;
 -tlsextdebug  - hex dump of all TLS extensions received&lt;br /&gt;
 -no_ticket    - disable use of RFC4507bis session tickets&lt;br /&gt;
 -legacy_renegotiation - enable use of legacy renegotiation (dangerous)&lt;br /&gt;
 -nextprotoneg arg - set the advertised protocols for the NPN extension (comma-separated list)&lt;br /&gt;
 -use_srtp profiles - Offer SRTP key management with a colon-separated profile list&lt;br /&gt;
 -keymatexport label   - Export keying material using label&lt;br /&gt;
 -keymatexportlen len  - Export len bytes of keying material (default 20)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== s_client ====&lt;br /&gt;
&lt;br /&gt;
This implements a generic SSL/TLS client&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
unknown option --help&lt;br /&gt;
usage: s_client args&lt;br /&gt;
&lt;br /&gt;
 -host host     - use -connect instead&lt;br /&gt;
 -port port     - use -connect instead&lt;br /&gt;
 -connect host:port - who to connect to (default is localhost:4433)&lt;br /&gt;
 -verify arg   - turn on peer certificate verification&lt;br /&gt;
 -cert arg     - certificate file to use, PEM format assumed&lt;br /&gt;
 -certform arg - certificate format (PEM or DER) PEM default&lt;br /&gt;
 -key arg      - Private key file to use, in cert file if&lt;br /&gt;
                 not specified but cert file is.&lt;br /&gt;
 -keyform arg  - key format (PEM or DER) PEM default&lt;br /&gt;
 -pass arg     - private key file pass phrase source&lt;br /&gt;
 -CApath arg   - PEM format directory of CA's&lt;br /&gt;
 -CAfile arg   - PEM format file of CA's&lt;br /&gt;
 -reconnect    - Drop and re-make the connection with the same Session-ID&lt;br /&gt;
 -pause        - sleep(1) after each read(2) and write(2) system call&lt;br /&gt;
 -showcerts    - show all certificates in the chain&lt;br /&gt;
 -debug        - extra output&lt;br /&gt;
 -msg          - Show protocol messages&lt;br /&gt;
 -nbio_test    - more ssl protocol testing&lt;br /&gt;
 -state        - print the 'ssl' states&lt;br /&gt;
 -nbio         - Run with non-blocking IO&lt;br /&gt;
 -crlf         - convert LF from terminal into CRLF&lt;br /&gt;
 -quiet        - no s_client output&lt;br /&gt;
 -ign_eof      - ignore input eof (default when -quiet)&lt;br /&gt;
 -no_ign_eof   - don't ignore input eof&lt;br /&gt;
 -psk_identity arg - PSK identity&lt;br /&gt;
 -psk arg      - PSK in hex (without 0x)&lt;br /&gt;
 -srpuser user     - SRP authentification for 'user'&lt;br /&gt;
 -srppass arg      - password for 'user'&lt;br /&gt;
 -srp_lateuser     - SRP username into second ClientHello message&lt;br /&gt;
 -srp_moregroups   - Tolerate other than the known g N values.&lt;br /&gt;
 -srp_strength int - minimal mength in bits for N (default 1024).&lt;br /&gt;
 -ssl2         - just use SSLv2&lt;br /&gt;
 -ssl3         - just use SSLv3&lt;br /&gt;
 -tls1_2       - just use TLSv1.2&lt;br /&gt;
 -tls1_1       - just use TLSv1.1&lt;br /&gt;
 -tls1         - just use TLSv1&lt;br /&gt;
 -dtls1        - just use DTLSv1&lt;br /&gt;
 -mtu          - set the link layer MTU&lt;br /&gt;
 -no_tls1_2/-no_tls1_1/-no_tls1/-no_ssl3/-no_ssl2 - turn off that protocol&lt;br /&gt;
 -bugs         - Switch on all SSL implementation bug workarounds&lt;br /&gt;
 -serverpref   - Use server's cipher preferences (only SSLv2)&lt;br /&gt;
 -cipher       - preferred cipher to use, use the 'openssl ciphers'&lt;br /&gt;
                 command to see what is available&lt;br /&gt;
 -starttls prot - use the STARTTLS command before starting TLS&lt;br /&gt;
                 for those protocols that support it, where&lt;br /&gt;
                 'prot' defines which one to assume.  Currently,&lt;br /&gt;
                 only &amp;quot;smtp&amp;quot;, &amp;quot;pop3&amp;quot;, &amp;quot;imap&amp;quot;, &amp;quot;ftp&amp;quot; and &amp;quot;xmpp&amp;quot;&lt;br /&gt;
                 are supported.&lt;br /&gt;
 -engine id    - Initialise and use the specified engine&lt;br /&gt;
 -rand file:file:...&lt;br /&gt;
 -sess_out arg - file to write SSL session to&lt;br /&gt;
 -sess_in arg  - file to read SSL session from&lt;br /&gt;
 -servername host  - Set TLS extension servername in ClientHello&lt;br /&gt;
 -tlsextdebug      - hex dump of all TLS extensions received&lt;br /&gt;
 -status           - request certificate status from server&lt;br /&gt;
 -no_ticket        - disable use of RFC4507bis session tickets&lt;br /&gt;
 -nextprotoneg arg - enable NPN extension, considering named protocols supported (comma-separated list)&lt;br /&gt;
 -legacy_renegotiation - enable use of legacy renegotiation (dangerous)&lt;br /&gt;
 -use_srtp profiles - Offer SRTP key management with a colon-separated profile list&lt;br /&gt;
 -keymatexport label   - Export keying material using label&lt;br /&gt;
 -keymatexportlen len  - Export len bytes of keying material (default 20)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== ocsp ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Signing / Digest and Timestamping ===&lt;br /&gt;
&lt;br /&gt;
==== Signing / Digest ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl dgst --help&lt;br /&gt;
unknown option '--help'&lt;br /&gt;
options are&lt;br /&gt;
-c              to output the digest with separating colons&lt;br /&gt;
-r              to output the digest in coreutils format&lt;br /&gt;
-d              to output debug info&lt;br /&gt;
-hex            output as hex dump&lt;br /&gt;
-binary         output in binary form&lt;br /&gt;
-hmac arg       set the HMAC key to arg&lt;br /&gt;
-non-fips-allow allow use of non FIPS digest&lt;br /&gt;
-sign   file    sign digest using private key in file&lt;br /&gt;
-verify file    verify a signature using public key in file&lt;br /&gt;
-prverify file  verify a signature using private key in file&lt;br /&gt;
-keyform arg    key file format (PEM or ENGINE)&lt;br /&gt;
-out filename   output to filename rather than stdout&lt;br /&gt;
-signature file signature to verify&lt;br /&gt;
-sigopt nm:v    signature parameter&lt;br /&gt;
-hmac key       create hashed MAC with key&lt;br /&gt;
-mac algorithm  create MAC (not neccessarily HMAC)&lt;br /&gt;
-macopt nm:v    MAC algorithm parameters or key&lt;br /&gt;
-engine e       use engine e, possibly a hardware device.&lt;br /&gt;
-md4            to use the md4 message digest algorithm&lt;br /&gt;
-md5            to use the md5 message digest algorithm&lt;br /&gt;
-ripemd160      to use the ripemd160 message digest algorithm&lt;br /&gt;
-sha            to use the sha message digest algorithm&lt;br /&gt;
-sha1           to use the sha1 message digest algorithm&lt;br /&gt;
-sha224         to use the sha224 message digest algorithm&lt;br /&gt;
-sha256         to use the sha256 message digest algorithm&lt;br /&gt;
-sha384         to use the sha384 message digest algorithm&lt;br /&gt;
-sha512         to use the sha512 message digest algorithm&lt;br /&gt;
-whirlpool      to use the whirlpool message digest algorithm&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==== timestamping ====&lt;br /&gt;
&lt;br /&gt;
openssl ts&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
usage:&lt;br /&gt;
ts -query [-rand file:file:...] [-config configfile] [-data file_to_hash] [-digest digest_bytes][-md2|-md4|-md5|-sha|-sha1|-mdc2|-ripemd160] [-policy object_id] [-no_nonce] [-cert] [-in request.tsq] [-out request.tsq] [-text]&lt;br /&gt;
or&lt;br /&gt;
ts -reply [-config configfile] [-section tsa_section] [-queryfile request.tsq] [-passin password] [-signer tsa_cert.pem] [-inkey private_key.pem] [-chain certs_file.pem] [-policy object_id] [-in response.tsr] [-token_in] [-out response.tsr] [-token_out] [-text] [-engine id]&lt;br /&gt;
or&lt;br /&gt;
ts -verify [-data file_to_hash] [-digest digest_bytes] [-queryfile request.tsq] -in response.tsr [-token_in] -CApath ca_path -CAfile ca_file.pem -untrusted cert_file.pem&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Data handling ===&lt;br /&gt;
&lt;br /&gt;
==== ASN.1 ====&lt;br /&gt;
&lt;br /&gt;
[[DER]] decoding &lt;br /&gt;
&lt;br /&gt;
openssl asn1parse&lt;br /&gt;
&lt;br /&gt;
==== Base64 ====&lt;br /&gt;
&lt;br /&gt;
base64 encoding / decoding&lt;br /&gt;
&lt;br /&gt;
[[Base64]]&lt;br /&gt;
&lt;br /&gt;
===== a String =====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl base64 -e &amp;lt;&amp;lt;&amp;lt; 'Welcome to openssl wiki'&lt;br /&gt;
V2VsY29tZSB0byBvcGVuc3NsIHdpa2kK&lt;br /&gt;
openssl base64 -d &amp;lt;&amp;lt;&amp;lt; 'V2VsY29tZSB0byBvcGVuc3NsIHdpa2kK'&lt;br /&gt;
Welcome to openssl wiki&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
warning '''base64 line length is limited to 76 characters by default in openssl''' ( and generated with 64 characters / line ).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl base64 -e &amp;lt;&amp;lt;&amp;lt; 'Welcome to openssl wiki with a very long line that splits...'&lt;br /&gt;
V2VsY29tZSB0byBvcGVuc3NsIHdpa2kgd2l0aCBhIHZlcnkgbG9uZyBsaW5lIHRo&lt;br /&gt;
YXQgc3BsaXRzLi4uCg==&lt;br /&gt;
openssl base64 -d &amp;lt;&amp;lt;&amp;lt; 'V2VsY29tZSB0byBvcGVuc3NsIHdpa2kgd2l0aCBhIHZlcnkgbG9uZyBsaW5lIHRoYXQgc3BsaXRzLi4uCg=='&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=&amp;gt; NOTHING !&lt;br /&gt;
&lt;br /&gt;
to be able to decode a base64 line without line feed that exceed 76 characters use -A option :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl base64 -d -A &amp;lt;&amp;lt;&amp;lt; 'V2VsY29tZSB0byBvcGVuc3NsIHdpa2kgd2l0aCBhIHZlcnkgbG9uZyBsaW5lIHRoYXQgc3BsaXRzLi4uCg=='&lt;br /&gt;
Welcome to openssl wiki with a very long line that splits...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is anyway better to actualy split base64 result in 64 characters lines since -A option is BUGGY ( limit with long files ).&lt;br /&gt;
&lt;br /&gt;
==== DER &amp;lt;-&amp;gt; PEM conversion ====&lt;br /&gt;
&lt;br /&gt;
on each command handling PEM and DER format an '''inform''' and '''outform''' options are provided to specify it.&lt;br /&gt;
Then it is easy to read it in format and write it in another&lt;br /&gt;
&lt;br /&gt;
==== pkcs8 / pkcs5 ====&lt;br /&gt;
&lt;br /&gt;
pkcs8 is a format to store private keys.&lt;br /&gt;
pkcs8 uses various pkcs5 version as subformat.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl pkcs8 --help&lt;br /&gt;
Usage pkcs8 [options]&lt;br /&gt;
where options are&lt;br /&gt;
-in file        input file&lt;br /&gt;
-inform X       input format (DER or PEM)&lt;br /&gt;
-passin arg     input file pass phrase source&lt;br /&gt;
-outform X      output format (DER or PEM)&lt;br /&gt;
-out file       output file&lt;br /&gt;
-passout arg    output file pass phrase source&lt;br /&gt;
-topk8          output PKCS8 file&lt;br /&gt;
-nooct          use (nonstandard) no octet format&lt;br /&gt;
-embed          use (nonstandard) embedded DSA parameters format&lt;br /&gt;
-nsdb           use (nonstandard) DSA Netscape DB format&lt;br /&gt;
-noiter         use 1 as iteration count&lt;br /&gt;
-nocrypt        use or expect unencrypted private key&lt;br /&gt;
-v2 alg         use PKCS#5 v2.0 and cipher &amp;quot;alg&amp;quot;&lt;br /&gt;
-v1 obj         use PKCS#5 v1.5 and cipher &amp;quot;alg&amp;quot;&lt;br /&gt;
 -engine e       use engine e, possibly a hardware device.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Diagnostics ===&lt;br /&gt;
&lt;br /&gt;
==== SSL/TLS session information ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
openssl sess_id --help&lt;br /&gt;
unknown option --help&lt;br /&gt;
usage: sess_id args&lt;br /&gt;
&lt;br /&gt;
 -inform arg     - input format - default PEM (DER or PEM)&lt;br /&gt;
 -outform arg    - output format - default PEM&lt;br /&gt;
 -in arg         - input file - default stdin&lt;br /&gt;
 -out arg        - output file - default stdout&lt;br /&gt;
 -text           - print ssl session id details&lt;br /&gt;
 -cert           - output certificate &lt;br /&gt;
 -noout          - no CRL output&lt;br /&gt;
 -context arg    - set the session ID context&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Shell level]]&lt;/div&gt;</summary>
		<author><name>Frukto</name></author>
	</entry>
</feed>