package
0.2501.0
Repository: https://github.com/oasisprotocol/oasis-core.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# Functions

BuildPublicKeyBlacklist builds the public key blacklist.
HashToPublicKey creates a public key via h2c from the given domain separator and message.
IsUnsafeUnregisteredContextsAllowed returns true iff context registration checks are bypassed.
NewBatchVerifier creates an empty BatchVerifier.
NewBatchVerifierWithCapacity creates an empty BatchVerifier, with preallocations for a pre-determined batch size hint.
NewBlacklistedPublicKey creates a new blacklisted public key from the given hex representation or panics.
NewContext creates and registers a new context.
NewPrettyMultiSigned creates a new PrettySigned instance that can be used for pretty printing multi-signed values.
NewPrettySigned creates a new PrettySigned instance that can be used for pretty printing signed values.
NewPublicKey creates a new public key from the given hex representation or panics.
PrepareSignerContext prepares a context for use during signing by a Signer.
PrepareSignerMessage prepares a context and message for signing by a Signer.
Prove generates a VRF proof with the private key over the alpha.
RegisterTestPublicKey registers a hardcoded test public key with the internal public key blacklist.
SetChainContext configures the chain domain separation context that is used with any contexts constructed using the WithChainSeparation option.
Sign generates a signature with the private key over the context and message.
SignMultiSigned generates a MultiSigned with the Signers over the context and CBOR-serialized message.
SignRaw generates a signature with the private key over the context and message.
SignSigned generates a Signed with the Signer over the context and CBOR-serialized message.
UnsafeAllowUnregisteredContexts bypasses the context registration check.
UnsafeResetChainContext resets the chain context.
VerifyManyToOne verifies multiple signatures against a single context and message, returning true iff every signature is valid.
WithChainSeparation is a context option that enforces additional domain separation based on the ChainID.
WithDynamicSuffix is a context option that configures the context to use a dynamic suffix.

# Constants

BetaSize is the size of a VRF output in bytes.
ProofSize is the size of a VRF proof in bytes.
PublicKeySize is the size of a public key in bytes.
SignatureSize is the size of a signature in bytes.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

ErrForbiddenPublicKey is the error returned when a public key is in the blacklist.
ErrInvalidRole is the error returned when the signer role is invalid.
ErrMalformedPrivateKey is the error returned when a private key is malformed.
ErrMalformedPublicKey is the error returned when a public key is malformed.
ErrMalformedSignature is the error returned when a signature is malformed.
ErrNotExist is the error returned when a private key does not exist.
ErrPublicKeyMismatch is the error returned when a signature was not produced by the expected public key.
ErrRoleAction is the error returned when the signer role mismatches the signing operations allowed by the role.
ErrRoleMismatch is the error returned when the signer factory role is misconfigured.
ErrVerifyFailed is the error return when a signature verification fails when opening a signed blob.
ErrVRFNotSupported is the error returned when the signer is not capable of generating VRF proofs.
SignerRoles is the list of all supported signer roles.

# Structs

BatchVerifier accumulates batch entries with Add, before performing batch verification with Verify.
MultiSigned is a blob signed by multiple public keys.
PrettyMultiSigned is used for pretty-printing multi-signed messages so that the actual content is displayed instead of the binary blob.
PrettySigned is used for pretty-printing signed messages so that the actual content is displayed instead of the binary blob.
Proof is a VRF proof, bundled with the signing public key.
Signature is a signature, bundled with the signing public key.
Signed is a signed blob.
SignedPublicKey is a signed blob containing a PublicKey.

# Interfaces

Signer is an opaque interface for private keys that is capable of producing signatures, in the spirit of `crypto.Signer`.
SignerFactory is the opaque factory interface for Signers.
StaticEntropyProvider is the interface implemented by signers that support providing persistent static entropy that is entirely independent from a keypair.
UnsafeSigner is a Signer that also supports access to the raw private key, primarily for testing.
VRFSigner is a Signer that also supports generating VRF proofs, using the semantics from the IETF Verifiable Random Functions draft.

# Type aliases

Context is a domain separation context.
ContextOption is a context configuration option.
PublicKey is a public key used for signing.
RawProof is a raw VRF proof.
RawSignature is a raw signature.
SignerFactoryCtor is an SignerFactory constructor.
SignerRole is the role of the Signer (Entity, Node, etc).