summaryrefslogtreecommitdiff
path: root/cesar/cp2
diff options
context:
space:
mode:
authorlaranjeiro2008-06-20 07:34:16 +0000
committerlaranjeiro2008-06-20 07:34:16 +0000
commit19e1fd604c21750c48e9a4716469f624f23079bd (patch)
treeea3bbced25c4a67da46ebd4024c84199900e56d8 /cesar/cp2
parent9a64d5648d484d59fe342dc64e663c53e199b5f7 (diff)
cp2/secu: Replace the number of iterration by a define stored in the defs.h file.
git-svn-id: svn+ssh://pessac/svn/cesar/trunk@2395 017c9cb6-072f-447c-8318-d5b54f68fe89
Diffstat (limited to 'cesar/cp2')
-rw-r--r--cesar/cp2/secu/defs.h5
-rw-r--r--cesar/cp2/secu/src/secu.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/cesar/cp2/secu/defs.h b/cesar/cp2/secu/defs.h
index 84037839e5..2f1fe7ec7e 100644
--- a/cesar/cp2/secu/defs.h
+++ b/cesar/cp2/secu/defs.h
@@ -26,9 +26,12 @@
/** pbkdf1 generated key size */
#define CP_SECU_OUTPUT_KEY_SIZE 16
-/** PBKDF1 itreration. */
+/** PBKDF1 iteration. */
#define CP_SECU_PBKDF1_ITERATION 1000
+/** PBKDF1 iteration for NID. */
+#define CP_SECU_PBKDF1_ITERATION_NID 5
+
/** AES Size. */
#define CP_SECU_AES_SIZE 16
diff --git a/cesar/cp2/secu/src/secu.c b/cesar/cp2/secu/src/secu.c
index 4bde16315d..03fad86c46 100644
--- a/cesar/cp2/secu/src/secu.c
+++ b/cesar/cp2/secu/src/secu.c
@@ -119,7 +119,8 @@ cp_secu_nmk2nid(u8 *buffer, u8 security_level)
dbg_assert (buffer);
dbg_assert (security_level <= 2);
- secu_pbkdf1 (buffer, CP_NMK_SIZE, NULL, 0, 5, buffer);
+ secu_pbkdf1 (buffer, CP_NMK_SIZE, NULL, 0, CP_SECU_PBKDF1_ITERATION_NID,
+ buffer);
/* Set the right nibble of rightmost octet of NID = rightmost nibble
* of the 52 Bit Hashed NID offset*/