Case
secp256k1Error.incorrectKeySize
A key was deserialized with the wrong byte count.
case incorrectKeySize
Discussion
Thrown when a serialized secp256k1 key’s length does not match the expected P256K.Format: 32 bytes for a private key, 33 bytes for P256K.Format.compressed or x-only public keys, or 65 bytes for P256K.Format.uncompressed public keys. The validation happens before any upstream C call, so this case surfaces ill-formed inputs at the Swift layer.