LocalCredential

class LocalCredential(val credential: AuthenticationCredential, val identifier: CredentialIdentifier, val privateKey: PrivateKey, val authentication: AuthenticationKind)(source)

This endpoint's own authentication material: CRED_x, how the peer is told about it (ID_CRED_x), and the handle of the private authentication key, which never leaves its dev.kcoap.crypto.CryptoBackend.

authentication fixes what the key is for. RFC 9528 §9.2 discourages using one key both to sign and for static Diffie-Hellman, and a P-256 key could do either, so the purpose is explicit.

Constructors

Link copied to clipboard
constructor(credential: AuthenticationCredential, identifier: CredentialIdentifier, privateKey: PrivateKey, authentication: AuthenticationKind)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

whether the key signs or does static Diffie-Hellman.

Link copied to clipboard
Link copied to clipboard

ID_CRED_x as sent to the peer.

Link copied to clipboard

the private authentication key; its type must be the credential's.

Functions

Link copied to clipboard

Whether this credential authenticates kind in suite: the key type must be the suite's.

Link copied to clipboard
open override fun toString(): String