docs
Evidence format
When an envelope is completed, TypeSign produces a set of files that anyone can check without TypeSign's code. This page describes those files and the checks, for version 0.1 of the format. It is a technical format. It makes no claim about the legal level of a signature.
The source repository is not public yet. The specification text and the test vectors will be published with it. Until then, this page is the reference. Version 0.1 will change before 1.0. Each change gets a new schema identifier, and a verifier must reject identifiers it does not know.
The evidence package
A package is four files.
| File | Content |
|---|---|
| original.pdf | The document exactly as it was uploaded and shown to the signers. |
| signed.pdf | The original with the signers' fields drawn in and a certificate page added. |
| evidence.json | The manifest: who signed what, when, and the envelope's history. Stored in canonical form. |
| evidence.sig.json | The platform seal over the manifest. |
What a package that passes every check shows:
- The manifest has not changed since the holder of the sealing key sealed it.
- The two PDFs you hold are the ones the manifest names, byte for byte. signed.pdf is bound to the package through its SHA-256 hash in the manifest.
- The audit events are complete and in order: none was edited, removed or inserted after it was written.
- Every signer is recorded as having signed the same original document and the same request.
What it does not show:
- Who the signer is. The signing method is a one-time code sent by email. That shows control of a mailbox, and the signature is a simple electronic signature.
- That the seal comes from someone you have reason to rely on. The seal proves integrity relative to the sealing key, not the identity of any signer. Whether to rely on that key is your decision.
- An independent time. In the base format every time comes from the server clock. A timestamp from a timestamp service is an optional addition.
- Long-term validation. No revocation information is included.
- Any legal classification. None was assessed, and the manifest says so in its own limitations list.
The manifest
evidence.json is one JSON object. Its schema is typesign.evidence/v0.1. Verifiers also accept open-signing.evidence/v0.1, the same format under the project's earlier name. The example is shortened from the test vectors and indented for reading; the stored file is canonical, with sorted keys and no whitespace.
{
"schema": "typesign.evidence/v0.1",
"evidence_id": "evd_fmj3j7pn16hq6dytqgp489473k",
"generated_at": "2026-12-04T10:00:00.000Z",
"envelope": {
"id": "env_vk0mgtxtyrjry879zhkrs905nj",
"workspace_id": "ws_9kg2w57pdzcx7kqn3zm373d9rj",
"environment": "sandbox",
"title": "Synthetic agreement",
"payload_hash": "bec40f87…",
"sent_at": "2026-12-04T10:00:00.000Z",
"completed_at": "2026-12-04T10:00:00.000Z"
},
"documents": {
"original": { "sha256": "c57cb62f…", "size": 1209, "page_count": 2 },
"signed": { "sha256": "1a61405f…", "size": 6104 }
},
"recipients": [
{
"id": "rcp_4214h3bdcwjmn56vn3m8ka4b29",
"role": "customer",
"name": "Demo Customer",
"email": "customer@example.com",
"method": "email_otp",
"verified_at": "2026-12-04T10:00:00.000Z",
"signed_at": "2026-12-04T10:00:00.000Z",
"intent_text": "I have reviewed the document \"Synthetic agreement\" (SHA-256 c57cb62f…) and I agree to sign it electronically. …",
"signed_document_sha256": "c57cb62f…",
"signed_payload_hash": "bec40f87…",
"field_values": [
{ "field_id": "fld_whqb0rd2ys71rwwgqkx6sazk42", "type": "checkbox", "page": 1, "value": "true" },
{ "field_id": "fld_pwzp5qdxsnngvt8yn09yadck3r", "type": "signature", "page": 1, "value": "customer" }
],
"signature": { "kind": "typed", "text": "customer" }
}
],
"audit": { "event_count": 7, "head_hash": "5a4c3b85…", "events": [ … ] },
"time_source": "server_clock",
"seal": { "alg": "Ed25519", "kid": "spec-vector-key-1", "trust": "untrusted_test_key" },
"limitations": [
"SANDBOX: test envelope without legal effect.",
"Simple electronic signature (SES): signer identity is based on control of an email address (one-time code).",
"…"
]
}| Member | Meaning |
|---|---|
| evidence_id | Identifier of this package. Also printed on every page of signed.pdf. |
| generated_at | RFC 3339 UTC time from the server clock. |
| envelope | id, workspace_id, environment (sandbox or production), title, payload_hash, sent_at, completed_at. |
| documents.original | sha256 (lower-case hex), size in bytes, page_count. |
| documents.signed | sha256 and size. |
| recipients[] | One entry per signer. See below. |
| audit | event_count, head_hash and events[]. See the audit chain. |
| time_source | "server_clock". The manifest itself holds no independent timestamp. |
| seal | alg ("Ed25519"), kid and trust. May also hold certificate {subject, issuer, serial} when the optional certificate seal is used. |
| limitations[] | Plain-language statements of what the package does not prove. |
envelope.payload_hash is the SHA-256 of the canonical description of everything the signers were asked to sign: document hash, title, message, recipients, fields, order and expiry. It is fixed when the envelope is sent. The manifest does not contain that description, so a verifier treats the hash as an opaque value and checks only that every signer is bound to it.
Each recipient has these members:
| Member | Meaning |
|---|---|
| id, role, name, email | The signer as the sender entered them. |
| method | "email_otp" in this version: a one-time code sent to the email address. |
| verified_at, signed_at | When the code was accepted and when the signer signed. Server clock. |
| intent_text | The exact statement the signer accepted. |
| signed_document_sha256 | The hash of the original document the signer signed. |
| signed_payload_hash | The payload hash the signer signed. |
| field_values[] | field_id, type, page and value for each field the signer filled in. |
| signature | kind "typed" with text, or kind "drawn" with image_sha256. |
| network | Optional. ip_address and user_agent, present only when the sender asked for it. The server observed these values; they are not independently verified. |
Verifiers must ignore members they do not know. Those members are still covered by the seal, because the seal is over the whole canonical manifest.
Canonical JSON and the seal
Every hash and signature is computed over a canonical serialisation, so that two parties always hash the same bytes. It is the subset of RFC 8785 (JCS) that the data needs:
- Objects: members sorted by key, comparing keys as sequences of UTF-16 code units. No whitespace. Members whose value is undefined are left out.
- Arrays: elements in order, no whitespace.
- Strings: as ECMAScript JSON.stringify writes them. " and \ are escaped. Control characters below U+0020 use \b \f \n \r \t or \u00xx with lower-case hex. Lone surrogates use \udxxx. Everything else, including non-ASCII and U+2028/U+2029, is written as is.
- Numbers: must be finite, written as ECMAScript Number.prototype.toString does (1, -1.5, 1e+21, 0.000001). The format itself only uses integers.
- true, false and null as usual.
- The result is encoded as UTF-8 without a byte order mark.
input: { "b": 1, "a": [true, false, null], "ä": "å", "A": "x" }
canonical: {"A":"x","a":[true,false,null],"b":1,"ä":"å"}
sha256: 76096114b03304033a1d90c8a4e53f8cd3d00353dc1ebf17547055c12e0ce100A verifier must parse evidence.json and canonicalise it again before hashing. It must not hash the file bytes directly: a manifest that was indented or re-ordered in transit is still the same manifest.
The seal is evidence.sig.json:
{
"schema": "typesign.evidence-signature/v0.1",
"alg": "Ed25519",
"kid": "spec-vector-key-1",
"trust": "untrusted_test_key",
"manifest_sha256": "1b3acba5…",
"signature": "uhf+1XaJ5W6I…"
}| Member | Meaning |
|---|---|
| schema | "typesign.evidence-signature/v0.1". |
| alg | "Ed25519". |
| kid | Identifier of the sealing key. Must equal seal.kid in the manifest. |
| trust | What the producer says about its key. Must equal seal.trust in the manifest. |
| manifest_sha256 | Hex SHA-256 of the canonical manifest bytes. |
| signature | Base64 Ed25519 signature over the canonical manifest bytes. |
The signature is plain Ed25519 (RFC 8032) over the canonical manifest bytes, not over the hash. Public keys are 32 raw bytes, base64 encoded.
To check the seal:
- Parse both files. Canonicalise the manifest.
- Compute the SHA-256 of those bytes and compare it with manifest_sha256.
- Verify signature over the same bytes with the public key.
- Compare kid and trust with seal.kid and seal.trust in the manifest. If either differs, the signature check is invalid.
trust is one of untrusted_test_key, self_managed_key or trusted_certificate. It is a label the producer sets, not proof. A verifier decides for itself whether it relies on a key, from a source other than the package and other than the server that produced it.
The audit chain
audit.events[] is the envelope's history. Each event has seq (1, 2, 3, …), type, at, actor, data, prev_hash and hash.
[
{
"seq": 1,
"type": "envelope.created",
"at": "2026-12-04T10:00:00.000Z",
"actor": "api_key:key_xbh26vezgb27apw4hrk302gn4j",
"data": { "document_sha256": "c57cb62f…" },
"prev_hash": null,
"hash": "79f40ee2…"
},
{
"seq": 2,
"type": "envelope.sent",
"at": "2026-12-04T10:00:00.000Z",
"actor": "api_key:key_xbh26vezgb27apw4hrk302gn4j",
"data": { "approval_id": null, "document_sha256": "c57cb62f…", "payload_hash": "bec40f87…", "quote": { … } },
"prev_hash": "79f40ee2…",
"hash": "da4e65f9…"
}
]The hash of an event covers every other member of it:
hash = hex(SHA-256(canonical({ seq, type, at, actor, data, prev_hash })))prev_hash is the previous event's hash, or null for the first event. The chain is valid when all of these hold:
- Sequence numbers start at 1 and have no gaps.
- Every prev_hash matches the hash of the event before it.
- Every hash recomputes.
- audit.head_hash equals the last event's hash.
- audit.event_count equals the number of events.
The test vectors include one event with its expected hash:
{
"event": {
"seq": 1,
"type": "envelope.created",
"at": "2026-12-04T10:00:00.000Z",
"actor": "api_key:key_example",
"data": { "document_sha256": "abababababababababababababababababababababababababababababababab" },
"prev_hash": null
},
"hash": "88db1dac889f4730f9cafb093805885a0a906320c566a4062902b090a858a911"
}The chain catches what the seal cannot. Someone who holds the sealing key can edit an event and seal the manifest again. The seal then verifies, but the chain does not, unless they also recompute every later hash. The chain makes edits visible; it does not make them impossible for the key holder.
Optional additions
evidence.sig.json may carry three more members. All three are optional. They are outside the Ed25519 signature, which covers only the manifest, so a producer can add them after completion and anyone can strip them. Verifiers that do not know them ignore them. Older packages have none.
{
"certificate_seal": { "format": "cms-detached", "alg": "ECDSA-P256-SHA256", "cms": "<base64 DER CMS SignedData>" },
"timestamp": { "status": "present", "format": "rfc3161", "tsa_url": "…", "token": "<base64 DER TimeStampToken>" },
"transparency": {
"status": "present", "format": "c2sp-checkpoint+rfc6962", "origin": "example.com/log",
"leaf_index": 0, "tree_size": 1, "inclusion_proof": ["<hex>"], "checkpoint": "<signed note>"
}
}- certificate_seal (optional): a detached CMS signature (RFC 5652) over the canonical manifest bytes, ECDSA P-256 with SHA-256, with the signer certificate and chain. If the manifest has seal.certificate, the CMS signer must be that certificate.
- timestamp (optional): an RFC 3161 token whose message imprint is the SHA-256 of the canonical manifest bytes.
- transparency (optional): a proof that the manifest hash is in a transparency log. The leaf is "typesign.tlog-leaf/v1\n" + manifest_sha256, hashed as an RFC 6962 leaf. inclusion_proof proves it at leaf_index in a tree of tree_size whose root is in checkpoint, a C2SP tlog-checkpoint signed note by the log's Ed25519 key.
- timestamp and transparency may instead be { "status": "missing", "reason", "attempted_at" } with reason not_configured, tsa_unavailable or log_unavailable. A verifier reports these as missing, never as valid.
- signed.pdf may also carry a PAdES signature (optional, ETSI.CAdES.detached) by the same certificate, with an RFC 3161 signature timestamp or without one. Its hash is still the one in documents.signed.sha256.
A missing or invalid addition does not change the overall verdict, because anyone can strip or swap them. The verifier reports each one on its own.
Limits that remain: no long-term validation data, no test vectors for these additions yet, and no external witnesses for the transparency log. A producer that holds the seal key and runs the log could still fork it, undetected by anyone who has not kept an earlier checkpoint.
What typesign.dev does today:
- The live seal is TypeSign's own self-managed Ed25519 key. The public key is published at /api/seal-keys.
- The signed PDF carries a PAdES signature made with TypeSign's own certificate, named “TypeSign Seal”. That certificate is on no trust list, so PDF readers report an unknown issuer.
- Timestamps come from DigiCert's RFC 3161 service. They are not qualified timestamps.
- Test mode uses a separate test key, labelled untrusted_test_key.
Verdicts
A verifier takes the manifest, the seal, optionally a public key and optionally each PDF. It runs seven checks. Each check is valid, invalid, indeterminate or not_checked.
| Check | Rule |
|---|---|
| manifest_schema | Both files parse as JSON, the manifest schema is known and the seal alg is Ed25519. If not: invalid, and stop. |
| manifest_hash | SHA-256 of the canonical manifest equals manifest_sha256. |
| manifest_signature | indeterminate without a public key. Otherwise the Ed25519 result. invalid if kid or trust differ between the two files. |
| original_document | not_checked without the file. Otherwise its SHA-256 equals documents.original.sha256. |
| signed_document | The same, against documents.signed.sha256. |
| audit_chain | The rules under the audit chain above. |
| recipient_bindings | Every recipient has a signed_at, a signed_document_sha256 equal to documents.original.sha256, and a signed_payload_hash equal to envelope.payload_hash. |
The report then gives three results:
- integrity is invalid if any check is invalid. Otherwise it is indeterminate if any check is indeterminate or the signature was not checked. Otherwise it is valid. A PDF that was not supplied does not lower the result, but the report says it was not checked.
- certificate_trust is invalid if integrity is invalid. It is valid only if integrity is valid, the key is anchored in the verifier's own trust store (a pinned key, a configured root certificate, or the caller's declaration), and the producer labelled the key trusted_certificate. Otherwise it is indeterminate.
- status, the overall verdict, is invalid if integrity is invalid, valid if integrity and certificate trust are both valid, and indeterminate otherwise.
| Verdict | Meaning |
|---|---|
| valid | Every check passed, and the seal key is one the verifier has anchored itself and the producer labels trusted_certificate. |
| invalid | At least one check failed. Something does not match: the manifest, the seal, a PDF, the audit chain or a signer's binding. |
| indeterminate | Nothing failed, but something could not be established: no public key was supplied, or the key is not anchored, or it is not labelled trusted_certificate. |
A package sealed with a self-managed key or a test key gives indeterminate, never valid. This is by design. valid needs the label trusted_certificate, and a key labelled self_managed_key or untrusted_test_key does not have it, even when you pin that key yourself. Certificates marked as TypeSign sandbox certificates are never anchored. So a package from typesign.dev that passes every check reports integrity valid and status indeterminate: the files are intact relative to TypeSign's key, and the verifier does not vouch for that key.
With the optional additions, the report also has certificate_seal, timestamp, transparency_log and pdf_signature. Each is valid, invalid, indeterminate (it verifies, but not against anything the caller has configured), missing or not_checked.
A report also states, separately: identity assurance (email_otp: control of a mailbox, a simple electronic signature), time evidence (server_clock_only, or rfc3161_timestamp when a timestamp verifies against a timestamp authority root in the verifier's trust store), long-term validation (not_supported) and that no legal classification was assessed. A verifier must not collapse these into a single green mark.
How to verify
In the browser. Open the verifier and add the files. It reads them locally in your browser; the files are not uploaded. By default it uses the public key this site publishes at /api/seal-keys. That key comes from the same server that produced the package, so it is not an independent source. You can supply a key you obtained another way.
On the command line. typesign verify <dir> reads evidence.json and evidence.sig.json from the folder, and signed.pdf and original.pdf if they are there. It runs offline unless you ask it to fetch the key.
# The folder holds evidence.json and evidence.sig.json, and signed.pdf and original.pdf if you have them.
typesign verify ./evidence --key-from https://typesign.dev
# With a key you obtained yourself (base64, 32 raw bytes):
typesign verify ./evidence --key BASE64
# Exit codes: 0 valid, 1 invalid, 3 indeterminate| Exit code | Verdict |
|---|---|
| 0 | valid |
| 1 | invalid |
| 3 | indeterminate |
--key-from fetches the key from /api/seal-keys at the address you give. That is convenient, not independent: get the key through another channel and pass it with --key when it matters. --json prints the full report. In a script, treat exit code 3 as “intact as far as could be checked, key not established”, not as a pass.
Test vectors and your own verifier
Anyone may implement a verifier. The test vectors say what a correct one must report. A file named cases.json lists the cases. Each case names the manifest and seal files, a base64 public key or null, optional PDFs, and the expected result: status, integrity, certificate_trust and every check.
{
"name": "broken-audit-chain",
"description": "An audit event was edited and the manifest re-sealed with the real key. The seal is valid; the chain is not.",
"manifest": "broken-audit-chain/evidence.json",
"signature": "broken-audit-chain/evidence.sig.json",
"public_key": "t4lqPwonbBfzOAHfIzGskagkxP1xcrZmZRpmhnRzDis=",
"expected": {
"status": "invalid",
"integrity": "invalid",
"certificate_trust": "invalid",
"checks": {
"manifest_schema": "valid",
"manifest_signature": "valid",
"manifest_hash": "valid",
"original_document": "not_checked",
"signed_document": "not_checked",
"audit_chain": "invalid",
"recipient_bindings": "valid"
}
}
}| Case | What it tests |
|---|---|
| valid | Untouched package with all files and the right key. Expected status: indeterminate. |
| valid-without-pdfs | Only the manifest and seal are supplied. The PDF checks are not_checked. |
| no-public-key | No key supplied: the seal cannot be checked. Integrity is indeterminate. |
| wrong-public-key | A different Ed25519 key. Invalid. |
| non-canonical-file | Manifest indented with keys in another order. Verifiers canonicalise before hashing, so it still verifies. |
| tampered-manifest | A recipient name was changed after sealing. Invalid. |
| tampered-signed-pdf | One bit of the signed PDF was flipped. Invalid. |
| swapped-pdfs | Original and signed PDF supplied in each other's place. Invalid. |
| broken-audit-chain | An audit event was edited and the manifest sealed again with the real key. The seal is valid; the chain is not. |
| audit-event-removed | The last audit event was removed and the manifest sealed again. Invalid. |
| recipient-bound-to-other-document | A recipient's signature refers to another document hash; sealed again. Invalid. |
A second file, canonical.json, has inputs with the expected canonical string and its SHA-256, and one audit event with its expected hash. The vectors are synthetic. The key that sealed them was generated for the purpose and discarded. It is labelled untrusted_test_key, so no case expects status valid.
To write your own verifier:
- Implement the canonical serialisation and SHA-256. Run the canonical.json inputs through it first; nothing else works until those match.
- Parse both files. Reject a schema you do not know, and a seal whose alg is not Ed25519.
- Check the manifest hash and the Ed25519 signature over the canonical bytes. Compare kid and trust across the two files.
- Hash each PDF you were given and compare it with the manifest.
- Walk the audit chain.
- Check every recipient's bindings.
- Combine the checks into integrity, certificate trust and status with the rules under Verdicts.
- Run every case in cases.json and compare your report with expected, check by check.
Use an existing library for SHA-256 and Ed25519. Do not write them yourself. Take the public key from a source other than the package. Never let a key labelled untrusted_test_key lead to valid.
There is a second profile for documents a person signs on their own, with the schema typesign.self-sign-evidence/v0.1. Its manifest differs: the server never receives the PDF, the signer's name is self-asserted and not verified, and there is no audit chain. It has its own test vectors. A verifier that only implements the format on this page must reject that schema rather than guess.
Licence
The specification text is licensed under Creative Commons Attribution 4.0 (CC BY 4.0). Attribution: “TypeSign evidence format, © Finfint AB (in formation) and the TypeSign contributors, CC BY 4.0”. The test vectors are dedicated to the public domain under CC0 1.0. The reference verifier is MIT licensed. The TypeSign name and logo are not covered by these licences.
The specification text, the vectors and the reference verifier will be published with the source repository. Until then, this page is the reference.