Contents

signature(for:)

Generates an EdDSA signature over Curve25519.

Declaration

func signature<D>(for data: D) throws -> Data where D : DataProtocol

Parameters

  • data:

    The data to sign.

Return Value

The signature for the data. Although not required by RFC 8032, 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.