encrypted-type.h 914 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright (C) 2010 IBM Corporation
  3. * Author: Mimi Zohar <zohar@us.ibm.com>
  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 as published by
  7. * the Free Software Foundation, version 2 of the License.
  8. */
  9. #ifndef _KEYS_ENCRYPTED_TYPE_H
  10. #define _KEYS_ENCRYPTED_TYPE_H
  11. #include <linux/key.h>
  12. #include <linux/rcupdate.h>
  13. struct encrypted_key_payload {
  14. struct rcu_head rcu;
  15. char *master_desc; /* datablob: master key name */
  16. char *datalen; /* datablob: decrypted key length */
  17. u8 *iv; /* datablob: iv */
  18. u8 *encrypted_data; /* datablob: encrypted data */
  19. unsigned short datablob_len; /* length of datablob */
  20. unsigned short decrypted_datalen; /* decrypted data length */
  21. u8 decrypted_data[0]; /* decrypted data + datablob + hmac */
  22. };
  23. extern struct key_type key_type_encrypted;
  24. #endif /* _KEYS_ENCRYPTED_TYPE_H */