Lines Matching +full:pre +full:- +full:filled

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
28 * This uses __MODULE_INFO directly instead of MODULE_ALIAS because pre-4.3
35 __MODULE_INFO(alias, alias_crypto, "crypto-" name)
73 * Set if the algorithm has passed automated run-time testing. Note that
74 * if there is no run-time testing for a given algorithm it is considered
97 * Set if the algorithm has a ->setkey() method but can be used without
134 * as arm where pointers are 32-bit aligned but there are data types such as
135 * u64 which require 64-bit alignment.
193 * struct ablkcipher_alg - asynchronous block cipher definition
196 * This must be set to one of the pre-defined values as this is
201 * This must be set to one of the pre-defined values as this is
222 * re-programmed into the hardware in this function. This function
230 * All fields except @ivsize are mandatory and must be filled.
244 * struct blkcipher_alg - synchronous block cipher definition
252 * All fields except @ivsize are mandatory and must be filled.
270 * struct cipher_alg - single-block symmetric ciphers definition
273 * algorithm. This must be set to one of the pre-defined
279 * algorithm. This must be set to one of the pre-defined values
299 * API will re-align the buffers. The re-alignment means that a
307 * transformation context, the key might need to be re-programmed
314 * All fields are mandatory and must be filled.
326 * struct compress_alg - compression/decompression algorithm
345 * struct crypto_istat_aead - statistics for AEAD algorithm
361 * struct crypto_istat_akcipher - statistics for akcipher algorithm
381 * struct crypto_istat_cipher - statistics for cipher algorithm
397 * struct crypto_istat_compress - statistics for compress algorithm
413 * struct crypto_istat_hash - statistics for has algorithm
425 * struct crypto_istat_kpp - statistics for KPP algorithm
459 * struct crypto_alg - definition of a cryptograpic cipher algorithm
462 * used for fine-tuning the description of the transformation
479 * the Crypto API will do the re-alignment in software, but
481 * The re-alignment happens at these occasions for different
482 * @cra_u types: cipher -- For both input data and output data
483 * buffer; ahash -- For output hash destination buf; shash --
510 * filled with callbacks. This field might be empty. This is the case
527 * @cra_u.cipher: Union member which contains a single-block symmetric cipher
683 case -EINPROGRESS: in crypto_wait_req()
684 case -EBUSY: in crypto_wait_req()
685 wait_for_completion(&wait->completion); in crypto_wait_req()
686 reinit_completion(&wait->completion); in crypto_wait_req()
687 err = wait->err; in crypto_wait_req()
696 init_completion(&wait->completion); in crypto_init_wait()
713 * Transforms: user-instantiated objects which encapsulate algorithms
803 #define CRYPTOA_MAX (__CRYPTOA_MAX - 1)
840 return tfm->__crt_alg->cra_name; in crypto_tfm_alg_name()
845 return tfm->__crt_alg->cra_driver_name; in crypto_tfm_alg_driver_name()
850 return tfm->__crt_alg->cra_priority; in crypto_tfm_alg_priority()
855 return tfm->__crt_alg->cra_flags & CRYPTO_ALG_TYPE_MASK; in crypto_tfm_alg_type()
860 return tfm->__crt_alg->cra_blocksize; in crypto_tfm_alg_blocksize()
865 return tfm->__crt_alg->cra_alignmask; in crypto_tfm_alg_alignmask()
870 return tfm->crt_flags; in crypto_tfm_get_flags()
875 tfm->crt_flags |= flags; in crypto_tfm_set_flags()
880 tfm->crt_flags &= ~flags; in crypto_tfm_clear_flags()
885 return tfm->__crt_ctx; in crypto_tfm_ctx()
891 return __alignof__(tfm->__crt_ctx); in crypto_tfm_ctx_alignment()
926 * load-balanced on the different CPUs via the process scheduler. To allow
950 return &tfm->base; in crypto_ablkcipher_tfm()
954 * crypto_free_ablkcipher() - zeroize and free cipher handle
963 * crypto_has_ablkcipher() - Search for the availability of an ablkcipher.
982 return &crypto_ablkcipher_tfm(tfm)->crt_ablkcipher; in crypto_ablkcipher_crt()
986 * crypto_ablkcipher_ivsize() - obtain IV size
997 return crypto_ablkcipher_crt(tfm)->ivsize; in crypto_ablkcipher_ivsize()
1001 * crypto_ablkcipher_blocksize() - obtain block size of cipher
1040 * crypto_ablkcipher_setkey() - set key for cipher
1049 * different cipher modes depending on the key size, such as AES-128 vs AES-192
1050 * vs. AES-256. When providing a 16 byte key for an AES cipher handle, AES-128
1060 return crt->setkey(crt->base, key, keylen); in crypto_ablkcipher_setkey()
1064 * crypto_ablkcipher_reqtfm() - obtain cipher handle from request
1075 return __crypto_ablkcipher_cast(req->base.tfm); in crypto_ablkcipher_reqtfm()
1079 * crypto_ablkcipher_encrypt() - encrypt plaintext
1084 * structure and how it is filled with data is discussed with the
1093 struct crypto_alg *alg = crt->base->base.__crt_alg; in crypto_ablkcipher_encrypt()
1094 unsigned int nbytes = req->nbytes; in crypto_ablkcipher_encrypt()
1098 ret = crt->encrypt(req); in crypto_ablkcipher_encrypt()
1104 * crypto_ablkcipher_decrypt() - decrypt ciphertext
1109 * structure and how it is filled with data is discussed with the
1118 struct crypto_alg *alg = crt->base->base.__crt_alg; in crypto_ablkcipher_decrypt()
1119 unsigned int nbytes = req->nbytes; in crypto_ablkcipher_decrypt()
1123 ret = crt->decrypt(req); in crypto_ablkcipher_decrypt()
1140 * crypto_ablkcipher_reqsize() - obtain size of the request data structure
1148 return crypto_ablkcipher_crt(tfm)->reqsize; in crypto_ablkcipher_reqsize()
1152 * ablkcipher_request_set_tfm() - update cipher handle reference in request
1162 req->base.tfm = crypto_ablkcipher_tfm(crypto_ablkcipher_crt(tfm)->base); in ablkcipher_request_set_tfm()
1172 * ablkcipher_request_alloc() - allocate request data structure
1197 * ablkcipher_request_free() - zeroize and free request data structure
1206 * ablkcipher_request_set_callback() - set asynchronous callback function
1234 req->base.complete = compl; in ablkcipher_request_set_callback()
1235 req->base.data = data; in ablkcipher_request_set_callback()
1236 req->base.flags = flags; in ablkcipher_request_set_callback()
1240 * ablkcipher_request_set_crypt() - set data buffers
1253 * reversed - the source is the ciphertext and the destination is the plaintext.
1260 req->src = src; in ablkcipher_request_set_crypt()
1261 req->dst = dst; in ablkcipher_request_set_crypt()
1262 req->nbytes = nbytes; in ablkcipher_request_set_crypt()
1263 req->info = iv; in ablkcipher_request_set_crypt()
1287 * The kernel crypto API supports a cipher operation "in-place" which means that
1310 * crypto_alloc_blkcipher() - allocate synchronous block cipher handle
1336 return &tfm->base; in crypto_blkcipher_tfm()
1340 * crypto_free_blkcipher() - zeroize and free the block cipher handle
1349 * crypto_has_blkcipher() - Search for the availability of a block cipher
1368 * crypto_blkcipher_name() - return the name / cra_name from the cipher handle
1381 return &crypto_blkcipher_tfm(tfm)->crt_blkcipher; in crypto_blkcipher_crt()
1387 return &crypto_blkcipher_tfm(tfm)->__crt_alg->cra_blkcipher; in crypto_blkcipher_alg()
1391 * crypto_blkcipher_ivsize() - obtain IV size
1401 return crypto_blkcipher_alg(tfm)->ivsize; in crypto_blkcipher_ivsize()
1405 * crypto_blkcipher_blocksize() - obtain block size of cipher
1444 * crypto_blkcipher_setkey() - set key for cipher
1453 * different cipher modes depending on the key size, such as AES-128 vs AES-192
1454 * vs. AES-256. When providing a 16 byte key for an AES cipher handle, AES-128
1462 return crypto_blkcipher_crt(tfm)->setkey(crypto_blkcipher_tfm(tfm), in crypto_blkcipher_setkey()
1467 * crypto_blkcipher_encrypt() - encrypt plaintext
1469 * @dst: scatter/gather list that is filled by the cipher operation with the
1477 * The blkcipher_desc data structure must be filled by the caller and can
1478 * reside on the stack. The caller must fill desc as follows: desc.tfm is filled
1479 * with the block cipher handle; desc.flags is filled with either
1489 desc->info = crypto_blkcipher_crt(desc->tfm)->iv; in crypto_blkcipher_encrypt()
1490 return crypto_blkcipher_crt(desc->tfm)->encrypt(desc, dst, src, nbytes); in crypto_blkcipher_encrypt()
1494 * crypto_blkcipher_encrypt_iv() - encrypt plaintext with dedicated IV
1496 * @dst: scatter/gather list that is filled by the cipher operation with the
1504 * The blkcipher_desc data structure must be filled by the caller and can
1505 * reside on the stack. The caller must fill desc as follows: desc.tfm is filled
1506 * with the block cipher handle; desc.info is filled with the IV to be used for
1507 * the current operation; desc.flags is filled with either
1517 return crypto_blkcipher_crt(desc->tfm)->encrypt(desc, dst, src, nbytes); in crypto_blkcipher_encrypt_iv()
1521 * crypto_blkcipher_decrypt() - decrypt ciphertext
1523 * @dst: scatter/gather list that is filled by the cipher operation with the
1531 * The blkcipher_desc data structure must be filled by the caller as documented
1542 desc->info = crypto_blkcipher_crt(desc->tfm)->iv; in crypto_blkcipher_decrypt()
1543 return crypto_blkcipher_crt(desc->tfm)->decrypt(desc, dst, src, nbytes); in crypto_blkcipher_decrypt()
1547 * crypto_blkcipher_decrypt_iv() - decrypt ciphertext with dedicated IV
1549 * @dst: scatter/gather list that is filled by the cipher operation with the
1557 * The blkcipher_desc data structure must be filled by the caller as documented
1567 return crypto_blkcipher_crt(desc->tfm)->decrypt(desc, dst, src, nbytes); in crypto_blkcipher_decrypt_iv()
1571 * crypto_blkcipher_set_iv() - set IV for cipher
1582 memcpy(crypto_blkcipher_crt(tfm)->iv, src, len); in crypto_blkcipher_set_iv()
1586 * crypto_blkcipher_get_iv() - obtain IV from cipher
1588 * @dst: buffer filled with the IV
1592 * cipher handle and store it into the user-provided buffer. If the buffer
1598 memcpy(dst, crypto_blkcipher_crt(tfm)->iv, len); in crypto_blkcipher_get_iv()
1614 * block-wise and process either the input or the output data of these cipher
1630 * crypto_alloc_cipher() - allocate single block cipher handle
1655 return &tfm->base; in crypto_cipher_tfm()
1659 * crypto_free_cipher() - zeroize and free the single block cipher handle
1668 * crypto_has_cipher() - Search for the availability of a single block cipher
1688 return &crypto_cipher_tfm(tfm)->crt_cipher; in crypto_cipher_crt()
1692 * crypto_cipher_blocksize() - obtain block size for cipher
1729 * crypto_cipher_setkey() - set key for cipher
1738 * different cipher modes depending on the key size, such as AES-128 vs AES-192
1739 * vs. AES-256. When providing a 16 byte key for an AES cipher handle, AES-128
1747 return crypto_cipher_crt(tfm)->cit_setkey(crypto_cipher_tfm(tfm), in crypto_cipher_setkey()
1752 * crypto_cipher_encrypt_one() - encrypt one block of plaintext
1754 * @dst: points to the buffer that will be filled with the ciphertext
1763 crypto_cipher_crt(tfm)->cit_encrypt_one(crypto_cipher_tfm(tfm), in crypto_cipher_encrypt_one()
1768 * crypto_cipher_decrypt_one() - decrypt one block of ciphertext
1770 * @dst: points to the buffer that will be filled with the plaintext
1779 crypto_cipher_crt(tfm)->cit_decrypt_one(crypto_cipher_tfm(tfm), in crypto_cipher_decrypt_one()
1807 return &tfm->base; in crypto_comp_tfm()
1831 return &crypto_comp_tfm(tfm)->crt_compress; in crypto_comp_crt()
1838 return crypto_comp_crt(tfm)->cot_compress(crypto_comp_tfm(tfm), in crypto_comp_compress()
1846 return crypto_comp_crt(tfm)->cot_decompress(crypto_comp_tfm(tfm), in crypto_comp_decompress()