Builds from the given parameters a Verifiable Presentation as returned by II
to the relying party during a successful VC flow. Specifically, the returned JWT
Extracts the canister signature public key from the given signing_input, which is the
effective byte array that is signed when creating a JWS from a JWT.
(essentially, it is a serialized JWT with JWS header, yet without a signature,
cf. vc_signing_input()-function above).
Verifies the given JWS-credential as an id_alias-VC and extracts the alias tuple.
Performs both the cryptographic verification of the credential, and the semantic
validation of the claims in the VC.
Constructs and returns a JWS (a signed JWT) from the given components.
Specifically, it constructs a JWS-header with the given canister_sig_pk, and
packages credential_jwt, the header, and the signature sig into a JWS.
The given signature should be created over the bytes returned by vc_signing_input().
Note: the validity of the signature is not checked.
Returns the effective bytes that will be signed when computing a canister signature for
the given JWT-credential, verifiable via the specified public key.
Computes and returns SHA-256 hash of the given signing_input prefixed with
length(VC_SIGNING_INPUT_DOMAIN) · VC_SIGNING_INPUT_DOMAIN
(for domain separation), where length(a) is the length of byte-array a,
and · denotes concatenation of bytes.
Constructs and returns a JWS (a signed JWT) from the given components.
The given signing_input should be a value returned by vc_signing_input()
(which already contains a header with canister signatures public key), and
sig should be valid canister signature over signing_input.
Note: the validity of the signature is not checked.
Verifies the specified JWS credential cryptographically and checks that the signature was
created by the provided canister.
DOES NOT perform semantic validation of the claims in the credential.