PublicKey
RSA+BlindSigning.swift:33- iOS
- 13+
- macOS
- 10.15+
- tvOS
- 13+
- watchOS
- 6+
struct PublicKey<H> where H : HashFunction
struct PublicKey<H> where H : HashFunction
import _CryptoExtras
Provides additional cryptographic APIs that are not available in CryptoKit (and therefore the core Crypto library).
enum BlindSigning
enum _RSA
Types associated with the RSA algorithm
protocol HashFunction
A type that performs cryptographically secure hashing.
struct BlindSignature
struct BlindingInverse
The blinding inverse for a blinded message, used to unblind a blind signature.
struct BlindingResult
The blinded message and its blinding inverse for unblinding its blind signature.
struct Parameters<H> where H : HashFunction
Parameters used in the blind signing protocol.
struct PreparedMessage
An input ready to be blinded, possibly prepended with random bytes.
struct PrivateKey<H> where H : HashFunction
protocol Sendable
init<Bytes>(derRepresentation: Bytes, parameters: Parameters = .RSABSSA_SHA384_PSS_Randomized) throws where Bytes : DataProtocol
Construct an RSA public key from a DER representation.
init(n: some ContiguousBytes, e: some ContiguousBytes, parameters: Parameters) throws
Construct a RSA public key with the specified parameters.
init(pemRepresentation: String, parameters: Parameters = .RSABSSA_SHA384_PSS_Randomized) throws
Construct an RSA public key from a PEM representation.
init<Bytes>(unsafeDERRepresentation derRepresentation: Bytes, parameters: Parameters = .RSABSSA_SHA384_PSS_Randomized) throws where Bytes : DataProtocol
Construct an RSA public key from a DER representation.
init(unsafePEMRepresentation pemRepresentation: String, parameters: Parameters = .RSABSSA_SHA384_PSS_Randomized) throws
Construct an RSA public key from a PEM representation.
var derRepresentation: Data { get }
var keySizeInBits: Int { get }
var pemRepresentation: String { get }
var pkcs1DERRepresentation: Data { get }
var pkcs1PEMRepresentation: String { get }
func getKeyPrimitives() throws -> Primitives
struct Primitives
typealias Parameters = _RSA.BlindSigning.Parameters<H>
func blind(_ message: _RSA.BlindSigning.PreparedMessage) throws -> _RSA.BlindSigning.BlindingResult
Blind a message to be signed by the server using the blind signing protocol.
func finalize(_ signature: _RSA.BlindSigning.BlindSignature, for message: _RSA.BlindSigning.PreparedMessage, blindingInverse: _RSA.BlindSigning.BlindingInverse) throws -> _RSA.Signing.RSASignature
Unblinds the message and produce a signature for the message.
func isValidSignature(_ signature: _RSA.Signing.RSASignature, for message: _RSA.BlindSigning.PreparedMessage) -> Bool
Validate a signature for a prepared message.
func prepare<D>(_ message: D) -> _RSA.BlindSigning.PreparedMessage where D : DataProtocol
Prepare a message to be signed using the blind signing protocol.