xref: /aosp_15_r20/external/wpa_supplicant_8/src/tls/rsa.h (revision 03f9172ca588f91df233974f4258bab95191f931)
1*03f9172cSAndroid Build Coastguard Worker /*
2*03f9172cSAndroid Build Coastguard Worker  * RSA
3*03f9172cSAndroid Build Coastguard Worker  * Copyright (c) 2006, Jouni Malinen <[email protected]>
4*03f9172cSAndroid Build Coastguard Worker  *
5*03f9172cSAndroid Build Coastguard Worker  * This software may be distributed under the terms of the BSD license.
6*03f9172cSAndroid Build Coastguard Worker  * See README for more details.
7*03f9172cSAndroid Build Coastguard Worker  */
8*03f9172cSAndroid Build Coastguard Worker 
9*03f9172cSAndroid Build Coastguard Worker #ifndef RSA_H
10*03f9172cSAndroid Build Coastguard Worker #define RSA_H
11*03f9172cSAndroid Build Coastguard Worker 
12*03f9172cSAndroid Build Coastguard Worker struct crypto_rsa_key;
13*03f9172cSAndroid Build Coastguard Worker 
14*03f9172cSAndroid Build Coastguard Worker struct crypto_rsa_key *
15*03f9172cSAndroid Build Coastguard Worker crypto_rsa_import_public_key(const u8 *buf, size_t len);
16*03f9172cSAndroid Build Coastguard Worker struct crypto_rsa_key *
17*03f9172cSAndroid Build Coastguard Worker crypto_rsa_import_public_key_parts(const u8 *n, size_t n_len,
18*03f9172cSAndroid Build Coastguard Worker 				   const u8 *e, size_t e_len);
19*03f9172cSAndroid Build Coastguard Worker struct crypto_rsa_key *
20*03f9172cSAndroid Build Coastguard Worker crypto_rsa_import_private_key(const u8 *buf, size_t len);
21*03f9172cSAndroid Build Coastguard Worker size_t crypto_rsa_get_modulus_len(struct crypto_rsa_key *key);
22*03f9172cSAndroid Build Coastguard Worker int crypto_rsa_exptmod(const u8 *in, size_t inlen, u8 *out, size_t *outlen,
23*03f9172cSAndroid Build Coastguard Worker 		       struct crypto_rsa_key *key, int use_private);
24*03f9172cSAndroid Build Coastguard Worker void crypto_rsa_free(struct crypto_rsa_key *key);
25*03f9172cSAndroid Build Coastguard Worker 
26*03f9172cSAndroid Build Coastguard Worker #endif /* RSA_H */
27