hopr_crypto_types

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.
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.
PeerId
Identifier of a peer of the network.
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 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 and S values with the recovery bit already embedded in S.

Constants§

PACKET_TAG_LENGTH
Length of a packet tag

Type Aliases§

PacketTag
Represents a fixed size packet verification tag