NIKE-Sphinx #
Sphinx packet creation and unwrapping over any NIKE, with sizes read from the NIKE's own fields.
createHeader takes its randomness as arguments, so it is pure.
Equations
- Cryptlib.Protocols.Sphinx.NIKESphinx.instDecidableEqPublicKey nike a b = decidable_of_iff (nike.encodePublicKey a = nike.encodePublicKey b) ⋯
Equations
- Cryptlib.Protocols.Sphinx.NIKESphinx.instFintypePrivateKey nike = Fintype.ofInjective nike.encodePrivateKey ⋯
Equations
- Cryptlib.Protocols.Sphinx.NIKESphinx.instDecidableEqPrivateKey nike a b = decidable_of_iff (nike.encodePrivateKey a = nike.encodePrivateKey b) ⋯
Equations
- Cryptlib.Protocols.Sphinx.NIKESphinx.instInhabitedPrivateKey nike = { default := nike.privateKeyFromSeed (Vector.replicate 32 0) }
Equations
- Cryptlib.Protocols.Sphinx.NIKESphinx.instInhabitedPublicKey nike = { default := nike.derivePublicKey default }
Equations
- Cryptlib.Protocols.Sphinx.NIKESphinx.instSampleableTypePrivateKey nike = SampleableType.ofFintype nike.PrivateKey
On an encoded Safe public key, nikeDH computes the encoded groupAction.
On an encoded Safe public key and factor bytes decoding to sk, nikeBlind computes the
encoded reinterpret (groupAction sk pk h).
Per-hop keys. blindingFactor is raw bytes so HopKeys does not depend on the NIKE.
- blindingFactor : ByteArray
Instances For
Derive one hop's keys from its shared secret.
Equations
- One or more equations did not get rendered due to their size.
Instances For
filler must be (geom.nrHops - path.size) * geom.perHopRoutingInfoLength bytes; it
hides the hop count of a short path.
Equations
- One or more equations did not get rendered due to their size.
Instances For
createHeader's header size is 2 + nike.publicKeySize + geom.routingInfoLength + macLength, which is geom.headerLength when geom is valid for nike.
Build a forward packet.
Equations
- One or more equations did not get rendered due to their size.
Instances For
newNIKEPacket on a geom.forwardPayloadLength payload yields geom.packetLength bytes.
Sphinx.Interface.wrap: newNIKEPacket with the client key and filler drawn from the seed
stream.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Build a SURB. keyPayload is the 64-byte SPRP key and IV for the reply's final payload
layer. Returns (surb, decryptionKeys).
Equations
- One or more equations did not get rendered due to their size.
Instances For
newNIKESURB's SURB is geom.surbLength bytes.
Sphinx.Interface.newSURB: newNIKESURB with the client key, keyPayload and filler drawn
from the seed stream.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Unwrap one layer: (payload, replayTag, cmds, forwardPkt).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Non-terminal hop: unwrapNIKE on hopPacket ... k (k+1 < nrHops) yields
hopPacket ... (k+1), given the hop's private key decodes to targetSk k.
Terminal hop: unwrapNIKE on hopPacket ... (nrHops - 1) reveals payload, given the hop's
private key decodes to targetSk k.
Unwrapping hopPacket ... k through the remaining hops, with private keys decoding to
targetSk (k+i), recovers payload.
The envelope bytes depend only on the seed drawn from state.
A successful wrapNIKE, unfolded: one seed and the filler are drawn, and newNIKEPacket
succeeds on them producing pkt.
Completeness: NIKESphinxScheme's witness for Sphinx.Interface.unwrap_complete.
The executable Sphinx.Interface.Sphinx instance for nike, without the re-blindable
envelope structure (which needs noncomputable instances).
Equations
- One or more equations did not get rendered due to their size.
Instances For
NIKESphinxScheme for any NIKE. Noncomputable; use nikeSphinxCore for executable code.
Equations
- One or more equations did not get rendered due to their size.
Instances For
NIKESphinxScheme for the NIKE named by geom.nikeName, with AEZ, HMAC-SHA256,
HKDF-SHA256-Expand and AES-256-CTR. Rejects a geom not valid for that NIKE.
Equations
- One or more equations did not get rendered due to their size.