Package-level declarations

Types

Link copied to clipboard

How to extract the algorithm from KeyMaterial

Link copied to clipboard

Identify KeyMaterial with it's KeyMaterial.getCertificate in (unprotected) CoseHeader.certificateChain.

Link copied to clipboard
fun interface CoseHeaderIdentifierFun<T>

How to identify the key material in a CoseHeader

Link copied to clipboard

Identify KeyMaterial with it's KeyMaterial.identifier in (protected) CoseHeader.keyId.

Link copied to clipboard

Don't identify KeyMaterial in CoseHeader.

Link copied to clipboard
object CoseUtils

Extract the algorithm from KeyMaterial directly, using fully specified algorithms when applicable, see RFC 9864.

Link copied to clipboard

Workaround for other implementations not supporting fully specified algorithms from RFC 9864, so we'll be using the non-fully specified ones.

Link copied to clipboard
class MacCose<P : Any>(val keyMaterial: CoseKey, val protectedHeaderModifier: CoseHeaderIdentifierFun<CoseKey>? = null, val unprotectedHeaderModifier: CoseHeaderIdentifierFun<CoseKey>? = null) : MacCoseFun<P>
Link copied to clipboard
class MacCoseDetached<P : Any>(val keyMaterial: CoseKey, val protectedHeaderModifier: CoseHeaderIdentifierFun<CoseKey>? = null, val unprotectedHeaderModifier: CoseHeaderIdentifierFun<CoseKey>? = null) : MacCoseDetachedFun<P>
Link copied to clipboard
fun interface MacCoseDetachedFun<P>
Link copied to clipboard
fun interface MacCoseFun<P>
Link copied to clipboard
fun interface PublicCoseKeyLookup
Link copied to clipboard
class SignCose<P : Any>(val keyMaterial: KeyMaterial, val protectedHeaderModifier: CoseHeaderIdentifierFun<KeyMaterial>? = null, val unprotectedHeaderModifier: CoseHeaderIdentifierFun<KeyMaterial>? = null, val algorithmExtractor: CoseHeaderAlgorithmExtractor = LegacyCoseHeaderAlgorithmExtractor) : SignCoseFun<P>

Create a CoseSigned, setting protected and unprotected headers, and applying CoseHeaderIdentifierFun.

Link copied to clipboard
class SignCoseDetached<P : Any>(val keyMaterial: KeyMaterial, val protectedHeaderModifier: CoseHeaderIdentifierFun<KeyMaterial>? = null, val unprotectedHeaderModifier: CoseHeaderIdentifierFun<KeyMaterial>? = null, val algorithmExtractor: CoseHeaderAlgorithmExtractor = LegacyCoseHeaderAlgorithmExtractor) : SignCoseDetachedFun<P>

Create a CoseSigned with detached payload, setting protected and unprotected headers, and applying CoseHeaderIdentifierFun.

Link copied to clipboard
fun interface SignCoseDetachedFun<P>
Link copied to clipboard
fun interface SignCoseFun<P>
Link copied to clipboard
class VerifyCoseMacWithKey<P : Any>(val verifyMac: VerifyMacFun = VerifyMac()) : VerifyCoseMacWithKeyFun<P>
Link copied to clipboard
fun interface VerifyCoseMacWithKeyFun<P>
Link copied to clipboard
class VerifyCoseSignature<P : Any>(val verifyCoseSignature: VerifyCoseSignatureWithKeyFun<P> = VerifyCoseSignatureWithKey<P>(), val publicKeyLookup: PublicCoseKeyLookup = PublicCoseKeyLookup { null }) : VerifyCoseSignatureFun<P>
Link copied to clipboard
fun interface VerifyCoseSignatureFun<P>
Link copied to clipboard
class VerifyCoseSignatureWithKey<P : Any>(val verifySignature: VerifySignatureFun = VerifySignature()) : VerifyCoseSignatureWithKeyFun<P>
Link copied to clipboard

Properties

Link copied to clipboard
val CoseHeader.publicKey: CoseKey?

Tries to compute a public key in order from coseKey, kid or certificateChain, and takes the first success or null.