rsa.h 635 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * RSA internal helpers
  3. *
  4. * Copyright (c) 2015, Intel Corporation
  5. * Authors: Tadeusz Struk <tadeusz.struk@intel.com>
  6. *
  7. * This program is free software; you can redistribute it and/or modify it
  8. * under the terms of the GNU General Public License as published by the Free
  9. * Software Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. */
  13. #ifndef _RSA_HELPER_
  14. #define _RSA_HELPER_
  15. #include <linux/mpi.h>
  16. struct rsa_key {
  17. MPI n;
  18. MPI e;
  19. MPI d;
  20. };
  21. int rsa_parse_key(struct rsa_key *rsa_key, const void *key,
  22. unsigned int key_len);
  23. void rsa_free_key(struct rsa_key *rsa_key);
  24. #endif