feat(libSceLibreSsl): implement DES_set_key, DES_ecb_encrypt and DES_set_odd_parity #9047
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9047"
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 VakzOs on 2026-10-21T10:46:54Z.
What
Implements three libSceLibreSsl exports that were throwing
NotImplemented:DES_set_key,DES_ecb_encryptandDES_set_odd_parity.mbedtls_des_*,mbedtls_des_key_set_parity), which is already a submodule built for libSceSsl, so no cipher code is added;libSceLibreSslnow linksmbedcryptoDES_set_keyfollows LibreSSL'sdes_key.cwithDES_check_keyoff, its default (the variable is not in the PS5 export inventory): no parity or weak-key check, returns 0DES_ecb_encryptencrypts for any nonzeroenc, as LibreSSL'sDES_encrypt1doesGap, recorded in the debt entry: the 128-byte
DES_key_schedulestores the 8-byte key followed by zeros instead of LibreSSL's precomputed subkeys, and the subkeys are derived on eachDES_ecb_encryptcall. Null pointers throw where LibreSSL faults. The pending-exports count goes from 399 to 396.The new
core/libs/prx/libSceLibreSsl/CMakeLists.txtoverlaps with the one added by #9025, #9033 and #9041; whichever is merged later only needs to merge the test andmbedcryptolines.Tested
Linux (Ubuntu, GCC), full build:
guest_libressl_deschecks the classic vectors (133457799BBCDFF1 / 0123456789ABCDEF → 85E813540F0AB405, 0E329232EA6D0D73 / 8787878787878787 → 0) and the SP 800-17 vector 0101010101010101 / 8000000000000000 → 95F8A5E5DD31D900, both directions, in-place decryption, a nonzeroencother than 1, all 256 parity bytes, the unchecked weak and bad-parity keys, and null pointers. The test fails when encryption and decryption are swapped.libSceLibreSsl.prxpatches its NIDs.tools/check_conventions.py --base origin/mainpasses.tools/pr_overlap.pycannot reach the GitHub API from my environment; I checked every open PR branch by hand right before opening: only #8747 (the declarations) touches these exports.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
Imported from boykopovar/AnyPS5. Originally posted by clairtonmichel on 2026-10-21T10:55:52Z.
Tested on AMD Ryzen 7 9800X3D and AMD Radeon RX 7900 XTX (Fedora Linux, Mesa 26.2.5):
guest_libressl_destest suite: 100% passed successfully (1/1 green in 0.01s).DES_set_key,DES_ecb_encrypt, andDES_set_odd_parity) behave correctly. Ready to merge!