feat(libSceLibreSsl3): implement HKDF #15472
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15472"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by puridanish284 on 2026-11-03T14:10:57Z.
What
Implements
HKDFin libSceLibreSsl3 (NIDuJ2ZXq4z3As), which was a parameterless throwing placeholder inAdditionalExports.cpp. The signature is LibreSSL'sopenssl/hkdf.h:int HKDF(uint8_t *out_key, size_t out_len, const EVP_MD *digest, const uint8_t *secret, size_t secret_len, const uint8_t *salt, size_t salt_len, const uint8_t *info, size_t info_len). The behaviour follows LibreSSL 4.0.0, the version libSceLibreSsl3 reports on firmware 13.40: hkdf.c and theHMACof hmac.c. It is computed through libSceLibreSsl's existingHMAC_*:salt_lenis converted tointasHMACtakes it;intsalt length) queuesERR_R_CRYPTO_LIBand returns 0 without writing;EVP_R_TOO_LARGEis queued and 0 is returned;docs/dev/debt/libSceLibreSsl3.mdgets an HKDF entry for what is unverified. Older LibreSSL 3 releases use OpenBSD 7.0's hkdf.c, which rejects oversize output before writing; the console's allocation failures are not reproduced. The export also leaves the Additional exports table, which goes from 175 to 174 entries.Tested
Ubuntu 24.04 x86-64, GCC 13.3, Release,
BUILD_TESTING=ON, full build.New
guest_libressl3_hkdftest:hmac;salt_lenabove 2^32;EVP_R_TOO_LARGE;intsalt length:ERR_R_CRYPTO_LIB, output untouched;Reverting the null-salt handling, or checking the length before writing, makes the test fail.
The libSceLibreSsl3,
guest_crypto_memcmpandpublic_headerstests pass onmainand on this branch.Full
ctestwith this branch: 2854 passed, 935 skipped (no Vulkan device) and 11 failed. The failures areguest_net_*,guest_socket_*andguest_tcp: they need IPv6, which the test machine lacks (socket(AF_INET6)givesEAFNOSUPPORT), and they don't link libSceLibreSsl3.Windows, run by maskym on this head (comment): Windows 11 26300, Intel i7-12700K, WinLibs GCC 15.2.0 (
x86_64-ucrt-posix-seh, r6), Release,BUILD_TESTING=ON, Ninja;d84eb91642merged alone intomain086c0686c8builds clean, andguest_libressl3_hkdfpasses 3 of 3 runs. Not run on a PS5.python3 tools/check_conventions.py --base mainpasses. Not tested on a console or with a title.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
https://claude.ai/code/session_01QJYUYbAgEHAevbodPCGuDz
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-03T14:25:05Z.
Review: COMMENTED
Reviewed — no blocking findings
At head
d84eb91642525413dbc17f3520f1fb0de5bea0f7, I found no source-level blocker; I could not independently verify the reported C++ build and tests against this exact SHA.What I ran
I reviewed all six changed files at head
d84eb91642525413dbc17f3520f1fb0de5bea0f7against base4f41f4c375f5abb487dbd184fbc150f31994d762. The exact-head preview against that base was clean. Environment: Debian Linux x86_64, Python 3.11.2, Git 2.39.5; GCC 12.2.0 was available but not used.Results
Precheck table and unedited outputs
Precheck report for the exact head:
git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...d84eb91642525413dbc17f3520f1fb0de5bea0f7tools/check_conventions.pycommand above.git diff --checkproduced no output and exited successfully.check_conventions.py:Direct ABI audit:
The test-quality heuristic output was:
The CMake file registers
guest_libressl3_hkdf_testswithadd_test_executableandadd_test(NAME guest_libressl3_hkdf ...); the heuristic misses the${CMAKE_CURRENT_SOURCE_DIR}path prefix.Python test-registration audit:
Hosted checks:
Negative control
Findings
Blocking
None found in the source review.
Non-blocking
The PR description reports a full build and 2,854 passing CTest cases, with 935 skipped and 11 failures attributed to unavailable IPv6. The report does not name the tested commit SHA or include raw build/test logs, so I cannot confirm that evidence applies to this exact head. I am withholding approval until the build/test result can be tied to this head; this is an evidence gap, not a source defect found in this review.
Sources
ce488b78e0bd994780569df718596b9776ff681a4f41f4c375f5abb487dbd184fbc150f31994d762Not verified
I did not compile the new implementation or execute
guest_libressl3_hkdf. The full build/CTest report and its IPv6 failure attribution are author-reported; I did not inspect raw logs. No PS5 console or title was tested.To get this to a good state
Please identify the tested SHA and attach or link the build and CTest output for it. If it is
d84eb91642525413dbc17f3520f1fb0de5bea0f7, I will recheck that evidence on this head; if the tested head differs, I will run the same no-build checks against the new head before reassessing.Pull request closed