Static ReadonlyUR_Get the UR type for signing private keys.
StaticnewCreates a new Schnorr signing private key from an ECPrivateKey.
The EC private key to use for Schnorr signing
A new Schnorr signing private key
StaticnewCreates a new ECDSA signing private key from an ECPrivateKey.
The EC private key to use for ECDSA signing
A new ECDSA signing private key
StaticnewCreates a new Ed25519 signing private key from an Ed25519PrivateKey.
The Ed25519 private key to use
A new Ed25519 signing private key
StaticnewCreates a new SR25519 signing private key from an Sr25519PrivateKey.
The SR25519 private key to use
A new SR25519 signing private key
StaticnewCreates a new MLDSA signing private key from an MLDSAPrivateKey.
The MLDSA private key to use
A new MLDSA signing private key
StaticrandomCreates a new random Ed25519 signing private key.
A new random Ed25519 signing private key
StaticrandomCreates a new random Schnorr signing private key.
A new random Schnorr signing private key
StaticrandomCreates a new random ECDSA signing private key.
A new random ECDSA signing private key
StaticrandomCreates a new random SR25519 signing private key.
A new random SR25519 signing private key
Returns the signature scheme of this key.
Returns a human-readable string identifying the key type.
A string like "Ed25519", "Schnorr", "ECDSA", "Sr25519", "MLDSA-44", etc.
Returns the underlying EC private key if this is a Schnorr or ECDSA key.
The EC private key if this is a Schnorr or ECDSA key, null otherwise
Returns the underlying Ed25519 private key if this is an Ed25519 key.
The Ed25519 private key if this is an Ed25519 key, null otherwise
Returns the underlying Sr25519 private key if this is an Sr25519 key.
The Sr25519 private key if this is an Sr25519 key, null otherwise
Returns the underlying MLDSA private key if this is an MLDSA key.
The MLDSA private key if this is an MLDSA key, null otherwise
Checks if this is a Schnorr signing key.
Checks if this is an ECDSA signing key.
Checks if this is an Ed25519 signing key.
Checks if this is an Sr25519 signing key.
Checks if this is an MLDSA signing key.
Derives the corresponding public key for this private key.
The public key corresponding to this private key
Get string representation.
Returns a unique reference to this SigningPrivateKey instance.
The reference is derived from the SHA-256 hash of the tagged CBOR representation, providing a unique, content-addressable identifier.
Signs a message with optional signing options.
Different signature schemes may use the options differently:
The message to sign
Optionaloptions: SigningOptionsOptional signing options
The digital signature
Signs a message using default options.
This is a convenience method that calls signWithOptions with no options.
The message to sign
The digital signature
Verifies a signature against a message.
The signature to verify
The message that was allegedly signed
true if the signature is valid, false otherwise
Returns the CBOR tags associated with SigningPrivateKey.
Returns the untagged CBOR encoding.
Format (matching Rust bc-components):
Returns the tagged CBOR encoding.
Returns the tagged value in CBOR binary representation.
Creates a SigningPrivateKey by decoding it from untagged CBOR.
Format (matching Rust bc-components):
Creates a SigningPrivateKey by decoding it from tagged CBOR.
StaticfromStaticfromStatic method to decode from tagged CBOR binary data.
StaticfromStatic method to decode from untagged CBOR binary data.
Returns the UR representation of the signing private key.
Returns the UR string representation of the signing private key.
StaticfromStaticfromStaticfromAlias for fromURString for Rust API compatibility.
Converts the private key to OpenSSH format. Currently only supports Ed25519 keys.
Optionalcomment: string
A private key used for creating digital signatures.
Currently supports: