ciphers.pod 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  1. =pod
  2. =head1 NAME
  3. ciphers - SSL cipher display and cipher list tool.
  4. =head1 SYNOPSIS
  5. B<openssl> B<ciphers>
  6. [B<-v>]
  7. [B<-ssl2>]
  8. [B<-ssl3>]
  9. [B<-tls1>]
  10. [B<cipherlist>]
  11. =head1 DESCRIPTION
  12. The B<cipherlist> command converts OpenSSL cipher lists into ordered
  13. SSL cipher preference lists. It can be used as a test tool to determine
  14. the appropriate cipherlist.
  15. =head1 COMMAND OPTIONS
  16. =over 4
  17. =item B<-v>
  18. verbose option. List ciphers with a complete description of
  19. protocol version (SSLv2 or SSLv3; the latter includes TLS), key exchange,
  20. authentication, encryption and mac algorithms used along with any key size
  21. restrictions and whether the algorithm is classed as an "export" cipher.
  22. Note that without the B<-v> option, ciphers may seem to appear twice
  23. in a cipher list; this is when similar ciphers are available for
  24. SSL v2 and for SSL v3/TLS v1.
  25. =item B<-ssl3>
  26. only include SSL v3 ciphers.
  27. =item B<-ssl2>
  28. only include SSL v2 ciphers.
  29. =item B<-tls1>
  30. only include TLS v1 ciphers.
  31. =item B<-h>, B<-?>
  32. print a brief usage message.
  33. =item B<cipherlist>
  34. a cipher list to convert to a cipher preference list. If it is not included
  35. then the default cipher list will be used. The format is described below.
  36. =back
  37. =head1 CIPHER LIST FORMAT
  38. The cipher list consists of one or more I<cipher strings> separated by colons.
  39. Commas or spaces are also acceptable separators but colons are normally used.
  40. The actual cipher string can take several different forms.
  41. It can consist of a single cipher suite such as B<RC4-SHA>.
  42. It can represent a list of cipher suites containing a certain algorithm, or
  43. cipher suites of a certain type. For example B<SHA1> represents all ciphers
  44. suites using the digest algorithm SHA1 and B<SSLv3> represents all SSL v3
  45. algorithms.
  46. Lists of cipher suites can be combined in a single cipher string using the
  47. B<+> character. This is used as a logical B<and> operation. For example
  48. B<SHA1+DES> represents all cipher suites containing the SHA1 B<and> the DES
  49. algorithms.
  50. Each cipher string can be optionally preceded by the characters B<!>,
  51. B<-> or B<+>.
  52. If B<!> is used then the ciphers are permanently deleted from the list.
  53. The ciphers deleted can never reappear in the list even if they are
  54. explicitly stated.
  55. If B<-> is used then the ciphers are deleted from the list, but some or
  56. all of the ciphers can be added again by later options.
  57. If B<+> is used then the ciphers are moved to the end of the list. This
  58. option doesn't add any new ciphers it just moves matching existing ones.
  59. If none of these characters is present then the string is just interpreted
  60. as a list of ciphers to be appended to the current preference list. If the
  61. list includes any ciphers already present they will be ignored: that is they
  62. will not moved to the end of the list.
  63. Additionally the cipher string B<@STRENGTH> can be used at any point to sort
  64. the current cipher list in order of encryption algorithm key length.
  65. =head1 CIPHER STRINGS
  66. The following is a list of all permitted cipher strings and their meanings.
  67. =over 4
  68. =item B<DEFAULT>
  69. the default cipher list. This is determined at compile time and is normally
  70. B<ALL:!EXPORT:!aNULL:!eNULL:!SSLv2:@STRENGTH>. This must be the first cipher string
  71. specified.
  72. =item B<COMPLEMENTOFDEFAULT>
  73. the ciphers included in B<ALL>, but not enabled by default. Currently
  74. this is B<ADH>. Note that this rule does not cover B<eNULL>, which is
  75. not included by B<ALL> (use B<COMPLEMENTOFALL> if necessary).
  76. =item B<ALL>
  77. all ciphers suites except the B<eNULL> ciphers which must be explicitly enabled.
  78. =item B<COMPLEMENTOFALL>
  79. the cipher suites not enabled by B<ALL>, currently being B<eNULL>.
  80. =item B<HIGH>
  81. "high" encryption cipher suites. This currently means those with key lengths larger
  82. than 128 bits, and some cipher suites with 128-bit keys.
  83. =item B<MEDIUM>
  84. "medium" encryption cipher suites, currently some of those using 128 bit encryption.
  85. =item B<LOW>
  86. "low" encryption cipher suites, currently those using 64 or 56 bit encryption algorithms
  87. but excluding export cipher suites.
  88. =item B<EXP>, B<EXPORT>
  89. export encryption algorithms. Including 40 and 56 bits algorithms.
  90. =item B<EXPORT40>
  91. 40 bit export encryption algorithms
  92. =item B<EXPORT56>
  93. 56 bit export encryption algorithms. In OpenSSL 0.9.8c and later the set of
  94. 56 bit export ciphers is empty unless OpenSSL has been explicitly configured
  95. with support for experimental ciphers.
  96. =item B<eNULL>, B<NULL>
  97. the "NULL" ciphers that is those offering no encryption. Because these offer no
  98. encryption at all and are a security risk they are disabled unless explicitly
  99. included.
  100. =item B<aNULL>
  101. the cipher suites offering no authentication. This is currently the anonymous
  102. DH algorithms. These cipher suites are vulnerable to a "man in the middle"
  103. attack and so their use is normally discouraged.
  104. =item B<kRSA>, B<RSA>
  105. cipher suites using RSA key exchange.
  106. =item B<kEDH>
  107. cipher suites using ephemeral DH key agreement.
  108. =item B<kDHr>, B<kDHd>
  109. cipher suites using DH key agreement and DH certificates signed by CAs with RSA
  110. and DSS keys respectively. Not implemented.
  111. =item B<aRSA>
  112. cipher suites using RSA authentication, i.e. the certificates carry RSA keys.
  113. =item B<aDSS>, B<DSS>
  114. cipher suites using DSS authentication, i.e. the certificates carry DSS keys.
  115. =item B<aDH>
  116. cipher suites effectively using DH authentication, i.e. the certificates carry
  117. DH keys. Not implemented.
  118. =item B<kFZA>, B<aFZA>, B<eFZA>, B<FZA>
  119. ciphers suites using FORTEZZA key exchange, authentication, encryption or all
  120. FORTEZZA algorithms. Not implemented.
  121. =item B<TLSv1>, B<SSLv3>, B<SSLv2>
  122. TLS v1.0, SSL v3.0 or SSL v2.0 cipher suites respectively.
  123. =item B<DH>
  124. cipher suites using DH, including anonymous DH.
  125. =item B<ADH>
  126. anonymous DH cipher suites.
  127. =item B<AES>
  128. cipher suites using AES.
  129. =item B<CAMELLIA>
  130. cipher suites using Camellia.
  131. =item B<3DES>
  132. cipher suites using triple DES.
  133. =item B<DES>
  134. cipher suites using DES (not triple DES).
  135. =item B<RC4>
  136. cipher suites using RC4.
  137. =item B<RC2>
  138. cipher suites using RC2.
  139. =item B<IDEA>
  140. cipher suites using IDEA.
  141. =item B<SEED>
  142. cipher suites using SEED.
  143. =item B<MD5>
  144. cipher suites using MD5.
  145. =item B<SHA1>, B<SHA>
  146. cipher suites using SHA1.
  147. =back
  148. =head1 CIPHER SUITE NAMES
  149. The following lists give the SSL or TLS cipher suites names from the
  150. relevant specification and their OpenSSL equivalents. It should be noted,
  151. that several cipher suite names do not include the authentication used,
  152. e.g. DES-CBC3-SHA. In these cases, RSA authentication is used.
  153. =head2 SSL v3.0 cipher suites.
  154. SSL_RSA_WITH_NULL_MD5 NULL-MD5
  155. SSL_RSA_WITH_NULL_SHA NULL-SHA
  156. SSL_RSA_EXPORT_WITH_RC4_40_MD5 EXP-RC4-MD5
  157. SSL_RSA_WITH_RC4_128_MD5 RC4-MD5
  158. SSL_RSA_WITH_RC4_128_SHA RC4-SHA
  159. SSL_RSA_EXPORT_WITH_RC2_CBC_40_MD5 EXP-RC2-CBC-MD5
  160. SSL_RSA_WITH_IDEA_CBC_SHA IDEA-CBC-SHA
  161. SSL_RSA_EXPORT_WITH_DES40_CBC_SHA EXP-DES-CBC-SHA
  162. SSL_RSA_WITH_DES_CBC_SHA DES-CBC-SHA
  163. SSL_RSA_WITH_3DES_EDE_CBC_SHA DES-CBC3-SHA
  164. SSL_DH_DSS_EXPORT_WITH_DES40_CBC_SHA Not implemented.
  165. SSL_DH_DSS_WITH_DES_CBC_SHA Not implemented.
  166. SSL_DH_DSS_WITH_3DES_EDE_CBC_SHA Not implemented.
  167. SSL_DH_RSA_EXPORT_WITH_DES40_CBC_SHA Not implemented.
  168. SSL_DH_RSA_WITH_DES_CBC_SHA Not implemented.
  169. SSL_DH_RSA_WITH_3DES_EDE_CBC_SHA Not implemented.
  170. SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA EXP-EDH-DSS-DES-CBC-SHA
  171. SSL_DHE_DSS_WITH_DES_CBC_SHA EDH-DSS-CBC-SHA
  172. SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA EDH-DSS-DES-CBC3-SHA
  173. SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA EXP-EDH-RSA-DES-CBC-SHA
  174. SSL_DHE_RSA_WITH_DES_CBC_SHA EDH-RSA-DES-CBC-SHA
  175. SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA EDH-RSA-DES-CBC3-SHA
  176. SSL_DH_anon_EXPORT_WITH_RC4_40_MD5 EXP-ADH-RC4-MD5
  177. SSL_DH_anon_WITH_RC4_128_MD5 ADH-RC4-MD5
  178. SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA EXP-ADH-DES-CBC-SHA
  179. SSL_DH_anon_WITH_DES_CBC_SHA ADH-DES-CBC-SHA
  180. SSL_DH_anon_WITH_3DES_EDE_CBC_SHA ADH-DES-CBC3-SHA
  181. SSL_FORTEZZA_KEA_WITH_NULL_SHA Not implemented.
  182. SSL_FORTEZZA_KEA_WITH_FORTEZZA_CBC_SHA Not implemented.
  183. SSL_FORTEZZA_KEA_WITH_RC4_128_SHA Not implemented.
  184. =head2 TLS v1.0 cipher suites.
  185. TLS_RSA_WITH_NULL_MD5 NULL-MD5
  186. TLS_RSA_WITH_NULL_SHA NULL-SHA
  187. TLS_RSA_EXPORT_WITH_RC4_40_MD5 EXP-RC4-MD5
  188. TLS_RSA_WITH_RC4_128_MD5 RC4-MD5
  189. TLS_RSA_WITH_RC4_128_SHA RC4-SHA
  190. TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5 EXP-RC2-CBC-MD5
  191. TLS_RSA_WITH_IDEA_CBC_SHA IDEA-CBC-SHA
  192. TLS_RSA_EXPORT_WITH_DES40_CBC_SHA EXP-DES-CBC-SHA
  193. TLS_RSA_WITH_DES_CBC_SHA DES-CBC-SHA
  194. TLS_RSA_WITH_3DES_EDE_CBC_SHA DES-CBC3-SHA
  195. TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA Not implemented.
  196. TLS_DH_DSS_WITH_DES_CBC_SHA Not implemented.
  197. TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA Not implemented.
  198. TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA Not implemented.
  199. TLS_DH_RSA_WITH_DES_CBC_SHA Not implemented.
  200. TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA Not implemented.
  201. TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA EXP-EDH-DSS-DES-CBC-SHA
  202. TLS_DHE_DSS_WITH_DES_CBC_SHA EDH-DSS-CBC-SHA
  203. TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA EDH-DSS-DES-CBC3-SHA
  204. TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA EXP-EDH-RSA-DES-CBC-SHA
  205. TLS_DHE_RSA_WITH_DES_CBC_SHA EDH-RSA-DES-CBC-SHA
  206. TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA EDH-RSA-DES-CBC3-SHA
  207. TLS_DH_anon_EXPORT_WITH_RC4_40_MD5 EXP-ADH-RC4-MD5
  208. TLS_DH_anon_WITH_RC4_128_MD5 ADH-RC4-MD5
  209. TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA EXP-ADH-DES-CBC-SHA
  210. TLS_DH_anon_WITH_DES_CBC_SHA ADH-DES-CBC-SHA
  211. TLS_DH_anon_WITH_3DES_EDE_CBC_SHA ADH-DES-CBC3-SHA
  212. =head2 AES ciphersuites from RFC3268, extending TLS v1.0
  213. TLS_RSA_WITH_AES_128_CBC_SHA AES128-SHA
  214. TLS_RSA_WITH_AES_256_CBC_SHA AES256-SHA
  215. TLS_DH_DSS_WITH_AES_128_CBC_SHA Not implemented.
  216. TLS_DH_DSS_WITH_AES_256_CBC_SHA Not implemented.
  217. TLS_DH_RSA_WITH_AES_128_CBC_SHA Not implemented.
  218. TLS_DH_RSA_WITH_AES_256_CBC_SHA Not implemented.
  219. TLS_DHE_DSS_WITH_AES_128_CBC_SHA DHE-DSS-AES128-SHA
  220. TLS_DHE_DSS_WITH_AES_256_CBC_SHA DHE-DSS-AES256-SHA
  221. TLS_DHE_RSA_WITH_AES_128_CBC_SHA DHE-RSA-AES128-SHA
  222. TLS_DHE_RSA_WITH_AES_256_CBC_SHA DHE-RSA-AES256-SHA
  223. TLS_DH_anon_WITH_AES_128_CBC_SHA ADH-AES128-SHA
  224. TLS_DH_anon_WITH_AES_256_CBC_SHA ADH-AES256-SHA
  225. =head2 Camellia ciphersuites from RFC4132, extending TLS v1.0
  226. TLS_RSA_WITH_CAMELLIA_128_CBC_SHA CAMELLIA128-SHA
  227. TLS_RSA_WITH_CAMELLIA_256_CBC_SHA CAMELLIA256-SHA
  228. TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA Not implemented.
  229. TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA Not implemented.
  230. TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA Not implemented.
  231. TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA Not implemented.
  232. TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA DHE-DSS-CAMELLIA128-SHA
  233. TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA DHE-DSS-CAMELLIA256-SHA
  234. TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA DHE-RSA-CAMELLIA128-SHA
  235. TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA DHE-RSA-CAMELLIA256-SHA
  236. TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA ADH-CAMELLIA128-SHA
  237. TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA ADH-CAMELLIA256-SHA
  238. =head2 SEED ciphersuites from RFC4162, extending TLS v1.0
  239. TLS_RSA_WITH_SEED_CBC_SHA SEED-SHA
  240. TLS_DH_DSS_WITH_SEED_CBC_SHA Not implemented.
  241. TLS_DH_RSA_WITH_SEED_CBC_SHA Not implemented.
  242. TLS_DHE_DSS_WITH_SEED_CBC_SHA DHE-DSS-SEED-SHA
  243. TLS_DHE_RSA_WITH_SEED_CBC_SHA DHE-RSA-SEED-SHA
  244. TLS_DH_anon_WITH_SEED_CBC_SHA ADH-SEED-SHA
  245. =head2 Additional Export 1024 and other cipher suites
  246. Note: these ciphers can also be used in SSL v3.
  247. TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA EXP1024-DES-CBC-SHA
  248. TLS_RSA_EXPORT1024_WITH_RC4_56_SHA EXP1024-RC4-SHA
  249. TLS_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA EXP1024-DHE-DSS-DES-CBC-SHA
  250. TLS_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA EXP1024-DHE-DSS-RC4-SHA
  251. TLS_DHE_DSS_WITH_RC4_128_SHA DHE-DSS-RC4-SHA
  252. =head2 SSL v2.0 cipher suites.
  253. SSL_CK_RC4_128_WITH_MD5 RC4-MD5
  254. SSL_CK_RC4_128_EXPORT40_WITH_MD5 EXP-RC4-MD5
  255. SSL_CK_RC2_128_CBC_WITH_MD5 RC2-MD5
  256. SSL_CK_RC2_128_CBC_EXPORT40_WITH_MD5 EXP-RC2-MD5
  257. SSL_CK_IDEA_128_CBC_WITH_MD5 IDEA-CBC-MD5
  258. SSL_CK_DES_64_CBC_WITH_MD5 DES-CBC-MD5
  259. SSL_CK_DES_192_EDE3_CBC_WITH_MD5 DES-CBC3-MD5
  260. =head1 NOTES
  261. The non-ephemeral DH modes are currently unimplemented in OpenSSL
  262. because there is no support for DH certificates.
  263. Some compiled versions of OpenSSL may not include all the ciphers
  264. listed here because some ciphers were excluded at compile time.
  265. =head1 EXAMPLES
  266. Verbose listing of all OpenSSL ciphers including NULL ciphers:
  267. openssl ciphers -v 'ALL:eNULL'
  268. Include all ciphers except NULL and anonymous DH then sort by
  269. strength:
  270. openssl ciphers -v 'ALL:!ADH:@STRENGTH'
  271. Include only 3DES ciphers and then place RSA ciphers last:
  272. openssl ciphers -v '3DES:+RSA'
  273. Include all RC4 ciphers but leave out those without authentication:
  274. openssl ciphers -v 'RC4:!COMPLEMENTOFDEFAULT'
  275. Include all chiphers with RSA authentication but leave out ciphers without
  276. encryption.
  277. openssl ciphers -v 'RSA:!COMPLEMENTOFALL'
  278. =head1 SEE ALSO
  279. L<s_client(1)|s_client(1)>, L<s_server(1)|s_server(1)>, L<ssl(3)|ssl(3)>
  280. =head1 HISTORY
  281. The B<COMPLENTOFALL> and B<COMPLEMENTOFDEFAULT> selection options were
  282. added in version 0.9.7.
  283. =cut