Skip to content

Encrypt and verify Matrix v2 attachments - #10

Merged
TroyHernandez merged 2 commits into
mainfrom
encrypted-media
Oct 26, 2026
Merged

TroyHernandez merged 2 commits into
mainfrom
encrypted-media

Conversation

@TroyHernandez

Copy link
Copy Markdown
Contributor

Add byte-oriented Matrix v2 attachment encryption and verified decryption. Each encryption generates a fresh AES-256 key and 64-bit nonce; the ciphertext's SHA-256 digest is checked before returning plaintext. HTTP transport and room encryption remain in the client layer.

Validation: 161 assertions pass, including an independent NIST AES-256-CTR vector, corrupt/truncated ciphertext, malformed metadata, empty files, and fresh-key checks. The new tests are mandatory in CI. The RustCrypto ctr crate is added to the vendored dependency set; existing AES, random, and SHA crates are declared directly. Version 0.2.2.2.

@TroyHernandez
TroyHernandez merged commit 60df38f into main Oct 26, 2026
19 checks passed
@TroyHernandez
TroyHernandez deleted the encrypted-media branch October 26, 2026 18:51
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