mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-11 09:01:36 +08:00
Add a header to logfile encryption key exchange file
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
committed by
Beat Küng
parent
9a4ef709ca
commit
6cae4c92e7
@@ -61,6 +61,33 @@ struct ulog_file_header_s {
|
||||
uint64_t timestamp;
|
||||
};
|
||||
|
||||
/** first bytes of the crypto key file */
|
||||
struct ulog_key_header_s {
|
||||
/* magic identifying the file content */
|
||||
uint8_t magic[7];
|
||||
|
||||
/* version of this header file */
|
||||
uint8_t hdr_ver;
|
||||
|
||||
/* file creation timestamp */
|
||||
uint64_t timestamp;
|
||||
|
||||
/* crypto algorithm used for key exchange */
|
||||
uint8_t exchange_algorithm;
|
||||
|
||||
/* encryption key index used for key exchange */
|
||||
uint8_t exchange_key;
|
||||
|
||||
/* size of the key */
|
||||
uint16_t key_size;
|
||||
|
||||
/* size of logfile crypto algoritm initialization data, e.g. nonce */
|
||||
uint16_t initdata_size;
|
||||
|
||||
/* actual data (initdata+key) */
|
||||
uint8_t data[0];
|
||||
};
|
||||
|
||||
#define ULOG_MSG_HEADER_LEN 3 //accounts for msg_size and msg_type
|
||||
struct ulog_message_header_s {
|
||||
uint16_t msg_size;
|
||||
|
||||
Reference in New Issue
Block a user