OpenDDS  Snapshot(2023/04/28-20:55)
CryptoBuiltIn.idl
Go to the documentation of this file.
1 /*
2  * Distributed under the OpenDDS License.
3  * See: http://www.opendds.org/license.html
4  */
5 
6 #include <dds/DdsDcpsCore.idl>
7 
8 module OpenDDS {
9  module Security {
10 
11  // The CRYPTO_TRANSFORMATION_KIND_* constants below are used in this
12  // index of the CryptoTransformKind array. (Other elements are 0.)
13  const unsigned long TransformKindIndex = 3;
14 
15  /* No encryption, no authentication tag */
17 
18  /*
19  No encryption.
20  One AES128-GMAC authentication tag using the sender_key
21  Zero or more AES128-GMAC auth. tags with receiver specific keys
22  */
24 
25  /*
26  Authenticated Encryption using AES-128 in Galois Counter Mode
27  (GCM) using the sender key.
28  The authentication tag using the sender_key obtained from GCM
29  Zero or more AES128-GMAC auth. tags with receiver specific keys
30  */
32 
33  /*
34  No encryption.
35  One AES256-GMAC authentication tag using the sender_key
36  Zero or more AES256-GMAC auth.
37  tags with receiver specific keys
38  */
40 
41  /*
42  Authenticated Encryption using AES-256 in Galois Counter Mode
43  (GCM) using the sender key.
44  The authentication tag using the sender_key obtained from GCM
45  Zero or more AES256-GMAC auth.
46  tags with receiver specific keys
47  */
49 
50  typedef octet CryptoTransformKind[4];
51  typedef octet CryptoTransformKeyId[4];
53  CryptoTransformKind transformation_kind;
54  CryptoTransformKeyId transformation_key_id;
55  };
56 
57  typedef sequence<octet, 32> KeyOctetSeq;
58 
60  CryptoTransformKind transformation_kind;
61  KeyOctetSeq master_salt;
62 
63  CryptoTransformKeyId sender_key_id;
64  KeyOctetSeq master_sender_key;
65 
66  CryptoTransformKeyId receiver_specific_key_id;
68  };
69 
70  typedef sequence<KeyMaterial_AES_GCM_GMAC> KeyMaterial_AES_GCM_GMAC_Seq;
71 
72  typedef octet SessionIdType[4];
73  typedef octet IV_SuffixType[8];
74  struct CryptoHeader {
76  SessionIdType session_id;
78  };
79 
80  // Serialized as Big Endian
81  struct CryptoContent {
83  };
84 
85  typedef octet ReceiverMAC_Type[16];
87  CryptoTransformKeyId receiver_mac_key_id;
88  ReceiverMAC_Type receiver_mac;
89  };
90 
91  typedef sequence<ReceiverSpecificMAC> ReceiverSpecificMACSeq;
92  typedef octet CommonMAC_Type[16];
93 
94  // Serialized as Big Endian
95  struct CryptoFooter {
96  CommonMAC_Type common_mac;
97  ReceiverSpecificMACSeq receiver_specific_macs;
98  };
99 
100  const unsigned long FLAG_IS_SUBMESSAGE_ENCRYPTED = 1;
101  const unsigned long FLAG_IS_PAYLOAD_ENCRYPTED = 2;
102  };
103 };
const octet CRYPTO_TRANSFORMATION_KIND_AES256_GCM
sequence< octet, 32 > KeyOctetSeq
const unsigned long FLAG_IS_PAYLOAD_ENCRYPTED
const unsigned long FLAG_IS_SUBMESSAGE_ENCRYPTED
const octet CRYPTO_TRANSFORMATION_KIND_NONE
const octet CRYPTO_TRANSFORMATION_KIND_AES128_GCM
octet CryptoTransformKeyId[4]
sequence< ReceiverSpecificMAC > ReceiverSpecificMACSeq
ReceiverSpecificMACSeq receiver_specific_macs
const octet CRYPTO_TRANSFORMATION_KIND_AES128_GMAC
const unsigned long TransformKindIndex
octet CommonMAC_Type[16]
sequence< octet > OctetSeq
Definition: DdsDcpsCore.idl:64
octet CryptoTransformKind[4]
const octet CRYPTO_TRANSFORMATION_KIND_AES256_GMAC
IV_SuffixType initialization_vector_suffix
octet ReceiverMAC_Type[16]
sequence< KeyMaterial_AES_GCM_GMAC > KeyMaterial_AES_GCM_GMAC_Seq
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28
CryptoTransformIdentifier transform_identifier