The ed25519sha256_single signature scheme¶
Tutorial¶
Application¶
This scheme computes a single ed25519 digital signature over the input message. Its output is a ~sig object with the following contents:
{
"@type": "https://didcomm.org/signature/1.0/ed25519Sha512_single",
"sig_data": "base64URL(64bit_integer_from_unix_epoch|msg)",
"signature": "base64URL(ed25519 signature)",
"signer": "base64URL(inlined_ed25519_signing_verkey)"
}
@typeMUST behttps://didcomm.org/signature/1.0/ed25519Sha512_singlesig_dataMUST be the base64URL encoding of a 64-bit integer prepended to the messagesignatureMUST be the base64URL encoding of the resulting ed25519 digital signature oversig_datasignerMUST be the base64URL encoding of the corresponding ed25519 public key used to signsig_data
Verification¶
The successful outcome of this scheme is the plaintext.
- base64URL-decode
signer - base64URL-decode
signature - Verify the ed25519 signature over
sig_datawith the key provided insigner - Further processing is halted if verification fails and an "authentication failure" error is returned
- base64URL-decode the
sig_data - Strip out the first 8 bytes
- Return the remaining bytes