add 128-EIA2 unit test using 33.401 Annex C.2 vectors - #1529
Open
Noahs212 wants to merge 1 commit into
Open
Conversation
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Noticed there's no unit test for
srsran::security_128_eia2()even thoughEIA1 and EIA3 both have one in
lib/test/common/. EIA2 currently onlygets exercised through the PDCP integration tests, which can't really
catch an algorithm regression — encrypt+decrypt with the same broken
algorithm just cancels out.
Adds the three byte-aligned test vectors from 3GPP TS 33.401 v15.6.0
Annex C.2 (sets 2, 5, 8). Sets 5 and 8 happen to share inputs with
test_eia1.cc'stest_set_4/test_set_7, which is convenient —it's the same crossover pattern the spec uses across EIA1/EIA2/EIA3.
Sets 1, 3, 4, 6 and 7 have non-byte-aligned message lengths and can't
go through the byte-length wrapper API.
Tested with
make test_eia2 && ctest -R test_eia2and confirmed thetest actually fails when an expected MAC byte is mutated.