Copyright © 2022 Fraunhofer Institute for Applied Information Technology. This document is available under the W3C Document License. See the W3C Intellectual Rights Notice and Legal Disclaimers for additional information.
This section describes the status of this document at the time of its publication. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at https://www.w3.org/TR/.
By publishing this document, W3C acknowledges that the Submitting Members have made a formal Submission request to W3C for discussion. Publication of this document by W3C indicates no endorsement of its content by W3C, nor that W3C has, is, or will be allocating any resources to the issues addressed by it. This document is not the product of a chartered W3C group, but is published as potential input to the W3C Process. A W3C Team Comment has been published in conjunction with this Member Submission. Publication of acknowledged Member Submissions at the W3C site is one of the benefits of W3C Membership. Please consult the requirements associated with Member Submissions of section 3.3 of the W3C Patent Policy. Please consult the complete list of acknowledged W3C Member Submissions.
This section is non-normative.
Information sharing between parties on the Internet is omnipresent. However, there is a severe lack of efficient and scalable methods to prove the existence, contents, and context of a data transfer.
Especially in the context of data-driven business models, data trustworthiness and reliability are extremely important to minimize data quality-related risks in the business model. Therefore, an approach, which is able to guarantee both of these properties in the context of data sharing, and scale up to the future needs w.r.t. data throughput, is needed. The relevance of inter-organizational data sharing is stressed by the vision of an Internet of Production (IoP), where open data sharing approaches leverage cross-domain collaboration, resulting in a multitude of benefits for all participants [TowardsIoP].
In this document, we describe ReShare (Reliable Data Sharing through Digital Transmission Contracts). ReShare provides data integrity, authenticity, and immutability in data exchanges between two parties through digital contracting using on-demand bilateral signatures. By establishing an irrefutable commitment by the two parties to the data transmission, data trustworthiness, and reliability emerge.
ReShare is a unified solution for the Web, built from open Web technology, and adresses an important research gap. That is, ReShare is both highly scalable, and does not rely on pre-existing trust relations, which both are essential requirements in the context of the Web.
ReShare employs signature-based strong data immutability to be feasible as a unified solution for the Web. Further, the design provides a system which is flexible to the payload (i.e., the shared data to be made trustworthy and reliable), and therefore supports any Web resource or content, including plain text, Linked Data payloads, JSON, and binary data, amongst other formats.
The structure of this document is as follows: In Section 3. A Primer to Data Sharing, we introduce the relevant terminology and outline typical data sharing scenarios motivating the need for scalable immutability, authenticity, and integrity. In Section 4. Digital Transmission Contracts (DTCs), we describe the paradigm and structure of Digital Transmission Contracts (DTCs), which are at the core of ReShare. After that, we propose the ReShare ontology in Section 5. The ReShare Ontology, which is used to define the semantics of DTCs in the context of Linked Data. Finally, we describe the generation and verification mechanisms needed to process DTCs in Section 6. DTC Generation & Verification.
As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
The key words MAY, MUST, MUST NOT, SHOULD, and SHOULD NOT in this document are to be interpreted as described in BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
This section is non-normative.
For a formal understanding of data sharing and its applications, Section 3.1 Background gives an introduction to data sharing, and Section 3.2 Terminology formalizes the used terminology. In Section 3.3 Example Scenario, we introduce a use case scenario which we use throughout the remainder of the document for clarifications and examples.
Data sharing is a central concept of the Web. In recent years, fueled by developments in data-driven business and industries, challenges of fitting the process of data sharing to more advanced requirements, such as trustworthiness and reliability, have emerged.
As the source of data used in industrial collaborations often is external, it has no inherent trustworthiness compared to self-produced data. This increases the risk of legal and safety issues for the data user, as the liability for incidents caused by the data cannot immediately be attributed to its source.
Solving the challenges of data trustworthiness and reliability has been shown to enable a variety of novel business models based on data-driven decision making [OEZER-TRUST], where the data sharing process is made transparent to the data users through the ability to reliably trace the provenance of data. Further, data sharing in inter-organizational collaborations has been shown to provide the basis for benefits such as cost reductions, increased profit margins, and general improvements in product quality and safety [TowardsIoP].
Wherever corrupted or forged data imposes a relevant risk, the user should carefully assess the trustworthiness of its data. That is, users need some rationale for trusting the authenticity and correctness of data. This rationale may be a strong trust relationship with the data source, some form of digital proof of authenticity and integrity, or even the result of manual data curation.
Especially in safety-critical environments, the data user might need confidence in the reliability of data, i.e., that the data itself is valuable and usable beyond its initial use, i.e., it should keep its initial value to the user. One relevant aspect of data reliability is that the data source cannot easily repudiate the state of the shared data later, neither by forging contradicting data, nor by repudiating the earlier data transmission at all.
Similar as for data trustworthiness, some kind of rationale for this reliability is necessary, e.g., a strong pre-existing trust relationship with the data source, or some kind of mechanism to notice adversaries by the data source and solve the resulting conflicts.
The Web is a prime candidate to enable reliable data sharing as it is commonly used to exchange information between different stakeholders. As the importance of Open Data increases steadily, a system for trustworthy and reliable data sharing built using open Web standards and technology can both profit from the inherent data sharing capabilities of the Web, and facilitate integration into an Open Data paradigm.
Existing approaches to trustworthy and reliable data sharing, such as mutually trusted mediators and distributed ledgers, might be applicable to small-scale use cases with either pre-existing trust relations or low requirements to system scalability. However, Web-scaled systems have specific, more challenging needs. First, the possible limitation of a trust assumption in a system would severely limit its potential, as common trust in a central mediator can hardly be assumed in a global network such as the Web. Second, existing no-trust solutions, such as manual data curation and even distributed ledger technology, do not meet tomorrow's needs toward scalability for efficient usage on the whole Web.
This section is non-normative.
In the following, we introduce the necessary terminology used throughout the document.
This section is non-normative.
While the presented terms and concepts may have different definitions in practice, ReShare builds on the terminology introduced in the following.
We define data to be immutable if it can be uniquely referenced, and that reference always refers to exactly the same data at any point in time. This directly implicates that once published, data cannot be manipulated afterward without assigning a different identifier.
We further differentiate between weak and strong data immutability:
It is unclear whether a perfect strong immutability system can practically exist. Most systems striving at providing strong data immutability come with practical assumptions and limitations. For example, the consensus state of a distributed consensus mechanism can be determined with a high probability, but not with full certainty. Furthermore, if a large proportion of the participants of a consensus network collude, the immutability guarantee cannot hold.
This section is non-normative.
An immutable revision of a resource, uniquely and persistently referenced through an IRI specific to the revision. This implies that given the IRI, the data identified by the IRI cannot be altered. In this context, the persistent IRI of a fact can also be referred to as a FactID.
The term originated from FactDAG, a formalization model of data interoperability which was proposed in a research paper by Gleim et al. [FactDAG], where it denotes a data point that was explicitly made immutable by means of a revisioning system.
This section is non-normative.
We employ an example scenario of inter-organizational data sharing in aircraft manufacturing to clarify the concepts and terminology introduced above.
This example considers the supplier-manufacturer relation in the highly-regulated and safety-critical process of aircraft engineering.
Three parties are involved in the scenario: Two part suppliers, A-Corp and B-Tech, as well as a manufacturer C-Aviation, which assembles the final product (here: aircraft).
In this simple scenario, both A-Corp and B-Tech supply parts (wings and propellers) to C-Aviation. Additionally, besides a flow of physical products, a dataflow exists in parallel. The data might include relevant production data, conformance certificates, etc.
In this dataflow, A-Corp and B-Tech are the senders, and C-Aviation is the receiver.
Further, the precision of the placement of a certain rivet used in a wing by A-Corp might be a resource as part of the production data shared with C-Aviation. By using a revision identifier, e.g., the timestamp of measurement, the resource can be lifted to an immutable resource revision, i.e., a fact.
The scenario, including the flow of physical goods and data, is visualized below.
Data shared between the parties is used in processes such as production and audits, which are critical for product safety. Thus, it is extremely important that C-Aviation assesses the trustworthiness and reliability of the data. These properties can reduce the risk of data-caused damage or shift liability for said damage to the suppliers.
To establish a common ground of trustworthiness and reliability, C-Aviation agrees upon a conformance agreement in the form of a paper-based contract with its suppliers. This practice naturally is a labor-intensive process, as such documents have to be created, sent between the companies, and archived physically. Here, the data storage layer comprises physical archives, where the paper-based contracts are stored.
After describing the concept of DTCs in the following, we will discuss an application to this scenario together with corresponding benefits in Section 4.2 Application to the Example Scenario
This section is non-normative.
DTCs leverage digital signatures to create strong data immutability within a defined scope, which we further describe below. DTCs deviate from the common paradigm of document signatures by enforcing the signatures to be created during data transmission, thus allowing to involve a second party, the receiver, in the signature process.
For a clear differentiation, we can classify common uses of signatures into one of the following two paradigms:
The terms of pre-created and on-demand signatures are not canonical, as a clear differentiation between these signature paradigms can rarely be found in literature.
DTCs are linked to a specific data transmission and comprise a signature by both the sender and the receiver. Therefore, the signatures cannot be pre-computed during publishing, i.e., they are on-demand signatures.
Because the receiver signs the state of the data, the sender alone cannot forge a valid DTC by itself. Therefore, as long as sender and receiver do not collude to forge rogue signature pairs, the valid DTC can unambiguously be determined by the pair of valid signatures by both parties. Thus, this approach provides strong data immutability under the assumption of no inter-party collusion.
While the assumption of no inter-party collusion may seem limiting at first, it still covers a substantial set of use cases, i.e., inter-party conflicts of sender and receiver. Thus, DTCs can be applied wherever sender and receiver do not trust each other and want to have mutual proof of the data sharing process. In our example from Section 3.3 Example Scenario, this assumption covers a variety of possible scenarios, including proving data authenticity in liability conflicts and creating secure and non-repudiable product conformance and quality certificates between C-Aviation and the two suppliers.
If the receiver would not sign the DTC, the sender could create signatures for arbitrary data. If a rogue sender would now sign different versions of the same fact, the correct version of the fact would become ambiguous, thus violating the data immutability.
In the example from Section 3.3 Example Scenario, the production data of a propeller supplied by B-Tech may hint at a production fault that leads to an incident with the respective airplane. During the incident inspection and liability process, B-Tech might now supply corrected data together with valid certificates and thereby claim that the supplied parts were not faulty to the best of their knowledge. The data immutability is violated in this case, as one cannot unambiguously determine the original version of B-Tech's production data.
This section is non-normative.
In Section 3.3 Example Scenario, we introduced an exemplary scenario from the aviation industry. The original process relied on costly and management-intensive paper-based contracting and archiving methods.
If the concept of DTCs is applied to the exemplary data sharing process, substantial parts of the system can be implemented digitally. These parts comprise of
The application of DTCs within the data sharing process is visualized below.
In the example scenario, a DTC is linked to all three layers of the data sharing process:
DTCs have a defined object structure. Its components are defined as contract fields.
In the following, we define the content and substructure of the contract fields. All fields not explicitly marked as optional MUST be present in any valid DTC. A valid DTC MUST NOT contain any fields which are not specified below.
To disambiguate between the terms defined in Section 3.2 Terminology and the contract fields above, contract fields are always typeset as red-orange monospace font, e.g., sender
vs sender
).
baseIRI
The base IRI which can be used to uniquely identify the DTC.
The base IRI is selected by the sender or receiver during the DTC generation handshake (see Section 6.1 DTC Generation Handshake) and is used as both the IRI for the DTC itself, as well as an IRI prefix for its subcomponents in the JSON-LD representation (see Section 4.4.2 JSON-LD)
The base IRI SHOULD end with a #
delimiter, i.e., the "#" ifragment
part,
where ifragment
is empty, such that the sub-IRIs assigned in the JSON-LD representation (Section 4.4.2 JSON-LD) use the ifragment
part to identify the subcomponent.
sender
Identity of the sender, i.e., the sender's IRI and a public key certificate.
The IRI uniquely links the DTC to the sender, and the public key certificate contains the public key needed to verify the sender's signature contained in
.
senderSig
The
field has the following subcomponents:sender
authID
cert
field.
A discussion on linking the certificate to the authority IRI can be found in Section A.2 Identity Management.
cert
type
"X509"
/"X509-single"
for a single X.509 certificate,
"PKCS7"
/"X509-PKCS7-chain"
for a certificate chain bundled into a PKCS #7 message [RFC2315].
These two types MUST be implemented.
While we do not specify other types in this document, this field can be used to implement different certificate types in future extensions.
encoding
"base64"
, which refers to the certificate (chain) in DER notation encoded using Base64 [RFC4648].
The purpose of this field is both for the data structure to be self-describing and to allow for possible extensions of other encodings.
receiver
Identity of the receiver, i.e., an IRI and a public key certificate.
The IRI uniquely links the DTC to the receiver, and the public key certificate contains the public key needed to verify the receiver's signature contained in
.
receiverSig
The substructure is equivalent to the
field.sender
senderSig
The contract signature created by the sender according to Section 4.5.3 Signature Creation.
The
field has the following subcomponents:
senderSig
sig
encoding
field (see below).type
"urn:oid:1.2.840.113549.1.1.10"
, which is the Object Identifier (OID) [RFC3061] of the RSASSA-PSS
signature scheme as defined in PKCS #1 v2.2
[RFC8017].
We use the URN Namespace of Object Identifiers
[RFC3001] to make the identifier interpretable as an IRI.
The purpose of this field is both for the data structure to be self-describing and to allow for possible extensions of other signature schemes.
encoding
"base64"
, specifying that the signature value is encoded using Base64 [RFC4648] according to Section 4.5.3 Signature Creation.
The purpose of this field is both for the data structure to be self-describing and to allow for possible extensions of other encodings.
receiverSig
senderSig
.
facts
A set of one or more fact checksums.
This field binds the DTC to the state of the transmitted data by including fact checksums, which are implemented using cryptographic hash functions.
Any implementation SHOULD interpret this field as an unordered list. Whenever a canonical representation is needed, the set MUST be transformed into an ordered list by sorting the elements lexicographically by factID in the UTF-8 encoding [RFC3629] (e.g., see Section 4.5.2 Pre-Processing).
A single fact checksum has the following subcomponents:
factID
facts
.
requestedID
factID
(e.g., in order to provide a persistent fact IRI for long-term referenceability).
In this case, this field contains the IRI which was originally requested.
The procedure of updating the factID
is included to support factID negotiation.
Example scenarios:
factID
to identify an immutable fact.
factID
into a new one.
<alg>
The checksum, created by hashing a serialization of the fact.
The hash algorithm MUST be specified through the field name, i.e., <alg>
MUST be replaced by one of the supported algorithms listed below.
The hash values MUST be encoded as a hexadecimal string, i.e., using digits and the letters a-f or A-F. The encoding SHOULD use lowercase letters.
The supported hash algorithms are cryptographic hash functions, so that an attacker cannot forge data that collides with the checksum. Such a vulnerability could lead to misuse of existing DTCs, or ambiguity w.r.t. the verifiability of the underlying data.
Currently supported algorithms:
sha256
, sha384
, sha512
: Variants of SHA-2 FIPS PUB 180-4: Secure Hash Standard (SHS)serialization
"binary"
: A (trivial) binary representation of the fact"string"
: A (trivial) string representation of the fact"canonical_json"
: A representation of the fact as canonicalized JSON according to the JSON Canonicalization Scheme (JCS) [RFC8785]."URDNA2015"
: The Linked Data associated with a fact, serialized as normalized N-Quads [N-Quads] according to the URDNA2015
algorithm.
We recognize that Linked Data canonicalization is an open issue, and the specification of the specified algorithm is at a draft status. As the algorithm is not a direct component of ReShare, and we argue for an extensible serialization identifier scheme, we consider this remark to be tolerable.
"binary"
identifier) can be considered trivial, as JPEG is a binary file format and does not need to be transformed.
A JSON document, however, cannot be trivially serialized as a binary object without transformations, as the choice of the character set, the canonicalization scheme, etc. are ambiguous.
senderCustomContent
/receiverCustomContent
(Optional) DTC fields that MAY be used to add custom content or metadata to a DTC as a JSON object.
If one of these fields is present, it MUST contain exactly one JSON object (i.e., enclosed by curly brackets).
timestamp
By default, DTCs are represented as JSON [RFC8259]. To make DTCs interpretable as Linked Data, we further define an associated JSON-LD [JSON-LD11] context. We deem JSON the default representation, as it can be transformed to the JSON-LD representation without context by the procedure defined below, and thus reduces the overhead in storage and transmission of (partial) DTCs.
Any implementation MUST support the creation, validation, and interpretation of the JSON DTC representation, which we describe in Section 4.4.1 JSON.
Implementations MAY support the transformations from and to JSON-LD. In this case, these transformations MUST be implemented according to Section 4.4.2 JSON-LD.
We define a default JSON representation for DTCs. Every contract field is represented by a root-level submember of a JSON object. The content of each field and sub-field is described above in Section 4.3 DTC Data Structure.
To specify the structure of the JSON representation of a DTC, we build upon the specification of JSON Schema
[JSON-SCHEMA][JSON-SCHEMA-VALIDATION].
While we recognize that this specification is still in a draft state, we find this tolerable due to the nature of this document being a member submission.
We further specifically use the 2020-12
version of the draft of JSON Schema to avoid ambiguities.
We define three schemas: The schema for a partial DTC, the schema for a complete DTC, and the schema for a partial DTC, where only the two signatures may be missing. The two latter schemas extend the partial DTC schema by requiring the fields to be present.
For a JSON representation of a DTC to be syntactically valid, a JSON schema validator implemented according to the 2020-12
version of JSON schema MUST successfully test the JSON representation to the JSON schema of a complete DTC.
In the following, we give an example of a complete DTC as a JSON object, according to the descriptions above.
The contract contains four fact checksums (in facts
), where the fact
itself could trivially be serialized as a string.
The public key certificates (in sender
and receiver
)
are single X.509 certificates directly signed by an imaginary root CA.
{
"baseIRI": "https://example.com/contracts/2021-09-24/134",
"sender": {
"type": "X509",
"encoding": "base64",
"cert": "MIIEkTCCAnmgAwIBAgIUTpTAugWv4ZYQX9nk2zETfVcMi38wDQYJKoZIhvcNAQELBQAwTDELMAkGA1UEBhMCREUxEzARBgNVBAgMClNvbWUtU3RhdGUxEzARBgNVBAoMCkV4YW1wbGUgQ0ExEzARBgNVBAMMCkV4YW1wbGUgQ0EwHhcNMjEwNDE1MjExMTExWhcNMjIwNDE1MjExMTExWjAzMR0wGwYDVQQKDBRFeGFtcGxlIGNoYWluIGNlcnQgMTESMBAGA1UEAwwJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvw8C6sqLUVSOwFPbZsqS/1cL/+7aaaxVPwXs7TjPVombwNLyJW8yPyyQLbsTN5evVCpNdzciYc9Nhh77AYrqCiOsZBb7hu/PMqNqDvU2FAHeTH9KZ1PSpsOdgzG4i9widL6FBKGrxvlyj0G5ztQoGtymJFdmQ8K/ZN2W5Bi27H24UgITO+mX5MGmzFfyib7bDnvNqZUMJEgpSGt+jUf/7pMtuQqusrE1bfg5vvCbHIPHx2KXqzQEjNiioDafzKjIY2NSakis1AZe+J46o/Za0L8TUMXPvO1nSX4VMm9w5Qqf8auKdlUnT7fVqGKxQvPgX/JM/ksduZqZdTE1giWDgQIDAQABo4GDMIGAMB0GA1UdDgQWBBQtTnbTodwlQnP0QXA2VRv6DBWgzzAfBgNVHSMEGDAWgBR+/85DLJ8v0EP1y6kv/I9XPsHQ5TAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEwDQYJKoZIhvcNAQELBQADggIBAG47hxcjEY6kXojCadK15iW5t6P2p2NCfXpymeRuVaHiI7hhMwQEPymGqXZe0MKUKaRxb9BssG9UvndJw7PWdLx55Y498dgEVXWp7UWUg+VmLxE0wrS+7odJ6ZwsSTPhlgQVF3y9SOP18UX1Iy+ipkdPVbeiQB2QJOYLdxj3h26a/BevyWJU7jTbZO9fNX3FlopyQbB64QPJKJyQiYrT1td7lOcreyBJUS2e5p+hifW/ukxHQ9QtfN+mE/MlnUSHar6LgXPX3AoiVKc14L5E7jRHLDCvFWO1PfVCsS6RWIKdoWsEUytDnMYLHb2TmMJWQf8S69BLyqgEhKXNS9hZceGr32jM9O6TepYKZNH5A1QLjZcuHHKUAzXMjM9loNLra/VGcqrMTdZYautGl8EdEURqE063qDd+Hsp3Vqw0iALQHcbEb6R1b2o5dIrczo+PINTSvnFv+4GyqznXEYjcueLrR/R6kE9GNOiPUxpont+0s1JCAKPaaZk97Z09ldtD47rPQLQgWopDadVOm3Gu9+ef7uqqpJw9+q384mqgw4P1Yws6aVkXLdvh8MCXcMEYi2AeQVCCZv2CjAh8CZQC+0P2JtkhWlCxPoSDk4jbm6koCxcpL3CRcc5LtTTrev5+Mi0oDMiLzx09GNls3SQzdKdP9PM+Y7E7y4Xi2LW3FtoG",
"authID": "http://example.com/sender"
},
"receiver": {
"type": "X509",
"encoding": "base64",
"cert": "MIIEkTCCAnmgAwIBAgIUTpTAugWv4ZYQX9nk2zETfVcMi4AwDQYJKoZIhvcNAQELBQAwTDELMAkGA1UEBhMCREUxEzARBgNVBAgMClNvbWUtU3RhdGUxEzARBgNVBAoMCkV4YW1wbGUgQ0ExEzARBgNVBAMMCkV4YW1wbGUgQ0EwHhcNMjEwNDE1MjExNDM1WhcNMjIwNDE1MjExNDM1WjAzMR0wGwYDVQQKDBRFeGFtcGxlIGNoYWluIGNlcnQgMTESMBAGA1UEAwwJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuKe4H5GwuaKS02s6oAnQF0e30TLyB3joT5GNzwa94WXuLjU8SWKqOjLQyIN2ZBtZW1jNI3By6nsPoU3t181SBStFI25JZ8PUvJ9/Skf/adRmrtXHX8MYRBqN4d1JIRdOoLxwq+bI0UIyMmMNMTjvhnWwTx4FkXwup5fna9FFBbtOGP+7vMVl98L2/bDMJwwLdnzUs0CKLyqDRx0XWAnp6R6CN9YDeMgpdDviMkBfeY74AJ084v6pWnx+K0PlUuQAkiuPvcRsDxgjHRO18rq4wA6Dxh6My7Xh/uHFzb5cmLT7C7kfr+WN26va8IRGCF8NWdOYQ0HSo/vbY/eIOB/G0wIDAQABo4GDMIGAMB0GA1UdDgQWBBSmlyw0Ht9gF3rnI42Us1dK9+jZ/DAfBgNVHSMEGDAWgBR+/85DLJ8v0EP1y6kv/I9XPsHQ5TAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEwDQYJKoZIhvcNAQELBQADggIBABMLMfSOAwk34LEK9L/A1qtHTJPQ2BF3XjnbswINNao0oOI3PSWKU0weWYlITH29hgyzrwO8A9ifaOFPtsRxe9/UNv6RNqwObLpxF+f2U3ulu2hTzd7l/ZXUGYaBUHLL3Cu1JlZWMRoTUBUHAvkwnQlUkQLJZ7A+N9y+FfV5apIMTwPA+C2lwiVtEd3Hje5Z9lUmjwiARRnsliRuCm2ZY0IHvneQN7NnOFCFFQQnu/7wMEywNWR3NMtj5AcMugs56OqcAglwq+HqYNCUkelt1/I7A/NwitaPEYu/1TDjQBckR6nbtJwHKFx2M9heB+E5iMI65r+ae01jBr+r7tes6UdEz7SCF3xHks3ubKfRQykZzTZ7ixeHYG5XjaUSSk8EDuBCdZOJ/AUAA+Rar/UPODUd1YQUZDUqs0MvB9zXQYBtEhwii75pCmkFBpZewo6xyktdP3964q7MZPZQZTZimh02CxcWdXZj6JkoL6ihuM36UciS9rXUgIGGdJcbhC5mP/PqRYsAzipOvQiRL7mGRB9L8H0Wt08yl3H0KFwGcgasML8tOOkf+4MsGIHJZaJ20cVfdWm1StOtLN1Bn+gAppq8nlvDgPiQ3NxSsvY+Qpb0WSVWknc1VyOPKexKaM20/alMv/fykVhVmmAcNVshIMAuKV5TnhqeZyg8L02pVAHL",
"authID": "http://example.com/receiver"
},
"senderSig": {
"type": "urn:oid:1.2.840.113549.1.1.10",
"encoding": "base64",
"sig": "S82Al/YgpfjywjagQ03tjr8WT2oiMSkuYGA5hoXL/LCZHJhR4UGuXyQe1lJ6+yDRiN8FbKcp6ZrClb645rKpIK9UP/Y50wOo/vXCdeUGRqWj4NduoJsBKAP9O4QfQQkT9POHwcbYDsbvEGm3M7fh7mrOn6PzQQgq8vNGayVP5VmFLofxhArc2cy7/TthDl5sBwngpIokHUGOIE+RXasifJ/KS+DALU2s51EZzP2NuTbOvC2328UD5yhvHTopwqn3OrMWbKjF8UUDFjQHYx383hrK3VPjqfrMMNT3OHiJB6t9pJwZ3lmD3PV0Axp6k1XV+oxckBaYN7dCNneQn+zkcw=="
},
"receiverSig": {
"type": "urn:oid:1.2.840.113549.1.1.10",
"encoding": "base64",
"sig": "P70POEihM3V+pX+lPmvyoDzhERRuuat4P+jGIN/ME1n4hrl9vHb7l8yXy04iT2lNRXv2wkPfPC55nNCTCjWkPhF9Ca6KM6km0BHanPT9J7DZYuCes3RiPwEqO2UsVVZMxj/kMpwu0X23+SHjpAycGY7M/ZRG5iasQiu4N4f/O6pmNTOE6AqpgdhqACqUInbCN3afbdIUnFdbQSRn16VKmrmgUtus5XrVMsCEEZ3xlw8Pl+1toHgWllK4bnm3+DO4wdNb9wvM5TMrqCGHGZOkkxdlZ2pK3uSHuWtvifA49Ks113giNz6ZNjbWvmq9AJRY8/qVQUCBwZaBeSBqZRUMMw=="
},
"facts": [
{
"factID": "http://example.com/facts/fact1",
"sha256": "5fc62b0e99a143ff2b99b56a6953f07e96f52023aa3739bba3fec1194292f48e",
"serialization": "string"
},
{
"factID": "http://example.com/facts/fact2",
"sha256": "828bbc97b5b866992dc8bc532265e3094bc9e17cce05e16d90844d2160ad99cf",
"serialization": "string"
},
{
"factID": "http://example.com/facts/fact3",
"sha256": "c646cfa0feda9af766e6eca97f8578f3eb2b126d2349ea7ce1fd2d3b3fe2d456",
"serialization": "string"
},
{
"factID": "http://example.com/facts/fact4",
"sha256": "5845f61bccd9c5631dee29f9e87830b11eb5b531081a8888db42e80e2f153fc0",
"serialization": "string"
}
],
"timestamp": "2021-04-15T21:50:29.940Z",
"senderCustomContent": {
"authMethod": "PublicKey",
"authSuccessful": true,
"authUserId": "user123456"
},
"receiverCustomContent": {
"dbStorageId": "StorageCluster5"
}
}
We use the ReShare ontology v0.3, which we describe in Section 5. The ReShare Ontology, for defining the semantics of the JSON structure in a JSON-LD [JSON-LD11] representation for DTCs.
Instead of defining a schema for the JSON-LD representation of DTCs, we specify a procedure to transform a JSON representation of a DTC into a JSON-LD representation, and a procedure to transform a JSON-LD representation to a JSON representation.
To raise a valid JSON DTC serialization to JSON-LD, the following transformation steps MUST be conducted:
@context
object@type
keywords to the non-literal (sub-)objects@context
object as an IRI prefix@id
keywords to the non-literal sub-objects
Details about the steps are presented in the following and MUST be followed when creating a JSON-LD representation of a DTC.
In the following examples, the misuse of the triple-dot notation denotes that the rest of the JSON structure is not changed. As it is only used in informative examples, it does not violate the normative character of this section.
@context
object (corresponding to version 0.3 of the ReShare ontology)
MUST be added to the root of the DTC object:
{
"@context": {
"fc": "https://w3id.org/reshare/ontology/0.3/#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"facts": {
"@id": "fc:fact",
"@context": {
"factID": {
"@id": "fc:factOrigin",
"@type": "@id"
},
"sha256": {
"@id": "fc:sha256Sum",
"@type": "xsd:hexBinary"
},
"sha384": {
"@id": "fc:sha384Sum",
"@type": "xsd:hexBinary"
},
"sha512": {
"@id": "fc:sha512Sum",
"@type": "xsd:hexBinary"
},
"serialization": "fc:serialization"
}
},
"sender": {
"@id": "fc:sender",
"@context": {
"authID": {
"@id": "fc:identifies",
"@type": "@id"
},
"type": "fc:certType",
"cert": {
"@id": "fc:x509Cert",
"@type": "xsd:base64Binary"
},
"encoding": "fc:certEncoding"
}
},
"receiver": {
"@id": "fc:receiver",
"@context": {
"authID": {
"@id": "fc:identifies",
"@type": "@id"
},
"type": "fc:certType",
"cert": {
"@id": "fc:x509Cert",
"@type": "xsd:base64Binary"
},
"encoding": "fc:certEncoding"
}
},
"senderSig": {
"@id": "fc:senderSig",
"@context": {
"type": {
"@id": "fc:sigType",
"@type": "@id"
},
"sig": {
"@id": "fc:sigData",
"@type": "xsd:base64Binary"
},
"encoding": "fc:sigEncoding"
}
},
"receiverSig": {
"@id": "fc:receiverSig",
"@context": {
"type": {
"@id": "fc:sigType",
"@type": "@id"
},
"sig": {
"@id": "fc:sigData",
"@type": "xsd:base64Binary"
},
"encoding": "fc:sigEncoding"
}
},
"senderCustomContent": {
"@id": "fc:senderCustomContent",
"@type": "@json"
},
"receiverCustomContent": {
"@id": "fc:receiverCustomContent",
"@type": "@json"
},
"timestamp": {
"@id": "fc:timestamp",
"@type": "xsd:dateTimeStamp"
}
}
}
The following (sub-)objects of the DTC object MUST be typed explicitly with the following types by adding a @type
attribute to their root-level attributes:
JSON object | Type IRI |
---|---|
Root DTC object | fc:DTC |
Each entry of facts |
fc:Fact |
sender |
fc:Sender |
receiver |
fc:Receiver |
senderSig |
fc:Signature |
receiverSig |
fc:Signature |
All other contract fields do not need to be typed, as they are represented as literals in JSON-LD, and are typed through the @context
objects.
The assignment of @type
attributes is illustrated with the following example.
{
"@type": "fc:DTC",
"facts": [
{
"@type": "fc:Fact",
...
},
...
],
"receiver": {
"@type": "fc:Receiver",
...
},
"receiverSig": {
"@type": "fc:Signature",
...
},
"sender": {
"@type": "fc:Sender",
...
},
"senderSig": {
"@type": "fc:Signature",
...
},
...
}
An IRI prefix for the keyword contract
MUST be added to the @context
object.
The prefix MUST be set to the baseIRI
of the contract.
The step is illustrated with the following example.
Note that the baseIRI
attribute existed beforehand. Its value is simply copied to the IRI prefix definition.
{
"@context": {
"contract": "http://example.com/contracts/1#",
...
},
"baseIRI": "http://example.com/contracts/1#",
...
}
The following (sub-)objects of the DTC object MUST be made identifiable with the following IRIs
(relative to the root DTC IRI) by adding a @id
attribute to their root-level attributes:
JSON object | Resource IRI |
---|---|
Each entry of facts |
contract:fact-<i> , where <i> is the index of the entry within facts when sorted lexicographically by factID (starting with contract:fact-0 )
|
sender |
contract:sender |
receiver |
contract:receiver |
senderSig |
contract:senderSig |
receiverSig |
contract:senderSig |
All other contract fields are not assigned an IRI, as they are represented as literals in JSON-LD, and thus do not have their own IRIs. Instead, they can be queried through the data properties of the DTC resource.
The assignment of @id
attributes is illustrated with the following example.
{
"facts": [
{
"@id": "contract:fact-0",
...
},
{
"@id": "contract:fact-1",
...
},
{
"@id": "contract:fact-2",
...
},
{
"@id": "contract:fact-3",
...
}
],
"receiver": {
"@id": "contract:receiver",
...
},
"receiverSig": {
"@id": "contract:receiverSig",
...
},
"sender": {
"@id": "contract:sender",
...
},
"senderSig": {
"@id": "contract:senderSig",
...
},
...
}
In the following, we give the example of a DTC represented in JSON-LD, where the static part of the @context
object is omitted for readability.
{
"@context": {
...
},
"@id": "http://example.com/contracts/1",
"@type": "fc:DTC",
"facts": [
{
"@id": "contract:fact-0",
"@type": "fc:Fact",
"factID": "http://example.com/facts/fact1",
"serialization": "string",
"sha256": "5fc62b0e99a143ff2b99b56a6953f07e96f52023aa3739bba3fec1194292f48e"
},
{
"@id": "contract:fact-1",
"@type": "fc:Fact",
"factID": "http://example.com/facts/fact2",
"serialization": "string",
"sha256": "828bbc97b5b866992dc8bc532265e3094bc9e17cce05e16d90844d2160ad99cf"
},
{
"@id": "contract:fact-2",
"@type": "fc:Fact",
"factID": "http://example.com/facts/fact3",
"serialization": "string",
"sha256": "c646cfa0feda9af766e6eca97f8578f3eb2b126d2349ea7ce1fd2d3b3fe2d456"
},
{
"@id": "contract:fact-3",
"@type": "fc:Fact",
"factID": "http://example.com/facts/fact4",
"serialization": "string",
"sha256": "5845f61bccd9c5631dee29f9e87830b11eb5b531081a8888db42e80e2f153fc0"
}
],
"receiver": {
"@id": "contract:receiver",
"@type": "fc:Receiver",
"type": "X509",
"encoding": "base64",
"authID": "http://example.com/receiver",
"cert": "MIIEkTCCAnmgAwIBAgIUTpTAugWv4ZYQX9nk2zETfVcMi4AwDQYJKoZIhvcNAQELBQAwTDELMAkGA1UEBhMCREUxEzARBgNVBAgMClNvbWUtU3RhdGUxEzARBgNVBAoMCkV4YW1wbGUgQ0ExEzARBgNVBAMMCkV4YW1wbGUgQ0EwHhcNMjEwNDE1MjExNDM1WhcNMjIwNDE1MjExNDM1WjAzMR0wGwYDVQQKDBRFeGFtcGxlIGNoYWluIGNlcnQgMTESMBAGA1UEAwwJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuKe4H5GwuaKS02s6oAnQF0e30TLyB3joT5GNzwa94WXuLjU8SWKqOjLQyIN2ZBtZW1jNI3By6nsPoU3t181SBStFI25JZ8PUvJ9/Skf/adRmrtXHX8MYRBqN4d1JIRdOoLxwq+bI0UIyMmMNMTjvhnWwTx4FkXwup5fna9FFBbtOGP+7vMVl98L2/bDMJwwLdnzUs0CKLyqDRx0XWAnp6R6CN9YDeMgpdDviMkBfeY74AJ084v6pWnx+K0PlUuQAkiuPvcRsDxgjHRO18rq4wA6Dxh6My7Xh/uHFzb5cmLT7C7kfr+WN26va8IRGCF8NWdOYQ0HSo/vbY/eIOB/G0wIDAQABo4GDMIGAMB0GA1UdDgQWBBSmlyw0Ht9gF3rnI42Us1dK9+jZ/DAfBgNVHSMEGDAWgBR+/85DLJ8v0EP1y6kv/I9XPsHQ5TAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEwDQYJKoZIhvcNAQELBQADggIBABMLMfSOAwk34LEK9L/A1qtHTJPQ2BF3XjnbswINNao0oOI3PSWKU0weWYlITH29hgyzrwO8A9ifaOFPtsRxe9/UNv6RNqwObLpxF+f2U3ulu2hTzd7l/ZXUGYaBUHLL3Cu1JlZWMRoTUBUHAvkwnQlUkQLJZ7A+N9y+FfV5apIMTwPA+C2lwiVtEd3Hje5Z9lUmjwiARRnsliRuCm2ZY0IHvneQN7NnOFCFFQQnu/7wMEywNWR3NMtj5AcMugs56OqcAglwq+HqYNCUkelt1/I7A/NwitaPEYu/1TDjQBckR6nbtJwHKFx2M9heB+E5iMI65r+ae01jBr+r7tes6UdEz7SCF3xHks3ubKfRQykZzTZ7ixeHYG5XjaUSSk8EDuBCdZOJ/AUAA+Rar/UPODUd1YQUZDUqs0MvB9zXQYBtEhwii75pCmkFBpZewo6xyktdP3964q7MZPZQZTZimh02CxcWdXZj6JkoL6ihuM36UciS9rXUgIGGdJcbhC5mP/PqRYsAzipOvQiRL7mGRB9L8H0Wt08yl3H0KFwGcgasML8tOOkf+4MsGIHJZaJ20cVfdWm1StOtLN1Bn+gAppq8nlvDgPiQ3NxSsvY+Qpb0WSVWknc1VyOPKexKaM20/alMv/fykVhVmmAcNVshIMAuKV5TnhqeZyg8L02pVAHL"
},
"receiverCustomContent": {
"dbStorageId": "StorageCluster5"
},
"receiverSig": {
"@id": "contract:receiverSig",
"@type": "fc:Signature",
"sig": "JepGwNLofxFFCvewKe+OBFm7G+YOvfqrAz3+z+jEAiPlpNtuXrQo3WM8g9SHyMpccu4BBPlKflSynI/OC6X7JL9kuJchg93gRBk/PjfTj8bUSaewCW3CVPe50zznJC7R9rcjUVtyLDIva558RJaJwVzgwO6YH+1/+hU4qKVHUyUuxBJSbWrBuOHBjavQQdq2utaja6h8dx1bLcBHAMjKxM4rIfUzXgjzkJk/D/DEZvSIRMnBafnqDQFvjB/eSZQa+oSSxKXS6dXskOKlxS9HvnRn2CsWEjhDrCIyphwEUj8qqhv1rsPWpiIXYVewWcsRxaYDfoe6+5hgquXR1i3nrg==",
"type": "urn:oid:1.2.840.113549.1.1.10",
"encoding": "base64"
},
"sender": {
"@id": "contract:sender",
"@type": "fc:Sender",
"type": "X509",
"encoding": "base64",
"authID": "http://example.com/sender",
"cert": "MIIEkTCCAnmgAwIBAgIUTpTAugWv4ZYQX9nk2zETfVcMi38wDQYJKoZIhvcNAQELBQAwTDELMAkGA1UEBhMCREUxEzARBgNVBAgMClNvbWUtU3RhdGUxEzARBgNVBAoMCkV4YW1wbGUgQ0ExEzARBgNVBAMMCkV4YW1wbGUgQ0EwHhcNMjEwNDE1MjExMTExWhcNMjIwNDE1MjExMTExWjAzMR0wGwYDVQQKDBRFeGFtcGxlIGNoYWluIGNlcnQgMTESMBAGA1UEAwwJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvw8C6sqLUVSOwFPbZsqS/1cL/+7aaaxVPwXs7TjPVombwNLyJW8yPyyQLbsTN5evVCpNdzciYc9Nhh77AYrqCiOsZBb7hu/PMqNqDvU2FAHeTH9KZ1PSpsOdgzG4i9widL6FBKGrxvlyj0G5ztQoGtymJFdmQ8K/ZN2W5Bi27H24UgITO+mX5MGmzFfyib7bDnvNqZUMJEgpSGt+jUf/7pMtuQqusrE1bfg5vvCbHIPHx2KXqzQEjNiioDafzKjIY2NSakis1AZe+J46o/Za0L8TUMXPvO1nSX4VMm9w5Qqf8auKdlUnT7fVqGKxQvPgX/JM/ksduZqZdTE1giWDgQIDAQABo4GDMIGAMB0GA1UdDgQWBBQtTnbTodwlQnP0QXA2VRv6DBWgzzAfBgNVHSMEGDAWgBR+/85DLJ8v0EP1y6kv/I9XPsHQ5TAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEwDQYJKoZIhvcNAQELBQADggIBAG47hxcjEY6kXojCadK15iW5t6P2p2NCfXpymeRuVaHiI7hhMwQEPymGqXZe0MKUKaRxb9BssG9UvndJw7PWdLx55Y498dgEVXWp7UWUg+VmLxE0wrS+7odJ6ZwsSTPhlgQVF3y9SOP18UX1Iy+ipkdPVbeiQB2QJOYLdxj3h26a/BevyWJU7jTbZO9fNX3FlopyQbB64QPJKJyQiYrT1td7lOcreyBJUS2e5p+hifW/ukxHQ9QtfN+mE/MlnUSHar6LgXPX3AoiVKc14L5E7jRHLDCvFWO1PfVCsS6RWIKdoWsEUytDnMYLHb2TmMJWQf8S69BLyqgEhKXNS9hZceGr32jM9O6TepYKZNH5A1QLjZcuHHKUAzXMjM9loNLra/VGcqrMTdZYautGl8EdEURqE063qDd+Hsp3Vqw0iALQHcbEb6R1b2o5dIrczo+PINTSvnFv+4GyqznXEYjcueLrR/R6kE9GNOiPUxpont+0s1JCAKPaaZk97Z09ldtD47rPQLQgWopDadVOm3Gu9+ef7uqqpJw9+q384mqgw4P1Yws6aVkXLdvh8MCXcMEYi2AeQVCCZv2CjAh8CZQC+0P2JtkhWlCxPoSDk4jbm6koCxcpL3CRcc5LtTTrev5+Mi0oDMiLzx09GNls3SQzdKdP9PM+Y7E7y4Xi2LW3FtoG"
},
"senderCustomContent": {
"authMethod": "PublicKey",
"authSuccessful": true,
"authUserId": "user123456"
},
"senderSig": {
"@id": "contract:senderSig",
"@type": "fc:Signature",
"sig": "XW5nUNXY+06Llu9i4vUABpm4CpTHTPBy7rAYjGV/FG8CIuYffr4xYZkm6VIDApWQ3F38CwLDzEgy4bAT/u+kQshCM4MzIyGnqTzatvV8ZM3gfBJ6307h+t8VdBW3siXYcqexpA5CWVtqNWhCIme/sXEXkJQDQl1q5NljIcWiaJMHNUwg0IvCP1LLL8fcMr0Yj0sVKN5l8WuBpr6lLIsxOJgN6iWt/wM43pBO2G62/BR7FCWY1jE72gedGy16BBpn/KNkCRIr0ACcZNArZPYlISsHXpjOk3QoiUMakxgvdbdlpKZNFchbXU6ZlZTu3xyc67uddy6QzNID3yJ35Kcp3w==",
"type": "urn:oid:1.2.840.113549.1.1.10",
"encoding": "base64"
},
"timestamp": "2021-04-15T21:53:24.446Z"
}
To transfer a JSON-LD representation of a DTC to a JSON representation, one MUST execute the following steps:
@context
object by adding a contract
IRI prefix to the static @context
object from the JSON-to-JSON-LD transformation by copying the IRI of the DTC,
similarly to step 3 of the JSON-to-JSON-LD transformation.
@type
, @id
, and @context
attributes.
Note: The baseIRI
of the DTC is unaffected by this, as it is aliased as @id
, and thus is not removed!
A valid DTC MUST always contain two signatures, one by the sender, and one by the receiver.
These signatures constitute a central component of the trust chain of a DTC, connecting the information included in DTCs (e.g., the checksums in facts
) to the public keys of sender
and receiver.
The signatures are included in the DTC itself in the senderSig
and receiverSig
fields (see 4.3 DTC Data Structure).
The processes of creating and verifying DTC signatures, which are specified in the following, are the same for any party (sender or receiver). Thus, we only consider the sender in the following. For receiver signatures, analogous steps apply.
Each party (sender and receiver) MUST have an RSA public/private key pair which they use for creating DTC signatures.
The public key of the key pair used to create DTC signatures MUST be included in the cert
property of the respective identity field of the DTC, i.e., sender
or receiver
(see 4.3 DTC Data Structure).
The processes of signature creation and verification can be divided into three low-level processes: A pre-processing pipeline for generating a normalized binary serialization of a DTC (further described in Section 4.5.2 Pre-Processing), and both a signature creation and verification process based on the pre-processed form of a DTC (further described in Sections 4.5.3 Signature Creation and 4.5.4 Signature Verification respectively).
The integration of said low-level processes into the high-level processes of signature creation and verification is visualized in the two figures below.
The DTC pre-processing pipeline, as visualized below, consists of four steps and starts with the implementation-dependent internal representation of the DTC.
The four pre-processing steps MUST be executed as follows in order to uniquely serialize and normalize the DTC.
senderSig
and receiverSig
fields (if existing) MUST be removed in this step.
facts
array MUST be sorted by the ascending lexicographic order of the factID
subproperty in UTF-8 encoding [RFC3629].
Afterward, the JSON document MUST be canonicalized according to the JSON Canonicalization Scheme (JCS) [RFC8785].
The signature MUST be created using the pre-processed form of the DTC as described in Section 4.5.2 Pre-Processing as the input to the RSASSA-PSS-SIGN
operation specified in PKCS #1 [RFC8017].
For the EMSA-PSS-ENCODE
encoding operation used in the RSASSA-PSS-SIGN
operation, the following parameters MUST be selected:
Hash
): SHA-256 [FIPS-180-4]
MGF
): MGF1 [RFC8017]
sLen
): 32 (=hLen
, i.e., the length of a SHA-256 hash in octets)
The binary output of the RSASSA-PSS
signature creation primitive MUST be encoded as Base64 [RFC4648].
The encoded signature can be used as the sig
subfield of the senderSig
or receiverSig
DTC fields (the field associated with the signer), as specified in Section 4.3 DTC Data Structure.
To verify a given signature, as included in the senderSig
or receiverSig
DTC fields (see 4.3 DTC Data Structure), the encoded signature (here: senderSig
) MUST be decoded as Base64 [RFC4648].
The DTC MUST be pre-processed according to 4.5.2 Pre-Processing.
Together with the pre-processed DTC, and the public key associated with the signature, the signature MUST then be verified according to the RSASSA-PSS-VERIFY
operation as specified in PKCS #1 [RFC8017].
For the EMSA-PSS-VERIFY
operation, which is used in the RSASSA-PSS-VERIFY
operation, the same parameters as for EMSA-PSS-ENCODE
(see 4.5.3 Signature Creation) MUST be used.
Two core mechanisms are defined as part of ReShare:
Any implementation MUST implement the verification mechanism mechanism according to Section 6.2 DTC Verification.
The generation mechanism, which is specified in Section 6.1 DTC Generation Handshake, follows a client-server-paradigm. To allow for application-dependent lightweight implementations, the client and server parts of the generation mechanism MAY not be implemented. The following combinations are possible:
Server implemented | Client implemented | Description |
---|---|---|
Yes | Yes | Full implementation |
Yes | No | Only supports sender role & DTC verification |
No | Yes | Only supports receiver role & DTC verification |
No | No | Only supports DTC verification |
The DTC generation mechanism constitutes a handshake, in which sender and receiver jointly create and sign a DTC in a client-server paradigm.
We specify two versions of this generation handshake: A complete 3-way version, which can be carried out completely in parallel to the underlying data transmission, and an abbreviated 2-way handshake, which can be used if the receiver has access to the complete underlying data of the DTC (i.e., the data transmission has to be completed already).
The benefits of the independence of DTC generation to the data transmission are expected to outweigh the effects of the increased overhead in most use cases. Thus, we consider the complete 3-way handshake the default handshake version. A brief elaboration on this discussion can be found in Section A.3 DTC Generation: Two Handshake Versions.
We do not specify any mechanism to separate handshake versions or negotiate the handshake version. Instead, such a mechanism MAY be implemented on a lower layer (e.g., by using HTTP content negotiation or using two ports for separating the two handshake versions).
This section is non-normative.
The specification of the DTC generation mechanism is divided into the following components:
The DTC generation components are visualized in the following figure.
The complete DTC generation handshake consists of the following three steps, which are described in detail in the following:
receiver
, facts
(only IRIs, no checksums), and receiverCustomContent
fields.
receiverSig
field.
The following figure gives an overview of the handshake messages and computations. Note that only the differential message contents are listed, as the previously existing DTC content is carried over to the next messages. The caption includes a mapping from the message abbreviations used in the figure to the message identifiers defined in Section 6.1.4 Message Identifiers.
In the following, we define the behavior of client and server implementations in detail.
The client is responsible for initiating the DTC generation handshake. For this, an appropriate user interface (manual trigger) or interface to the data-sharing system (automatic trigger) SHOULD be implemented.
To initiate the DTC generation, the client MUST first compile a partial DTC only consisting of the receiver
, the facts
, and the (optional) receiverCustomContent
fields.
The content of the receiver
and receiverCustomContent
fields MUST comply with the contents specified in Section 4.3 DTC Data Structure.
The content of facts
MUST comply with its definition in Section 4.3 DTC Data Structure, except that the requestedID
, <alg>
, and serialization
sub-fields MUST NOT be present for any entry.
The client then MUST use the partial DTC to build the ContractRequest
message by passing the partial DTC to the message builder defined in Section 6.1.5 Message Builder, and use the outgoing message interface (see Section 6.1.9 Protocol Stack) to send it to the server.
Once the client implementation is called by the incoming message handler (see Section 6.1.9 Protocol Stack), the following procedure MUST be carried out.
Start with step 1. If no "continue with step x" phrase is hit, the procedure is finished.
(id,schema)
of all error message identifiers (defined in Section 6.1.4 Message Identifiers) and their respective schemas (defined in Section 6.1.6 Message Schemas), to the message validator (see Section 6.1.7 Message Validator).
If the validation returns None
, continue with step 2.
If the validation returns one of the error message identifiers, the implementation MAY behave arbitrarily (see the discussion and behavior recommendation in Section 6.1.8 Error Message Builder & Error Handling).
S1
message (defined in Section 6.1.6 Message Schemas), to the message validator (see Section 6.1.7 Message Validator).
If None
is returned by the message validator, the client SHOULD send an UnknownMessage
error to the server according to Section 6.1.8 Error Message Builder & Error Handling.
If the validator returns S1
, continue with step 3.
S1
message belongs to an unanswered previous ContractRequest
message.
The implementation of this check is not further specified, but MAY be implemented by matching HTTP requests and responses (see Section 6.1.9 Protocol Stack for a specification of the protocol stack) or by implementing a custom caching mechanism.
If the check fails, the client SHOULD send an UnexpectedSenderContract
error to the server according to Section 6.1.8 Error Message Builder & Error Handling.
If the check succeeds, or if no check was executed, continue with step 4.
The client MUST extract and parse the partial DTC contained in the content
attribute of the JSON message, and verify
sender
) is as expectedsender
) is valid and trusted
This step SHOULD include checking whether the public key certificate has been issued for the authority identified by the IRI contained in the sender
field.
We further discuss this verification step in Section A.2 Identity Management.
senderSig
) is valid by verifying the signature according to Section 4.5.4 Signature Verification.
The sender's public key contained in the public key certificate in sender
MUST be used for the verification procedure.facts
are valid.
This is dependent on a completed data transaction and an interface to the data within the client-side handshake implementation, and thus, is not mandatory to implement.InvalidSenderContract
error message to the server according to Section 6.1.8 Error Message Builder & Error Handling, and SHOULD consider the ContractRequest
message, to which the S1
message was matched, as unanswered, such that the server can retry sending a valid matching S1
message.
If all of the verifications succeeded, continue with step 5.
S1
message and the private key associated with the public key included in the public key certificate in the receiver
field, and add it as the receiverSig
field according to Section 4.3 DTC Data Structure.
The client SHOULD accept the complete DTC and SHOULD forward it so a DTC storage system.
Finally, the client MUST build the R2
message by passing the now-complete DTC to the message builder (see Section 6.1.5 Message Builder), and use the outgoing message interface (see Section 6.1.9 Protocol Stack) to send it to the server.
Once the server implementation is called by the incoming message handler (see Section 6.1.9 Protocol Stack), the following procedure MUST be carried out.
Start with step 1. If no "continue with step x" phrase is hit, the procedure is finished.
(id,schema)
of all error message identifiers (defined in Section 6.1.4 Message Identifiers) and their respective schemas (defined in Section 6.1.6 Message Schemas), to the message validator (see Section 6.1.7 Message Validator).
If the validation returns None
, continue with step 2.
If the validation returns one of the error message identifiers, the implementation MAY behave arbitrarily (see the discussion and behavior recommendation in Section 6.1.8 Error Message Builder & Error Handling).
ContractRequest
and R2
message schemas (in this order, defined in Section 6.1.6 Message Schemas) to the message validator (see 6.1.7 Message Validator).
If the validator returns None
, the server MUST send an UnknownMessage
error to the client according to Section 6.1.8 Error Message Builder & Error Handling.
If the validator returns ContractRequest
, continue with step 3.
If the validator returns R2
, continue with step 6.
contract
attribute of the JSON message.
Then, the server MAY verify that the client is authorized to request the DTC for the facts
contained in the facts
field.
Such an access-control mechanism is not specified, but could be implemented on a lower layer (e.g., using the HTTP Authorization header). Therefore, error handling for access control should also be implemented on a lower layer.
sender
field with its own information, such that the content complies with Section 4.3 DTC Data Structure.
factID
sub-fields of the entries of facts
.
During this process, the server MAY resolve some of the IRIs to concretized IRIs (see the documentation requestedID
for details).
In this case, the server MUST copy the content of factID
to requestedID
, and subsequently overwrite the content of factID
with the new IRI in accordance with Section 4.3 DTC Data Structure.
It then adds each checksum to the <alg>
sub-field of the respective facts
entry in accordance with Section 4.3 DTC Data Structure.
As specified in Section 4.3 DTC Data Structure, the checksum is associated with a specific serialization of the fact.
The server MUST add the serialization identifier to the serialization
sub-field of each entry of facts
according to Section 4.3 DTC Data Structure.
timestamp
field according to Section 4.3 DTC Data Structure.
baseIRI
field according to Section 4.3 DTC Data Structure.
senderCustomContent
field according to 4.3 DTC Data Structure.
Continue with step 4.
sender
field.
The server then adds it as the senderSig
field according to Section 4.3 DTC Data Structure.
Continue with step 5.
S2
message by passing the compiled (partial) DTC to the message builder (see Section 6.1.5 Message Builder), and MUST then use the outgoing message interface (see Section 6.1.9 Protocol Stack) to send the resulting message to the client.
contract
field of the JSON message.
Then, the server MUST verify that its own public key certificate is contained in the sender
field.
If not, the server MUST send a BogusSenderCert
error to the client according to Section 6.1.8 Error Message Builder & Error Handling.
This step prevents the client from simply replacing the sender's public key certificate with a bogus certificate, for which it controls the private key, and can thus create a signature (and thus a valid DTC) independent of the sender. While such an attack would not lead to a valid DTC issued by the sender, it would lead to an invaluable DTC, which is not recognized by the sender by simply verifying the DTC using the procedure specified in Section 6.2 DTC Verification.
receiver
) is as expectedreceiver
) is valid and trusted
This step SHOULD include checking whether the public key certificate has been issued for the authority identified by the IRI contained in the receiver
field.
We further discuss this verification step in Section A.2 Identity Management.
receiverSig
is valid by verifying the signature according to Section 4.5.4 Signature Verification.
The receiver's public key contained in the public key certificate in receiver
MUST be used for the verification procedure.InvalidReceiverContract
error message to the client according to 6.1.8 Error Message Builder & Error Handling.
Otherwise, the server SHOULD accept the DTC and SHOULD forward it to a DTC storage system.
The abbreviated handshake assumes that the receiver has full access to the underlying data of the DTC,
i.e., that the data transmission is completed.
Further, it assumes that the receiver has access to the sender's identity and public certificate, i.e., the contents of the sender
field according to Section 4.3 DTC Data Structure.
If these two assumptions hold, the receiver is able to compile the DTC except for the sender's signature. In this case, only two messages are necessary to establish a valid DTC.
Note that if the senderCustomContent
is to be used, its content MUST be pre-shared before the receiver initiates the handshake, such that the client has access to it when initially compiling the DTC.
The following figure gives an overview of the handshake messages and computations. Note that only the differential message contents are listed, as the previously existing DTC content is carried over to the next messages. The caption includes a mapping from the message abbreviations used in the figure to the message identifiers defined in Section 6.1.4 Message Identifiers.
A shortened 2-way handshake dependent on a completed data transmission is shown below:
In the following, we define the behavior of client and server implementations in detail.
The client is responsible for initiating the DTC generation handshake. For this, an appropriate user interface (manual trigger) or interface to the data-sharing system (automatic trigger) SHOULD be implemented.
receiver
field with its own information, such that the content complies with Section 4.3 DTC Data Structure.
sender
field with the sender's information,
such that the content complies with Section 4.3 DTC Data Structure.
facts
field in compliance with Section 4.3 DTC Data Structure.
For this, the client looks up or computes the checksums for the facts identified by the IRIs of the data transmission.
It then adds each checksum to the <alg>
sub-field of the respective facts
entry in accordance with Section 4.3 DTC Data Structure.
As specified in Section 4.3 DTC Data Structure, the checksum is associated with a specific serialization of the fact.
The client MUST add the serialization identifier to the serialization
sub-field of each entry of facts
according to Section 4.3 DTC Data Structure.
The requestedID
subfield SHOULD NOT be present for any entry of facts
.
Note that in the abbreviated handshake, the sender cannot update the entries of factID
, as the receiver's signature already exists in the first message addressed to the sender.
Instead, an IRI negotiation, as discussed in Section 4.3 DTC Data Structure
SHOULD be implemented together with the data transmission, as this has to be completed before the handshake if using the abbreviated handshake version.
timestamp
field according to Section 4.3 DTC Data Structure.
baseIRI
field according to Section 4.3 DTC Data Structure, which can be used to uniquely identify the created DTC.
This IRI MAY be created by the receiver itself, or negotiated or created by the sender during the transmission of the data subject to the DTC.
receiverCustomContent
and senderCustomContent
fields according to 4.3 DTC Data Structure.
As mentioned above, the content of the senderCustomContent
field has to be pre-shared before the abbreviated handshake.
Continue with step 2.
receiver
field.
The client then MUST add it as the receiverSig
field according to Section 4.3 DTC Data Structure.
Continue with step 3.
The client then MUST use the partial DTC to build the AbbrevContractRequest
message by passing the partial DTC to the message builder defined in Section 6.1.5 Message Builder, and pass it to the outgoing message interface
(see Section 6.1.9 Protocol Stack).
Once the client implementation is called by the incoming message handler (see Section 6.1.9 Protocol Stack), the following procedure MUST be carried out.
Start with step 1. If no "continue with step x" phrase is hit, the procedure is finished.
(id,schema)
of all error message identifiers (defined in Section 6.1.4 Message Identifiers) and their respective schemas (defined in Section 6.1.6 Message Schemas), to the message validator (see Section 6.1.7 Message Validator).
If the validation returns None
, continue with step 2.
If the validation returns one of the error message identifiers, the implementation MAY behave arbitrarily (see the discussion and behavior recommendation in Section 6.1.8 Error Message Builder & Error Handling).
AbbrevContract
message (defined in Section 6.1.6 Message Schemas), to the message validator (see Section 6.1.7 Message Validator).
If None
is returned by the message validator, the client SHOULD send an UnknownMessage
error to the server according to Section 6.1.8 Error Message Builder & Error Handling.
If the validator returns S1
, continue with step 3.
contract
field of the JSON message.
Then, the client MUST verify that its own public key certificate is contained in the receiver
field.
If not, the client MUST send a BogusReceiverCert
error to the server according to Section 6.1.8 Error Message Builder & Error Handling.
This step prevents the server from simply replacing the receiver's public key certificate with a bogus certificate, for which it controls the private key, and can thus create a signature (and thus a valid DTC) independent of the receiver. While such an attack would not lead to a valid DTC issued by the receiver, it would lead to an invaluable DTC, which is not recognized by the receiver by simply verifying the DTC using the procedure specified in Section 6.2 DTC Verification.
sender
) is as expectedsender
) is valid and trusted
This step SHOULD include checking whether the public key certificate has been issued for the authority identified by the IRI contained in the sender
field.
We further discuss this verification step in Section A.2 Identity Management.
senderSig
is valid by verifying the signature according to Section 4.5.4 Signature Verification.
The sender's public key contained in the public key certificate in sender
MUST be used for the verification procedure.InvalidAbbrevContract
error message to the server according to 6.1.8 Error Message Builder & Error Handling.
Otherwise, the client SHOULD accept the DTC and SHOULD forward it to a DTC storage system.
Once the server implementation is called by the incoming message handler (see Section 6.1.9 Protocol Stack), the following procedure MUST be carried out.
Start with step 1. If no "continue with step x" phrase is hit, the procedure is finished.
(id,schema)
of all error message identifiers (defined in Section 6.1.4 Message Identifiers) and their respective schemas (defined in Section 6.1.6 Message Schemas), to the message validator (see Section 6.1.7 Message Validator).
If the validation returns None
, continue with step 2.
If the validation returns one of the error message identifiers, the implementation MAY behave arbitrarily (see the discussion and behavior recommendation in Section 6.1.8 Error Message Builder & Error Handling).
AbbrevContractRequest
schema (see Section 6.1.6 Message Schemas) to the message validator (see 6.1.7 Message Validator).
If the validator returns None
, the server MUST send an UnknownMessage
error to the client according to Section 6.1.8 Error Message Builder & Error Handling.
If the validator returns AbbrevContractRequest
, continue with step 3.
The server MUST extract and parse the partial DTC contained in the content
attribute of the JSON message, and verify
receiver
) is as expectedreceiver
) is valid and trusted
This step SHOULD include checking whether the public key certificate is issues for the authority identified by the IRI contained in the receiver
field.
We further discuss this verification step in Section A.2 Identity Management.
receiverSig
) is valid by verifying the signature according to Section 4.5.4 Signature Verification.
The receiver's public key contained in the public key certificate in receiver
MUST be used for the verification procedure.facts
are valid.
This verification step can be done by re-computing or looking up the fact checksums given the serialization identified by the serialization
field.
In contrast to the 3-way handshake (see Section 6.1.2 Complete (3-way) Handshake), this step is not optional, as the 2-way handshake requires a previously completed data transmission. Thus, making this step mandatory does not constrain the application of the procedure.
InvalidAbbrevContractRequest
error message to the client according to Section 6.1.8 Error Message Builder & Error Handling.
If all of the verifications succeeded, continue with step 5.
sender
field.
This information has to be pre-shared between sender and receiver for the abbreviated handshake. If this information is not correct, the signature in step 6 cannot be created with the matching private key.
BogusSenderCert
error message to the client according to Section 6.1.8 Error Message Builder & Error Handling.
If the information is correct, continue with step 6.
AbbrevContractRequest
message and the private key associated with the public key included in the public key certificate in the sender
field,
and add it as the senderSig
field according to Section 4.3 DTC Data Structure.
The server SHOULD accept the complete DTC and SHOULD forward it so a DTC storage system.
Finally, the server MUST build the AbbrevContract
message by passing the now-complete DTC to the message builder (see Section 6.1.5 Message Builder), and use the outgoing message interface (see Section 6.1.9 Protocol Stack) to send it to the client.
The defined message identifiers are partitioned into non-error message identifiers and error message identifiers.
We do not further specify the implementation of the message identifiers. They could, for example, be implemented using constant string values, or with an enum-like structure.
We define the following non-error message identifiers:
ContractRequest
: Identifies the first message in the complete handshake defined in Section 6.1.2 Complete (3-way) Handshake.SenderContract
: Identifies the second message in the complete handshake defined in Section 6.1.2 Complete (3-way) Handshake.ReceiverContract
: Identifies the third message in the complete handshake defined in Section 6.1.2 Complete (3-way) Handshake.
AbbrevContractRequest
: Identifies the first message of the abbreviated handshake defined in Section 6.1.3 Abbreviated (2-way) Handshake.AbbrevContract
: Identifies the second message of the abbreviated handshake defined in Section 6.1.3 Abbreviated (2-way) Handshake.
We define the following error message identifiers:
UnknownMessage
:
Indicates that the message could not be validated against any message schema.
UnexpectedSenderContract
:
Indicates that an S1
message was received by the client without expecting it (see Section 6.1.2 Complete (3-way) Handshake).
InvalidSenderContract
:
Indicates that the verification of an S1
message failed (see Section 6.1.2 Complete (3-way) Handshake).
BogusSenderCert
:
Indicates that the public key certificate contained in the sender
field of an R2
message did not equal the sender's actual certificate (see Section 6.1.2 Complete (3-way) Handshake).
InvalidReceiverContract
:
Indicates that the verification of the previously transmitted ReceiverContract
message on the server side failed.
BogusReceiverCert
:
Indicates that the receiver's certificate, as included in the receiver
field of the partial DTC within the previously transmitted SenderContract
message, was not the correct certificate of the handshake client.
InvalidAbbrevContract
:
Indicates that the client-side verification of the previously transmitted AbbrevContract
message failed.
InvalidAbbrevContractRequest
:
Indicates that the server-side verification of the previously transmitted AbbrevContractRequest
message failed.
The message builder is used to build JSON messages to be transmitted according to Section 6.1.9 Protocol Stack. Its behavior is the same for client and server implementations, and it provides an interface for the implementation of both server and client behavior, as specified in Sections 6.1.2 Complete (3-way) Handshake and 6.1.3 Abbreviated (2-way) Handshake.
If an implementation implements the client or server part of the generation handshake, it MUST also implement the message builder.
The message builder MUST implement the following functionality.
Details about building error messages can be found in Section 6.1.8 Error Message Builder & Error Handling.
{}
), referred to as res
.res
as the string content of the messageType
attribute.
res
as the contract
attribute.res
to the caller.The following is an informative example of an S1
message (see Section 6.1.2 Complete (3-way) Handshake) as generated by the message builder.
{
"messageType": "SenderContract",
"contract": {
"baseIRI": "https://example.com/contracts/2021-09-24/134",
"sender": {
"type": "X509",
"encoding": "base64",
"cert": "MIIEkTCCAnmgAwIBAgIUTpTAugWv4ZYQX9nk2zETfVcMi38wDQYJKoZIhvcNAQELBQAwTDELMAkGA1UEBhMCREUxEzARBgNVBAgMClNvbWUtU3RhdGUxEzARBgNVBAoMCkV4YW1wbGUgQ0ExEzARBgNVBAMMCkV4YW1wbGUgQ0EwHhcNMjEwNDE1MjExMTExWhcNMjIwNDE1MjExMTExWjAzMR0wGwYDVQQKDBRFeGFtcGxlIGNoYWluIGNlcnQgMTESMBAGA1UEAwwJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvw8C6sqLUVSOwFPbZsqS/1cL/+7aaaxVPwXs7TjPVombwNLyJW8yPyyQLbsTN5evVCpNdzciYc9Nhh77AYrqCiOsZBb7hu/PMqNqDvU2FAHeTH9KZ1PSpsOdgzG4i9widL6FBKGrxvlyj0G5ztQoGtymJFdmQ8K/ZN2W5Bi27H24UgITO+mX5MGmzFfyib7bDnvNqZUMJEgpSGt+jUf/7pMtuQqusrE1bfg5vvCbHIPHx2KXqzQEjNiioDafzKjIY2NSakis1AZe+J46o/Za0L8TUMXPvO1nSX4VMm9w5Qqf8auKdlUnT7fVqGKxQvPgX/JM/ksduZqZdTE1giWDgQIDAQABo4GDMIGAMB0GA1UdDgQWBBQtTnbTodwlQnP0QXA2VRv6DBWgzzAfBgNVHSMEGDAWgBR+/85DLJ8v0EP1y6kv/I9XPsHQ5TAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEwDQYJKoZIhvcNAQELBQADggIBAG47hxcjEY6kXojCadK15iW5t6P2p2NCfXpymeRuVaHiI7hhMwQEPymGqXZe0MKUKaRxb9BssG9UvndJw7PWdLx55Y498dgEVXWp7UWUg+VmLxE0wrS+7odJ6ZwsSTPhlgQVF3y9SOP18UX1Iy+ipkdPVbeiQB2QJOYLdxj3h26a/BevyWJU7jTbZO9fNX3FlopyQbB64QPJKJyQiYrT1td7lOcreyBJUS2e5p+hifW/ukxHQ9QtfN+mE/MlnUSHar6LgXPX3AoiVKc14L5E7jRHLDCvFWO1PfVCsS6RWIKdoWsEUytDnMYLHb2TmMJWQf8S69BLyqgEhKXNS9hZceGr32jM9O6TepYKZNH5A1QLjZcuHHKUAzXMjM9loNLra/VGcqrMTdZYautGl8EdEURqE063qDd+Hsp3Vqw0iALQHcbEb6R1b2o5dIrczo+PINTSvnFv+4GyqznXEYjcueLrR/R6kE9GNOiPUxpont+0s1JCAKPaaZk97Z09ldtD47rPQLQgWopDadVOm3Gu9+ef7uqqpJw9+q384mqgw4P1Yws6aVkXLdvh8MCXcMEYi2AeQVCCZv2CjAh8CZQC+0P2JtkhWlCxPoSDk4jbm6koCxcpL3CRcc5LtTTrev5+Mi0oDMiLzx09GNls3SQzdKdP9PM+Y7E7y4Xi2LW3FtoG",
"authID": "http://example.com/sender"
},
"receiver": {
"type": "X509",
"encoding": "base64",
"cert": "MIIEkTCCAnmgAwIBAgIUTpTAugWv4ZYQX9nk2zETfVcMi4AwDQYJKoZIhvcNAQELBQAwTDELMAkGA1UEBhMCREUxEzARBgNVBAgMClNvbWUtU3RhdGUxEzARBgNVBAoMCkV4YW1wbGUgQ0ExEzARBgNVBAMMCkV4YW1wbGUgQ0EwHhcNMjEwNDE1MjExNDM1WhcNMjIwNDE1MjExNDM1WjAzMR0wGwYDVQQKDBRFeGFtcGxlIGNoYWluIGNlcnQgMTESMBAGA1UEAwwJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuKe4H5GwuaKS02s6oAnQF0e30TLyB3joT5GNzwa94WXuLjU8SWKqOjLQyIN2ZBtZW1jNI3By6nsPoU3t181SBStFI25JZ8PUvJ9/Skf/adRmrtXHX8MYRBqN4d1JIRdOoLxwq+bI0UIyMmMNMTjvhnWwTx4FkXwup5fna9FFBbtOGP+7vMVl98L2/bDMJwwLdnzUs0CKLyqDRx0XWAnp6R6CN9YDeMgpdDviMkBfeY74AJ084v6pWnx+K0PlUuQAkiuPvcRsDxgjHRO18rq4wA6Dxh6My7Xh/uHFzb5cmLT7C7kfr+WN26va8IRGCF8NWdOYQ0HSo/vbY/eIOB/G0wIDAQABo4GDMIGAMB0GA1UdDgQWBBSmlyw0Ht9gF3rnI42Us1dK9+jZ/DAfBgNVHSMEGDAWgBR+/85DLJ8v0EP1y6kv/I9XPsHQ5TAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEwDQYJKoZIhvcNAQELBQADggIBABMLMfSOAwk34LEK9L/A1qtHTJPQ2BF3XjnbswINNao0oOI3PSWKU0weWYlITH29hgyzrwO8A9ifaOFPtsRxe9/UNv6RNqwObLpxF+f2U3ulu2hTzd7l/ZXUGYaBUHLL3Cu1JlZWMRoTUBUHAvkwnQlUkQLJZ7A+N9y+FfV5apIMTwPA+C2lwiVtEd3Hje5Z9lUmjwiARRnsliRuCm2ZY0IHvneQN7NnOFCFFQQnu/7wMEywNWR3NMtj5AcMugs56OqcAglwq+HqYNCUkelt1/I7A/NwitaPEYu/1TDjQBckR6nbtJwHKFx2M9heB+E5iMI65r+ae01jBr+r7tes6UdEz7SCF3xHks3ubKfRQykZzTZ7ixeHYG5XjaUSSk8EDuBCdZOJ/AUAA+Rar/UPODUd1YQUZDUqs0MvB9zXQYBtEhwii75pCmkFBpZewo6xyktdP3964q7MZPZQZTZimh02CxcWdXZj6JkoL6ihuM36UciS9rXUgIGGdJcbhC5mP/PqRYsAzipOvQiRL7mGRB9L8H0Wt08yl3H0KFwGcgasML8tOOkf+4MsGIHJZaJ20cVfdWm1StOtLN1Bn+gAppq8nlvDgPiQ3NxSsvY+Qpb0WSVWknc1VyOPKexKaM20/alMv/fykVhVmmAcNVshIMAuKV5TnhqeZyg8L02pVAHL",
"authID": "http://example.com/receiver"
},
"senderSig": {
"type": "urn:oid:1.2.840.113549.1.1.10",
"encoding": "base64",
"sig": "S82Al/YgpfjywjagQ03tjr8WT2oiMSkuYGA5hoXL/LCZHJhR4UGuXyQe1lJ6+yDRiN8FbKcp6ZrClb645rKpIK9UP/Y50wOo/vXCdeUGRqWj4NduoJsBKAP9O4QfQQkT9POHwcbYDsbvEGm3M7fh7mrOn6PzQQgq8vNGayVP5VmFLofxhArc2cy7/TthDl5sBwngpIokHUGOIE+RXasifJ/KS+DALU2s51EZzP2NuTbOvC2328UD5yhvHTopwqn3OrMWbKjF8UUDFjQHYx383hrK3VPjqfrMMNT3OHiJB6t9pJwZ3lmD3PV0Axp6k1XV+oxckBaYN7dCNneQn+zkcw=="
},
"facts": [
{
"factID": "http://example.com/facts/fact1",
"sha256": "5fc62b0e99a143ff2b99b56a6953f07e96f52023aa3739bba3fec1194292f48e",
"serialization": "string"
},
{
"factID": "http://example.com/facts/fact2",
"sha256": "828bbc97b5b866992dc8bc532265e3094bc9e17cce05e16d90844d2160ad99cf",
"serialization": "string"
},
{
"factID": "http://example.com/facts/fact3",
"sha256": "c646cfa0feda9af766e6eca97f8578f3eb2b126d2349ea7ce1fd2d3b3fe2d456",
"serialization": "string"
},
{
"factID": "http://example.com/facts/fact4",
"sha256": "5845f61bccd9c5631dee29f9e87830b11eb5b531081a8888db42e80e2f153fc0",
"serialization": "string"
}
],
"timestamp": "2021-04-15T21:50:29.940Z",
"senderCustomContent": {
"authMethod": "PublicKey",
"authSuccessful": true,
"authUserId": "user123456"
},
"receiverCustomContent": {
"dbStorageId": "StorageCluster5"
}
}
}
We define one message schema per message identifier.
For this, we build upon the same specification of JSON Schema [JSON-SCHEMA][JSON-SCHEMA-VALIDATION] as in Section 4.4.1 JSON.
The message schemas can be obtained through the following links:
The message validator is used to validate a JSON message against an ordered list of schemas. It provides an interface to the client and server implementations specified in Sections 6.1.2 Complete (3-way) Handshake and 6.1.3 Abbreviated (2-way) Handshake.
Any implementation implementing the client or server part of the generation handshake MUST also implement the message validator.
The behavior of the message validator MUST be implemented as follows:
msg
) and a list of tuples (id_0,schema_0),...,(id_n-1,schema_n-1)
, where for i=0,...,n-1
, id_i
is a message identifier, and schema_i
is the according JSON schema according to Section 6.1.6 Message Schemas.
msg
against the JSON Schemas, starting with schema_0
, applying a first-match policy.
That is, for the first tuple (id_i,schema_i)
, such that msg
matches schema_i
, the message validator terminates and returns id_i
to the caller.
If none of the schemas match msg
, the validator returns None
(which MAY be represented as a string or as a language-internal representation of a null value).
We define a special message builder for error message identifiers, which provides an interface to the client and server implementations in Sections 6.1.2 Complete (3-way) Handshake and 6.1.3 Abbreviated (2-way) Handshake.
Any implementation implementing the client or server part of the generation handshake MUST also implement the error message builder.
The error message builder MUST be implemented with the following functionality:
{}
) referred to as res
.messageType
attribute of res
.
errorMessage
attribute of res
.
This field can be used to carry further meta-information about the error occurrence, but is not further specified.
res
to the caller.The following is an informative example of an error message with the UnknownMessage
message identifier as generated by the error message builder.
{
"messageType": "UnknownMessage",
"errorMessage": "Unrecognized message format!"
}
Note that we do not specify how error messages are handled. However, we recommend that error messages SHOULD NOT simply be ignored, as this behavior MAY lead to invalid (and thus invaluable) DTCs. An implementation SHOULD instead decide to either repeat the handshake step which caused the error, or abort the generation handshake, such that a new handshake can be initiated.
The JSON messages are either transmitted directly on top of TCP [RFC793], via TLS directly on top of TCP, or wrapped into HTTP [HTTP11] requests, optionally over TLS (HTTPS) [HTTP-TLS].
In order for the lower protocol stack to be transparent for the client and server implementation, we define an additional abstraction layer. This abstraction layer MUST implement two components:
Depending on the protocol stack, these components are implemented differently, as we specify in the following.
If only TCP is used (no TLS or HTTP on top), the server MUST provide an open port that can be contacted by the client. Upon contract handshake initiation, the client MUST open a connection to the server, such that both the client and the server have an open bi-directional TCP socket. The two abstraction components MUST be implemented as follows for client and server:
If TLS is used on top of TCP without HTTP, the server MUST provide an open TCP port that can be contacted by the client, but only accepts TLS traffic. Upon contract handshake initiation, the client MUST open a connection to the server and carry out a TLS handshake, such that a TLS-protected tunnel is established. Then, the abstraction components (i.e., the outgoing message interface and the incoming message handler) MUST be implemented as in the no-TLS case, but using the TLS tunnel instead.
If HTTP or HTTPS is used, the server MUST provide an HTTP(S) server to which the client can connect. Upon contract handshake initiation, the client MUST open a TCP connection (without TLS) or create a TLS tunnel through a TLS handshake (with TLS), through which HTTP traffic can be sent. For the abstraction components, we differentiate between client and sender.
The client-side abstraction components for HTTP(S) MUST be implemented as follows:
Content-Type
header to application/json
.
It MUST then install the incoming message handler, such that it gets called with the response to the request.
Content-Type
header does not indicate the application/json
type,
the implementation SHOULD initiate a retransmission of the previous message by either sending an UnknownMessage
error message (see Sections 6.1.4 Message Identifiers and 6.1.8 Error Message Builder & Error Handling), or by retransmitting the previous message, using the outgoing message interface.
Because the client is not simply able to provide feedback in the form of an HTTP status code, as it only performs requests, we leave error handling to the implementation. We refer to the general discussion of ReShare's approach on error handling in Section 6.1.8 Error Message Builder & Error Handling.
The server-side abstraction components for HTTP(S) MUST be implemented as follows:
200
.
The status code of a message with an error message identifier (see Section 6.1.4 Message Identifiers) SHOULD be set to one of the acceptable status codes from the table below, depending on the message identifier.
The Content-Type
header MUST be set to application/json
.
A 200
status code is considered acceptable for every defined error message, as these higher-layer errors are already uniquely identified through their respective message schemas.
Thus, using a 200
status code does not hinder an implementation's functionality, but we consider the usage of proper error status codes good practice.
Content-Type
header of the request does not indicate the application/json
type, the incoming message handler MUST respond with an empty response with a 406
status code, without calling the server-side implementation of the handshake.
Else, the body of the request is parsed as a JSON object, and the server-side implementation of the handshake (defined in Sections 6.1.2 Complete (3-way) Handshake and 6.1.3 Abbreviated (2-way) Handshake) is called with the parsed JSON object.
Additionally, the incoming message handler SHOULD store the context of the request, such that it can be passed to the outgoing message interface once it is called by the server implementation.
We define the following acceptable status codes for error messages based on the error message identifiers (see Section 6.1.4 Message Identifiers):
We only define status codes for error messages which can be sent by the server during the handshake, as a client only sends HTTP requests, which do not carry a status code.
Message identifier | Recommended HTTP Status Codes |
---|---|
UnknownMessage |
200 , 400 |
BogusSenderCert |
200 , 422 |
InvalidReceiverContract |
200 , 422 |
InvalidAbbrevContractRequest |
200 , 422 |
DTC verification can be executed fully locally, as the DTC itself contains all information necessary for its verification. This self-containing property of DTCs allows for efficient and unambiguous verification without the need to directly communicate with the involved parties.
To verify a DTC and the resources for which it contains checksums, access to the following information is required:
The verification steps immediately emerge from the design of the trust chain of DTCs. In order to verify a syntactically valid DTC, one MUST execute the following verification steps in any order:
sender
and receiver
using a pre-installed trusted root CA's public key as the trust anchor.
This step SHOULD include checking whether the public key certificates are issued for the respective authorities identified by the IRIs contained in the sender
and receiver
fields.
We further discuss this verification step in Section A.2 Identity Management.
senderSig
and receiverSig
using the public keys contained in the certificates in the sender
and receiver
fields and the signature verification process specified in Section 4.5.4 Signature Verification.
serialization
field.
Subsequently, the checksums need to be re-computed given the serialized facts, and compared to the checksum included in the DTC.
We do not further specify this verification step, as the process of serializing facts of different types is deemed out-of-scope for this document.
If any of the verification steps fail, the verification mechanism MUST terminate with a negative result.
Depending on the use case, it MAY be desirable to extend these verification steps, e.g., by verifying that the owner of the certificates in the receiver
and sender
fields are as expected.
While such extensions are not part of this verification mechanism, we advise implementors to carefully review that no unverified assumptions are made about the contents of a DTC.
ReShare with its specification of DTCs, the ontology, and the DTC creation and verification process, enables users to achieve data trustworthiness and reliability in a scalable manner. In this context, the central aspect not covered before by Web technology, but essential in the context of data-driven or industrial data sharing settings is the accountable involvement of both parties in the data transmission process, which is implemented using bilateral signatures in ReShare.
This section is non-normative.
In the following section, we briefly elaborate on some of the design decisions and considerations w.r.t. ReShare.This section is non-normative.
In recent years, both W3C itself and W3C Community Groups have been quite active in the field of expressing cryptographically-backed claims or statements about data. To the best of our knowledge, the following three documents are especially noteworthy:
ReShare was developed largely in parallel to these developments throughout years 2020 until early 2021, and the major parts of this document were created mostly from April to the end of 2021. ReShare was designed with backward-compatability with the existing Web infrastructure in mind and as such makes use of established standards at the time of design as a largely self-contained solution. That being said, future work, e.g., towards standardization, may potentially also make use of these related efforts. A potential role of Decentralized Identifiers in ReShare is discussed in Section A.2 Identity Management. In the following, we focus on Verifiable Credentials and the Data Integrity specification.
Verifiable Credentials (VC) [VC-DATA-MODEL] provide a cryptographically-secure and machine-readable approach to expressing credentials. An overview of conceivable use cases can be found in [VC-USE-CASES], and include a variety of claims in the areas of education, finance, healthcare and more.
The data model of a VC is defined independently from its representation. However, the specification defines both a JSON, and a JSON-LD representation, thus taking a very similar approach to ReShare.
As VCs represent very general means of expressing, presenting, and proving a set of claims in the form of credentials, it is conceivable that VCs could be used as a framework for an implementation of DTCs, together with a DTC generation mechanism similar to the one we currently specify.
However, the following two considerations have lead us to the decision of refraining from the use of VCs in ReShare as of now:
While a credential is defined as essentially consisting of metadata, one ore more claims, and one or more proofs, which is applicable to the model of a DTC, the use cases in [VC-USE-CASES] are very much centered around use cases of a single individual in everyday life.
This makes us wonder whether applicability in typical use-cases of inter-organizational data sharing of ReShare is given, as such scenarios might not have been considered in the design of the VC specification.
Probably the most essential design choice defining the paradigm of DTCs lies in the idea of bilateral on-demand signatures, as we describe in-detail in Section 4.1 Mutual Commitment through Bilateral Signatures.
In the VC specification, while multiple proofs within a single VC are supported, a VC always has one issuer by design (see 4.5 Issuer), which is incompatible with the paradigm of a DTC having two equally-involved parties, the sender and the receiver, whose signatures are both required for a DTC to be considered valid.
Of course, depending on future developments, the suitability of VC as a framework for DTCs should be re-assessed if a new version of ReShare is to be designed in future.
For example, as we discuss below, signature sets, as used in contracts, are included in the Data Integrity [DATA-INTEGRITY] specification, and could find their way into a future version of the VC specification, possibly expanding the set of use cases to those of DTCs.
The Data Integrity specification [DATA-INTEGRITY] strives to provide data models and representations of cryptographic proofs, such as signatures and integrity checksums, within the context of Linked Data.
Such mechanisms clearly find a promising use case in DTCs, as DTCs include integrity checksums of the data subject to the underlying data transmission (see facts
), as well as digital signatures of both DTC parties (see sender
and receiver
).
Even proof sets are already included in the Data Integrity specification (see 3.1 Proof Sets), for which we deem DTCs a very interesting use case.
Naturally, ReShare would greatly profit from employing a standardized mechanism of including and structuring these cryptographic proofs in DTCs. Therefore, we consider the Data Integrity specification as a promising mechanism to be used in a future version of ReShare.
As of now, ReShare uses a custom implementation of embedding signatures and checksums in DTCs, which has to be attributed to the temporal overlap of ReShare and the Data Integrity specification, as the Data Integrity specification is in a relatively early stage of standardization.
This section is non-normative.
Tackling the challenge of integrating a consistent and well-designed identity management approach, which also seamlessly interoperates within the ecosystem of common application contexts, clearly is a non-trivial task. We elaborate on our considerations w.r.t. an identity management system within ReShare in the following.
ReShare employs X.509 certificates for identity management. Parties of a contract are reliably linked to their signatures through their public key, which is contained in the DTC itself. Through this approach, we achieve a robust link between the party identified through an X.509 certificate to the signature that party creates.
However, the linking of an X.509 certificate to the party itself (e.g., a physical person or company) is also a major task in defining an identity management system. Here, we give recommendations on what such an approach should fulfill, but in general consider this task out of scope for ReShare.
The information about the two signing parties of a DTC include a public key certificate and an IRI - separated from the certificate - per party.
These IRI and public key certificate of a party are included in the sender
and receiver
fields of a DTC,
as described in Section 4.3 DTC Data Structure.
However, the IRI of a party should additionally be included in the subject part of a party's public key certificate. Thereby, the party identified through the IRI can be held accountable for the uses of the private key matching the public key provided in the X.509 certificate, as long as the certificate validity is trusted.
For this link of IRI to X.509 certificate to be trustworthy, self-signed X.509 certificates are only conceivable for testing purposes. In productive use, for the DTC to be valuable, certificates should always be valid within a certificate chain starting at a root certificate, which is commonly trusted by all conceivable verifiers of the DTC to be created.
As specified in Section 4.3 DTC Data Structure, we leave our system open to extensions w.r.t. other certificate technologies than X.509. Therefore, we also decided not to further specify a mechanism of mapping IRIs to parties such as phyisical persons or organizations, but consider it out of scope.
However, in the following, we discuss how new technologies and standardization approaches of W3C could be used in future to extend or improve identity management in ReShare.
We opted to use X.509 as our Public Key Infrastructure (PKI), as it is a commonly trusted system, and therefore does not hinder acceptability of ReShare.
However, X.509 is quite inflexible with the employed trust infrastructure, as it enforces a hierarchical trust structure by design. Furthermore, while it is a common use case of X.509 to verifiably link certificates to domain names, to the best of our knowledge, a mechanism to verifiably link certificates to parties such as persons or organizations can hardly be found.
For these reasons, deviating from pure use of X.509 certificates in ReShare may prove to be best in future. One technology is especially noteworthy with these regards, which is the Decentralized Identifiers specification [DID-CORE].
A Decentralized Identifier (DID) allows to identify an arbitrary entity, such as an individual or organization. Because DIDs themselves are URIs (Uniform Resource Identifiers), which in turn is a subset of IRIs, DIDs could be used within ReShare with ease.
However, the DIDs themselves only define a mechanism to access the DID document related to the DID, which contains the statements the DID makes, including the link to a physical identity, or the public key material. For the accountability and verifiability guarantees we deem crucial in ReShare, such information should be self-contained within a DTC itself. Now, while it is conceivable to directly include DID documents in a DTC, this conflicts with an essential design choice of [DID-CORE], that is, that the DID controller is in charge of altering, or more generally, controlling the DID document. When this DID document is included within the DTC, this makes the DID document immutable without the DTC losing its validity, and thus takes away the control from the DID controller. It is hard to say whether this deviation from the design of [DID-CORE] would be reasonable.
If one decides to employ DIDs in DTCs, and directly includes the attached DID documents in some representations, the DID document could completely replace the public key certificate of a party within ReShare. A public key can optionally be directly included within the DID document (see 5.2.1 Verification Material), making an external public key certificate unnecessary, as long as the trustworthiness of this public key can be guaranteed.
In our current approach, we have established verifiability independent of certificate availability by including the public key certificates directly within a DTC. For the use of DIDs to provide the same verifiability guarantees, the following points would have to be fulfilled:
x5c
property).
Note that both the use of publicKeyJwk
in [DID-CORE] and the use of x5c
in [RFC7517] are optional, and thus would have to be enforced in a future version of ReShare.
Furthermore, as the use of JWKs is currently the only specified stable mechanism for including public keys in DID documents (see 5.2.1 Verification Material), and JWKs rely on X.509 certificates, we still find ourselves with the disadvantages of using an X.509 PKI when using DIDs as of now.
Because of the stated disadvantages of X.509 certificates, we see the need for a novel mechanism to prove possession of a public key, which clearly relates said key to an entity. Such a mechanism should integrate well within the modern ecosystem of Linked Data, while building upon a secure and trusted PKI with well-defined methods to register or create your own certificate, which is linked to you as a person, organization, or different entity.
This section is non-normative.
We have introduced the shortened 2-way handshake as a way to reduce the communication overhead in an application scenario with high communication latencies. However, this shortened version requires that the transmission of the data which is signed in a given DTC is completed before DTC generation. With the complete 3-way handshake, the DTC generation is completely independent of the underlying data transmission, except that the receiver has to know which resources are transmitted.
The sequentiality arising from a dependency on the data transmission has practical disadvantages in many cases, such as an increased management and implementation overhead by more closely integrating the data transmission process into the DTC generation mechanism. Given the context system, configuration or implementation changes in the data transmission backend might be necessary to implement the necessary pre-sharing to allow for a short handshake.
Therefore, we consider the complete 3-way handshake the default handshake, but still specify the shortened 2-way handshake for special high-latency environments. Without a strong argument against it, we advise to use the 3-way handshake.
The authors are grateful for the supervision of Prof. Dr. Stefan Decker and Prof. Dr.-Ing. Klaus Wehrle.
The authors would like to thank Silvio Peroni for developing LODE, a Live OWL Documentation Environment, which is used for representing the Cross Referencing Section of this document and Daniel Garijo for developing Widoco, the program used to create the template used in this documentation.
The authors would further like to thank the reviewers of the ESWC paper [ReShare] for providing insightful and constructive feedback on the topic.
Funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under Germany's Excellence Strategy -- EXC-2023 Internet of Production -- 390621612.
ContractRequest
), the sender (S) assembles the DTC, signs it, and sends it to the receiver (S1=SenderContract
).
Finally, the receiver verifies and signs the DTC, and sends its own signature to the sender
(R2=ReceiverContract
).
AbbrevContractRequest
, S1'=AbbrevContract
.
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
Referenced in:
A Digital Transmisson Contract (DTC), used to create data immutability through bilateral signatures.