Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCipherStream ¶
generates cipher stream of size numBytes from a given PRG. TODO: generalize to other ciphers
Types ¶
type Hash256 ¶
func ComputeBlindingFactor ¶
computes blinding factor used for blinding the cyclic group element at each hop. The blinding factor is computed by hashing the concatenation of the the hop's public key and the secret key derived between the sender and the hop blinding_factor := sha256(hopPubKey || sharedSecret)
func GenerateECDHSharedSecret ¶
func GenerateECDHSharedSecret(pub *ecdsa.PublicKey, priv *ecdsa.PrivateKey) Hash256
generates shared secret using ECDH protocol in an arbitrary curve. The shared secret is the hash of the resulting x coordinate of point after scalar multiplication between the a ECDSA key pair.
Click to show internal directories.
Click to hide internal directories.