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
Michael Black
OpenXG-RAN
Commits
f6e42ce9
Commit
f6e42ce9
authored
Jan 27, 2017
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix compilation of oaisim
That's not the end of the story though.
parent
c62b54a0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
11 deletions
+12
-11
openair3/NAS/UE/API/USIM/usim_api.c
openair3/NAS/UE/API/USIM/usim_api.c
+9
-8
openair3/NAS/UE/API/USIM/usim_api.h
openair3/NAS/UE/API/USIM/usim_api.h
+2
-2
openair3/NAS/UE/EMM/SecurityModeControl.c
openair3/NAS/UE/EMM/SecurityModeControl.c
+1
-1
No files found.
openair3/NAS/UE/API/USIM/usim_api.c
View file @
f6e42ce9
...
@@ -150,7 +150,8 @@ int usim_api_write(const char *filename, const usim_data_t* data)
...
@@ -150,7 +150,8 @@ int usim_api_write(const char *filename, const usim_data_t* data)
** Others: None **
** Others: None **
** **
** **
***************************************************************************/
***************************************************************************/
int
usim_api_authenticate_test
(
const
OctetString
*
rand_pP
,
const
OctetString
*
autn_pP
,
int
usim_api_authenticate_test
(
usim_data_t
*
usim_data
,
const
OctetString
*
rand_pP
,
const
OctetString
*
autn_pP
,
OctetString
*
auts_pP
,
OctetString
*
res_pP
,
OctetString
*
auts_pP
,
OctetString
*
res_pP
,
OctetString
*
ck_pP
,
OctetString
*
ik_pP
)
OctetString
*
ck_pP
,
OctetString
*
ik_pP
)
{
{
...
@@ -166,7 +167,7 @@ int usim_api_authenticate_test(const OctetString* rand_pP, const OctetString* au
...
@@ -166,7 +167,7 @@ int usim_api_authenticate_test(const OctetString* rand_pP, const OctetString* au
// RES = XDOUT
// RES = XDOUT
for
(
i
=
0
;
i
<
USIM_API_K_SIZE
;
i
++
)
for
(
i
=
0
;
i
<
USIM_API_K_SIZE
;
i
++
)
{
{
res_pP
->
value
[
i
]
=
rand_pP
->
value
[
i
]
^
_
usim_api_k
[
i
];
res_pP
->
value
[
i
]
=
rand_pP
->
value
[
i
]
^
usim_data
->
keys
.
usim_api_k
[
i
];
}
}
//step2: res = f2(xdout,n)
//step2: res = f2(xdout,n)
...
@@ -257,19 +258,19 @@ int usim_api_authenticate_test(const OctetString* rand_pP, const OctetString* au
...
@@ -257,19 +258,19 @@ int usim_api_authenticate_test(const OctetString* rand_pP, const OctetString* au
/* Concealed value of the counter SQNms in the USIM:
/* Concealed value of the counter SQNms in the USIM:
* Conc(SQNMS) = SQNMS ⊕ f5*K(RAND) */
* Conc(SQNMS) = SQNMS ⊕ f5*K(RAND) */
f5star
(
_usim_api_k
,
rand_pP
->
value
,
ak
);
f5star
(
usim_data
->
keys
.
usim_api_k
,
rand_pP
->
value
,
ak
,
usim_data
->
keys
.
opc
);
u8
sqn_ms
[
USIM_API_SQNMS_SIZE
];
u8
sqn_ms
[
USIM_API_SQNMS_SIZE
];
memset
(
sqn_ms
,
0
,
USIM_API_SQNMS_SIZE
);
memset
(
sqn_ms
,
0
,
USIM_API_SQNMS_SIZE
);
//#define USIM_API_SQN_MS_SIZE 3
//#define USIM_API_SQN_MS_SIZE 3
printf
(
"
_usim_api_data.sqn_ms %p
\n
"
,
_usim_api
_data
.
sqn_ms
);
printf
(
"
usim_data->usim_sqn_data.sqn_ms %p
\n
"
,
usim_data
->
usim_sqn
_data
.
sqn_ms
);
for
(
i
=
0
;
i
<
USIM_API_SQNMS_SIZE
;
i
++
)
{
for
(
i
=
0
;
i
<
USIM_API_SQNMS_SIZE
;
i
++
)
{
//#warning "LG:BUG HERE TODO"
//#warning "LG:BUG HERE TODO"
printf
(
"i %d: ((uint8_t*)(
_usim_api_data.sqn_ms))[USIM_API_SQNMS_SIZE - i] %d
\n
"
,
i
,
((
uint8_t
*
)(
_usim_api
_data
.
sqn_ms
))[
USIM_API_SQNMS_SIZE
-
i
]);
printf
(
"i %d: ((uint8_t*)(
usim_data->usim_sqn_data.sqn_ms))[USIM_API_SQNMS_SIZE - i] %d
\n
"
,
i
,
((
uint8_t
*
)(
usim_data
->
usim_sqn
_data
.
sqn_ms
))[
USIM_API_SQNMS_SIZE
-
i
]);
sqn_ms
[
USIM_API_SQNMS_SIZE
-
i
]
=
sqn_ms
[
USIM_API_SQNMS_SIZE
-
i
]
=
((
uint8_t
*
)(
_usim_api
_data
.
sqn_ms
))[
USIM_API_SQNMS_SIZE
-
i
];
((
uint8_t
*
)(
usim_data
->
usim_sqn
_data
.
sqn_ms
))[
USIM_API_SQNMS_SIZE
-
i
];
}
}
u8
sqnms
[
USIM_API_SQNMS_SIZE
];
u8
sqnms
[
USIM_API_SQNMS_SIZE
];
...
@@ -285,8 +286,8 @@ int usim_api_authenticate_test(const OctetString* rand_pP, const OctetString* au
...
@@ -285,8 +286,8 @@ int usim_api_authenticate_test(const OctetString* rand_pP, const OctetString* au
* MACS = f1*K(SQNMS || RAND || AMF) */
* MACS = f1*K(SQNMS || RAND || AMF) */
#define USIM_API_MACS_SIZE USIM_API_XMAC_SIZE
#define USIM_API_MACS_SIZE USIM_API_XMAC_SIZE
u8
macs
[
USIM_API_MACS_SIZE
];
u8
macs
[
USIM_API_MACS_SIZE
];
f1star
(
_
usim_api_k
,
rand_pP
->
value
,
sqn_ms
,
f1star
(
usim_data
->
keys
.
usim_api_k
,
rand_pP
->
value
,
sqn_ms
,
&
rand_pP
->
value
[
USIM_API_SQN_SIZE
],
macs
);
&
rand_pP
->
value
[
USIM_API_SQN_SIZE
],
macs
,
usim_data
->
keys
.
opc
);
LOG_TRACE
(
DEBUG
,
"USIM-API - MACS %02X%02X%02X%02X%02X%02X%02X%02X"
,
LOG_TRACE
(
DEBUG
,
"USIM-API - MACS %02X%02X%02X%02X%02X%02X%02X%02X"
,
macs
[
0
],
macs
[
1
],
macs
[
2
],
macs
[
3
],
macs
[
0
],
macs
[
1
],
macs
[
2
],
macs
[
3
],
macs
[
4
],
macs
[
5
],
macs
[
6
],
macs
[
7
]);
macs
[
4
],
macs
[
5
],
macs
[
6
],
macs
[
7
]);
...
...
openair3/NAS/UE/API/USIM/usim_api.h
View file @
f6e42ce9
...
@@ -366,7 +366,6 @@ typedef struct {
...
@@ -366,7 +366,6 @@ typedef struct {
/* usim test mode */
/* usim test mode */
uint8_t
usimtestmode
;
uint8_t
usimtestmode
;
usim_sqn_data_t
usim_sqn_data
;
usim_sqn_data_t
usim_sqn_data
;
>>>>>>>
UE
/
API
:
rename
_usim_api_data
to
usim_sqn_data
and
move
it
to
usim_data
}
usim_data_t
;
}
usim_data_t
;
/****************************************************************************/
/****************************************************************************/
...
@@ -384,7 +383,8 @@ int usim_api_write(const char *filename, const usim_data_t* data);
...
@@ -384,7 +383,8 @@ int usim_api_write(const char *filename, const usim_data_t* data);
int
usim_api_authenticate
(
usim_data_t
*
usim_data
,
const
OctetString
*
rand_pP
,
const
OctetString
*
autn_pP
,
int
usim_api_authenticate
(
usim_data_t
*
usim_data
,
const
OctetString
*
rand_pP
,
const
OctetString
*
autn_pP
,
OctetString
*
auts
,
OctetString
*
res
,
OctetString
*
auts
,
OctetString
*
res
,
OctetString
*
ck
,
OctetString
*
ik
);
OctetString
*
ck
,
OctetString
*
ik
);
int
usim_api_authenticate_test
(
const
OctetString
*
rand
,
const
OctetString
*
autn
,
int
usim_api_authenticate_test
(
usim_data_t
*
usim_data
,
const
OctetString
*
rand
,
const
OctetString
*
autn
,
OctetString
*
auts
,
OctetString
*
res
,
OctetString
*
auts
,
OctetString
*
res
,
OctetString
*
ck
,
OctetString
*
ik
);
OctetString
*
ck
,
OctetString
*
ik
);
...
...
openair3/NAS/UE/EMM/SecurityModeControl.c
View file @
f6e42ce9
...
@@ -286,7 +286,7 @@ int emm_proc_security_mode_command(nas_user_t *user, int native_ksi, int ksi,
...
@@ -286,7 +286,7 @@ int emm_proc_security_mode_command(nas_user_t *user, int native_ksi, int ksi,
user
->
emm_data
->
security
->
selected_algorithms
.
encryption
=
seea
;
user
->
emm_data
->
security
->
selected_algorithms
.
encryption
=
seea
;
user
->
emm_data
->
security
->
selected_algorithms
.
integrity
=
seia
;
user
->
emm_data
->
security
->
selected_algorithms
.
integrity
=
seia
;
#if defined(NAS_BUILT_IN_UE)
#if defined(NAS_BUILT_IN_UE)
nas_itti_kenb_refresh_req
(
_security_data
.
kenb
.
value
);
nas_itti_kenb_refresh_req
(
security_data
->
kenb
.
value
);
#endif
#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