---
# System prepended metadata

title: Signature decorator

---

# Signature decorator

## Construct signature decorator

1. `value` = payload to be signed
2. `etime` = current time in epoch seconds (UTC timestamp)
3. `etime` = convert `etime` to unsigned int 8 byte big-endian encoded string.
4. `combined_value` = prefix ascii encoded string `value` with `etime`
5. `signature` = indy SDK `sign_message(combined_value, verkey (corresponding to the did:mydata identifier))
6. `esignature` = encode `signature` 
   1. base64 URL safe encode `signature`
   2. convert bytes to ascii string
   3. strip `=` padding characters from right end of the ascii string
7. `ecombined_value` = encode `combined_value`
   1. base64 URL safe encode `combined_value`
   2. convert bytes to ascii string
   3. strip `=` padding characters from right end of the ascii string

8. construct the signature decorator as given below,
```
{
    "@type" : "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/signature/1.0/ed25519Sha512_single",
    "signature": esignature,
    "sig_data": ecombined_value,
    "signer": verkey
}
```