Lines Matching +full:key +full:- +full:code
2 * Public Key Encryption
18 * struct akcipher_request - public key request
42 * struct crypto_akcipher - user-instantiated objects which encapsulate
52 * struct akcipher_alg - generic public key algorithm
54 * @sign: Function performs a sign operation as defined by public key
56 * the req->dst_len will be updated to the size required for the
58 * @verify: Function performs a sign operation as defined by public key
60 * the req->dst_len will be updated to the size required for the
62 * @encrypt: Function performs an encrypt operation as defined by public key
64 * the req->dst_len will be updated to the size required for the
66 * @decrypt: Function performs a decrypt operation as defined by public key
68 * the req->dst_len will be updated to the size required for the
70 * @set_pub_key: Function invokes the algorithm specific set public key
72 * the BER encoded public key
73 * @set_priv_key: Function invokes the algorithm specific set private key
75 * the BER encoded private key
76 * @max_size: Function returns dest buffer size required for a given key.
97 int (*set_pub_key)(struct crypto_akcipher *tfm, const void *key,
99 int (*set_priv_key)(struct crypto_akcipher *tfm, const void *key,
110 * DOC: Generic Public Key API
112 * The Public Key API is used with the algorithms of type
117 * crypto_alloc_akcipher() - allocate AKCIPHER tfm handle
119 * public key algorithm e.g. "rsa"
123 * Allocate a handle for public key algorithm. The returned struct
125 * API invocation for the public key operations.
128 * of an error, PTR_ERR() returns the error code.
136 return &tfm->base; in crypto_akcipher_tfm()
153 return __crypto_akcipher_alg(crypto_akcipher_tfm(tfm)->__crt_alg); in crypto_akcipher_alg()
158 return crypto_akcipher_alg(tfm)->reqsize; in crypto_akcipher_reqsize()
164 req->base.tfm = crypto_akcipher_tfm(tfm); in akcipher_request_set_tfm()
170 return __crypto_akcipher_tfm(req->base.tfm); in crypto_akcipher_reqtfm()
174 * crypto_free_akcipher() - free AKCIPHER tfm handle
184 * akcipher_request_alloc() - allocates public key request
204 * akcipher_request_free() - zeroize and free public key request
214 * akcipher_request_set_callback() - Sets an asynchronous callback.
229 req->base.complete = cmpl; in akcipher_request_set_callback()
230 req->base.data = data; in akcipher_request_set_callback()
231 req->base.flags = flgs; in akcipher_request_set_callback()
235 * akcipher_request_set_crypt() - Sets request parameters
239 * @req: public key request
251 req->src = src; in akcipher_request_set_crypt()
252 req->dst = dst; in akcipher_request_set_crypt()
253 req->src_len = src_len; in akcipher_request_set_crypt()
254 req->dst_len = dst_len; in akcipher_request_set_crypt()
258 * crypto_akcipher_maxsize() - Get len for output buffer
260 * Function returns the dest buffer size required for a given key.
261 * Function assumes that the key is already set in the transformation. If this
271 return alg->max_size(tfm); in crypto_akcipher_maxsize()
275 * crypto_akcipher_encrypt() - Invoke public key encrypt operation
277 * Function invokes the specific public key encrypt operation for a given
278 * public key algorithm
280 * @req: asymmetric key request
282 * Return: zero on success; error code in case of error
289 return alg->encrypt(req); in crypto_akcipher_encrypt()
293 * crypto_akcipher_decrypt() - Invoke public key decrypt operation
295 * Function invokes the specific public key decrypt operation for a given
296 * public key algorithm
298 * @req: asymmetric key request
300 * Return: zero on success; error code in case of error
307 return alg->decrypt(req); in crypto_akcipher_decrypt()
311 * crypto_akcipher_sign() - Invoke public key sign operation
313 * Function invokes the specific public key sign operation for a given
314 * public key algorithm
316 * @req: asymmetric key request
318 * Return: zero on success; error code in case of error
325 return alg->sign(req); in crypto_akcipher_sign()
329 * crypto_akcipher_verify() - Invoke public key verify operation
331 * Function invokes the specific public key verify operation for a given
332 * public key algorithm
334 * @req: asymmetric key request
336 * Return: zero on success; error code in case of error
343 return alg->verify(req); in crypto_akcipher_verify()
347 * crypto_akcipher_set_pub_key() - Invoke set public key operation
349 * Function invokes the algorithm specific set key function, which knows
350 * how to decode and interpret the encoded key
353 * @key: BER encoded public key
354 * @keylen: length of the key
356 * Return: zero on success; error code in case of error
359 const void *key, in crypto_akcipher_set_pub_key() argument
364 return alg->set_pub_key(tfm, key, keylen); in crypto_akcipher_set_pub_key()
368 * crypto_akcipher_set_priv_key() - Invoke set private key operation
370 * Function invokes the algorithm specific set key function, which knows
371 * how to decode and interpret the encoded key
374 * @key: BER encoded private key
375 * @keylen: length of the key
377 * Return: zero on success; error code in case of error
380 const void *key, in crypto_akcipher_set_priv_key() argument
385 return alg->set_priv_key(tfm, key, keylen); in crypto_akcipher_set_priv_key()