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.
- 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.
- PeerId
- Identifier of a peer of the network.
- 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 of 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.
Constants§
- PACKET_
TAG_ LENGTH - Length of a packet tag
Type Aliases§
- Packet
Tag - Represents a fixed size packet verification tag