Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1 | /* |
| 2 | * PKCS #1 (RSA Encryption) |
| 3 | * Copyright (c) 2006-2009, Jouni Malinen <j@w1.fi> |
| 4 | * |
| 5 | * This program is free software; you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License version 2 as |
| 7 | * published by the Free Software Foundation. |
| 8 | * |
| 9 | * Alternatively, this software may be distributed under the terms of BSD |
| 10 | * license. |
| 11 | * |
| 12 | * See README and COPYING for more details. |
| 13 | */ |
| 14 | |
| 15 | #ifndef PKCS1_H |
| 16 | #define PKCS1_H |
| 17 | |
| 18 | int pkcs1_encrypt(int block_type, struct crypto_rsa_key *key, |
| 19 | int use_private, const u8 *in, size_t inlen, |
| 20 | u8 *out, size_t *outlen); |
| 21 | int pkcs1_v15_private_key_decrypt(struct crypto_rsa_key *key, |
| 22 | const u8 *in, size_t inlen, |
| 23 | u8 *out, size_t *outlen); |
| 24 | int pkcs1_decrypt_public_key(struct crypto_rsa_key *key, |
| 25 | const u8 *crypt, size_t crypt_len, |
| 26 | u8 *plain, size_t *plain_len); |
| 27 | |
| 28 | #endif /* PKCS1_H */ |