File tree Expand file tree Collapse file tree 5 files changed +23
-18
lines changed Expand file tree Collapse file tree 5 files changed +23
-18
lines changed Original file line number Diff line number Diff line change 17
17
#include "access/pg_tde_xlog.h"
18
18
#include "catalog/tde_global_space.h"
19
19
#include "catalog/tde_principal_key.h"
20
+ #include "common/pg_tde_utils.h"
20
21
#include "encryption/enc_aes.h"
21
22
#include "encryption/enc_tde.h"
22
23
#include "keyring/keyring_api.h"
Original file line number Diff line number Diff line change 9
9
#include "storage/fd.h"
10
10
#include "utils/memutils.h"
11
11
12
- #include "access/pg_tde_tdemap.h"
13
12
#include "access/pg_tde_xlog_keys.h"
14
13
#include "access/pg_tde_xlog.h"
15
14
#include "catalog/tde_global_space.h"
16
15
#include "catalog/tde_principal_key.h"
16
+ #include "common/pg_tde_utils.h"
17
17
#include "encryption/enc_aes.h"
18
18
#include "encryption/enc_tde.h"
19
19
Original file line number Diff line number Diff line change
1
+ #ifndef PG_TDE_KEYS_COMMON_H
2
+ #define PG_TDE_KEYS_COMMON_H
3
+
4
+ #include "catalog/tde_principal_key.h"
5
+
6
+ #define INTERNAL_KEY_LEN 16
7
+ #define INTERNAL_KEY_IV_LEN 16
8
+
9
+ #define MAP_ENTRY_IV_SIZE 16
10
+ #define MAP_ENTRY_AEAD_TAG_SIZE 16
11
+
12
+ typedef struct
13
+ {
14
+ TDEPrincipalKeyInfo data ;
15
+ unsigned char sign_iv [MAP_ENTRY_IV_SIZE ];
16
+ unsigned char aead_tag [MAP_ENTRY_AEAD_TAG_SIZE ];
17
+ } TDESignedPrincipalKeyInfo ;
18
+
19
+ #endif /* PG_TDE_KEYS_COMMON_H */
Original file line number Diff line number Diff line change 1
1
#ifndef PG_TDE_MAP_H
2
2
#define PG_TDE_MAP_H
3
3
4
- #include "access/xlog_internal.h"
5
4
#include "storage/relfilelocator.h"
6
- #include "catalog/tde_principal_key.h"
7
- #include "common/pg_tde_utils.h"
8
5
9
- #define INTERNAL_KEY_LEN 16
10
- #define INTERNAL_KEY_IV_LEN 16
6
+ #include "access/pg_tde_keys_common.h"
11
7
12
8
typedef struct InternalKey
13
9
{
14
10
uint8 key [INTERNAL_KEY_LEN ];
15
11
uint8 base_iv [INTERNAL_KEY_IV_LEN ];
16
12
} InternalKey ;
17
13
18
- #define MAP_ENTRY_IV_SIZE 16
19
- #define MAP_ENTRY_AEAD_TAG_SIZE 16
20
-
21
- typedef struct
22
- {
23
- TDEPrincipalKeyInfo data ;
24
- unsigned char sign_iv [MAP_ENTRY_IV_SIZE ];
25
- unsigned char aead_tag [MAP_ENTRY_AEAD_TAG_SIZE ];
26
- } TDESignedPrincipalKeyInfo ;
27
-
28
14
extern void pg_tde_save_smgr_key (RelFileLocator rel , const InternalKey * key );
29
15
extern bool pg_tde_has_smgr_key (RelFileLocator rel );
30
16
extern InternalKey * pg_tde_get_smgr_key (RelFileLocator rel );
Original file line number Diff line number Diff line change 3
3
4
4
#include "access/xlog_internal.h"
5
5
6
- #include "access/pg_tde_tdemap.h"
7
- #include "catalog/tde_principal_key.h"
6
+ #include "access/pg_tde_keys_common.h"
8
7
9
8
typedef enum
10
9
{
You can’t perform that action at this time.
0 commit comments