- Added thread that fetch netlink packets and place them in a FIFO (option enabled by default) to reduce pdcp_run execution time

- Fix some debug formats

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4187 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
Cedric Roux
2013-10-11 14:45:30 +00:00
parent e03b125c9d
commit 8fa5602278
16 changed files with 382 additions and 66 deletions
+1 -1
View File
@@ -21,6 +21,6 @@
((x & 0x00FF0000) >> 8) | ((x & 0xFF000000) >> 24))
#endif
#define SECU_DEBUG
// #define SECU_DEBUG
#endif /* OSA_INTERNAL_H_ */
+3 -6
View File
@@ -24,7 +24,7 @@ void kdf(const uint8_t *s, const uint32_t s_length, const uint8_t *key,
}
/*!
* @brief Derive the keys from kasme and perform truncate on the generated key to
* @brief Derive the keys from key and perform truncate on the generated key to
* reduce his size to 128 bits. Definition of the derivation function can
* be found in 3GPP TS.33401 #A.7
* @param[in] alg_type Algorithm distinguisher
@@ -41,9 +41,6 @@ int derive_key(algorithm_type_dist_t alg_type, uint8_t alg_id,
const uint8_t key[32], uint8_t **out)
{
uint8_t string[7];
#if defined(SECU_DEBUG)
int i;
#endif
/* FC */
string[0] = FC_ALG_KEY_DER;
@@ -79,7 +76,7 @@ int derive_key(algorithm_type_dist_t alg_type, uint8_t alg_id,
return 0;
}
int derive_keNB(const uint8_t kasme[32], const uint32_t nas_count, uint8_t **keNB)
int derive_keNB(const uint8_t key[32], const uint32_t nas_count, uint8_t **keNB)
{
uint8_t string[7];
@@ -107,7 +104,7 @@ int derive_keNB(const uint8_t kasme[32], const uint32_t nas_count, uint8_t **keN
}
#endif
kdf(string, 7, kasme, 32, keNB, 32);
kdf(string, 7, key, 32, keNB, 32);
return 0;
}