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
常顺宇
OpenXG-RAN
Commits
c05bc1a3
Commit
c05bc1a3
authored
Aug 21, 2020
by
Laurent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
5G SA authentication: authentication request, partial authentication response
parent
0ee578f4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
5 deletions
+35
-5
openair3/NAS/COMMON/NR_NAS_defs.h
openair3/NAS/COMMON/NR_NAS_defs.h
+4
-1
openair3/NAS/NR_UE/nr_user_def.h
openair3/NAS/NR_UE/nr_user_def.h
+2
-0
openair3/NAS/NR_UE/ue_process_nas.c
openair3/NAS/NR_UE/ue_process_nas.c
+27
-4
openair3/UICC/usim_interface.h
openair3/UICC/usim_interface.h
+2
-0
No files found.
openair3/NAS/COMMON/NR_NAS_defs.h
View file @
c05bc1a3
...
...
@@ -288,7 +288,10 @@ typedef struct {
Extendedprotocoldiscriminator_t
epd
:
8
;
Security_header_t
sh
:
8
;
SGSmobilitymanagementmessages_t
mt
:
8
;
}
authenticationresponseHeader_t
;
uint8_t
iei
;
uint8_t
RESlen
;
uint8_t
RES
[
16
];
}
authenticationresponse_t
;
...
...
openair3/NAS/NR_UE/nr_user_def.h
View file @
c05bc1a3
...
...
@@ -6,7 +6,9 @@ typedef struct {
uicc_t
*
uicc
;
}
nr_user_nas_t
;
#define STATIC_ASSERT(test_for_true) _Static_assert((test_for_true), "(" #test_for_true ") failed")
#define myCalloc(var, type) type * var=(type*)calloc(sizeof(type),1);
#define arrayCpy(tO, FroM) STATIC_ASSERT(sizeof(tO) == sizeof(FroM)) ; memcpy(tO, FroM, sizeof(tO))
int
identityResponse
(
void
**
msg
,
nr_user_nas_t
*
UE
);
#endif
openair3/NAS/NR_UE/ue_process_nas.c
View file @
c05bc1a3
...
...
@@ -13,6 +13,13 @@ void nas_schedule(void) {
*/
void
SGSauthenticationReq
(
void
*
msg
,
nr_user_nas_t
*
UE
)
{
authenticationrequestHeader_t
*
amsg
=
(
authenticationrequestHeader_t
*
)
msg
;
arrayCpy
(
UE
->
uicc
->
rand
,
amsg
->
RAND
);
arrayCpy
(
UE
->
uicc
->
autn
,
amsg
->
AUTN
);
nas_schedule
();
}
void
SGSidentityReq
(
void
*
msg
,
nr_user_nas_t
*
UE
)
{
Identityrequest_t
*
idmsg
=
(
Identityrequest_t
*
)
msg
;
if
(
idmsg
->
it
==
SUCI
)
{
...
...
@@ -22,9 +29,6 @@ void SGSauthenticationReq(void *msg, nr_user_nas_t *UE) {
LOG_E
(
NAS
,
"Not developped: identity request for %d
\n
"
,
idmsg
->
it
);
}
void
SGSidentityReq
(
void
*
msg
,
nr_user_nas_t
*
UE
)
{
}
void
SGSsecurityModeCommand
(
void
*
msg
,
nr_user_nas_t
*
UE
)
{
}
...
...
@@ -109,7 +113,26 @@ int identityResponse(void **msg, nr_user_nas_t *UE) {
}
int
authenticationResponse
(
void
**
msg
,
nr_user_nas_t
*
UE
)
{
return
-
1
;
if
(
UE
->
uicc
==
NULL
)
// config file section hardcoded as "uicc", nevertheless it opens to manage several UEs or a multi SIM UE
UE
->
uicc
=
init_uicc
(
"uicc"
);
myCalloc
(
resp
,
authenticationresponse_t
);
resp
->
epd
=
SGSmobilitymanagementmessages
;
resp
->
sh
=
0
;
resp
->
mt
=
Authenticationresponse
;
resp
->
iei
=
IEI_AuthenticationResponse
;
resp
->
RESlen
=
sizeof
(
resp
->
RES
);
// Verify the AUTN
uint8_t
ik
[
16
],
ck
[
16
],
res
[
8
],
AUTN
[
16
];
milenage_generate
(
UE
->
uicc
->
opc
,
UE
->
uicc
->
amf
,
UE
->
uicc
->
key
,
UE
->
uicc
->
sqn
,
UE
->
uicc
->
rand
,
AUTN
,
ik
,
ck
,
res
);
if
(
memcmp
(
UE
-
uicc
->
autn
,
AUTN
)
{
}
else
{
}
*
msg
=
resp
;
return
sizeof
(
authenticationresponse_t
);
}
int
securityModeComplete
(
void
**
msg
,
nr_user_nas_t
*
UE
)
{
...
...
openair3/UICC/usim_interface.h
View file @
c05bc1a3
...
...
@@ -46,6 +46,8 @@ typedef struct {
uint8_t
amf
[
2
];
uint8_t
sqn
[
6
];
int
nmc_size
;
uint8_t
rand
[
16
];
uint8_t
autn
[
16
];
}
uicc_t
;
/*
...
...
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