Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: doc - add akcipher API

Reference the new akcipher API calls in the kernel crypto API DocBook.

Also, fix the comments in the akcipher.h file: double dashes do not look
good in the DocBook; fix a typo.

Signed-off-by: Stephan Mueller <smueller@chronox.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

authored by

Stephan Mueller and committed by
Herbert Xu
e1eabc05 029c053c

+37 -14
+23
Documentation/DocBook/crypto-API.tmpl
··· 485 485 <para>CRYPTO_ALG_TYPE_RNG Random Number Generation</para> 486 486 </listitem> 487 487 <listitem> 488 + <para>CRYPTO_ALG_TYPE_AKCIPHER Asymmetric cipher</para> 489 + </listitem> 490 + <listitem> 488 491 <para>CRYPTO_ALG_TYPE_PCOMPRESS Enhanced version of 489 492 CRYPTO_ALG_TYPE_COMPRESS allowing for segmented compression / 490 493 decompression instead of performing the operation on one ··· 1819 1816 !Finclude/crypto/rng.h crypto_rng_reset 1820 1817 !Finclude/crypto/rng.h crypto_rng_seedsize 1821 1818 !Cinclude/crypto/rng.h 1819 + </sect1> 1820 + <sect1><title>Asymmetric Cipher API</title> 1821 + !Pinclude/crypto/akcipher.h Generic Public Key API 1822 + !Finclude/crypto/akcipher.h akcipher_alg 1823 + !Finclude/crypto/akcipher.h akcipher_request 1824 + !Finclude/crypto/akcipher.h crypto_alloc_akcipher 1825 + !Finclude/crypto/akcipher.h crypto_free_akcipher 1826 + !Finclude/crypto/akcipher.h crypto_akcipher_set_pub_key 1827 + !Finclude/crypto/akcipher.h crypto_akcipher_set_priv_key 1828 + </sect1> 1829 + <sect1><title>Asymmetric Cipher Request Handle</title> 1830 + !Finclude/crypto/akcipher.h akcipher_request_alloc 1831 + !Finclude/crypto/akcipher.h akcipher_request_free 1832 + !Finclude/crypto/akcipher.h akcipher_request_set_callback 1833 + !Finclude/crypto/akcipher.h akcipher_request_set_crypt 1834 + !Finclude/crypto/akcipher.h crypto_akcipher_maxsize 1835 + !Finclude/crypto/akcipher.h crypto_akcipher_encrypt 1836 + !Finclude/crypto/akcipher.h crypto_akcipher_decrypt 1837 + !Finclude/crypto/akcipher.h crypto_akcipher_sign 1838 + !Finclude/crypto/akcipher.h crypto_akcipher_verify 1822 1839 </sect1> 1823 1840 </chapter> 1824 1841
+14 -14
include/crypto/akcipher.h
··· 114 114 */ 115 115 116 116 /** 117 - * crypto_alloc_akcipher() -- allocate AKCIPHER tfm handle 117 + * crypto_alloc_akcipher() - allocate AKCIPHER tfm handle 118 118 * @alg_name: is the cra_name / name or cra_driver_name / driver name of the 119 119 * public key algorithm e.g. "rsa" 120 120 * @type: specifies the type of the algorithm ··· 171 171 } 172 172 173 173 /** 174 - * crypto_free_akcipher() -- free AKCIPHER tfm handle 174 + * crypto_free_akcipher() - free AKCIPHER tfm handle 175 175 * 176 176 * @tfm: AKCIPHER tfm handle allocated with crypto_alloc_akcipher() 177 177 */ ··· 181 181 } 182 182 183 183 /** 184 - * akcipher_request_alloc() -- allocates public key request 184 + * akcipher_request_alloc() - allocates public key request 185 185 * 186 186 * @tfm: AKCIPHER tfm handle allocated with crypto_alloc_akcipher() 187 187 * @gfp: allocation flags ··· 201 201 } 202 202 203 203 /** 204 - * akcipher_request_free() -- zeroize and free public key request 204 + * akcipher_request_free() - zeroize and free public key request 205 205 * 206 206 * @req: request to free 207 207 */ ··· 211 211 } 212 212 213 213 /** 214 - * akcipher_request_set_callback() -- Sets an asynchronous callback. 214 + * akcipher_request_set_callback() - Sets an asynchronous callback. 215 215 * 216 216 * Callback will be called when an asynchronous operation on a given 217 217 * request is finished. 218 218 * 219 219 * @req: request that the callback will be set for 220 220 * @flgs: specify for instance if the operation may backlog 221 - * @cmlp: callback which will be called 221 + * @cmpl: callback which will be called 222 222 * @data: private data used by the caller 223 223 */ 224 224 static inline void akcipher_request_set_callback(struct akcipher_request *req, ··· 232 232 } 233 233 234 234 /** 235 - * akcipher_request_set_crypt() -- Sets request parameters 235 + * akcipher_request_set_crypt() - Sets request parameters 236 236 * 237 237 * Sets parameters required by crypto operation 238 238 * ··· 255 255 } 256 256 257 257 /** 258 - * crypto_akcipher_maxsize() -- Get len for output buffer 258 + * crypto_akcipher_maxsize() - Get len for output buffer 259 259 * 260 260 * Function returns the dest buffer size required for a given key 261 261 * ··· 271 271 } 272 272 273 273 /** 274 - * crypto_akcipher_encrypt() -- Invoke public key encrypt operation 274 + * crypto_akcipher_encrypt() - Invoke public key encrypt operation 275 275 * 276 276 * Function invokes the specific public key encrypt operation for a given 277 277 * public key algorithm ··· 289 289 } 290 290 291 291 /** 292 - * crypto_akcipher_decrypt() -- Invoke public key decrypt operation 292 + * crypto_akcipher_decrypt() - Invoke public key decrypt operation 293 293 * 294 294 * Function invokes the specific public key decrypt operation for a given 295 295 * public key algorithm ··· 307 307 } 308 308 309 309 /** 310 - * crypto_akcipher_sign() -- Invoke public key sign operation 310 + * crypto_akcipher_sign() - Invoke public key sign operation 311 311 * 312 312 * Function invokes the specific public key sign operation for a given 313 313 * public key algorithm ··· 325 325 } 326 326 327 327 /** 328 - * crypto_akcipher_verify() -- Invoke public key verify operation 328 + * crypto_akcipher_verify() - Invoke public key verify operation 329 329 * 330 330 * Function invokes the specific public key verify operation for a given 331 331 * public key algorithm ··· 343 343 } 344 344 345 345 /** 346 - * crypto_akcipher_set_pub_key() -- Invoke set public key operation 346 + * crypto_akcipher_set_pub_key() - Invoke set public key operation 347 347 * 348 348 * Function invokes the algorithm specific set key function, which knows 349 349 * how to decode and interpret the encoded key ··· 364 364 } 365 365 366 366 /** 367 - * crypto_akcipher_set_priv_key() -- Invoke set private key operation 367 + * crypto_akcipher_set_priv_key() - Invoke set private key operation 368 368 * 369 369 * Function invokes the algorithm specific set key function, which knows 370 370 * how to decode and interpret the encoded key