Professional Documents
Culture Documents
Paper 1
Paper 1
architecture
01
Secure document storage is provided through the sophisticated Quorum
Constellation system, which guarantees that only permitted users will have
access to document data.
Cronica has three features that makes this solution unique to other
blockchain-based document verification solutions
Programmable Documents
Each document in Cronica is represented in the form of a smart
contract, which stores all document data. Smart contracts are
computer programs that, in addition to storing data, can
execute pre-programmed agreements and data transactions.
User roles
Cronica users have one of three basic roles:
Each Cronica user may be granted one or more of the roles listed above.
02
Document ID
Document IDs are used to uniquely identify each document on the Cronica
platform. When a document is sent to the Issuer’s backend for deployment, the
backend generates a long random string (40-symbol length). This string is a
nonce – a random number that can only be used once – and is incorporated into
a smart contract as a field (secureRandomToken) and deployed to the Quorum
network.
Once a smart contract has been deployed, the Quorum network returns the
smart contract address in a key hash form, e.g., 0xabcde, etc. Concatenated with
the nonce string, it then forms a Document ID.
Document ID = <smartContracAddress><secureRandomToken>
Documents are only recorded as immutable data sets on the blockchain and,
likewise, the nonce string is generated and immediately recorded onto the
blockchain, and cannot change or be altered.
03
Document Storage and
Security
Document Status is a technical field that is calculated from the fields stored in
the document’s smart contract. Document status can be one of the following:
Not Found – document smart contract does not exist on the Quorum
blockchain.
How document data is stored depends on the type of document. Generally, only
the hash of the data is stored (hence, hashed documents) due to the resource
cost of storing document data on the blockchain. For structured documents,
however, document data is stored on the blockchain.
04
Storing of hashed documents
A hashed document is a document that can be displayed to a user without any data
modification. Cronica ensures the document data is consistent, which it achieves by
keeping the hash of the document data within the smart contract, on the blockchain.
Access permissions are limited by parameters set on smart
contract deployment. A hashed document is stored as a smart contract that does not
have document data.
Storing of structured
documents
A structured document is a document that requires some transformation for users to
view it (e.g., a set of financial document data in JSON format that requires conversion to
a PDF template).
Technically speaking, it makes more sense to hash and securely store the original set of
document data rather than saving its representation. Through this, only essential data is
stored until a human readable representation is required (i.e., a PDF), which can be
generated from a template.
For structured documents, Cronica stores the set of data inside a smart contract along
with its hash (for compatibility reasons). This way, document data can be accessed by all
permitted actors from within the Cronica blockchain in machine readable form, without
any need for the Issuer’s servers/resources, or for parsing data from the representation
document.
05
Document data
Document data is stored on the blockchain, while document templates are stored
separately and locally for each actor (Issuer or Verifier). This means that Verifiers
can prove document data exists and match the hash. However, to retrieve the
representation of the document in PDF, the Verifier must claim the PDF directly
from the Issuer via HTTPS protocol. Therefore, the Issuer may or may not enable
a public interface that allows for PDFs to be downloaded, and may filter these
requests on its own.
Such an approach may be necessary if a Verifier has their own template for creat-
ing document representation, which may differ from the Issuer’s template, while
keeping the same set of essential data.
06
Example Flow 1
Document data is stored on the blockchain, while document templates are stored
separately and locally for each actor (Issuer or Verifier). This means that Verifiers
can prove document data exists and match the hash.
However, to retrieve the representation of the document in PDF, the Verifier must
claim the PDF directly from the Issuer via HTTPS protocol. Therefore, the Issuer
may or may not enable a public interface that allows for PDFs to be downloaded,
and may filter these requests on its own.
Such an approach may be necessary if a Verifier has their own template for
creating document representation, which may differ from the Issuer’s template,
while keeping the same set of essential data.
Request Certificate
Publish to Blockchain
Generate
PDF
Distribute Certificate Smart Contract Store a copy of
Certificate data
Validate Certificate by ID
Certificate PDF
07
PDF Templates
PDF templates are stored inside specific template smart contracts: template data
(binary) is incorporated into a permissioned smart contract, between the Issuer
and the Admin. When a document is generated, the document smart contract
references the template smart contract via a hash address. This way, document
data is bound to the specific PDF template, which may contain important legal
references.
Storing templates inside smart contracts has the benefit of making templates
unalterable. Through this approach, template binary data is stored at least once
on the blockchain and templates will always exist within the Quorum network.
A verifier will always be able to generate a PDF to the correct template, as long
as they have the corresponding reference address.
08
<<Template>> <<StructuredDocument>>
+ bytes: recipientName
+ address: template
+ bytes: status
Instantiates
Extend
IncomeCertificate
+ uint64: periodStart
Sub class of basic
+ uint64: periodEnd
structured smart
Template Instance
contract representing
(for Income Certificate) + uint64: income exact certificate
+ string[]: quarterPeriods
+ uint64[]: quarterIncomes
Referencing
by address
Deploy Instantiates
Income Certificate
Deploy Instance #1
Income Certificate smart contract
instances are referencing the same
Template Smart Contract instance.
When PDF is generated, template
Issuer Deploy
data is taken out of exact Document
Smart Contract
Income Certificate
Instance #2
09
Document registration
transaction types
Each document is stored in a way that each actor can validate its authenticity
(i.e., check that the document ID is valid and that it exists on the Quorum
blockchain), but not all the actors can read the document. There are three
ways documents can be stored:
10
Platform
The Cronica platform is built on the Quorum blockchain, originally developed by
JP Morgan, which is a smart contract-enabled blockchain that allows for secure
private transactions and smart contracts.
The diagram below describes the data flow during the upload of a structured
document, along with generation of its PDF representation via a template. The
search process is described both via the Issue’s interface and via the Verifier’s
interface. The difference is that the Issuer’s interface allows for searches by
multiple data fields, while the Verifier’s interface allows for searches on
Document ID only.
11
Actor Actor Actor
Enterprise Enterprise
Internal Internal
System System
Upload Search
Search for Upload Search for
Certificate Certificate
Certificate Certificate Certificate
via API by ID
12
Bank A Bank B
Inter-bank Inter-bank
Quorum Quorum
Quorum Network Quorum Network
Node Node
DB DB
13
Cronica network
administration
Cronica is managed with a single public administration smart contract, in which
all available Issuers are listed. When Cronica is first started, the administration
API deploys the public administration smart contract from the Quorum node it is
connected to. This Quorum node is the only node allowed to make any changes
to this smart contract.
The administration API allows for adding/removing Issuers and changing their
parameters. These parameters enable other Issuers and Verifiers to generate
valid links to the PDF representations of documents, and include the Issuer
Quorum node public key (required for sharing permissioned documents) and
URLs to the Verifier API for redirecting users to PDF representations of the docu-
ments listed by particular Issuers (assuming that each Issuer also deploys a
Verifier API).
http://cronica.io
hello@cronica.io
14