feat(libSceLibreSsl3): implement PKCS5_PBKDF2_HMAC #15624
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15624"
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 user236404 on 2026-11-03T22:16:51Z.
What
Implements
PKCS5_PBKDF2_HMAC(libSceLibreSsl3, NIDvnwZHU5FvBQ), which threwNotImplemented_nid_no_patchas a parameterless placeholder. It now has LibreSSL's prototypeint (const char* pass, int passlen, const unsigned char* salt, int saltlen, int iter, const EVP_MD* digest, int keylen, unsigned char* out)and follows LibreSSL 4.0.0evp/evp_pbe.c(the version the 13.40 module reports; the function is unchanged from 2.5.4), using libSceLibreSsl's HMAC and digests.EVP_R_MESSAGE_DIGEST_IS_NULL(0x06fff09f), as 4.0.0'sEVP_MD_sizedoes.HMAC_Init_ex, as in LibreSSL; -1 meansstrlen; an iteration count below 1 acts as 1; a key length of 0 returns 1 and writes nothing.std::invalid_argument: a negative key length, a null output, a negative salt length, a null salt with a positive length, a digest size of 0 or over 64.docs/dev/debt/libSceLibreSsl3.md: new entry (nothing checked on the console; the queued error has no file/line), the placeholder row removed and the count cut from 175 to 174.Tested
Linux x86_64 (Ubuntu 24.04, GCC 13.3), full build with
-DBUILD_TESTING=ONon086c0686c8. Titles and console: not tested.guest_libressl3_pbkdf2passes (0.2 s): RFC 7914 §11 vectors, Pythonhashlib.pbkdf2_hmacvectors for MD5, SHA-256, SHA-384 and SHA-512 (password longer than the block, partial last block, embedded NULs), -1 and 0 lengths, iteration counts 0 and -5, null and empty salt, the failure and throwing cases, no leaked allocations, and allocation failures returning 0.guest_libressl_oracle(-DANYPS5_LIBRESSL_ORACLE=ON): 3000 randomPKCS5_PBKDF2_HMACcases against LibreSSL 2.5.4, 0 differ. The test still fails on 6AES_set_*_keycases, which fail the same way onmain.guest_libressl_oracle(above) and 11 socket tests that need IPv6, which the container does not have.tools/check_conventions.py --base origin/main,tools/check_test_registration.pyandcore/libs/tests/test_public_headers.pypass.tools/pr_overlap.py --branch claude/epic-tesla-2yue6yfinds no open PR with the same exports; it reports textual overlap indocs/dev/debt/libSceLibreSsl3.md,core/libs/prx/libSceLibreSsl3/CMakeLists.txt,include/Api.hpp,AdditionalExports.cppandcore/libs/prx/libSceLibreSsl/tests/Oracle.cppwith #10557, #10960, #12315, #12945, #13266, #13285, #13546, #13547, #13877, #14366, #14889, #14890, #14992, #15031, #15045, #15119, #15289, #15303, #15449, #15472, #15514, #15544, #15591, #15599. It also lists shared helper names (Allocate,Release,Align,Realign,Reallocate,PosixAlign, not PKCS5) with #1384 and #15232. It could not compare #10461, #10631, #11146, #12754, #12928, #14212, #14483, #14499 and #14612 because they conflict withmain; none of their diffs mentionPKCS5_PBKDF2_HMACorvnwZHU5FvBQ. Run with--repo boykopovar/AnyPS5againstmainat04a9eb4fa2, into which the branch still merges cleanly.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)Pull request closed