Trusty URIs make digital artifacts
Read the specificationverifiable,
Anyone can recompute the hash and compare it with the URI. There is no need to trust the server the content came from.
immutable,
Changed content has a different hash and therefore a different URI. What a trusty URI refers to cannot be silently replaced.
and permanent.
Any copy can be verified, so artifacts can be mirrored and archived anywhere and stay usable when the original location is gone.
A hash inside the URI
A trusty URI ends with an artifact code: a module identifier followed by a hash of the content. Whoever retrieves that content, from the original server, a mirror or an archive, can recompute the hash and check that it is exactly what the URI refers to.
http://example.org/r1.RAcbjcRIQozo2wBMq4WcCYkFAjRz0AX-Ux3PquZZrC68s
-
Any URI
Where an artifact lives and what it is called is up to you. A separator such as a dot comes before the code.
-
Module identifier
Two characters for the type of content and the version of the method: FA for files, RA and RB for RDF graphs.
-
Hash
SHA-256 of the content, written as 43 URL-safe Base64 characters. It changes whenever the content does.
Modules
The module identifier says what kind of content is hashed, and how. Version 1 of the specification defines three modules.
File content
SHA-256 over the bytes of a file. Its name and other metadata are not considered.
RDF graphs
Any number of named RDF graphs, hashed over sorted statements, so the serialization does not matter. The data may refer to its own trusty URI.
Single RDF graph
Like RA, but for exactly one graph.
Implementations
- Java trustyuri-java Library and command-line tools. On Maven Central as net.trustyuri:trustyuri, latest release 1.24.1.
- Python trustyuri-python Library, built on rdflib.
- Perl trustyuri-perl Library, built on RDF::Trine.
- SWI-Prolog trustyuri-swipl Library, work in progress.
- Test suite trustyuri-testsuite Test files for validating implementations.
All libraries are free software under the MIT License.
Specification
The specification formally defines the structure and meaning of trusty URIs. Version 1, dated 23 February 2015, is the current version. Future versions are meant to stay fully backward compatible.
Articles
Tobias Kuhn and Michel Dumontier. Making Digital Artifacts on the Web Verifiable and Reliable. IEEE Transactions on Knowledge and Data Engineering, 27(9), 2015.
Tobias Kuhn and Michel Dumontier. Trusty URIs: Verifiable, Immutable, and Permanent Digital Artifacts for Linked Data. In Proceedings of the 11th Extended Semantic Web Conference (ESWC). Springer, 2014.
Slides of the talk at ESWC 2014