Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
promise
OpenXG-RAN
Commits
45d55b16
Commit
45d55b16
authored
Jul 16, 2014
by
Lionel Gauthier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git-svn-id:
http://svn.eurecom.fr/openair4G/trunk@5512
818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent
0f2eae24
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
openair-cn/SECU/kdf.c
openair-cn/SECU/kdf.c
+6
-5
No files found.
openair-cn/SECU/kdf.c
View file @
45d55b16
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
#include "security_types.h"
#include "security_types.h"
#include "secu_defs.h"
#include "secu_defs.h"
inline
void
kdf
(
const
uint8_t
*
s
,
const
uint32_t
s_length
,
const
uint8_t
*
key
,
void
kdf
(
const
uint8_t
*
s
,
const
uint32_t
s_length
,
const
uint8_t
*
key
,
const
uint32_t
key_length
,
uint8_t
**
out
,
uint32_t
out_length
)
const
uint32_t
key_length
,
uint8_t
**
out
,
uint32_t
out_length
)
{
{
...
@@ -22,20 +21,20 @@ void kdf(const uint8_t *s, const uint32_t s_length, const uint8_t *key,
...
@@ -22,20 +21,20 @@ void kdf(const uint8_t *s, const uint32_t s_length, const uint8_t *key,
*
out
=
buffer
;
*
out
=
buffer
;
}
}
#ifndef NAS_UE
int
derive_keNB
(
const
uint8_t
kasme
[
32
],
const
uint32_t
nas_count
,
uint8_t
**
keNB
)
int
derive_keNB
(
const
uint8_t
kasme
[
32
],
const
uint32_t
nas_count
,
uint8_t
**
keNB
)
{
{
uint8_t
string
[
7
];
uint8_t
string
[
7
];
/
* FC */
/
/ FC
string
[
0
]
=
FC_KENB
;
string
[
0
]
=
FC_KENB
;
/
* P0 = Uplink NAS count */
/
/ P0 = Uplink NAS count
string
[
1
]
=
(
nas_count
&
0xff000000
)
>>
24
;
string
[
1
]
=
(
nas_count
&
0xff000000
)
>>
24
;
string
[
2
]
=
(
nas_count
&
0x00ff0000
)
>>
16
;
string
[
2
]
=
(
nas_count
&
0x00ff0000
)
>>
16
;
string
[
3
]
=
(
nas_count
&
0x0000ff00
)
>>
8
;
string
[
3
]
=
(
nas_count
&
0x0000ff00
)
>>
8
;
string
[
4
]
=
(
nas_count
&
0x000000ff
);
string
[
4
]
=
(
nas_count
&
0x000000ff
);
/
* Length of NAS count */
/
/ Length of NAS count
string
[
5
]
=
0x00
;
string
[
5
]
=
0x00
;
string
[
6
]
=
0x04
;
string
[
6
]
=
0x04
;
...
@@ -43,3 +42,5 @@ int derive_keNB(const uint8_t kasme[32], const uint32_t nas_count, uint8_t **keN
...
@@ -43,3 +42,5 @@ int derive_keNB(const uint8_t kasme[32], const uint32_t nas_count, uint8_t **keN
return
0
;
return
0
;
}
}
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment