EnOcean Link  1.14.0.0
Middleware to Connect EnOcean easily to other Projects
eoSecureInfo.h
Go to the documentation of this file.
1 /******************************************************************************
2  DISCLAIMER
3 
4  THIS SOFTWARE PRODUCT ("SOFTWARE") IS PROPRIETARY TO ENOCEAN GMBH, OBERHACHING,
5  GERMANY (THE "OWNER") AND IS PROTECTED BY COPYRIGHT AND INTERNATIONAL TREATIES OR
6  PROTECTED AS TRADE SECRET OR AS OTHER INTELLECTUAL PROPERTY RIGHT. ALL RIGHTS, TITLE AND
7  INTEREST IN AND TO THE SOFTWARE, INCLUDING ANY COPYRIGHT, TRADE SECRET OR ANY OTHER
8  INTELLECTUAL PROPERTY EMBODIED IN THE SOFTWARE, AND ANY RIGHTS TO REPRODUCE,
9  DISTRIBUTE, MODIFY, DISPLAY OR OTHERWISE USE THE SOFTWARE SHALL EXCLUSIVELY VEST IN THE
10  OWNER. ANY UNAUTHORIZED REPRODUCTION, DISTRIBUTION, MODIFICATION, DISPLAY OR OTHER
11  USE OF THE SOFTWARE WITHOUT THE EXPLICIT PERMISSION OF OWNER IS PROHIBITED AND WILL
12  CONSTITUTE AN INFRINGEMENT OF THE OWNER'S RIGHT AND MAY BE SUBJECT TO CIVIL OR
13  CRIMINAL SANCTION.
14 
15  THIS SOFTWARE IS PROVIDED BY THE OWNER "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
16  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
17  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN PARTICULAR, THE OWNER DOES NOT WARRANT
18  THAT THE SOFTWARE SHALL BE ERROR FREE AND WORKS WITHOUT INTERRUPTION.
19 
20  IN NO EVENT SHALL THE OWNER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
21  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  ******************************************************************************/
27 
33 #ifndef EO_SEC_INFO_H_
34 #define EO_SEC_INFO_H_
35 
36 #include "api/sec_api.h"
37 #include "eoHalTypes.h"
38 #include "eoISerialize.h"
39 #include "eoArchive.h"
40 
46 #define SLF_DATA_ENC_OFF 0
48 #define SLF_DATA_ENC_AES128 0x04
50 #define SLF_DATA_ENC_VAES128 0x03
52 #define SLF_MAC_OFF (0<<3)
54 #define SLF_MAC_3BYTE (1<<3)
56 #define SLF_MAC_4BYTE (2<<3)
58 #define SLF_RLC_TX_OFF (0<<5)
60 #define SLF_RLC_TX_ON (1<<5)
62 #define SLF_RLC_ALGO_OFF (0<<6)
64 #define SLF_RLC_ALGO_16BIT (1<<6)
66 #define SLF_RLC_ALGO_24BIT (2<<6)
68 #define SLF_RLC_ALGO_32BIT (3<<6)
70 
79 #define TEACH_INFO_PSK (1<<3)
81 #define TEACH_INFO_PTM (1<<2)
83 
85 #define TEACH_INFO_PTM_ROCKERA (0<<0)
86 #define TEACH_INFO_PTM_ROCKERB (1<<0)
88 
90 #define TEACH_INFO_UNIDIR (0<<0)
91 #define TEACH_INFO_BIDIR (1<<0)
93 
101 {
102 
103 public:
104  eoSecureInfo();
105  virtual ~eoSecureInfo();
106  uint8_t Serialize(eoArchive &arch);
107 
108 public:
110  uint8_t key[AES_KEY_SIZE];
112  uint8_t keySize;
114  uint8_t SLF;
116  uint8_t teachInInfo;
118  uint8_t subKey1[AES_KEY_SIZE];
120  uint8_t subKey2[AES_KEY_SIZE];
122  uint8_t psk[AES_KEY_SIZE];
124  uint32_t rollingCode;
126  SEC_RESULT securityResult;
129 };
130 #endif // !defined(EO_SEC_INFO_H_)
uint8_t keySize
Deprecated, is not used internally and will be Removed in the future.
Definition: eoSecureInfo.h:112
contains base for Archives
Interface for storing.
Definition: eoISerialize.h:48
uint32_t rollingCode
Rolling-code.
Definition: eoSecureInfo.h:124
Definition: eoSecureInfo.h:100
uint8_t subKey1[AES_KEY_SIZE]
CMAC Sub-Key1.
Definition: eoSecureInfo.h:118
uint8_t SLF
Secure Level Format.
Definition: eoSecureInfo.h:114
uint8_t key[AES_KEY_SIZE]
Passphrase Key.
Definition: eoSecureInfo.h:110
uint8_t psk[AES_KEY_SIZE]
Preshared key.
Definition: eoSecureInfo.h:122
uint8_t teachInInfo
Teach-In Info.
Definition: eoSecureInfo.h:116
uint8_t Serialize(eoArchive &arch)
Serialization Function which will be called by the eoStorageManager.
uint8_t subKey2[AES_KEY_SIZE]
CMAC Sub-Key2.
Definition: eoSecureInfo.h:120
SEC_RESULT securityResult
Last Secure Error.
Definition: eoSecureInfo.h:126
uint32_t previousRollingCode
The Previous Rolling code, allows to compare the old rolling code and new one.
Definition: eoSecureInfo.h:128
the base Archive
Definition: eoArchive.h:46