Under the Hood
This section is the engineer's view of SPECTER. It follows one payment from the keys that exist before anything happens to the signature that finally moves the funds, and it names the exact primitive at every step.
If you want the plain-language model first, read How SPECTER works. If you want to call this from code, read the SDK reference. This section sits between the two: it explains what the SDK and the API are actually doing.
The pipeline at a glance
A payment passes through five cryptographic stages. Each page below takes one stage apart.
The objects and their sizes
Every artifact in SPECTER has a fixed size. Knowing them makes the rest of this section concrete.
| Object | Size | Lives | Secret |
|---|---|---|---|
| Spending public key | 1,184 B | In the meta-address | No |
| Spending secret key | 2,400 B | Recipient device | Yes |
| Viewing public key | 1,184 B | In the meta-address | No |
| Viewing secret key | 2,400 B | Recipient device | Yes |
| Meta-address (serialized) | 2,369 B | Published | No |
| Announcement ciphertext | 1,088 B | On-chain or in the registry | No |
| Shared secret | 32 B | Derived on both sides | Yes |
| View tag | 1 B | In the announcement | No |
| Stealth Ethereum address | 20 B | On-chain | No |
| Stealth Sui address | 32 B | On-chain | No |
| Recovered Ethereum private key | 32 B | Recipient device | Yes |
The public key and ciphertext sizes are ML-KEM-768 as standardized in FIPS 203.
The flow as one diagram
Two derivations from one secret
Almost everything after encapsulation comes from the 32-byte shared secret, expanded with domain-separated SHAKE-256 so that two different uses of the same secret never collide:
view_tag = SHAKE-256("SPECTER_VIEW_TAG" || shared_secret)[0]
stealth_key = SHAKE-256("SPECTER_STEALTH_PK" || shared_secret) combined with spending_pk
The domain strings are the separator. The same shared secret feeds both, but the prefixes guarantee the view tag tells you nothing about the stealth key. The exact constructions live in the SPECTER Rust core; this section describes what each one produces and why.