Skip to content

Add support for Big Endian in ACVP tool#2938

Merged
samuel40791765 merged 1 commit intoaws:mainfrom
samuel40791765:big-endian-go
Jan 14, 2026
Merged

Add support for Big Endian in ACVP tool#2938
samuel40791765 merged 1 commit intoaws:mainfrom
samuel40791765:big-endian-go

Conversation

@samuel40791765
Copy link
Copy Markdown
Contributor

@samuel40791765 samuel40791765 commented Jan 12, 2026

Issues:

This was change needed to move forward with ACVP testing on powerpc64 for NetOS.

Description of changes:

Our ACVP tool was not working properly on the PowerPC Big Endian platform that NetOS needs to support. go1.21 has support for binary.NativeEndian, but we can't use the newer version yet. This uses a workaround with unsafe.Pointer until we can upgrade.

Call-outs:

This is harder to test, but it might be doable by recompiling the cross compilation tool chain we have here with gccgo enabled. It's harder to branch out the logic within the script to account for the different behavior though, might do so in a follow up PR.

Testing:

Works on the powerpc host NetOS lent us. Built with gccgo from gcc-12 with a powerpc64 cross compilation toolchain:

CC=powerpc64-unknown-linux-gnu-gcc \
GCCGO=powerpc64-unknown-linux-gnu-gccgo \
CGO_ENABLED=1 \
GOOS=linux \
GOARCH=ppc64 \
go build -compiler gccgo \
    -gccgoflags '-static -mcpu=e6500' \
    -o acvptool

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.22%. Comparing base (d91d05d) to head (a17f92b).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2938   +/-   ##
=======================================
  Coverage   78.22%   78.22%           
=======================================
  Files         690      690           
  Lines      118745   118745           
  Branches    16680    16678    -2     
=======================================
+ Hits        92889    92890    +1     
+ Misses      24967    24965    -2     
- Partials      889      890    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@samuel40791765 samuel40791765 marked this pull request as ready for review January 13, 2026 22:26
@samuel40791765 samuel40791765 requested a review from a team as a code owner January 13, 2026 22:26
@samuel40791765 samuel40791765 enabled auto-merge (squash) January 14, 2026 21:23
@samuel40791765 samuel40791765 merged commit d82aea4 into aws:main Jan 14, 2026
474 of 480 checks passed
samuel40791765 added a commit to samuel40791765/aws-lc that referenced this pull request Jan 15, 2026
This was change needed to move forward with ACVP testing on powerpc64
for NetOS.

Our ACVP tool was not working properly on the PowerPC Big Endian
platform that NetOS needs to support. go1.21 has support for
`binary.NativeEndian`, but we can't use the newer version yet. This uses
a workaround with `unsafe.Pointer` until we can upgrade.

This is harder to test, but it might be doable by recompiling the cross
compilation tool chain we have with gccgo enabled. It's harder to
branch out the logic within the script to account for the different
behavior though, might do so in a follow up PR.

Works on the powerpc host NetOS lent us. Built with `gccgo` from gcc-12
with a powerpc64 cross compilation toolchain:
```
CC=powerpc64-unknown-linux-gnu-gcc \
GCCGO=powerpc64-unknown-linux-gnu-gccgo \
CGO_ENABLED=1 \
GOOS=linux \
GOARCH=ppc64 \
go build -compiler gccgo \
    -gccgoflags '-static -mcpu=e6500' \
    -o acvptool
```

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and the ISC license.

(cherry picked from commit d82aea4)
@justsmth justsmth mentioned this pull request Jan 21, 2026
justsmth added a commit that referenced this pull request Jan 22, 2026
### Description of changes: 
Prepare AWS-LC v1.67.0

#### What's Changed
* Migrate Wycheproof test vectors for ECDSA, RSA PKCS#1, and some more
by @sgmenda in #2887
* increase timeout for SDE tests by @sgmenda in
#2936
* Rename volatile state/memory to unique state/memory by @torben-hansen
in #2935
* Fix failing Windows Docker image build by @nhatnghiho in
#2931
* Service Indicator: Add error call trampoline to avoid delocator issue
by @jakemas in #2920
* Add support for Big Endian in ACVP tool by @samuel40791765 in
#2938
* AES-GCM: Add function pointer trampolines to avoid delocator issue by
@jakemas in #2919
* Use already defined macro for no inline by @torben-hansen in
#2942
* Remove Kyber completely by @torben-hansen in
#2941
* Windows 7 support by @justsmth in
#2940
* Import mldsa-native by @jakemas in
#2902
* Use existing session context if new is actually NULL by @torben-hansen
in #2946
* Integrate Wycheproof ML-KEM test vectors by @sgmenda in
#2891
* Avoid cross-compilation build failure by @justsmth in
#2944


By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and the ISC license.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants