Skip to content

AOT: openssl_pbkdf2 runtime LLVM kernel (HMAC over hash hex) (#32410) - #32430

Merged
PurHur merged 3 commits into
masterfrom
fix/32410-openssl-pbkdf2-aot
Aug 18, 2026
Merged

PurHur merged 3 commits into
masterfrom
fix/32410-openssl-pbkdf2-aot

Conversation

@PurHur

@PurHur PurHur commented Aug 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Replaces Stdlib: openssl_pbkdf2() JIT/AOT compile-time bake (#32410) #32429 compile-time bake with an LLVM PBKDF2 kernel so openssl_pbkdf2() works for runtime password/salt/key_length/iterations/digest_algo (bake throws LogicException on non-literals).
  • HMAC via two hex __compiler_hash calls + LLVM hex-decode — not HashCrypto HMAC() / PKCS5_PBKDF2_HMAC (those SIGSEGV on this tree).
  • php-src: ext/openssl/openssl.c PHP_FUNCTION(openssl_pbkdf2) / PKCS5_PBKDF2_HMAC.

Closes #32410

Test plan

  • ./script/phpunit.sh --filter 'OpensslPbkdf2AotTest|OpensslPbkdf2JitTest|RuntimeShrinkCloseoutTest' — 7 tests OK (post-merge: 4/4 OpensslPbkdf2*)
  • AOT compile+run test/repro/issue_openssl_pbkdf2_aot.php including $pw/$len variables — v1ok/v2ok/v3ok + bool(false) ×2 + ValueError
  • PHP_COMPILER_HELPER_RUNTIME_O=1 ./script/aot-smoke.sh — 8/8
  • Did not run north-star5-verify --strict or make test-harness

PurHur and others added 3 commits August 18, 2026 22:33
JIT leftover of #6488: PKCS#5 PBKDF2 using __compiler_hash (hex, AOT-green)
plus LLVM HMAC/PBKDF2 loops. HashCrypto HMAC/PKCS5_PBKDF2_HMAC and raw
hash() SIGSEGV under AOT on this tree; php-src ext/openssl/openssl.c
PHP_FUNCTION(openssl_pbkdf2).

Co-authored-by: Cursor <cursoragent@cursor.com>
… args (#32410)

#32429 bake only handles compile-time literals. Runtime HMAC-over-hex-hash
lowers password/salt/key_length/iterations/digest_algo at AOT time.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur changed the title AOT: openssl_pbkdf2() via HMAC over hash() hex (#32410) AOT: openssl_pbkdf2 runtime LLVM kernel (HMAC over hash hex) (#32410) Aug 18, 2026
@PurHur
PurHur merged commit 8b26b0a into master Aug 18, 2026
0 of 2 checks passed
@PurHur
PurHur deleted the fix/32410-openssl-pbkdf2-aot branch August 18, 2026 22:41
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.

Stdlib: openssl_pbkdf2() JIT/AOT lowering missing — VM path only (ext/openssl/openssl.c)

1 participant