Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
UERANSIM
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
Libraries
UERANSIM
Commits
e28656ca
Commit
e28656ca
authored
Apr 25, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Security mode command procedure improvement
parent
2944a009
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
src/ue/nas/keys.cpp
src/ue/nas/keys.cpp
+9
-1
No files found.
src/ue/nas/keys.cpp
View file @
e28656ca
...
@@ -81,7 +81,6 @@ std::pair<OctetString, OctetString> CalculateCkPrimeIkPrime(const OctetString &c
...
@@ -81,7 +81,6 @@ std::pair<OctetString, OctetString> CalculateCkPrimeIkPrime(const OctetString &c
s
[
1
]
=
sqnXorAk
.
copy
();
s
[
1
]
=
sqnXorAk
.
copy
();
auto
res
=
crypto
::
CalculateKdfKey
(
key
,
0x20
,
s
,
2
);
auto
res
=
crypto
::
CalculateKdfKey
(
key
,
0x20
,
s
,
2
);
;
std
::
pair
<
OctetString
,
OctetString
>
ckIk
;
std
::
pair
<
OctetString
,
OctetString
>
ckIk
;
ckIk
.
first
=
res
.
subCopy
(
0
,
ck
.
length
());
ckIk
.
first
=
res
.
subCopy
(
0
,
ck
.
length
());
...
@@ -139,4 +138,13 @@ OctetString CalculateResStar(const OctetString &key, const std::string &snn, con
...
@@ -139,4 +138,13 @@ OctetString CalculateResStar(const OctetString &key, const std::string &snn, con
return
output
.
subCopy
(
output
.
length
()
-
16
);
return
output
.
subCopy
(
output
.
length
()
-
16
);
}
}
OctetString
DeriveAmfPrimeInMobility
(
bool
isUplink
,
const
NasCount
&
count
,
const
OctetString
&
kAmf
)
{
OctetString
params
[
2
];
params
[
0
]
=
OctetString
::
FromOctet
(
isUplink
?
0x00
:
0x01
);
params
[
1
]
=
OctetString
::
FromOctet4
(
count
.
toOctet4
());
return
crypto
::
CalculateKdfKey
(
kAmf
,
0x72
,
params
,
2
);
}
}
// namespace nr::ue::keys
}
// namespace nr::ue::keys
\ No newline at end of file
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