Skip to content

PPC64/PPC32 ASM: AES, SHA-2, SHA-3#10767

Open
SparkiDev wants to merge 1 commit into
wolfSSL:masterfrom
SparkiDev:ppc64_ppc32_asm_1
Open

PPC64/PPC32 ASM: AES, SHA-2, SHA-3#10767
SparkiDev wants to merge 1 commit into
wolfSSL:masterfrom
SparkiDev:ppc64_ppc32_asm_1

Conversation

@SparkiDev

Copy link
Copy Markdown
Contributor

Description

PPC64:

  • Added AES-ECB/CBC/CTR/GCM/XTS using crypto instructions
  • Added SHA-256/512 using base scalar and crypto instructions
  • Added SHA-3 using base scalar and POWER8 VSX
  • Added SHA-3 x2/x3 but disabled compilation.
  • Added CPU id flags.
  • Changed the constant data format to be consistent with other platforms. PPC32:
  • Added AES-ECB/CBC/CTR/GCM/XTS using base scalar
  • Added SHA-256/512 using base scalar
  • Added SHA-3 using base scalar

Testing

Various PPC64 and PPC32 configurations.

@SparkiDev SparkiDev self-assigned this Jun 24, 2026
@SparkiDev

Copy link
Copy Markdown
Contributor Author

Code generated by PR:
https://github.com/wolfSSL/scripts/pull/600

@SparkiDev SparkiDev force-pushed the ppc64_ppc32_asm_1 branch 3 times, most recently from a3e9d23 to 2ca65ae Compare June 24, 2026 20:34
@SparkiDev

SparkiDev commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Jenkins: retest this please

generic: agent offline
FIPS: failed then agent killed

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #10767

Scan targets checked: wolfcrypt-bugs, wolfcrypt-port-bugs, wolfcrypt-rs-bugs, wolfcrypt-src, wolfssl-bugs, wolfssl-src

Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Findings are non-blocking.

Comment thread wolfcrypt/src/sha256.c
@SparkiDev SparkiDev force-pushed the ppc64_ppc32_asm_1 branch from 2ca65ae to 70c207b Compare June 25, 2026 02:16
Comment thread wolfcrypt/src/sha256.c
@SparkiDev

SparkiDev commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

Jenlkins: retest this please

Windows

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #10767

Scan targets checked: wolfcrypt-bugs, wolfcrypt-port-bugs, wolfcrypt-rs-bugs, wolfcrypt-src, wolfssl-bugs, wolfssl-src

Findings: 1
1 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Findings are non-blocking.

Comment thread wolfcrypt/src/sha512.c Outdated
@SparkiDev SparkiDev force-pushed the ppc64_ppc32_asm_1 branch from 70c207b to 4693ee0 Compare June 25, 2026 06:33
Comment thread wolfcrypt/src/sha512.c Outdated

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #10767

Scan targets checked: wolfcrypt-bugs, wolfcrypt-port-bugs, wolfcrypt-rs-bugs, wolfcrypt-src, wolfssl-bugs, wolfssl-src

No new issues found in the changed files. ✅

@dgarske dgarske self-requested a review June 25, 2026 17:24
@dgarske dgarske self-assigned this Jun 25, 2026
@dgarske dgarske removed the request for review from wolfSSL-Bot June 25, 2026 17:24
Comment thread src/include.am Outdated
Comment thread wolfcrypt/benchmark/benchmark.c
@dgarske dgarske assigned SparkiDev and unassigned dgarske Jun 29, 2026
@dgarske

dgarske commented Jun 29, 2026

Copy link
Copy Markdown
Member

Testing on NXP T2080 (e6500 @ 1.8 GHz)

wolfSSL master (v5.9.2-stable + PR 10767), block 1024 B. C baseline = NO_ASM=1, ASM = PPC64 base-scalar (AES T-table, SHA-2/SHA-3 64-bit GPR).
wolfcrypt_test: all algorithms PASS in both builds.

Algorithm C (MiB/s) ASM (MiB/s) Speedup
RNG SHA-256 DRBG 782.2 782.2 1.00x
AES-128-CBC-enc 113.5 282.2 2.49x
AES-128-CBC-dec 116.1 231.6 2.00x
AES-192-CBC-enc 96.6 236.9 2.45x
AES-192-CBC-dec 98.6 193.5 1.96x
AES-256-CBC-enc 83.9 204.2 2.43x
AES-256-CBC-dec 85.8 168.2 1.96x
AES-128-GCM-enc 40.1 187.2 4.67x
AES-128-GCM-dec 40.0 171.6 4.29x
AES-192-GCM-enc 37.8 165.8 4.39x
AES-192-GCM-dec 37.7 153.5 4.07x
AES-256-GCM-enc 35.6 148.7 4.18x
AES-256-GCM-dec 35.5 138.8 3.91x
AES-128-GCM-enc-no_AAD 40.5 188.1 4.64x
AES-128-GCM-dec-no_AAD 40.4 172.7 4.27x
AES-192-GCM-enc-no_AAD 38.1 166.6 4.37x
AES-192-GCM-dec-no_AAD 38.1 154.4 4.06x
AES-256-GCM-enc-no_AAD 35.9 149.6 4.17x
AES-256-GCM-dec-no_AAD 35.8 139.6 3.90x
GMAC Table 62.7 590.9 9.43x
AES-128-ECB-enc 120.0 282.4 2.35x
AES-128-ECB-dec 123.1 232.4 1.89x
AES-192-ECB-enc 101.3 237.1 2.34x
AES-192-ECB-dec 103.7 195.5 1.88x
AES-256-ECB-enc 87.4 204.3 2.34x
AES-256-ECB-dec 89.6 168.6 1.88x
AES-XTS-enc 85.9 255.9 2.98x
AES-XTS-dec 87.3 214.7 2.46x
AES-128-CTR 114.1 278.1 2.44x
AES-192-CTR 97.0 234.1 2.41x
AES-256-CTR 84.2 202.1 2.40x
SHA-256 189.9 231.0 1.22x
SHA-384 103.9 357.0 3.44x
SHA-512 103.9 357.0 3.43x
SHA3-224 104.5 249.4 2.39x
SHA3-256 98.9 237.5 2.40x
SHA3-384 78.0 192.0 2.46x
SHA3-512 55.3 140.2 2.54x
HMAC-SHA256 187.9 228.1 1.21x
HMAC-SHA384 102.3 350.2 3.42x
HMAC-SHA512 102.3 350.2 3.42x

PPC64:
  - Added AES-ECB/CBC/CTR/GCM/XTS using crypto instructions
  - Added SHA-256/512 using base scalar and crypto instructions
  - Added SHA-3 using base scalar and POWER8 VSX
  - Added SHA-3 x2/x3 but disabled compilation.
  - Added CPU id flags.
  - Changed the constant data format to be consistent with other platforms.
PPC32:
  - Added AES-ECB/CBC/CTR/GCM/XTS using base scalar
  - Added SHA-256/512 using base scalar
  - Added SHA-3 using base scalar
@SparkiDev SparkiDev force-pushed the ppc64_ppc32_asm_1 branch from 4693ee0 to 3e99430 Compare June 29, 2026 22:52
@dgarske dgarske self-requested a review June 29, 2026 23:16
@dgarske dgarske self-assigned this Jun 29, 2026
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