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
c1c06785
Unverified
Commit
c1c06785
authored
Nov 05, 2021
by
Ali Güngör
Committed by
GitHub
Nov 05, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #429 from haotingC/master
fix EIA3 reading data byte-order
parents
0765eba2
8bd60af7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
src/lib/crypt/eea3.cpp
src/lib/crypt/eea3.cpp
+9
-2
No files found.
src/lib/crypt/eea3.cpp
View file @
c1c06785
...
...
@@ -61,10 +61,17 @@ uint32_t EIA3(const uint8_t *pKey, uint32_t count, uint32_t direction, uint32_t
z
=
new
uint32_t
[
L
];
ZUC
(
pKey
,
IV
,
z
,
L
);
uint32_t
data_htobe32
[
length
/
32
+
1
];
for
(
int
i
=
0
;
i
<
(
length
+
31
)
/
32
;
i
++
)
data_htobe32
[
i
]
=
htobe32
(
*
(
pData
+
i
));
uint32_t
*
pData_htobe32
=
data_htobe32
;
T
=
0
;
for
(
i
=
0
;
i
<
length
;
i
++
)
{
if
(
GetBit
(
pData
,
i
))
if
(
GetBit
(
pData
_htobe32
,
i
))
T
^=
GetWord
(
z
,
i
);
}
...
...
@@ -105,7 +112,7 @@ void EEA3(const uint8_t *pKey, uint32_t count, uint32_t bearer, uint32_t directi
ZUC
(
pKey
,
iv
,
z
,
L
);
for
(
i
=
0
;
i
<
L
;
i
++
)
pData
[
i
]
^=
z
[
i
]
;
pData
[
i
]
=
be32toh
(
htobe32
(
*
(
pData
+
i
))
^
z
[
i
])
;
delete
[]
z
;
}
...
...
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