2019-06-01 11:08:55 +03:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2010-11-24 02:55:35 +03:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2010 IBM Corporation
|
2011-06-27 15:45:42 +04:00
|
|
|
* Copyright (C) 2010 Politecnico di Torino, Italy
|
|
|
|
* TORSEC group -- http://security.polito.it
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Mimi Zohar <zohar@us.ibm.com>
|
|
|
|
* Roberto Sassu <roberto.sassu@polito.it>
|
2010-11-24 02:55:35 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _KEYS_ENCRYPTED_TYPE_H
|
|
|
|
#define _KEYS_ENCRYPTED_TYPE_H
|
|
|
|
|
|
|
|
#include <linux/key.h>
|
|
|
|
#include <linux/rcupdate.h>
|
|
|
|
|
|
|
|
struct encrypted_key_payload {
|
|
|
|
struct rcu_head rcu;
|
2011-06-27 15:45:42 +04:00
|
|
|
char *format; /* datablob: format */
|
2010-11-24 02:55:35 +03:00
|
|
|
char *master_desc; /* datablob: master key name */
|
|
|
|
char *datalen; /* datablob: decrypted key length */
|
|
|
|
u8 *iv; /* datablob: iv */
|
|
|
|
u8 *encrypted_data; /* datablob: encrypted data */
|
|
|
|
unsigned short datablob_len; /* length of datablob */
|
|
|
|
unsigned short decrypted_datalen; /* decrypted data length */
|
2011-06-27 15:45:42 +04:00
|
|
|
unsigned short payload_datalen; /* payload data length */
|
|
|
|
unsigned short encrypted_key_format; /* encrypted key format */
|
|
|
|
u8 *decrypted_data; /* decrypted data */
|
2020-05-28 17:35:11 +03:00
|
|
|
u8 payload_data[]; /* payload data + datablob + hmac */
|
2010-11-24 02:55:35 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
extern struct key_type key_type_encrypted;
|
|
|
|
|
|
|
|
#endif /* _KEYS_ENCRYPTED_TYPE_H */
|