From 24cc6b0db8ef9c718925d14b329f21938e5d2b1b Mon Sep 17 00:00:00 2001 From: Rasmus Dahlberg Date: Tue, 20 Apr 2021 12:28:28 +0200 Subject: started on our in-progress (re)design documents --- doc/schema/sth.schema.json | 50 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 doc/schema/sth.schema.json (limited to 'doc/schema/sth.schema.json') diff --git a/doc/schema/sth.schema.json b/doc/schema/sth.schema.json new file mode 100644 index 0000000..86de2d3 --- /dev/null +++ b/doc/schema/sth.schema.json @@ -0,0 +1,50 @@ +{ + "$schema": "https://json-schema.org/draft-07/schema#", + "title": "signed_tree_head_v0", + "description": "JSON-formatted signed tree head, version 0.", + + "type": "object", + "required": [ "timestamp", "tree_size", "root_hash", "signatures" ], + "properties": { + "timestamp": { + "description": "The number of milliseconds since the UNIX epoch (January 1, 1970 00:00:00 UTC).", + "type": "integer", + "minimum": 0 + }, + "tree_size": { + "description": "The number of entries that are stored in the log's Merkle tree.", + "type": "integer", + "minimum": 0 + }, + "root_hash": { + "description": "The log's Merkle tree root hash in base64.", + "type": "string", + "minLength": 44, + "maxLength": 44 + }, + "signatures": { + "description": "A list of signer-signature pairs.", + "type": "array", + "items": { + "description": "A signer-signature pair.", + "type": "object", + "required": [ "key_hash", "signature" ], + "properties": { + "key_hash": { + "description": "A public verification-key hash that identifies the signer in base64.", + "type": "string", + "minLength": 44, + "maxLength": 44 + }, + "signature": { + "description": "The signer's signature over the log's tree_leaf structure in base64.", + "type": "string", + "minLength": 44, + "maxLength": 44 + } + } + }, + "minItems": 1 + } + } +} -- cgit v1.2.3