Skip to content

test: add regression tests for salsa-simple#2102

Draft
dannywillems wants to merge 1 commit intodevelopfrom
add-salsa-simple-regtests
Draft

test: add regression tests for salsa-simple#2102
dannywillems wants to merge 1 commit intodevelopfrom
add-salsa-simple-regtests

Conversation

@dannywillems
Copy link
Copy Markdown
Contributor

@dannywillems dannywillems commented Jan 20, 2026

Add comprehensive regression tests for the salsa-simple XSalsa20 cipher implementation:

  • NaCl test vector verification with known expected keystream
  • Zero key/nonce test with reference implementation verification
  • Multi-block tests verifying counter increments correctly
  • Partial block handling tests with known expected values
  • Encrypt/decrypt roundtrip tests
  • Buffer size tests (1, 63, 64, 65, 127, 128, 129, 256, 1000 bytes)
  • Sequential vs bulk read comparison
  • Mixed size sequential read tests
  • Position tracking tests across block boundaries
  • Remaining bytes calculation tests
  • set_pos_unchecked method tests
  • check_remaining method tests
  • Distinct instance tests (same key/nonce produces same output)
  • Different key/nonce produces different output tests
  • Empty buffer edge case test
  • XOR property verification test

Also fix zeroize dependency to include "derive" feature required for Zeroize and ZeroizeOnDrop derives.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 20, 2026

OCaml Reference Validation Results

Repository: https://github.com/MinaProtocol/mina.git
Branch: compatible
Status: ❌ Validation failed

Click to see full validation output
Checking OCaml references against https://github.com/MinaProtocol/mina.git (branch: compatible)
Fetching current commit from compatible...
grep: write error: Broken pipe

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 20, 2026

✓ Code Reference Verification Passed

All code references in the documentation have been verified successfully!

Total references checked: 1
Valid references: 1

The documentation is in sync with the codebase on the develop branch.

@dannywillems dannywillems linked an issue Jan 20, 2026 that may be closed by this pull request
3 tasks
Add comprehensive regression tests for the salsa-simple XSalsa20 cipher
implementation:

- NaCl test vector verification with known expected keystream
- Zero key/nonce test with reference implementation verification
- Multi-block tests verifying counter increments correctly
- Partial block handling tests with known expected values
- Encrypt/decrypt roundtrip tests
- Buffer size tests (1, 63, 64, 65, 127, 128, 129, 256, 1000 bytes)
- Sequential vs bulk read comparison
- Mixed size sequential read tests
- Position tracking tests across block boundaries
- Remaining bytes calculation tests
- set_pos_unchecked method tests
- check_remaining method tests
- Distinct instance tests (same key/nonce produces same output)
- Different key/nonce produces different output tests
- Empty buffer edge case test
- XOR property verification test

Also fix zeroize dependency to include "derive" feature required for
Zeroize and ZeroizeOnDrop derives.
@dannywillems dannywillems force-pushed the add-salsa-simple-regtests branch from 10d1494 to db81e3a Compare January 20, 2026 21:58
@dannywillems dannywillems marked this pull request as draft January 21, 2026 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Upgrade generic-array to 1.x

1 participant