1 /* SPDX-License-Identifier: GPL-2.0-or-later */
5 * Copyright (c) 2015, Intel Corporation
6 * Authors: Tadeusz Struk <tadeusz.struk@intel.com>
10 #include <linux/types.h>
13 * rsa_key - RSA key structure
14 * @n : RSA modulus raw byte stream
15 * @e : RSA public exponent raw byte stream
16 * @d : RSA private exponent raw byte stream
17 * @p : RSA prime factor p of n raw byte stream
18 * @q : RSA prime factor q of n raw byte stream
19 * @dp : RSA exponent d mod (p - 1) raw byte stream
20 * @dq : RSA exponent d mod (q - 1) raw byte stream
21 * @qinv : RSA CRT coefficient q^(-1) mod p raw byte stream
22 * @n_sz : length in bytes of RSA modulus n
23 * @e_sz : length in bytes of RSA public exponent
24 * @d_sz : length in bytes of RSA private exponent
25 * @p_sz : length in bytes of p field
26 * @q_sz : length in bytes of q field
27 * @dp_sz : length in bytes of dp field
28 * @dq_sz : length in bytes of dq field
29 * @qinv_sz : length in bytes of qinv field
50 int rsa_parse_pub_key(struct rsa_key *rsa_key, const void *key,
51 unsigned int key_len);
53 int rsa_parse_priv_key(struct rsa_key *rsa_key, const void *key,
54 unsigned int key_len);
56 extern struct crypto_template rsa_pkcs1pad_tmpl;