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.
- Compact
Offchain Public Key - Compact representation of
OffchainPublicKey
suitable for use in enums. - Compressed
Public Key - Represents a compressed serializable extension of the
PublicKey
using the secp256k1 curve. - Curve
Point - 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.
- Half
KeyChallenge - 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.
- Offchain
Public Key - Represents an Ed25519 public key.
- Offchain
Signature - Represents an EdDSA signature using Ed25519 Edwards curve.
- Public
Key - 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
andS
values with the recovery bit already embedded in S. - Simple
Pseudonym - 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 indexingSURB
andLocalSURBEntry
at both parties.
Type Aliases§
- Packet
Tag - Represents a fixed size packet verification tag