Module types

Source
Expand description

Implements basic cryptography-related types based on primitives, such as Hash, PublicKey and Signature.

Structs§

Challenge
Natural extension of the Curve Point to the Proof-of-Relay challenge. Proof-of-Relay challenge is a secp256k1 curve point.
CompactOffchainPublicKey
Compact representation of OffchainPublicKey suitable for use in enums.
CompressedPublicKey
Represents a compressed serializable extension of the PublicKey using the secp256k1 curve.
CurvePoint
Represents an elliptic curve point on the secp256k1 curve It stores the compressed (and optionally also the uncompressed) form.
HalfKey
Represents a half-key used for the Proof-of-Relay.
HalfKeyChallenge
Represents a challenge for the half-key in Proof of Relay. Half-key challenge is equivalent to a secp256k1 curve point. Therefore, HalfKeyChallenge can be obtained from a HalfKey.
Hash
Represents an Ethereum 256-bit hash value This implementation instantiates the hash via Keccak256 digest.
OffchainPublicKey
Represents an Ed25519 public key.
OffchainSignature
Represents an EdDSA signature using Ed25519 Edwards curve.
PublicKey
Represents a secp256k1 public key.
Response
Contains a response upon ticket acknowledgement It is equivalent to a non-zero secret scalar on secp256k1 (EC private key).
Signature
Represents an ECDSA signature based on the secp256k1 curve with a recoverable public key. This signature encodes the 2-bit recovery information into the uppermost bits from MSB of the S value, which are never used by this ECDSA instantiation over secp256k1. The instance holds the byte array consisting of R and S values with the recovery bit already embedded in S.
SimplePseudonym
Represents a simple UUID-like pseudonym consisting of 10 bytes.

Constants§

PACKET_TAG_LENGTH
Length of a packet tag

Traits§

Pseudonym
Pseudonym used to identify the creator of a SURB. This allows indexing SURB and LocalSURBEntry at both parties.

Type Aliases§

PacketTag
Represents a fixed size packet verification tag