Lines Matching +full:key +full:- +full:up

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Public Key Signature Algorithm
13 * struct crypto_sig - user-instantiated objects which encapsulate
23 * struct sig_alg - generic public key signature algorithm
25 * @sign: Function performs a sign operation as defined by public key
29 * public key algorithm, returning verification status. Optional.
30 * @set_pub_key: Function invokes the algorithm specific set public key
32 * the BER encoded public key and parameters. Mandatory.
33 * @set_priv_key: Function invokes the algorithm specific set private key
35 * the BER encoded private key and parameters. Optional.
36 * @key_size: Function returns key size. Mandatory.
61 const void *key, unsigned int keylen);
63 const void *key, unsigned int keylen);
74 * DOC: Generic Public Key Signature API
76 * The Public Key Signature API is used with the algorithms of type
81 * crypto_alloc_sig() - allocate signature tfm handle
87 * Allocate a handle for public key signature algorithm. The returned struct
98 return &tfm->base; in crypto_sig_tfm()
113 return __crypto_sig_alg(crypto_sig_tfm(tfm)->__crt_alg); in crypto_sig_alg()
117 * crypto_free_sig() - free signature tfm handle
129 * crypto_sig_keysize() - Get key size
131 * Function returns the key size in bytes.
132 * Function assumes that the key is already set in the transformation. If this
133 * function is called without a setkey or with a failed setkey, you may end up
142 return alg->key_size(tfm); in crypto_sig_keysize()
146 * crypto_sig_digestsize() - Get maximum digest size
149 * Function assumes that the key is already set in the transformation. If this
150 * function is called without a setkey or with a failed setkey, you may end up
159 return alg->digest_size(tfm); in crypto_sig_digestsize()
163 * crypto_sig_maxsize() - Get maximum signature size
166 * Function assumes that the key is already set in the transformation. If this
167 * function is called without a setkey or with a failed setkey, you may end up
176 return alg->max_size(tfm); in crypto_sig_maxsize()
180 * crypto_sig_sign() - Invoke signing operation
198 return alg->sign(tfm, src, slen, dst, dlen); in crypto_sig_sign()
202 * crypto_sig_verify() - Invoke signature verification
221 return alg->verify(tfm, src, slen, digest, dlen); in crypto_sig_verify()
225 * crypto_sig_set_pubkey() - Invoke set public key operation
227 * Function invokes the algorithm specific set key function, which knows
228 * how to decode and interpret the encoded key and parameters
231 * @key: BER encoded public key, algo OID, paramlen, BER encoded
233 * @keylen: length of the key (not including other data)
238 const void *key, unsigned int keylen) in crypto_sig_set_pubkey() argument
242 return alg->set_pub_key(tfm, key, keylen); in crypto_sig_set_pubkey()
246 * crypto_sig_set_privkey() - Invoke set private key operation
248 * Function invokes the algorithm specific set key function, which knows
249 * how to decode and interpret the encoded key and parameters
252 * @key: BER encoded private key, algo OID, paramlen, BER encoded
254 * @keylen: length of the key (not including other data)
259 const void *key, unsigned int keylen) in crypto_sig_set_privkey() argument
263 return alg->set_priv_key(tfm, key, keylen); in crypto_sig_set_privkey()