Package-level declarations

Types

Link copied to clipboard
class DecryptJwe(val keyMaterial: KeyMaterial) : DecryptJweFun
Link copied to clipboard
fun interface DecryptJweFun

Decrypt a JweEncrypted object

Link copied to clipboard
class EncryptJwe(val keyMaterial: KeyMaterial) : EncryptJweFun

Create a JweEncrypted, setting values for JweHeader.

Link copied to clipboard
fun interface EncryptJweFun

Create a JweEncrypted, setting values for JweHeader.

Link copied to clipboard
object JweUtils
Link copied to clipboard

Clients need to retrieve the URL passed in as the only argument, and parse the content to JsonWebKeySet.

Link copied to clipboard
Link copied to clipboard

Identify KeyMaterial with it's KeyMaterial.getCertificate in JwsHeader.certificateChain if it exists, or KeyMaterial.jsonWebKey in JwsHeader.jsonWebKey.

Link copied to clipboard

How to identify the key material in a JwsHeader

Link copied to clipboard

Identify KeyMaterial with it's KeyMaterial.jsonWebKey in JwsHeader.jsonWebKey.

Link copied to clipboard
class JwsHeaderJwksUrl(val jsonWebKeySetUrl: String) : JwsHeaderIdentifierFun

Identify KeyMaterial with it's KeyMaterial.identifier set in JwsHeader.keyId, and URL set inJwsHeader.jsonWebKeySetUrl.

Link copied to clipboard

Identify KeyMaterial with it's KeyMaterial.identifier in JwsHeader.keyId.

Link copied to clipboard

Don't identify KeyMaterial at all in a JwsHeader, used for SD-JWT KB-JWS.

Link copied to clipboard

Clients get the parsed JwsSigned and need to provide a set of keys, which will be used for verification one-by-one.

Link copied to clipboard
data class SdJwtSigned(val jws: JwsSigned<JsonElement>, val rawDisclosures: List<String>, val keyBindingJws: JwsSigned<KeyBindingJws>? = null, val hashInput: String)

Representation of a signed SD-JWT, as issued by an at.asitplus.wallet.lib.agent.Issuer or presented by an at.asitplus.wallet.lib.agent.Holder, i.e. consisting of an JWS (with header, payload is at.asitplus.wallet.lib.data.VerifiableCredentialSdJwt and signature) and several disclosures (SelectiveDisclosureItem) separated by a ~, possibly ending with a keyBindingJws, that is a JWS with payload KeyBindingJws.

Link copied to clipboard

Encodes SelectiveDisclosureItem as needed by SD-JWT spec, that is a JSON array with the values for salt, name, and the value itself, which in turn can be anything, e.g. number, boolean or string. We solve this challenge by serializing a list of JsonPrimitive, see implementation. Note, that when disclosing array items, the claim name may be missing.

Link copied to clipboard
class SignJwt<P : Any>(val keyMaterial: KeyMaterial, val headerModifier: JwsHeaderIdentifierFun) : SignJwtFun<P>

Create a JwsSigned, setting JwsHeader.type to the specified value and applying JwsHeaderIdentifierFun.

Link copied to clipboard
fun interface SignJwtFun<P : Any>

Create a JwsSigned, setting JwsHeader.type to the specified value

Link copied to clipboard
class VerifyJwsObject(val verifyJwsSignature: VerifyJwsSignatureFun = VerifyJwsSignature(), val jwkSetRetriever: JwkSetRetrieverFunction = JwkSetRetrieverFunction { null }, val publicKeyLookup: PublicJsonWebKeyLookup = PublicJsonWebKeyLookup { null }) : VerifyJwsObjectFun
Link copied to clipboard
fun interface VerifyJwsObjectFun
Link copied to clipboard
class VerifyJwsSignature(val verifySignature: VerifySignatureFun = VerifySignature()) : VerifyJwsSignatureFun
Link copied to clipboard
fun interface VerifyJwsSignatureFun
Link copied to clipboard
class VerifyJwsSignatureWithCnf(val verifyJwsSignature: VerifyJwsSignatureFun = VerifyJwsSignature(), val jwkSetRetriever: JwkSetRetrieverFunction = JwkSetRetrieverFunction { null }) : VerifyJwsSignatureWithCnfFun
Link copied to clipboard
Link copied to clipboard
class VerifyJwsSignatureWithKey(val verifyJwsSignature: VerifyJwsSignatureFun = VerifyJwsSignature()) : VerifyJwsSignatureWithKeyFun
Link copied to clipboard