Skip to content

multi_encrypt: randomize empty nonce inputs - #138

Open
Ap4sh wants to merge 1 commit into
session-foundation:devfrom
Ap4sh:fix-multi-encrypt-empty-nonce
Open

multi_encrypt: randomize empty nonce inputs#138
Ap4sh wants to merge 1 commit into
session-foundation:devfrom
Ap4sh:fix-multi-encrypt-empty-nonce

Conversation

@Ap4sh

@Ap4sh Ap4sh commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

summary

encrypt_for_multiple_simple() documents that an omitted or empty nonce generates a random nonce, but the X25519 overload only handled an omitted optional

the Ed25519 overload defaults to an empty span, so calling it without a nonce currently throws Invalid nonce: nonce must be 24 bytes

this treats empty spans like omitted nonces while still rejecting non-empty values that are not 24 bytes

tests

  • ./Build-ci/tests/testAll "[encrypt][multi][simple]"
  • ./Build-ci/tests/testLogging
  • ./Build-ci/tests/testAll
  • ./Build-release/tests/testLogging
  • ./Build-release/tests/testAll
  • ./utils/format.sh verify

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