rsa.h 649 B

1234567891011121314151617181920212223
  1. /*
  2. * RSA
  3. * Copyright (c) 2006, 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 RSA_H
  9. #define RSA_H
  10. struct crypto_rsa_key;
  11. struct crypto_rsa_key *
  12. crypto_rsa_import_public_key(const u8 *buf, size_t len);
  13. struct crypto_rsa_key *
  14. crypto_rsa_import_private_key(const u8 *buf, size_t len);
  15. size_t crypto_rsa_get_modulus_len(struct crypto_rsa_key *key);
  16. int crypto_rsa_exptmod(const u8 *in, size_t inlen, u8 *out, size_t *outlen,
  17. struct crypto_rsa_key *key, int use_private);
  18. void crypto_rsa_free(struct crypto_rsa_key *key);
  19. #endif /* RSA_H */