CipherSuite

An EDHOC cipher suite, RFC 9528 §3.6 and §10.2 (IANA "EDHOC Cipher Suites").

The parameters follow the order of the registry's "Array" column: EDHOC AEAD, EDHOC hash, EDHOC MAC length, EDHOC key exchange, EDHOC signature, application AEAD, application hash.

Constructors

Link copied to clipboard
constructor(value: Int, edhocAead: AeadAlgorithm, edhocHash: HashAlgorithm, macLength: Int, keyExchange: KeyExchangeAlgorithm, signature: SignatureAlgorithm, appAead: AeadAlgorithm, appHash: HashAlgorithm)

A suite from its parameters, for private-use suites; isImplemented is true.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

the AEAD for the application, for example OSCORE (RFC 9528 Appendix A.1).

Link copied to clipboard

the hash for the application's HKDF, for example OSCORE.

Link copied to clipboard

protects message_3 and message_4 (RFC 9528 §5.4.2, §5.5.2).

Link copied to clipboard

computes the transcript hashes and selects HKDF or KMAC (RFC 9528 §4.1).

Link copied to clipboard

Whether kcoap can run this suite. False only for SUITE_25, whose EdDSA signatures use Ed448, a key type kcoap's crypto layer does not model and no backend provides.

Link copied to clipboard

RFC 9528 §8: implementations MUST support cipher suites 2 and 3.

Link copied to clipboard

Whether the value is in the private-use range -24..-21 of RFC 9528 §10.2.

Link copied to clipboard

the ephemeral key exchange, and with Diffie-Hellman also static-DH authentication.

Link copied to clipboard

EDHOC MAC length in bytes, used by static-DH authentication (RFC 9528 §5.3.2).

Link copied to clipboard

signs Signature_or_MAC_2/3 in the signature methods.

Link copied to clipboard
val value: Int

The suite's integer label in SUITES_I and SUITES_R.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
suspend fun isSupportedBy(crypto: CryptoBackend, method: EdhocMethod): Boolean

Whether a session with method on this suite runs on crypto where it is: the suite is implemented and fits the method (EdhocMethod.isCompatibleWith), and the backend supports

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