Instance Property
negation
A new P256K.Schnorr.PrivateKey whose secret scalar is the additive inverse modulo the secp256k1 curve order, produced by secp256k1_ec_seckey_negate.
- iOS 13.0+
- macCatalyst 13.0+
- macOS 10.15+
- tvOS 13.0+
- visionOS 1.0+
- watchOS 6.0+
var negation: P256K.Schnorr.PrivateKey { get }
Discussion
Useful in BIP-340 when the signing key must represent the even-Y x-only public key: if xonly’s parity is odd, the signer negates the secret scalar before signing so the effective public key has even Y.