CryptoBuiltIn.idl

Go to the documentation of this file.
00001 /*
00002  * Distributed under the OpenDDS License.
00003  * See: http://www.opendds.org/license.html
00004  */
00005 
00006 #include "dds/DdsDcpsCore.idl"
00007 
00008 module OpenDDS {
00009   module Security {
00010 
00011     // The CRYPTO_TRANSFORMATION_KIND_* constants below are used in this
00012     // index of the CryptoTransfromKind array.  (Other elements are 0.)
00013     const unsigned long TransformKindIndex = 3;
00014 
00015     /* No encryption, no authentication tag */
00016     const octet CRYPTO_TRANSFORMATION_KIND_NONE = 0;
00017 
00018     /*
00019       No encryption.
00020       One AES128-GMAC authentication tag using the sender_key
00021       Zero or more AES128-GMAC auth. tags with receiver specfic keys
00022     */
00023     const octet CRYPTO_TRANSFORMATION_KIND_AES128_GMAC = 1;
00024 
00025     /*
00026       Authenticated Encryption using AES-128 in Galois Counter Mode
00027       (GCM) using the sender key.
00028       The authentication tag using the sender_key obtained from GCM
00029       Zero or more AES128-GMAC auth. tags with receiver specfic keys
00030     */
00031     const octet CRYPTO_TRANSFORMATION_KIND_AES128_GCM = 2;
00032 
00033     /*
00034       No encryption.
00035       One AES256-GMAC authentication tag using the sender_key
00036       Zero or more AES256-GMAC auth.
00037       tags with receiver specfic keys
00038     */
00039     const octet CRYPTO_TRANSFORMATION_KIND_AES256_GMAC = 3;
00040 
00041     /*
00042       Authenticated Encryption using AES-256 in Galois Counter Mode
00043       (GCM) using the sender key.
00044       The authentication tag using the sender_key obtained from GCM
00045       Zero or more AES256-GMAC auth.
00046       tags with receiver specfic keys
00047     */
00048     const octet CRYPTO_TRANSFORMATION_KIND_AES256_GCM = 4;
00049 
00050     typedef octet CryptoTransformKind[4];
00051     typedef octet CryptoTransformKeyId[4];
00052     struct CryptoTransformIdentifier {
00053       CryptoTransformKind transformation_kind;
00054       CryptoTransformKeyId transformation_key_id;
00055     };
00056 
00057     typedef sequence<octet, 32> KeyOctetSeq;
00058 
00059     struct KeyMaterial_AES_GCM_GMAC {
00060       CryptoTransformKind   transformation_kind;
00061       KeyOctetSeq   master_salt;
00062 
00063       CryptoTransformKeyId  sender_key_id;
00064       KeyOctetSeq   master_sender_key;
00065 
00066       CryptoTransformKeyId  receiver_specific_key_id;
00067       KeyOctetSeq   master_receiver_specific_key;
00068     };
00069 
00070     typedef sequence<KeyMaterial_AES_GCM_GMAC> KeyMaterial_AES_GCM_GMAC_Seq;
00071 
00072     typedef octet SessionIdType[4];
00073     typedef octet IV_SuffixType[8];
00074     struct CryptoHeader {
00075       CryptoTransformIdentifier transform_identifier;
00076       SessionIdType             session_id;
00077       IV_SuffixType             initialization_vector_suffix;
00078     };
00079 
00080     // Serialized as Big Endian
00081     struct CryptoContent  {
00082       DDS::OctetSeq crypto_content;
00083     };
00084 
00085     typedef octet ReceiverMAC_Type[16];
00086     struct ReceiverSpecificMAC {
00087       CryptoTransformKeyId  receiver_mac_key_id;
00088       ReceiverMAC_Type      receiver_mac;
00089     };
00090 
00091     typedef sequence<ReceiverSpecificMAC> ReceiverSpecificMACSeq;
00092     typedef octet CommonMAC_Type[16];
00093 
00094     // Serialized as Big Endian
00095     struct CryptoFooter {
00096       CommonMAC_Type          common_mac;
00097       ReceiverSpecificMACSeq  receiver_specific_macs;
00098     };
00099 
00100     const unsigned long FLAG_IS_SUBMESSAGE_ENCRYPTED = 1;
00101     const unsigned long FLAG_IS_PAYLOAD_ENCRYPTED = 2;
00102   };
00103 };
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1