feat(libSceLibreSsl3): implement EC_POINT_dup #19044
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/19044"
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 fishingpvalues on 2026-11-12T16:59:06Z.
What
EC_POINT_dupleaves the throwingAdditionalExports.cppstub and follows LibreSSL 4.0.0ec_lib.cEC_POINT_dup: a null source returns null, a null group throws, a source point of another curve returns null, and a copy of the mbedtls point on the group's curve is returned through a newEcPointwrapper, whichEC_POINT_free/EC_POINT_clear_freerelease likeEC_POINT_new. The debt entry records that the wrapper is not the native PS5 point layout, that allocation failure throws rather than returning null, and that the console is unverified.The test creates a P-256 key with the parent exports, duplicates its public point, compares both
EC_POINT_point2octencodings, and covers the null source, a P-384 group and a null group.This is an independent implementation of the same export as open PR #17621, which currently conflicts with
main; one of the two should be closed when either lands.Tested
Linux x86-64 (Debian 13, glibc 2.41, GCC 14.2.0), Release,
BUILD_TESTING=ON, basemainf9c2d92b91:cmake --build build --target guest_libressl3_ec_point_dup_tests --parallel 8: passed.ctest --test-dir build -R '^guest_libressl3_ec_point_dup$' --output-on-failure: 1/1 passed.python3 tools/check_conventions.py --base origin/main: all checks passed.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 repositorySummary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-17T16:45:55Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
75ef8dc1d37c9e9665dc6641f31117e70948e623(basemain).repo_read.pyat the head: theEcPointandNamedCurvelayout, the test helper declarations, the debt row, and the otherEC_POINT_dupreferences.Results
f9c2d92b91Findings
Blocking
None.
Non-blocking
docs/dev/debt/changes/feat-libressl3-ec-point-dup.md:3— the fragment only has the heading## remove \uITUdhDDAg8``. The description says the debt entry records the wrapper layout, the throw on allocation failure and the unverified console. Either the text is missing from the fragment or the description overstates it. I did not check whether the debt tooling needs a body.core/libs/prx/libSceLibreSsl3/tests/EcPointDup.cpp:36— the test checks the encoding of the copy, but not that the copy is independent of the source. Nothing shows that changing one leaves the other unchanged.Sources
core/libs/prx/libSceLibreSsl3/src/EcPointDup.cppat 75ef8dc1: null source returns null, null group throwsstd::invalid_argument, curve mismatch returns null, and the copy goes throughmbedtls_ecp_copy.core/libs/prx/libSceLibreSsl/include/Ec.hppat 75ef8dc1:EcPointholdscurveand anmbedtls_ecp_point, andNamedCurvehasnid.Not verified
guest_libressl3_ec_point_dup_testsand oflibSceLibreSsl3. I did not run them, and the author-reported run is not one I performed.tools/check_conventions.pyresult. Not run.AdditionalExports.cpp,CMakeLists.txtandinclude/Api.hpp. I read the changed hunks only.To get this to a good state
Nothing is required.
Optional:
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T13:28:54Z.
Review: COMMENTED
Reviewed — comments
The implementation is consistent with the described point-copy behavior; I could not run the reported build or test commands in this review session.
What I ran
Reviewed head
9a11687f73a5fb76ae14d9a677657593d4133539usingrepo_read.pyto inspect the prepared diff and relevant source context. No build or tests were run.Results
Findings
Blocking
None.
Non-blocking
new; this behavior is also disclosed in the PR description. Align the debt entry with the implementation or handle allocation failure if null is intended. Seedocs/dev/debt/changes/feat-libressl3-ec-point-dup.md:5andcore/libs/prx/libSceLibreSsl3/src/EcPointDup.cpp:10.Not verified
The reported Linux build, CTest run, and convention check were not run during this review. Windows and console behavior were not verified. Read all six changed files listed in the manifest; no files were excluded there.
To get this to a good state
Nothing is required. Optional: reconcile the debt entry's allocation-failure description with the implementation.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T15:15:27Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the points below are optional.
What I ran
Reviewed head
12c6ae178a4b4fa89a7834c4ee837644d7c3d236. No build, test, or convention commands were run. Read all changed lines inAdditionalExports.cpp,CMakeLists.txt,include/Api.hpp,src/EcPointDup.cpp,tests/EcPointDup.cpp, and the debt change fragment, plus targeted EC wrapper and export context.files.jsonwas not available; the review folder’s file listing and manifest show all six changed files included and read.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
Windows, console, and title behavior were not verified. The reported Linux build, test, and convention checks were not independently run. No changed-file text was excluded from review; the
files.jsonexclusion listing was unavailable.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T08:45:01Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this change; the optional point below is for follow-up.
What I ran
Reviewed head
d05f16c0266c4b4b685f26de336ede15aa856225using the prepared diff andrepo_read.py. No commands or tests were run by me; the description reports a Linux build, targeted test, and convention check, which I did not independently verify.Results
Findings
Blocking
None.
Non-blocking
core/libs/prx/libSceLibreSsl/src/Ec.cpp:676: The curve mismatch check compares onlynid. The sharedRequireSameCurvehelper is used elsewhere for the same class of validation; consider using it here so behavior follows the common check and remains consistent if curve identity rules change.Not verified
No tests or build checks were run by me. Windows and console behavior remain unverified, as noted in the PR description. Read all eight changed files listed in
manifest.json; none were excluded.To get this to a good state
Nothing is required. Optional: use
RequireSameCurvefor the curve compatibility check, consistent with the other EC operations.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T22:38:23Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the Linux test results are author-reported, and the reviewed implementation and tests support merging.
What I ran
Reviewed head
8ac65771c448dc9ce75a3f1e8084a14b7beff979. I readdescription.md,commits.md,manifest.json,diff.patch, and all eight changed files listed in the manifest. I also read targeted context in the EC implementation and API declarations. No build or test commands were run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
Windows, console, and title behavior were not tested. Build and test results in the description were not independently verified.
files.jsonwas unavailable; the manifest lists eight changed-file entries, all included, and each was read.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-26T15:16:35Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: handle points whose source curve differs from the supplied group without returning a silently invalid result.
What I ran
Reviewed head
404a97e38112d6c8db275662abd75067175715cc. I inspected the prepared diff and targeted source context withrepo_read.py; I did not run commands or tests. The author reports a Linux x86-64 Release build, the focused CTest, and the conventions check passed; I did not independently verify those runs.Results
Findings
Blocking
core/libs/prx/libSceLibreSsl/src/Ec.cpp:707returnsnullptrfor a non-null point from another curve. LibreSSL'sEC_POINT_dupduplicates the point and does not treat a group mismatch as a null-result condition; the supplied group selects the wrapper's curve, while the point's coordinates are copied. As written, callers silently receive a null pointer for this input instead of a duplicate, contrary to the stated LibreSSL-compatible goal. Implement the duplication semantics for mismatched curves, or document and justify the intentional incompatibility before exposing this export.Non-blocking
Sources
Not verified
core/libs/prx/libSceLibreSsl/include/Api.hpp,core/libs/prx/libSceLibreSsl/src/Ec.cpp,core/libs/prx/libSceLibreSsl/include/Ec.hpp,core/libs/prx/libSceLibreSsl3/include/Api.hpp,core/libs/prx/libSceLibreSsl3/src/EcPointDup.cpp,core/libs/prx/libSceLibreSsl3/tests/EcPointDup.cpp,core/libs/prx/libSceLibreSsl3/CMakeLists.txt, andcore/libs/prx/libSceLibreSsl3/Export.cpp, plus the prepared description, commits, manifest, and diff.files.jsonwas not available through the reader, so excluded-file inventory and a complete comparison to its reviewed list are not verified.To get this to a good state
Implement or justify the different-curve behavior, add coverage for the chosen behavior, then rerun the focused build and CTest on the updated head.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-26T18:15:09Z.
Review: COMMENTED
Actionable comments posted: 1
3a7a600d-5f86-4893-a118-8a12d356e853Reviewing files that changed from the base of the PR and between
404a97e381and8e85b75b85.core/libs/prx/libSceLibreSsl/src/Ec.cppcore/libs/prx/libSceLibreSsl3/tests/EcPointDup.cppdocs/dev/debt/changes/feat-libressl3-ec-point-dup.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-26T18:19:50Z.
Review: APPROVED
Reviewed — looks good
The implementation and its host test support the stated copy and ownership behavior; no blocking defect was verified in the reviewed files.
What I ran
No build or test commands were run. I read the prepared diff and source at head
8e85b75b851e8ac4c608479ebd662291a1918d7cthroughrepo_read.py.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
I did not run the tests or independently verify the author-reported Linux results, Windows behavior, console behavior, or interaction with other titles. Read all seven files listed as reviewed in
manifest.json;files.jsonwas not available through the reader.To get this to a good state
Nothing is required.
Pull request closed