One Logo Pool Ball
CryptoKit · IOS API REFERENCE

Curve25519.Signing.PrivateKey

struct · iOS 13.0+ · SDK 27.1

struct PrivateKey

A Curve25519 private key used to create cryptographic signatures.

Members (5)

get · iOS 13.0+

publicKey

TypeScript
get publicKey(): Curve25519_Signing_PublicKey
Swift declaration
var publicKey: Curve25519.Signing.PublicKey { get }

The corresponding public key.

get · iOS 13.0+

rawRepresentation

TypeScript
get rawRepresentation(): ArrayBuffer
Swift declaration
var rawRepresentation: Data { get }

The raw representation of the key as a collection of contiguous bytes.

init · iOS 13.0+

init

TypeScript
static initRawRepresentation(data: ArrayBuffer): Curve25519_Signing_PrivateKey
Swift declaration
init<D>(rawRepresentation data: D) throws where D : ContiguousBytes

Creates a Curve25519 private key for signing from a data representation. - Parameters: - data: A representation of the key as contiguous bytes from which to create the key.

method · iOS 13.0+

signature

TypeScript
signature(data: ArrayBuffer): ArrayBuffer
Swift declaration
func signature<D>(for data: D) throws -> Data where D : DataProtocol

Generates an EdDSA signature over Curve25519. - Parameters: - data: The data to sign. - Returns: The signature for the data. Although not required by [RFC 8032](https://tools.ietf.org/html/rfc8032), which describes the Edwards-Curve Digital Signature Algorithm (EdDSA), the CryptoKit implementation of the algorithm employs randomization to generate a different signature on every call, even for the same data and key, to guard against side-channel attacks.

init · iOS 13.0+

init

TypeScript
static init(): Curve25519_Signing_PrivateKey
Swift declaration
init()

Creates a random Curve25519 private key for signing.

Skipped declarations

No declarations were skipped in this snapshot.

All CryptoKit types →