summaryrefslogtreecommitdiffhomepage
path: root/digital/beacon/src/Bitcloud_stack/Components/Security/ServiceProvider/include/sspCommon.h
diff options
context:
space:
mode:
Diffstat (limited to 'digital/beacon/src/Bitcloud_stack/Components/Security/ServiceProvider/include/sspCommon.h')
-rw-r--r--digital/beacon/src/Bitcloud_stack/Components/Security/ServiceProvider/include/sspCommon.h74
1 files changed, 74 insertions, 0 deletions
diff --git a/digital/beacon/src/Bitcloud_stack/Components/Security/ServiceProvider/include/sspCommon.h b/digital/beacon/src/Bitcloud_stack/Components/Security/ServiceProvider/include/sspCommon.h
new file mode 100644
index 00000000..5fd2bea3
--- /dev/null
+++ b/digital/beacon/src/Bitcloud_stack/Components/Security/ServiceProvider/include/sspCommon.h
@@ -0,0 +1,74 @@
+/**************************************************************************//**
+ \file sspCommon.h
+
+ \brief Declarations of common Security Service Provider's fields and types.
+
+ \author
+ Atmel Corporation: http://www.atmel.com \n
+ Support email: avr@atmel.com
+
+ Copyright (c) 2008-2011, Atmel Corporation. All rights reserved.
+ Licensed under Atmel's Limited License Agreement (BitCloudTM).
+
+ \internal
+ History:
+ 06/12/07 ALuzhetsky - Created.
+******************************************************************************/
+
+#ifndef _SSPCOMMON_H
+#define _SSPCOMMON_H
+
+/******************************************************************************
+ Includes section.
+******************************************************************************/
+#include <types.h>
+
+/******************************************************************************
+ Definitions section.
+******************************************************************************/
+#define SECURITY_KEY_SIZE 16U
+#define SECURITY_BLOCK_SIZE 16U
+#define SSP_SECURITY_CONTROL_FIELD_LENGTH 1U
+#define SSP_FRAME_COUNTER_FIELD_LENGTH 4U
+#define SSP_KEY_SEQ_NUMBER_FIELD_LENGTH 1U
+
+/******************************************************************************
+ Types section.
+******************************************************************************/
+/**************************************************************************//**
+ \brief Possible status values of different SSP primitives.
+******************************************************************************/
+typedef enum
+{
+ SSP_SUCCESS_STATUS,
+ SSP_NOT_PERMITED_STATUS,
+ SSP_MAX_FRM_COUNTER_STATUS,
+ SSP_BAD_CCM_OUTPUT_STATUS,
+} SSP_Status_t;
+
+/**************************************************************************//**
+ \brief Internal service fields which give an opportunity to compose requests' queue.
+******************************************************************************/
+typedef struct
+{
+ void *next;
+ uint8_t requestId;
+} SSP_Service_t;
+
+
+/******************************************************************************
+ Prototypes section
+ ******************************************************************************/
+/*******************************************************************************
+ Checks a security key.
+ Parameters:
+ key - valid pointer to a security key.
+ Return:
+ true - if key is not zero otherwise return false.
+********************************************************************************/
+bool SSP_IsKeyValid(const uint8_t *key);
+
+
+#endif //_SSPCOMMON_H
+
+// eof sspCommon.h