Severity: Informational; trivial fixes.
Source: TOB May 2026 revision, Appendix C — "Non-Security-Related
Recommendations" (pp. 56-58). mpt-crypto-side items only;
C.1 (XLS-0096 README terminology sort) and C.2 (XLS-0096 README
typos) belong in XRPLF/XRPL-Standards, not this repo. C.3
(canonical encrypted zero counter retry) is tracked separately in
#108.
This issue bundles the five remaining mpt-crypto items from
Appendix C into one cleanup PR.
Items
-
C.4 — Extraneous z^2 in BP verifier comment.
src/bulletproof_aggregated.c around L2629-L2630 (current line
may differ post-MSM-refactor; locate by string). The comment
reads:
/* P += sum_{k=0}^{n-1} [ (-z)*G_k + ( z*y^k + z^(block+2)*z^2*2^i ) *
* (y^{-k}*H_k) ] */
The intended exponent is z^(block+2)*2^i, without the extra
z^2 factor.
-
C.5 — secp256k1_mpt_pedersen_commit reimplements
mpt_uint64_to_scalar. src/commitments.c#L226-L231 does the
uint64 → 32-byte BE scalar conversion manually instead of
calling the shared helper at mpt_internal.h#L60-L67.
-
C.6 — Documentation typo. mpt_utility.h#L425 reads
"Helper function to substract a transparent amount from a
hidden commitment." Replace "substract" with "subtract".
-
C.7 — Documentation / implementation size mismatch.
include/utility/mpt_utility.h#L44-L54:
mpt_pedersen_proof_params documents pedersen_commitment as
"64-byte" but the array dimension is kMPT_PEDERSEN_COMMIT_SIZE,
which is 33. Update the comment to "33-byte (SEC1-compressed)".
-
C.8 — Stale parameter doc.
include/utility/mpt_utility.h#L456-L472:
mpt_verify_send_range_proof's doxygen lists a @param ctx
that is not in the function signature. Either remove the
@param ctx line or pass ctx through.
Acceptance
- All five fixes land in one PR.
- Pre-commit + clang-format clean.
- 11/11 ctest still green; no behavior change.
References
- TOB May 2026 Appendix C, pp. 57-58 (Figures C.5 through C.10).
Severity: Informational; trivial fixes.
Source: TOB May 2026 revision, Appendix C — "Non-Security-Related
Recommendations" (pp. 56-58). mpt-crypto-side items only;
C.1 (XLS-0096 README terminology sort) and C.2 (XLS-0096 README
typos) belong in
XRPLF/XRPL-Standards, not this repo. C.3(canonical encrypted zero counter retry) is tracked separately in
#108.
This issue bundles the five remaining mpt-crypto items from
Appendix C into one cleanup PR.
Items
C.4 — Extraneous
z^2in BP verifier comment.src/bulletproof_aggregated.caround L2629-L2630 (current linemay differ post-MSM-refactor; locate by string). The comment
reads:
The intended exponent is
z^(block+2)*2^i, without the extraz^2factor.C.5 —
secp256k1_mpt_pedersen_commitreimplementsmpt_uint64_to_scalar.src/commitments.c#L226-L231does theuint64 → 32-byte BE scalar conversion manually instead of
calling the shared helper at
mpt_internal.h#L60-L67.C.6 — Documentation typo.
mpt_utility.h#L425reads"Helper function to substract a transparent amount from a
hidden commitment." Replace "substract" with "subtract".
C.7 — Documentation / implementation size mismatch.
include/utility/mpt_utility.h#L44-L54:mpt_pedersen_proof_paramsdocumentspedersen_commitmentas"64-byte" but the array dimension is
kMPT_PEDERSEN_COMMIT_SIZE,which is 33. Update the comment to "33-byte (SEC1-compressed)".
C.8 — Stale parameter doc.
include/utility/mpt_utility.h#L456-L472:mpt_verify_send_range_proof's doxygen lists a@param ctxthat is not in the function signature. Either remove the
@param ctxline or passctxthrough.Acceptance
References