Repository navigation
Use @profullstack/encrypt for message encryption (0.5.7, qc 0.4.5) - #290
Merged
Merged
Conversation
PostQuantumEncryptionService.encryptForRecipient/decryptFromSender keep qrypt.chat's key handling (header stripping, size checks, 1024/768 key choice, legacy field names, friendly results) and hand the cipher itself (ML-KEM + HKDF-SHA-256 + ChaCha20-Poly1305, v3 envelope) to the shared library. The web app, qc, its MCP server and the CLI login handoff all go through these two methods. ~240 lines of duplicated crypto removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ThreatCrush Security Scan13 finding(s) MEDIUM: 9 | LOW: 4
Snippets are redacted; ThreatCrush never prints matched credential material. |
Contributor
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Anthony: "do it", meaning switch qrypt.chat and qc to
@profullstack/encryptinstead of their own copies of the crypto.What changed:
PostQuantumEncryptionService.encryptForRecipient/decryptFromSendernow callencrypt/decryptfrom@profullstack/encrypt0.1.0 for the cipher itself: ML-KEM + HKDF-SHA-256 + ChaCha20-Poly1305 in the v3 envelope.Everything qrypt.chat-specific stays where it was:
These two methods are used by the web app, qc, qc's MCP server and the CLI login key handoff, so all of them now run on the shared library. About 240 lines of duplicated crypto are removed.
Verification
tests/crypto/profullstack-encrypt-interop.test.js(6 tests):mlkemkeysnext buildand the qc bundle build pass. The qc bundle keeps@profullstack/encryptexternal, and it is listed in qc's dependencies.Note: messaging and crypto are Preshy's area; Anthony asked for this directly.
🤖 Generated with Claude Code