Skip to content

Use fixed-size span for Ed25519 pubkey conversion - #142

Open
Ap4sh wants to merge 1 commit into
session-foundation:devfrom
Ap4sh:ap4sh/fix-x25519-pubkey-input-size
Open

Use fixed-size span for Ed25519 pubkey conversion#142
Ap4sh wants to merge 1 commit into
session-foundation:devfrom
Ap4sh:ap4sh/fix-x25519-pubkey-input-size

Conversation

@Ap4sh

@Ap4sh Ap4sh commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

summary

compute_x25519_pubkey() now requires a 32-byte view, so dynamic spans with the wrong size cannot reach libsodium through this API accidentally

file server keys are parsed as fixed-size ed25519_pubkey values before conversion, rejecting oversized values that were previously accepted with trailing bytes ignored

this intentionally changes the C++ helper signature to match the fixed-size crypto input pattern already used elsewhere in libsession

tests

  • ./utils/format.sh verify
  • release build with GCC 15.2 and WARNINGS_AS_ERRORS=ON
  • ./Build/tests/testAll "[backend][session_file_server]"
  • ./Build/tests/testAll
  • ./Build/tests/testLogging
  • release build with Clang 19 and WARNINGS_AS_ERRORS=ON
  • ./Build-clang/tests/testAll "[backend][session_file_server]"
  • ./Build-clang/tests/testAll
  • ./Build-clang/tests/testLogging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant