Thales transaction signature extension
The Thales transaction signature extension dynamically links a FIDO authentication to a specific transaction. For example, a transaction could be a financial operation, such as a transfer or payment, or the signature of an official document. The Thales extension derives the standard FIDO challenge from the transaction data provided by the application. The FIDO authentication includes the cryptographic signature of this challenge.
Requesting a transaction signature
FIDO expects two inputs to perform a transaction signature:
-
Textual transaction details: These details are intended to be shared with the client-side application (the mobile or web application), so that is can be displayed to the user to visualize what is signed before the signature happens. It is up to the application to chose which information to include in this data. For example, it can contain the different attributes of a transaction, such as the amount and beneficiary of a bank transfer, or the reference of a document to sign. This data is encoded as a JSON array, where each array element is an object with a single property associated with a string value.
javascript [ { "date": "2023-12-22T08:28:02.361Z" }, { "amount": "423" }, { "currency": "EUR" }, { "beneficiary": "ACME inc." } ] -
A transaction digest: Depending on the use case below, this digest can either be computed by FIDO from the transaction details above, of be computed by the backend application using the inputs and algorithm of its choice. For example, the transaction details can contain the reference to a document to sign, and the digest can contain the digest of the document itself.
FIDO generates the signature challenge by combining the digest and a random generated nonce, using the following algorithm:
challenge = SHA256(nonce | scheme | transaction-details )
The nonce ensures that the signature is unique, and the scheme is an internal algorithm identifier.
The computed challenge is used as the FIDO2 authentication challenge, and can be processed by authenticators as any random authentication challenge. This ensures compatibility of the Thales transaction signature extension with all FIDO authenticators.
Using web APIs
When not using the mobile SDK, the back-end application initiates the signature using the assertion options web API, including the thalesgroup_txn_ext_v1 extension object in the request payload. This object must hold two values:
txnDetails: The transaction detailstxnDigest: The base 64 URL encoding of the transaction digest computed by the application
{
...
"extensions": {
"thalesgroup_txn_ext_v1": {
"txnDetails": [
{ "date": "2023-12-22T08:28:02.361Z" },
{ "amount": "423" },
{ "currency": "EUR" },
{ "beneficiary": "ACME inc." }
],
"txnDigest": "mhUF25kLkK6umOEA3pZWHlF1miCnVCNrNiTY1mEt8eo"
}
},
...
}
The generated assertion response includes the same thalesgroup_txn_ext_v1 extension, augmented with two values computed by the FIDO server:
nonce: A base 64 URL encoded random, to ensure uniqueness of the signaturechallengeDerivationScheme: An identifier of the challenge derivation algorithm
These values are not meant to be processed by the application, they are only included here for auditability of the signature.
The application should display the transaction details to the user, to provide the context of the requested signature, and ask user consent to proceed with the signature. The application can then call the standard WebAuthn navigator.credentials.get API to get the signature, and send it back in the assertion result.