KeyPair
org.sigilaris.core.crypto.KeyPair
An ECDSA secp256k1 key pair consisting of a private and public key.
The key pair enables cryptographic operations such as signing transactions and recovering public keys from signatures.
Value parameters
- privateKey
-
32-byte private key as datatype.UInt256, must be in range [1, n-1] where n is the secp256k1 curve order
- publicKey
-
corresponding 64-byte uncompressed public key (x||y coordinates)
Attributes
- See also
-
CryptoOps.generate for key pair generation
CryptoOps.fromPrivate for deriving from private key
- Example
-
// Generate a new key pair val keyPair = CryptoOps.generate() // Derive from existing private key val privateKey = UInt256.fromHex("0123...").toOption.get val keyPair2 = CryptoOps.fromPrivate(privateKey.toBigInt) - Source
- KeyPair.scala
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any
Members list
In this article