pkcs1.h 872 B

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