Skip to content

Add AES-256 IGE decrypt helper with ARMv8 fast path#106

Merged
ernado merged 1 commit into
gotd:mainfrom
fatshotty:feature/aes256-ige-armv8-decrypt
Jul 14, 2026
Merged

Add AES-256 IGE decrypt helper with ARMv8 fast path#106
ernado merged 1 commit into
gotd:mainfrom
fatshotty:feature/aes256-ige-armv8-decrypt

Conversation

@fatshotty

Copy link
Copy Markdown

Summary

  • Add DecryptAES256Blocks, with the existing Go implementation as a transparent fallback.
  • Use ARMv8 AES instructions on 32-bit ARM Linux and Android only when cgo and the runtime AES capability are available.
  • Keep the platform hook private, retain Go 1.15/1.16-compatible build constraints, and resolve getauxval dynamically so older libc/Android targets fall back safely.
  • Use a fixed-operation AES S-box for key expansion, avoiding secret-indexed lookup tables.

Verification

  • make test
  • go vet ./...
  • go test ./... with Go 1.16
  • Android ARMv7 cgo cross-compile with the local NDK
  • Linux ARM cross-compile with CGO_ENABLED=0

The ARM-specific correctness test and benchmark skip when the AES extension is unavailable. They still need to be executed on a real AArch32 ARMv8 device with HWCAP2_AES; no such device is currently connected.

@ernado
ernado merged commit 6667de7 into gotd:main Jul 14, 2026
13 of 14 checks passed
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 29.41176% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.37%. Comparing base (06dff71) to head (6a4a71e).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
aes256_decrypt.go 20.00% 6 Missing and 6 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #106       +/-   ##
===========================================
- Coverage   92.98%   78.37%   -14.61%     
===========================================
  Files           3        5        +2     
  Lines          57       74       +17     
===========================================
+ Hits           53       58        +5     
- Misses          2        8        +6     
- Partials        2        8        +6     

☔ View full report in Codecov by Harness.
📢 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.

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.

2 participants