Instance Property
publicKey
The secp256k1 public key derived from this private key, as a P256K.KeyAgreement.PublicKey.
- iOS 13.0+
- macCatalyst 13.0+
- macOS 10.15+
- tvOS 13.0+
- visionOS 1.0+
- watchOS 6.0+
var publicKey: P256K.KeyAgreement.PublicKey { get }
Discussion
Computed on every access via secp256k1_ec_pubkey_create. For high-frequency key-agreement loops, cache the value locally rather than re-deriving it per call. The returned public key carries the private key’s P256K.Format selection.