Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
awilliam
GitHub Repository: awilliam/linux-vfio
Path: blob/master/include/keys/encrypted-type.h
10818 views
1
/*
2
* Copyright (C) 2010 IBM Corporation
3
* Author: Mimi Zohar <[email protected]>
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
10
#ifndef _KEYS_ENCRYPTED_TYPE_H
11
#define _KEYS_ENCRYPTED_TYPE_H
12
13
#include <linux/key.h>
14
#include <linux/rcupdate.h>
15
16
struct encrypted_key_payload {
17
struct rcu_head rcu;
18
char *master_desc; /* datablob: master key name */
19
char *datalen; /* datablob: decrypted key length */
20
u8 *iv; /* datablob: iv */
21
u8 *encrypted_data; /* datablob: encrypted data */
22
unsigned short datablob_len; /* length of datablob */
23
unsigned short decrypted_datalen; /* decrypted data length */
24
u8 decrypted_data[0]; /* decrypted data + datablob + hmac */
25
};
26
27
extern struct key_type key_type_encrypted;
28
29
#endif /* _KEYS_ENCRYPTED_TYPE_H */
30
31