Skip to content

core: validate SNTRUP761 KEM input lengths#1801

Open
pbottine wants to merge 1 commit into
simplex-chat:stablefrom
pbottine:ptp/stable-fix-issue-2-sntrup-length-validation
Open

core: validate SNTRUP761 KEM input lengths#1801
pbottine wants to merge 1 commit into
simplex-chat:stablefrom
pbottine:ptp/stable-fix-issue-2-sntrup-length-validation

Conversation

@pbottine
Copy link
Copy Markdown

@pbottine pbottine commented Jun 5, 2026

Summary

  • Validate SNTRUP761 public key, secret key, and ciphertext lengths when parsing encoded values.
  • Reject malformed public keys and ciphertexts before calling the C KEM bindings.
  • Add regression tests for malformed encodings and direct FFI wrapper inputs.

Tests

  • git diff --check origin/stable..HEAD
  • cabal test simplexmq-test --extra-include-dirs=/opt/homebrew/opt/openssl@3/include --extra-lib-dirs=/opt/homebrew/opt/openssl@3/lib --test-option=--match --test-option='/Encryption tests/sntrup761/'

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