GitHub - VeilusDigital/PhantomChatCrypto: The cryptographic core of Phantom Chat — source-available for review · GitHub
/" data-turbo-transient="true" />
Skip to content
Search or jump to...
Search code, repositories, users, issues, pull requests...
-->
Search
Clear
Search syntax tips
Provide feedback
--><br>We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Cancel
Submit feedback
Saved searches
Use saved searches to filter your results more quickly
-->
Name
Query
To see all available qualifiers, see our documentation.
Cancel
Create saved search
Sign in
/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up
Appearance settings
Resetting focus
You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.
Dismiss alert
{{ message }}
VeilusDigital
PhantomChatCrypto
Public
Notifications<br>You must be signed in to change notification settings
Fork
Star
main
BranchesTags
Go to file
CodeOpen more actions menu
Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit
History<br>13 Commits<br>13 Commits
.github/workflows
.github/workflows
Sources/PhantomChatCrypto
Sources/PhantomChatCrypto
Tests/PhantomChatCryptoTests
Tests/PhantomChatCryptoTests
CHANGELOG.md
CHANGELOG.md
LICENSE
LICENSE
Package.swift
Package.swift
README.md
README.md
View all files
Repository files navigation
PhantomChatCrypto
The cryptographic core of Phantom Chat (Veilus Digital), extracted verbatim<br>from the iOS app so it can be read, compiled, and run by anyone — reviewers,<br>journalists, security researchers — without taking our word for anything.
Source-available for review. You may read, build, and run this code to<br>verify our claims. You may not reuse it in another product. See LICENSE.
The rest of the app and the backend remain closed-source; this package is the<br>part where the security actually lives.
What's here
File<br>What it is
Sources/PhantomChatCrypto/Kyber768.swift<br>ML-KEM-768 (FIPS 203) — post-quantum KEM, pure Swift
Sources/PhantomChatCrypto/Keccak.swift<br>Keccak-f[1600] + SHA3-256/512 + SHAKE128/256 (FIPS 202)
Sources/PhantomChatCrypto/PQXDHHybrid.swift<br>Hybrid combiner: classical X3DH secret + Kyber secret → root key
Sources/PhantomChatCrypto/DoubleRatchet.swift<br>Signal-protocol Double Ratchet (per-message keys, forward secrecy)
These files are byte-for-byte identical to the app's CryptoService.swift /<br>DoubleRatchet.swift (only the import lines differ). The companion document<br>phantom-chat-claim-audit.md maps each marketing claim to these files.
How to verify it yourself
swift test
That runs (all must pass):
FIPS 202 known-answer tests — SHA3-256/512 and SHAKE128/256 against the<br>published NIST reference values.
NTT correctness — polynomial multiply checked against a schoolbook<br>negacyclic convolution.
Reduction correctness — Barrett reduction checked congruent across the<br>entire Int16 input range; canonical encoding verified.
ML-KEM-768 round-trips — KeyGen → Encaps → Decaps agree; tampered<br>ciphertext triggers implicit rejection.
Double Ratchet — encrypt/decrypt round-trip.
PQXDH hybrid combiner — deterministic and transcript-bound.
FIPS-203 conformance vs Apple CryptoKit (FIPSInteropTests, requires<br>macOS 26+): Phantom's Kyber and Apple's vetted MLKEM768 exchange shared<br>secrets both directions , and for the same seed Phantom's public key is<br>byte-identical to Apple's. This is the strongest possible evidence that<br>this is genuinely standard ML-KEM-768, not a look-alike.
Honesty notes (the parts we want you to scrutinise)
This is a clean-room Swift implementation of published standards (FIPS 202,<br>FIPS 203, Signal Double Ratchet/X3DH), not libsignal or liboqs. The<br>algorithms are standard; the implementation is ours.
It has not had a paid third-party audit yet — that's on the roadmap. We're<br>publishing it precisely so it can be reviewed.
The interop tests use Apple's CryptoKit as the reference oracle; they need<br>macOS 26 or later to run (older OSes will skip them).
Found a problem? support@veilusdigital.co. We'd rather hear it from you.
About
The cryptographic core of Phantom Chat — source-available for review
Resources
Readme
License
View license
Uh oh!
There was an error while loading. Please reload this page.
Activity
Stars
stars
Watchers
watching
Forks
forks
Report repository
Releases
No releases published
Packages
Uh oh!
There was an error while loading. Please reload this page.
Contributors
Uh oh!
There was an error while loading. Please reload this page.
Languages
Swift<br>100.0%
You can’t perform that action at this time.