IPoPCryptoProvider Interface

Definition

An abstraction over an the asymmetric key operations needed by POP, that encapsulates a pair of public and private keys and some typical crypto operations. All symmetric operations are SHA256.

public interface IPoPCryptoProvider
type IPoPCryptoProvider = interface
Public Interface IPoPCryptoProvider

Remarks

Important: The 2 methods on this interface will be called at different times but MUST return details of the same private / public key pair, i.e. do not change to a different key pair mid way. Best to have this class immutable.

Ideally there should be a single public / private key pair associated with a machine, so implementers of this interface should consider exposing a singleton.

Properties

CannonicalPublicKeyJwk

The canonical representation of the JWK.
See https://tools.ietf.org/html/rfc7638#section-3

CryptographicAlgorithm

Algorithm used to sign proof of possession request. See EC algorithms for ECD. See RSA algorithms for RSA.

Methods

Sign(Byte[])

Signs the byte array using the private key

Applies to