provider.7ossl 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. .\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42)
  2. .\"
  3. .\" Standard preamble:
  4. .\" ========================================================================
  5. .de Sp \" Vertical space (when we can't use .PP)
  6. .if t .sp .5v
  7. .if n .sp
  8. ..
  9. .de Vb \" Begin verbatim text
  10. .ft CW
  11. .nf
  12. .ne \\$1
  13. ..
  14. .de Ve \" End verbatim text
  15. .ft R
  16. .fi
  17. ..
  18. .\" Set up some character translations and predefined strings. \*(-- will
  19. .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
  20. .\" double quote, and \*(R" will give a right double quote. \*(C+ will
  21. .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
  22. .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
  23. .\" nothing in troff, for use with C<>.
  24. .tr \(*W-
  25. .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
  26. .ie n \{\
  27. . ds -- \(*W-
  28. . ds PI pi
  29. . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
  30. . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
  31. . ds L" ""
  32. . ds R" ""
  33. . ds C` ""
  34. . ds C' ""
  35. 'br\}
  36. .el\{\
  37. . ds -- \|\(em\|
  38. . ds PI \(*p
  39. . ds L" ``
  40. . ds R" ''
  41. . ds C`
  42. . ds C'
  43. 'br\}
  44. .\"
  45. .\" Escape single quotes in literal strings from groff's Unicode transform.
  46. .ie \n(.g .ds Aq \(aq
  47. .el .ds Aq '
  48. .\"
  49. .\" If the F register is >0, we'll generate index entries on stderr for
  50. .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
  51. .\" entries marked with X<> in POD. Of course, you'll have to process the
  52. .\" output yourself in some meaningful fashion.
  53. .\"
  54. .\" Avoid warning from groff about undefined register 'F'.
  55. .de IX
  56. ..
  57. .nr rF 0
  58. .if \n(.g .if rF .nr rF 1
  59. .if (\n(rF:(\n(.g==0)) \{\
  60. . if \nF \{\
  61. . de IX
  62. . tm Index:\\$1\t\\n%\t"\\$2"
  63. ..
  64. . if !\nF==2 \{\
  65. . nr % 0
  66. . nr F 2
  67. . \}
  68. . \}
  69. .\}
  70. .rr rF
  71. .\"
  72. .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
  73. .\" Fear. Run. Save yourself. No user-serviceable parts.
  74. . \" fudge factors for nroff and troff
  75. .if n \{\
  76. . ds #H 0
  77. . ds #V .8m
  78. . ds #F .3m
  79. . ds #[ \f1
  80. . ds #] \fP
  81. .\}
  82. .if t \{\
  83. . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
  84. . ds #V .6m
  85. . ds #F 0
  86. . ds #[ \&
  87. . ds #] \&
  88. .\}
  89. . \" simple accents for nroff and troff
  90. .if n \{\
  91. . ds ' \&
  92. . ds ` \&
  93. . ds ^ \&
  94. . ds , \&
  95. . ds ~ ~
  96. . ds /
  97. .\}
  98. .if t \{\
  99. . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
  100. . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
  101. . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
  102. . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
  103. . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
  104. . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
  105. .\}
  106. . \" troff and (daisy-wheel) nroff accents
  107. .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
  108. .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
  109. .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
  110. .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
  111. .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
  112. .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
  113. .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
  114. .ds ae a\h'-(\w'a'u*4/10)'e
  115. .ds Ae A\h'-(\w'A'u*4/10)'E
  116. . \" corrections for vroff
  117. .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
  118. .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
  119. . \" for low resolution devices (crt and lpr)
  120. .if \n(.H>23 .if \n(.V>19 \
  121. \{\
  122. . ds : e
  123. . ds 8 ss
  124. . ds o a
  125. . ds d- d\h'-1'\(ga
  126. . ds D- D\h'-1'\(hy
  127. . ds th \o'bp'
  128. . ds Th \o'LP'
  129. . ds ae ae
  130. . ds Ae AE
  131. .\}
  132. .rm #[ #] #H #V #F C
  133. .\" ========================================================================
  134. .\"
  135. .IX Title "PROVIDER 7ossl"
  136. .TH PROVIDER 7ossl "2024-09-03" "3.3.2" "OpenSSL"
  137. .\" For nroff, turn off justification. Always turn off hyphenation; it makes
  138. .\" way too many mistakes in technical documents.
  139. .if n .ad l
  140. .nh
  141. .SH "NAME"
  142. provider \- OpenSSL operation implementation providers
  143. .SH "SYNOPSIS"
  144. .IX Header "SYNOPSIS"
  145. #include <openssl/provider.h>
  146. .SH "DESCRIPTION"
  147. .IX Header "DESCRIPTION"
  148. .SS "General"
  149. .IX Subsection "General"
  150. This page contains information useful to provider authors.
  151. .PP
  152. A \fIprovider\fR, in OpenSSL terms, is a unit of code that provides one
  153. or more implementations for various operations for diverse algorithms
  154. that one might want to perform.
  155. .PP
  156. An \fIoperation\fR is something one wants to do, such as encryption and
  157. decryption, key derivation, \s-1MAC\s0 calculation, signing and verification,
  158. etc.
  159. .PP
  160. An \fIalgorithm\fR is a named method to perform an operation.
  161. Very often, the algorithms revolve around cryptographic operations,
  162. but may also revolve around other types of operation, such as managing
  163. certain types of objects.
  164. .PP
  165. See \fBcrypto\fR\|(7) for further details.
  166. .SS "Provider"
  167. .IX Subsection "Provider"
  168. A \fIprovider\fR offers an initialization function, as a set of base
  169. functions in the form of an \s-1\fBOSSL_DISPATCH\s0\fR\|(3) array, and by extension,
  170. a set of \s-1\fBOSSL_ALGORITHM\s0\fR\|(3)s (see \fBopenssl\-core.h\fR\|(7)).
  171. It may be a dynamically loadable module, or may be built-in, in
  172. OpenSSL libraries or in the application.
  173. If it's a dynamically loadable module, the initialization function
  174. must be named \f(CW\*(C`OSSL_provider_init\*(C'\fR and must be exported.
  175. If it's built-in, the initialization function may have any name.
  176. .PP
  177. The initialization function must have the following signature:
  178. .PP
  179. .Vb 3
  180. \& int NAME(const OSSL_CORE_HANDLE *handle,
  181. \& const OSSL_DISPATCH *in, const OSSL_DISPATCH **out,
  182. \& void **provctx);
  183. .Ve
  184. .PP
  185. \&\fIhandle\fR is the OpenSSL library object for the provider, and works
  186. as a handle for everything the OpenSSL libraries need to know about
  187. the provider.
  188. For the provider itself, it is passed to some of the functions given in the
  189. dispatch array \fIin\fR.
  190. .PP
  191. \&\fIin\fR is a dispatch array of base functions offered by the OpenSSL
  192. libraries, and the available functions are further described in
  193. \&\fBprovider\-base\fR\|(7).
  194. .PP
  195. \&\fI*out\fR must be assigned a dispatch array of base functions that the
  196. provider offers to the OpenSSL libraries.
  197. The functions that may be offered are further described in
  198. \&\fBprovider\-base\fR\|(7), and they are the central means of communication
  199. between the OpenSSL libraries and the provider.
  200. .PP
  201. \&\fI*provctx\fR should be assigned a provider specific context to allow
  202. the provider multiple simultaneous uses.
  203. This pointer will be passed to various operation functions offered by
  204. the provider.
  205. .PP
  206. Note that the provider will not be made available for applications to use until
  207. the initialization function has completed and returned successfully.
  208. .PP
  209. One of the functions the provider offers to the OpenSSL libraries is
  210. the central mechanism for the OpenSSL libraries to get access to
  211. operation implementations for diverse algorithms.
  212. Its referred to with the number \fB\s-1OSSL_FUNC_PROVIDER_QUERY_OPERATION\s0\fR
  213. and has the following signature:
  214. .PP
  215. .Vb 3
  216. \& const OSSL_ALGORITHM *provider_query_operation(void *provctx,
  217. \& int operation_id,
  218. \& const int *no_store);
  219. .Ve
  220. .PP
  221. \&\fIprovctx\fR is the provider specific context that was passed back by
  222. the initialization function.
  223. .PP
  224. \&\fIoperation_id\fR is an operation identity (see \*(L"Operations\*(R" below).
  225. .PP
  226. \&\fIno_store\fR is a flag back to the OpenSSL libraries which, when
  227. nonzero, signifies that the OpenSSL libraries will not store a
  228. reference to the returned data in their internal store of
  229. implementations.
  230. .PP
  231. The returned \s-1\fBOSSL_ALGORITHM\s0\fR\|(3) is the foundation of any OpenSSL
  232. library \s-1API\s0 that uses providers for their implementation, most
  233. commonly in the \fIfetching\fR type of functions
  234. (see \*(L"\s-1ALGORITHM FETCHING\*(R"\s0 in \fBcrypto\fR\|(7)).
  235. .SS "Operations"
  236. .IX Subsection "Operations"
  237. Operations are referred to with numbers, via macros with names
  238. starting with \f(CW\*(C`OSSL_OP_\*(C'\fR.
  239. .PP
  240. With each operation comes a set of defined function types that a
  241. provider may or may not offer, depending on its needs.
  242. .PP
  243. Currently available operations are:
  244. .IP "Digests" 4
  245. .IX Item "Digests"
  246. In the OpenSSL libraries, the corresponding method object is
  247. \&\fB\s-1EVP_MD\s0\fR.
  248. The number for this operation is \fB\s-1OSSL_OP_DIGEST\s0\fR.
  249. The functions the provider can offer are described in
  250. \&\fBprovider\-digest\fR\|(7).
  251. .IP "Symmetric ciphers" 4
  252. .IX Item "Symmetric ciphers"
  253. In the OpenSSL libraries, the corresponding method object is
  254. \&\fB\s-1EVP_CIPHER\s0\fR.
  255. The number for this operation is \fB\s-1OSSL_OP_CIPHER\s0\fR.
  256. The functions the provider can offer are described in
  257. \&\fBprovider\-cipher\fR\|(7).
  258. .IP "Message Authentication Code (\s-1MAC\s0)" 4
  259. .IX Item "Message Authentication Code (MAC)"
  260. In the OpenSSL libraries, the corresponding method object is
  261. \&\fB\s-1EVP_MAC\s0\fR.
  262. The number for this operation is \fB\s-1OSSL_OP_MAC\s0\fR.
  263. The functions the provider can offer are described in
  264. \&\fBprovider\-mac\fR\|(7).
  265. .IP "Key Derivation Function (\s-1KDF\s0)" 4
  266. .IX Item "Key Derivation Function (KDF)"
  267. In the OpenSSL libraries, the corresponding method object is
  268. \&\fB\s-1EVP_KDF\s0\fR.
  269. The number for this operation is \fB\s-1OSSL_OP_KDF\s0\fR.
  270. The functions the provider can offer are described in
  271. \&\fBprovider\-kdf\fR\|(7).
  272. .IP "Key Exchange" 4
  273. .IX Item "Key Exchange"
  274. In the OpenSSL libraries, the corresponding method object is
  275. \&\fB\s-1EVP_KEYEXCH\s0\fR.
  276. The number for this operation is \fB\s-1OSSL_OP_KEYEXCH\s0\fR.
  277. The functions the provider can offer are described in
  278. \&\fBprovider\-keyexch\fR\|(7).
  279. .IP "Asymmetric Ciphers" 4
  280. .IX Item "Asymmetric Ciphers"
  281. In the OpenSSL libraries, the corresponding method object is
  282. \&\fB\s-1EVP_ASYM_CIPHER\s0\fR.
  283. The number for this operation is \fB\s-1OSSL_OP_ASYM_CIPHER\s0\fR.
  284. The functions the provider can offer are described in
  285. \&\fBprovider\-asym_cipher\fR\|(7).
  286. .IP "Asymmetric Key Encapsulation" 4
  287. .IX Item "Asymmetric Key Encapsulation"
  288. In the OpenSSL libraries, the corresponding method object is \fB\s-1EVP_KEM\s0\fR.
  289. The number for this operation is \fB\s-1OSSL_OP_KEM\s0\fR.
  290. The functions the provider can offer are described in \fBprovider\-kem\fR\|(7).
  291. .IP "Encoding" 4
  292. .IX Item "Encoding"
  293. In the OpenSSL libraries, the corresponding method object is
  294. \&\fB\s-1OSSL_ENCODER\s0\fR.
  295. The number for this operation is \fB\s-1OSSL_OP_ENCODER\s0\fR.
  296. The functions the provider can offer are described in
  297. \&\fBprovider\-encoder\fR\|(7).
  298. .IP "Decoding" 4
  299. .IX Item "Decoding"
  300. In the OpenSSL libraries, the corresponding method object is
  301. \&\fB\s-1OSSL_DECODER\s0\fR.
  302. The number for this operation is \fB\s-1OSSL_OP_DECODER\s0\fR.
  303. The functions the provider can offer are described in
  304. \&\fBprovider\-decoder\fR\|(7).
  305. .IP "Random Number Generation" 4
  306. .IX Item "Random Number Generation"
  307. The number for this operation is \fB\s-1OSSL_OP_RAND\s0\fR.
  308. The functions the provider can offer for random number generation are described
  309. in \fBprovider\-rand\fR\|(7).
  310. .IP "Key Management" 4
  311. .IX Item "Key Management"
  312. The number for this operation is \fB\s-1OSSL_OP_KEYMGMT\s0\fR.
  313. The functions the provider can offer for key management are described in
  314. \&\fBprovider\-keymgmt\fR\|(7).
  315. .IP "Signing and Signature Verification" 4
  316. .IX Item "Signing and Signature Verification"
  317. The number for this operation is \fB\s-1OSSL_OP_SIGNATURE\s0\fR.
  318. The functions the provider can offer for digital signatures are described in
  319. \&\fBprovider\-signature\fR\|(7).
  320. .IP "Store Management" 4
  321. .IX Item "Store Management"
  322. The number for this operation is \fB\s-1OSSL_OP_STORE\s0\fR.
  323. The functions the provider can offer for store management are described in
  324. \&\fBprovider\-storemgmt\fR\|(7).
  325. .PP
  326. \fIAlgorithm naming\fR
  327. .IX Subsection "Algorithm naming"
  328. .PP
  329. Algorithm names are case insensitive. Any particular algorithm can have multiple
  330. aliases associated with it. The canonical OpenSSL naming scheme follows this
  331. format:
  332. .PP
  333. ALGNAME[\s-1VERSION\s0?][\-SUBNAME[\s-1VERSION\s0?]?][\-SIZE?][\-MODE?]
  334. .PP
  335. \&\s-1VERSION\s0 is only present if there are multiple versions of an algorithm (e.g.
  336. \&\s-1MD2, MD4, MD5\s0). It may be omitted if there is only one version.
  337. .PP
  338. \&\s-1SUBNAME\s0 may be present where multiple algorithms are combined together,
  339. e.g. \s-1MD5\-SHA1.\s0
  340. .PP
  341. \&\s-1SIZE\s0 is only present if multiple versions of an algorithm exist with different
  342. sizes (e.g. \s-1AES\-128\-CBC, AES\-256\-CBC\s0)
  343. .PP
  344. \&\s-1MODE\s0 is only present where applicable.
  345. .PP
  346. Other aliases may exist for example where standards bodies or common practice
  347. use alternative names or names that OpenSSL has used historically.
  348. .SH "OPENSSL PROVIDERS"
  349. .IX Header "OPENSSL PROVIDERS"
  350. OpenSSL provides a number of its own providers. These are the default, base,
  351. fips, legacy and null providers. See \fBcrypto\fR\|(7) for an overview of these
  352. providers.
  353. .SH "SEE ALSO"
  354. .IX Header "SEE ALSO"
  355. \&\fBEVP_DigestInit_ex\fR\|(3), \fBEVP_EncryptInit_ex\fR\|(3),
  356. \&\s-1\fBOSSL_LIB_CTX\s0\fR\|(3),
  357. \&\fBEVP_set_default_properties\fR\|(3),
  358. \&\fBEVP_MD_fetch\fR\|(3),
  359. \&\fBEVP_CIPHER_fetch\fR\|(3),
  360. \&\fBEVP_KEYMGMT_fetch\fR\|(3),
  361. \&\fBopenssl\-core.h\fR\|(7),
  362. \&\fBprovider\-base\fR\|(7),
  363. \&\fBprovider\-digest\fR\|(7),
  364. \&\fBprovider\-cipher\fR\|(7),
  365. \&\fBprovider\-keyexch\fR\|(7)
  366. .SH "HISTORY"
  367. .IX Header "HISTORY"
  368. The concept of providers and everything surrounding them was
  369. introduced in OpenSSL 3.0.
  370. .SH "COPYRIGHT"
  371. .IX Header "COPYRIGHT"
  372. Copyright 2019\-2022 The OpenSSL Project Authors. All Rights Reserved.
  373. .PP
  374. Licensed under the Apache License 2.0 (the \*(L"License\*(R"). You may not use
  375. this file except in compliance with the License. You can obtain a copy
  376. in the file \s-1LICENSE\s0 in the source distribution or at
  377. <https://www.openssl.org/source/license.html>.