Repository navigation
testing/crypto: add crc8 and crc16 tests and parameterized crc32 vectors - #4094
Merged
Merged
Conversation
ThePassionate
force-pushed
the
crypto-crc-tests
branch
from
November 20, 2026 02:14
ec018a9 to
d983766
Compare
xiaoxiang781216
previously approved these changes
Nov 20, 2026
ThePassionate
force-pushed
the
crypto-crc-tests
branch
2 times, most recently
from
November 20, 2026 06:43
31d08f8 to
4258360
Compare
Add /dev/crypto tests for the CRYPTO_CRC8 and CRYPTO_CRC16 xforms,
following the crc32 test structure. The session key carries the
{polynomial, initial, xorout} parameters and the vectors cover the
non-reflected CRC-8/SAE J1850, CRC-8/AUTOSAR, CRC-16/CCITT-FALSE and
CRC-16/XMODEM variants, including segmented updates.
Signed-off-by: makejian <makejian@xiaomi.com>
ThePassionate
force-pushed
the
crypto-crc-tests
branch
from
November 20, 2026 08:26
4258360 to
ac60978
Compare
cederom
previously approved these changes
Nov 20, 2026
cederom
left a comment
Contributor
There was a problem hiding this comment.
Thank you @ThePassionate :-)
Add the reflected CRC parameter cases to the crc8 and crc16 tests, and
extend the crc32 test with parameterized keys: the full parameter block
{polynomial, initial, xorout, reflect_in, reflect_out} plus a three-word
{polynomial, initial, xorout} CRC-32/MPEG-2 case. The legacy
single-word crc32 key cases stay unchanged.
Signed-off-by: makejian <makejian@xiaomi.com>
ThePassionate
force-pushed
the
crypto-crc-tests
branch
from
November 20, 2026 14:04
ac60978 to
b4783ff
Compare
xiaoxiang781216
approved these changes
Nov 20, 2026
GUIDINGLI
approved these changes
Nov 20, 2026
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.
Summary
Test coverage for the CRC xforms of apache/nuttx#22063:
All vectors extracted from the reference source with a script and independently verified on the host before being committed; the check values match the published catalog entries (SAE J1850 0x4b, AUTOSAR 0xdf, ROHC 0xd0, KERMIT 0x2189, CCITT-FALSE 0x29b1, IBM 0xbb3d, XMODEM 0x31c3, MPEG-2 0x0376e6e7).
Impact
TESTING_CRYPTO_CRC8/TESTING_CRYPTO_CRC16options (default n).Testing
Depends on apache/nuttx#22063. On sim:sim/crypto with that kernel PR: crc32 legacy 8/8, crc32 parameterized 40/40, crc8 40/40, crc16 32/32.
tools/checkpatch.sh(via the paired nuttx tree) passes.