1e28a4053SRui Paulo /* 2e28a4053SRui Paulo * PKCS #1 (RSA Encryption) 3e28a4053SRui Paulo * Copyright (c) 2006-2009, Jouni Malinen <j@w1.fi> 4e28a4053SRui Paulo * 5f05cddf9SRui Paulo * This software may be distributed under the terms of the BSD license. 6f05cddf9SRui Paulo * See README for more details. 7e28a4053SRui Paulo */ 8e28a4053SRui Paulo 9e28a4053SRui Paulo #ifndef PKCS1_H 10e28a4053SRui Paulo #define PKCS1_H 11e28a4053SRui Paulo 12*5b9c547cSRui Paulo struct crypto_public_key; 13*5b9c547cSRui Paulo struct asn1_oid; 14*5b9c547cSRui Paulo 15e28a4053SRui Paulo int pkcs1_encrypt(int block_type, struct crypto_rsa_key *key, 16e28a4053SRui Paulo int use_private, const u8 *in, size_t inlen, 17e28a4053SRui Paulo u8 *out, size_t *outlen); 18e28a4053SRui Paulo int pkcs1_v15_private_key_decrypt(struct crypto_rsa_key *key, 19e28a4053SRui Paulo const u8 *in, size_t inlen, 20e28a4053SRui Paulo u8 *out, size_t *outlen); 21e28a4053SRui Paulo int pkcs1_decrypt_public_key(struct crypto_rsa_key *key, 22e28a4053SRui Paulo const u8 *crypt, size_t crypt_len, 23e28a4053SRui Paulo u8 *plain, size_t *plain_len); 24*5b9c547cSRui Paulo int pkcs1_v15_sig_ver(struct crypto_public_key *pk, 25*5b9c547cSRui Paulo const u8 *s, size_t s_len, 26*5b9c547cSRui Paulo const struct asn1_oid *hash_alg, 27*5b9c547cSRui Paulo const u8 *hash, size_t hash_len); 28e28a4053SRui Paulo 29e28a4053SRui Paulo #endif /* PKCS1_H */ 30