[OpenSheaf] [specification] [use cases] [FAQ] [tools] [formal model] [first archive]OpenSheaf

OpenSheaf: an open format for document archives and collections

Specification, version 0.2 (draft), 23 November 2026. OpenSheaf is a common, open format for archives of scholarly documents and for collections of them, built on the Oxford Common File Layout (OCFL 1.1) and the DataCite Metadata Schema (4.7). The text is licensed under CC BY-SA 4.0; the JSON Schemas are dedicated to the public domain (CC0 1.0).
Warning. Draft. Until version 1.0, any revision may change the format in incompatible ways. Version 0.2 is incompatible with version 0.1, which is kept as published (section 16.1). The text before its rebuild, with the changelog of every revision of the draft, is kept as the reference text.

1. Introduction (non-normative)

OpenSheaf is a lean alternative to arXiv and to the usual publication infrastructure. Any author, group or institution can keep an archive of its documents as plain files, served as a static website, checkable by anyone, and composable with other archives:

Two companion texts go with this specification: OpenSheaf archives in git, for archives kept in git repositories, and the timestamps extension, for dating signatures. Questions about the design are answered in the FAQ, and the use cases show the format at work.

The name: a sheaf is a bundle of papers and, in mathematics, the structure in which local pieces glue into a whole, as archives kept and checked separately compose into collections. The home of the format is https://opensheaf.org/; the first archive is https://mgubi.org/papers/, whose values appear in the examples.

2. Conventions and conformance

The key words MUST, MUST NOT, REQUIRED, SHALL, SHALL NOT, SHOULD, SHOULD NOT, RECOMMENDED, NOT RECOMMENDED, MAY and OPTIONAL are to be interpreted as described in BCP 14 (RFC 2119 and RFC 8174) when, and only when, they appear in all capitals. Sections marked non-normative, examples and notes are informative.

JSON means RFC 8259 JSON in UTF-8 without a byte order mark. URLs are absolute unless stated otherwise; a relative URL in a JSON file is resolved against the URL of that file. Digests are written in lowercase hexadecimal unless stated otherwise. DOIs are written bare (10.5281/zenodo.123), without a resolver prefix. Terms are defined where they are first introduced, written thus. Numbers in the JSON files this specification defines are integers, written without a fraction or an exponent, of absolute value at most 2^53 - 1, so that every reader parses them exactly; in a genesis record and in keys.json, whose values are compared and recomputed byte for byte (sections 5.1 and 6.1), this holds for every number, in the data of extensions included, and a file breaking it is malformed.

Conformance classes. An archive, an object or a program conforms to a class when it meets every MUST and MUST NOT of the sections listed for it:

Profiles. An archive MAY also follow the profiles of appendix A (Zenodo, TeXmacs, website), and MUST list in its discovery document those it follows.

Extensions. An extension is a specification published apart, named by a URI (RECOMMENDED: the https URL where it is published), that records what this specification leaves open, so that tools aware of it can act on it. Its data is kept under extensions, keyed by the extension's name: in object.json (section 4), where the inventory and the pins fix it, or in keys.json (section 6), where the owner's signatures fix it, and for the first version of a key log in the genesis record of the owner, which its owner name fixes (section 5.1). An extension MUST NOT change the meaning of what this specification defines, nor relax its requirements: archives, objects and collections are read and verified without knowing any extension, and readers ignore extensions they do not know. The discovery document lists the extensions its objects use (section 3.1). The timestamps extension is one.

Schemas. The JSON files defined here MUST validate against the JSON Schemas of appendix B for their declared format version.

3. Archives

An archive is a host of objects, served at a base URL ending with /. It holds the lines that owners write there (section 7) and copies of lines written elsewhere (section 11). No file of an object names the archive that holds it (section 4.3), and what is authentic is decided by pins and the owners' signatures (sections 4 and 7), never by where a file was fetched; an archive decides only which owners it hosts and how they deposit (a university admitting its staff, a journal its editors). Its base URL is a location, not a name, and may change; an archive's files MAY be served at several base URLs, each a location of the same archive.

An archive consists of a discovery document, REQUIRED (section 3.1); a storage root, REQUIRED (section 3.2); indexes, RECOMMENDED (section 12); and presentation files, OPTIONAL: web pages and other files generated for readers, never authoritative, kept outside the storage root (appendix A).

Serving. The discovery document, the storage root and the indexes MUST be served byte for byte, as stored: no conversion of line endings or character sets, and no compression that changes the bytes delivered after decoding. Archives SHOULD be served over HTTPS, and SHOULD allow cross-origin requests to these files (Access-Control-Allow-Origin: *), so that tools in a browser can read them. Any static web server will do; an archive kept in git follows OpenSheaf archives in git.

Being found. How readers and services learn of an archive is not part of this specification, and indexes (section 12.5) are maps for resolvers, not search services. A public archive SHOULD nevertheless be indexed by at least one searchable service: by following the website profile (appendix A.3), whose landing pages search engines and Google Scholar read; by following the Zenodo profile (appendix A.1), whose DOIs are searchable in DataCite and in the aggregators it feeds; or by publishing an OAI-PMH static repository for harvesters (appendix A.3).

Moving. An archive moving to another site, or served at another, copies its files unchanged, its drafts included (section 10); nothing in them changes, so every pin, signature and witness stays valid. Its base URL, and every location of a copy given elsewhere (in collections, sheaf: URIs, indexes), is a hint that needs no signature: whatever is fetched from it is checked against pins and signatures, so a wrong or stale location gives a reader nothing, or an older valid copy, never a forged one.

3.1 The discovery document

The discovery document is the JSON file opensheaf.json at the base URL. Static web servers cannot list folders; this one file makes an archive's objects known. It MUST contain:

It SHOULD contain contact, a URI, and extensions, the names of the extensions its objects use (section 2). It MAY contain drafts, the drafts it chooses to show, with id, kind and head, as unfinished work on which nothing may rely (section 10); indexes, which maps each index kept to the length of the prefixes of its files (section 12.5); and feed, the URL of an Atom feed of new object versions. It MUST contain tombstones once an object has been taken down (section 13.3).

The discovery document is rewritten whenever an object is added or changed. It is a map, not a witness: everything it states about objects MUST agree with the storage root, which verifiers check (section 14), and it lists what the archive holds, not every line an owner has elsewhere.

Labels. A label is a short readable name an archive MAY give a line it holds, for readable URLs on its website: it matches ^[a-z0-9]+(-[a-z0-9]+)*$, has at most 64 characters, and is unique in the discovery document. It is the archive's choice, may change, and is not an identifier; permanent links use sheaf: URIs (section 12). A label is never recorded in a fixed file: an address written in an object version is built from the line's name (appendix A.3), so that a label changes without leaving a broken address behind. Labels SHOULD be chosen by the depositor, not derived from the title.

Private archives. An archive need not be public. Kept in a private repository or on its owner's machine, or served only to some readers (a journal behind a paywall), it follows this specification all the same, and whoever has its files deposits, pins and verifies in it as in any other. An archive serves all its lines or none: its discovery document lists every object of its storage root, and no archive serves only part of its lines. An owner who wants to publish some of the lines it keeps privately copies them into a public archive (section 11): a copy of a line is the same line, with the same inventories, signatures and witnesses, so that pins made before stay valid. A version that no reader can reach is reported unavailable (section 8.5).

Pages. An archive with many objects lists them in pages: in place of objects, objectPages, a non-empty list of the paths of page files, relative to the discovery document (no scheme, no leading /, no . or .. segment). A page is a JSON file with format, "opensheaf-objects/0.2", and objects, a non-empty list of entries of the form above; every object is in exactly one page, and labels are unique across the pages. Wherever this specification speaks of objects, it means the entries of the pages for an archive that pages them. Pages SHOULD group objects by a prefix of their name, so that a deposit rewrites one page, and hold about a thousand entries each (some 0.5 MB); tools SHOULD page objects beyond about a thousand objects. Readers MUST accept both forms.

3.2 The storage root

The storage root is an OCFL 1.1 storage root at the URL storageRoot, holding the archive's objects (section 4). Since OCFL allows in it only the folders that lead to objects, and extensions, it SHOULD be a dedicated folder (by convention ocfl/), and presentation files MUST NOT be placed in it. It MAY contain, as loose files, copies of the OCFL specification and of this one. Its storage layout is the one storageLayout names in the discovery document, which is authoritative. OCFL's ocfl_layout.json, OPTIONAL in OCFL, may name only a layout registered as an OCFL extension (OCFL 1.1, section 4.1), and is therefore present for the hashed layout only:

Archives SHOULD use the owner-name layout, unless one folder per owner or per name becomes impractical (tens of thousands of lines, fewer in a git repository). The layout is chosen when the archive is created and SHOULD NOT be changed: pins stay valid, since readers compute paths from storageLayout, but every URL into the storage root changes.

Open question. Registering the owner-name layout as an OCFL community extension, so that ocfl_layout.json can name it (#59).

4. Objects

An object is an OCFL 1.1 object in a storage root. Its kind, given by its object.json and never by its identifier, is document, one work (an article, notes, a thesis, a book) with its sources and renditions; collection, a list of members (section 8); or owner, the key log of an owner (section 6).

Identifier. The identifier of an object, its OCFL id, is sheaf:<name>:<owner>, the name of the work (section 5) and the owner name of its line's owner (section 6), which object.json records as name and owner. It names the line (section 7), in every archive. A branch is a new object with its own identifier (section 9); a draft is sheaf:draft:<id> (section 10). The identifier MUST be unique in the storage root, and that of a sealed object MUST NOT be reused there, also after a takedown (section 13).

Versions. An object version is an OCFL version of an object (v1, v2, …): every change of the object makes one. Once made, no object version, and no file of the object's witness folder (section 7.2), is changed or removed, except: in a draft, which may be rewritten or deleted (section 10); and by a takedown, which deletes the whole object (section 13.2). A document version is a version of the work, a positive integer numbered by the owner of the line and recorded in object.json and datacite.json; it changes only when the document's own files change (section 4.2), so several object versions may hold one document version, with different descriptions or notices.

Pins. A pin is the pair (object version, SHA-512 digest of that version's inventory file, as its checksum file states it). An inventory records the digests of the files of its version and of every earlier one, and the object.json of every sealed version after the first records the digest of the inventory file of the version before (previous, section 4.3), so a pin fixes the object up to that version, the bytes of every earlier inventory included, in any copy. Collections (section 8), branches (section 9) and sheaf: URIs (section 12) refer to object versions by pins, and pin only signed versions (section 7). In a valid object the checksum file states the digest of the bytes of its inventory file (OCFL 1.1), so the two are the same; tools write the digest the checksum file states, and verifiers check both, a difference being an error (section 14.2).

4.1 Common rules

Every object MUST be a valid OCFL 1.1 object, and:

Deposits. Each version in the inventory MUST have a user with a name, SHOULD give its address (an ORCID iD, a mailto: URI or another URI identifying the depositor), and MUST have a message describing the change, except the first version of a key log, which has neither (section 6.1). The created date and user of an object version record its deposit, not repeated in object.json; the deposit of a document version is that of the first object version holding it.

Content. Every object version MUST contain, at the top level of its content, object.json (section 4.3); datacite.json (section 4.4), except in an owner object; and the genesis record genesis.json (section 5), except in a draft. Every version of a branch also holds the evidence of its branch point, in the folder parent/: parent/inventory.json, parent/object.json, parent/signatures/ and, for a branch of a branch, parent/parent/ (section 9). The genesis record and this evidence are the identity files of the object, never files of the document's own. The names of every file this specification defines at the top level of the content (object.json, datacite.json, genesis.json, members.json, keys.json, forked, parent) are reserved for those files. A collection version also holds members.json (section 8). An owner object holds genesis.json and keys.json (section 6), a fork record forked/ instead of keys.json (section 6.3), and no datacite.json; it has no document versions, and is never withdrawn or branched. Signatures and other witnesses are kept outside every version, in the object's extension folder extensions/opensheaf-witnesses/ (section 7).

4.2 Documents and document versions

A document version holds, at the top level of its content, besides the files of section 4.1:

The sources, the renditions and the change note (changes, section 4.3) are the document's own files. A collection (section 8) is a document whose source is its member list: its own files are members.json, its renditions, if any, and its change note, and the rules of this section hold for it as for any document. HTML versions and other presentation files SHOULD NOT be deposited.

Numbering. The owner of the line numbers document versions from 1, without gaps, independently of any external numbering: a work whose versions 1, 3 and 4 are on arXiv has document versions 1, 2 and 3. External labels (arXiv's v3) are recorded in external (section 4.3); presentations SHOULD show them with the document version. Branches number as section 9 says.

New versions. The own files of a document version are compared as pairs of a logical path and a digest, so that a renamed file is a change. A new document version is made exactly when the document's own files differ from those of the current version (a file added, changed, renamed or removed, the change note included), except when a version without sources is completed (below). An object version that holds an existing document version (a description-only version, a completion) holds exactly its own files. Own files that are those of an earlier document version other than the current one, deposited again, are a revert: a new document version, with the next number, whose change note SHOULD name the version it returns to. For a collection, any change of members.json is thus a new document version: a member added or removed, a pin moved, a reorder, a citation refreshed (section 8.2). A version not public at the time (the manuscript submitted to a journal), deposited later, is a document version like any other; a version published by someone else (the journal's version of record) is not, and is linked by a relation (section 4.4).

Description-only versions. A description-only version holds an existing document version with its own files unchanged, and changes only the description of the object: datacite.json (a DOI, a link to the published article, the licence in rightsList) and, in object.json, stage, agreement, licence, extensions, the state of the object (status and withdrawal, section 13), its notices and its history (below); it MAY add entries to external, which stay, unchanged, in every later object version holding that document version. The fields that say what the files of a document version are (mainSource, sourceFormat, sourcesMissing, renditions and toolchain, section 4.3) belong to the document version, like its change note, and are the same in every object version holding it, except as a completion adds to them (below): a wrong one is corrected by a notice or by a new document version. A description-only version MAY hold any document version, so that an earlier one can be described, a collection's earlier member list included; tools otherwise hold the current version. If the object has history, the entry of that document version becomes the new object version.

Completion. A document version deposited with sourcesMissing (section 4.3) MAY be completed, keeping its number, by object versions that add its sources, possibly with renditions made from them (named in mainSource, sourceFormat, renditions and toolchain), and change or remove no file of the version. It keeps sourcesMissing until the sources are complete; the object version that completes them names the main source and drops sourcesMissing, and the version is then fixed like any other.

History. The history of a document is the order of its document versions in the history of the work: the order of their numbers, unless object.json has history, the list, in that order, of the last object version holding each document version. A document version deposited out of order (an earlier version found later) gets the next number like any other, and is placed earlier in the history by history, which the object version depositing it writes: writing history is how a deposit out of order is recorded, and a version deposited without it is the last of the history, and so the current version (a later description-only version MAY then write history to place it). Once written, every later object version MUST keep history. A version whose place is unknown goes just before the current version, and its change note SHOULD say so. The history is read from the latest signed version of the line (section 7); earlier object versions keep it as it was then known. Dates never order document versions.

Current version. The current version of a document is the last of its history. The latest signed version may hold another document version, deposited out of order or newly described; the current version stays where it was. Landing pages, indexes and citations use the current version.

Notices. A notice is a statement about a document version made after it, since the version cannot change (that a theorem of version 2 is wrong as stated, and corrected in version 3). Notices are added to notices by description-only versions, at its end, and stay, unchanged and in the same order, at the start of notices in every later object version (for a branch taking a new branch point, see section 9.4). A notice is thus identified by its position: notice k of a line is the k-th entry of notices, counted from 1, in every version that holds it. A notice is corrected or withdrawn only by a later notice about the same document version that names it in replaces (section 4.3), and saying what it corrects or that it withdraws it; each notice is replaced at most once. The current notices about a document version are its notices that no notice replaces, read from the latest signed version of the line (section 7.3); a withdrawing notice is itself current, so that readers see what was said and taken back. Presentations showing a document version SHOULD show the current notices about it, and MAY show those replaced, as such. The date of a notice is the date its author issued it, which may be earlier than its deposit (an erratum printed before); the deposit is that of the object version that added it (section 4.1), and the date SHOULD NOT be later.

4.3 The object record: object.json

Every object version MUST contain object.json, the record of the object's identity, content, versions and state; it names no archive. It MUST contain:

The inventory chain. Signing a version fixes, through previous, the bytes of the inventory file of every version before it, not only the files they record: a version vouched for by a later signed version (section 7.3) is fixed byte for byte, and its pin is as reliable as that of a version signed directly (#46). Two versions of one number with the same previous share their history; with different ones, they differ in an earlier version too.

An owner object has only these fields, previous included, and MAY have extensions (below), though data concerning its key log goes in keys.json or, for the first version, the owner's genesis record (sections 5.1 and 6.1).

A note is an object with text, a short plain text, or path and mediaType, a file of the content of the same object version, or both.

A document MUST have mainSource (a logical path) and sourceFormat (its media type), and SHOULD have renditions, a list of path (a logical path) and mediaType, and toolchain, a list of tools with name, version and, OPTIONALLY, packages, enough to reproduce the renditions. A document version without its sources has instead sourcesMissing, a note saying why ("arXiv keeps only the PDF of this version"), and at least one rendition; a rendition is never presented as a source. A document MAY have:

A collection has no mainSource, sourceFormat, sourcesMissing or licence, since its source is members.json and its own files are under CC0 (section 8.6); it MAY have the other fields of a document, its renditions holding no part of its members. A document or a collection MAY have:

4.4 The description: datacite.json

Every object version except in an owner object MUST contain datacite.json, the DataCite 4.7 properties in the form of the attributes of a DOI in the DataCite REST API: the authoritative description of the object version. It MUST contain titles, creators (with name and nameType; personal names SHOULD also have givenName and familyName), publicationYear, types (with resourceTypeGeneral), version (the document version as a decimal string without leading zeros, "3"), publisher and rightsList (below). It SHOULD contain:

publisher is the owner of the line, the body behind it (a journal, an institution), or the service registering the version's DOI (appendix A). publisher and affiliation SHOULD be objects, with name and, where available, an identifier; readers MUST also accept strings. doi and url are present when the version has a DOI; url is the line's landing page at the address built from its name, never from a label (appendix A.3). resourceTypeGeneral is from DataCite's list (Collection for collections), with resourceType for detail ("Lecture notes"). An author's versions of a work not published elsewhere, the accepted manuscript included, are Preprint; stage in object.json gives their stage.

Rights. rightsList lists licences and rights statements, at least one, so that a reader always knows on what terms the files may be used (#79). An entry with rightsIdentifier or rightsUri is a licence: one with an SPDX identifier has it in rightsIdentifier, in lower case, with rightsIdentifierScheme SPDX, and SHOULD have the licence URL; one without has its name in rights and the URL identifying it in rightsUri (for arXiv's default licence, http://arxiv.org/licenses/nonexclusive-distrib/1.0/). An entry with neither is a rights statement, such as "All rights reserved". Where the rights are not known (an old paper imported without its terms), a rights statement says so, rather than the list being left out or empty.

Mathematics. Titles and abstracts are plain text, in which mathematics MAY be written in LaTeX between single dollar signs ($\Phi^4_3$; a literal dollar is \$). It SHOULD use only the mathematical commands of LaTeX with amsmath and amssymb, which common renderers display without the document's preamble. Tools importing them SHOULD replace the authors' macros (\R) with standard LaTeX when their definitions are known, and otherwise keep them; they MUST NOT invent definitions.

Dates. Each date type has one meaning:

Dates MAY be approximate, as DataCite allows (2019-03, 2018/2019), with dateInformation saying why; unknown dates are omitted.

Relations. In relatedIdentifiers:

5. Names

A work, and an owner, has a name: a digest of its genesis record, the same in every archive and copy, which anyone holding a copy can check. An owner's name is its owner name (section 6).

5.1 The genesis record

The genesis record is the JSON file genesis.json at the top level of the content, written when a work is sealed (section 10) or an owner created (section 6). It contains:

The genesis record MUST be part of every object version of the object and of its branches (section 9), byte for byte. It MUST be in UTF-8 without a byte order mark, and SHOULD have LF line ends. Since the name is the digest of its bytes as stored, tools MUST NOT rewrite or re-serialise it. A tool MUST NOT copy a genesis record into an object that is not a copy or a branch of the work it was written for, nor reuse a nonce.

5.2 Computing a name

Algorithm k, for k from 0 to 15, takes the SHA-256 digest of the seed opensheaf-name-<k> (ASCII, k in decimal, followed by a line feed) followed by the bytes of genesis.json, and writes it in lowercase base32 (RFC 4648, without padding): 52 characters, the last of which holds the last bit of the digest and four zero bits, which are set to k. A name thus matches ^[a-z2-7]{52}$, and its last character gives its algorithm (a or q for algorithm 0), so names made by different algorithms never coincide. Names are compared as strings, never decoded: a name of algorithm 1 to 15 sets bits that RFC 4648 requires to be zero, so it is not canonical base32, and a strict decoder may reject it. object.json records a line's name as name; appendix C gives examples.

A genesis record thus has 16 names of one work (section 12 searches for a work by all of them). Its genesis name, made by algorithm 0, is the same for every line of the work. Every line is named by its genesis name, except a branch renamed after a clash, and branches named after it (section 5.3).

5.3 Origin and clashes

Origin. The originator of a work is the owner its genesis record names in originator; an owner is its own originator. The originator's line is the origin of the name: it has no parent, and its first version MUST be signed by the originator (section 7), except the first version of a key log, which is computed from the genesis record (section 6.1). Every other line of the genesis record is a branch and MUST declare its parent (section 9); a line of another owner that declares none is not a valid line of the name. A tool refuses a branch owned by the originator, which takes in another line's work by depositing it (section 9.5).

Clashes. An owner has one line of each name, and no two objects of a storage root have the same line (section 4). A clash can arise only when a line is made, and the tool that makes it resolves it against the archive where it writes and the lines of the same owner it knows elsewhere that are signed (section 7):

Lines of different owners never clash. A branch is always written with its owner part (section 12.1).

5.4 Reused genesis records

A genesis record reused for another work gives no valid line: the originator's line needs the originator's signature, and every other line needs a chain of signed parents back to it (section 9). A second history that the originator signs under its own record is a fork of its line (section 7).

When an object is created or deposited, an archive that holds an object or a tombstone with the same genesis record, compared by genesis name (genesisName of a tombstone, section 13), MUST refuse it unless it is signed by the originator (the originator's line) or is a branch whose branch points are confirmed back to the originator's line (section 9.3).

A work refused for a reused genesis record is sealed anew, under a genesis record of its own, and its datacite.json MAY relate it to the version it was refused as (IsIdenticalTo or IsVariantFormOf, section 4.4). No record wraps another: a genesis record never names another one.

6. Owners

An owner is a keyed identity: a person, a group or an institution that decides the versions of its lines and signs them (section 7), wherever they are stored. It is an object of kind owner (section 4), named by its genesis record (section 5): its owner name is the name of that record, the name that genesis records (originator), object.json (owner, and owner in parent) and sheaf: URIs (section 12) record. The owner object is the owner's own line, (owner name, owner name), at <owner>/<owner>/ in the owner-name layout (section 3.2). Its object versions are the owner's key log.

6.1 The key log

Every version of the key log, except a fork record (section 6.3), holds, besides the files of section 4.1, the file keys.json, with:

A rotation key is revealed once it has signed a version of the key log. In the genesis record of an owner and in every keys.json, earlier versions being those before it on its side of a fork (section 6.3):

  1. threshold MUST NOT exceed the number of keys, nor nextThreshold that of next;

  2. keys MUST NOT list a key that this version or an earlier one exposes, nor a rotation key, revealed or not (a key whose digest next of this version or an earlier one holds);

  3. next MUST NOT hold the digest of a current key of this version or an earlier one, nor a digest that next of an earlier version holds, so that each rotation key is committed in one version only;

  4. exposed MUST list only keys that keys of an earlier version lists.

Key-log versions are the OCFL versions of the owner object (v1, v2, …); an owner object has no document versions. The first version is computed from the genesis record, and is never signed. It MUST hold exactly three files, whose bytes are fixed: genesis.json, the genesis record; object.json, the JCS form (RFC 8785, the JSON Canonicalization Scheme, without a final line feed) of an object with format, specification, kind owner, status active, and name and owner, both the owner name (section 4.3); and keys.json, the JCS form of an object with format and the keys, threshold, next and nextThreshold of the genesis record. Its inventory file MUST be the JCS form of the OCFL 1.1 inventory of these files, with nothing else: digestAlgorithm sha512; head v1; id the identifier of the owner object, sheaf:<owner>:<owner>; type https://ocfl.io/1.1/spec/#inventory; manifest, mapping the SHA-512 digest of each file, in lowercase hexadecimal, to a list of its content path, v1/content/ followed by its name; and versions, holding only v1, with created, the created of the genesis record, and state, mapping the same digests to lists of the names of the files; no contentDirectory, fixity, message or user. Its checksum file states the SHA-512 digest of that inventory file, as OCFL requires. These files, and so the digest of the inventory file, are thus the same in every copy, and any reader can rebuild them from the genesis record; a signature naming the first version pins them. A first version with other files or other bytes is invalid, an error (section 14.3), never a fork (section 6.3). No owner tool writes a signature file for it. The keeper and the data of extensions as of the first version are those of the genesis record (section 5.1).

The versions after the first are signed by rotation keys:

  1. every later version vN+1, except a fork record (section 6.3), MUST be signed by at least nextThreshold distinct rotation keys of vN, the keys whose digests next of vN holds, nextThreshold being that of vN (for v2, those of the genesis record);

  2. its signature files name these keys, and so reveal them (section 7.2);

  3. current keys never sign a version of the key log, and rotation keys sign nothing else.

From the second version on, object.json has previous (section 4.3), and a version MAY also hold files that this specification does not define (a display name, for instance), signed with it. Signature files, and when a signature is good, are defined in section 7.

A current key is added, retired or exposed, a threshold or the data of an extension changed, or the owner ended, by a new version of the key log, which also commits the next rotation keys; the owner name never changes, nor does the keeper, which the genesis record fixes: another keeper means another owner (section 6.6). Changing the current keys or threshold affects only signatures naming the new version or a later one: signatures naming earlier versions stay good (section 7.1).

6.2 Creating an owner and choosing its keys

An owner tool creates an owner by making its first current keys and rotation keys, writing its genesis record, with kind owner, keys, threshold, next and nextThreshold, and OPTIONALLY keeper and extensions (section 5.1), and the first version of its key log, computed as section 6.1 says. An owner is its own originator, and its owner object has no parent, so its owner name is made by algorithm 0 (section 5.2). If the owner name is taken, in the archive where the tool writes or among the owners it knows elsewhere, the tool draws a new nonce (section 5.3).

Current keys. Current keys are in daily use: one on each device the owner signs from (a laptop, a desktop), made there and never copied to another device. A person usually has a threshold of 1; a group or an institution MAY require the keys of several members, by a threshold of 2 or more, so that a thief holding one of them signs nothing alone.

Rotation keys. Rotation keys are kept apart from the current keys and from each other (on hardware tokens, for instance), and used only to sign the next version of the key log. Owner tools SHOULD offer three, with a nextThreshold of 2, which survive the loss of one or the theft of one. The minimal setup, which owner tools MAY offer, is a nextThreshold of 1 with at least one rotation key kept offline (printed, or on a USB key kept apart); its risk MUST then be stated: the loss of that key leaves the owner unable to change its keys or end, and its theft lets the thief take the owner over (section 15.1). A rotation key is used once, and committed in the next of one version only (section 6.1): once the next version is signed, the rotation keys of the version before, whether they signed or not, are never used again, and the owner SHOULD destroy them. Owner tools MUST warn that an owner left with fewer than nextThreshold rotation keys of the latest version of its key log can never change its keys or end.

Retiring a key. An owner retires a current key it no longer uses (a replaced laptop, a member who leaves the group) by leaving it out of keys in a new version of its key log. Signatures made with it stay good, and a retired key in someone else's hands still makes good signatures naming the versions that list it; section 6.3 says when to expose it instead.

6.3 Ending, exposed keys and forks

Ending. An owner ends by signing, as usual, a last version of its key log with ended true, without keys, threshold, next and nextThreshold, and, OPTIONALLY, successor, the owner name of a new owner that continues its work, which MUST differ from its own owner name. The ending version only ends: it has no keys, so nothing is signed against it, and signatures made before it name earlier versions, and stay good. Owner tools MUST NOT sign anything for an ended owner. A successor is a hint, never followed automatically, and is accepted only as section 6.6 says. An owner is ended when its key log has an ending version or a fork record (below).

Exposed keys. A current key is exposed when a version of the key log lists it in exposed: a key listed in keys of an earlier version of the same key log, retired or not. An exposure counts in any version of the key log, on either side of a fork (below), in a version a fork record carries included: a thief that forks the key log may thus expose the owner's earlier keys, which makes contested what they signed (section 7.3), but never makes a version signed. Exposed keys concern only the versions of the owner's lines (section 7.3), never those of its key log (section 6.1). An owner whose current keys may have been exposed (stolen, leaked, copied), and could together reach the threshold of some version of its key log that lists them, MUST at once sign a version of its key log that exposes them, or end; otherwise retiring them is enough. Only rotation keys sign that version, so whoever holds the current keys can neither prevent nor contest it.

Forks of a key log. Two signed versions of a key log with the same number whose inventory files differ are a fork of the key log; the first number at which two copies hold such versions is its fork point. The first version is computed, the same in every copy (section 6.1), so a key log never forks there; only nextThreshold rotation keys of the version before can make a fork: rotation keys stolen before use, or kept after it. The format cannot tell which side is the owner's, so a fork ends the owner, at the fork point, and freezes it (section 7.5); no version of either side from the fork point on names a successor that is accepted (section 6.6). An owner that finds a version of its key log it did not make, and still holds nextThreshold rotation keys of the version before, MAY sign another version of that number, which ends it (section 7.4).

Fork records. An archive keeps the versions of a key log it holds, the side it saw first (when it meets both sides at once, either one, since each ends the owner), and never replaces or removes one but by a takedown (section 4). When it meets, directly or carried by a fork record of another copy, a signed version of the key log whose inventory file differs from that of the version of that number it holds, after versions with the same inventory files as its own, it MUST append a fork record: a version of the key log after the latest it holds, made by the archive (its deposit, section 4.1), and not signed. When the copy that carries that version in a fork record holds, below the record, the same versions as the archive, that copy is the longer (section 6.5): the archive appends its fork record, byte for byte, like any version, instead of making one. A fork record:

  1. holds genesis.json, that of the first version byte for byte; object.json, with the fields of that of the first version and previous (section 4.3); no keys.json; and the versions of the other side it met, from the fork point to the latest signed version of that side, each under forked/<d>/, where <d> is the first 16 characters of the lowercase base32 (RFC 4648, without padding) SHA-256 digest of its inventory file: that inventory file as inventory.json, its checksum file as inventory.json.sha512, its keys.json, and its signature files signature-<k>.json with the witnesses beside them (section 7.2), byte for byte, under the names they have in the witness folder of that version. These versions are carried, and each carried inventory has the id of the owner object;

  2. is valid only when it holds nothing but these files, every file under forked/<d>/ but inventory.json, inventory.json.sha512 and keys.json being read as a file of the witness folder of that version (section 7.2), so that a file a reader does not recognise there is reported and never makes the record invalid; the first version it carries is signed (section 7.3) against the version before it held below the fork record, and its inventory file differs from that of the version of its number held below it; and every later version it carries is signed against the version before it on its side. The earlier versions a carried inventory records, and its previous, are not compared with those held: its signatures, whose keyLog pins the version before it as held (section 7.2), show the fork. Otherwise it is not a version of the key log;

  3. has as its fork point the number of the first version it carries;

  4. is never a side of a fork: copies of a key log are compared up to the version before their fork records, and a version held in one copy at the number of a fork record of another, or after it, is no fork;

  5. is copied with the key log like any version, so that every copy shows the fork; copies of a key log may differ after the fork point, each archive keeping the side it saw first.

The end of a key log. No version of the key log follows a valid fork record, and none follows an ending version but a fork record, which carries the other side from the fork point on: any other version held after either is not a version of the key log, and a fork met once the key log has a fork record is reported, not recorded.

6.4 After an end or an exposure

The signatures of an ended owner, and those made with exposed keys, stay good, since the format does not date signatures; but readers cannot tell them from a thief's, and trust them only as far as other evidence goes: copies held before, the pins of collections (section 8), timestamps (the timestamps extension). A version of a line that needs an exposed key, or whose signatures name a version of its owner's key log from a fork point on, is contested, unless other evidence dates its signatures before (section 7.3). While it is not ended, the owner MAY sign again, with current keys not exposed, versions it knows it made that are contested by an exposed key (section 7.1); owner tools sign nothing for an ended owner (section 6.3), and after a fork nothing is added without evidence (section 7.5).

Ended owners. An archive that knows an owner is ended adds that owner's key log up to the ending version, with the fork record that may follow it, or up to the fork record, also as a new deposit, and that owner's other lines only as section 7.5 says, a fork freezing the owner. The work of an ended owner continues only under its successor, by branches of its versions (section 9). Resolvers and verifiers report ended owners, by an ending version or by a fork with its fork point, exposed keys, and successors, accepted or claimed (sections 6.6, 12 and 14).

6.5 Key logs travel with the objects they sign

A key log checks itself from its owner name: its first version is computed from the genesis record, which lists the first current keys and the digests of the first rotation keys, and each later version is signed by the rotation keys that the one before commits to. A copy from any source is therefore as good as the original, and a line can be checked without trusting any host, also after the archives that served it have gone.

Every copy of an object, in any archive, MUST hold beside it, as owner objects in the same storage root at their paths (section 3.2), the key logs of the owner of its line and, for a branch, of the owner of each parent whose signatures its evidence holds, in parent/signatures/ and at every level of parent/parent/ (section 9). Each is copied up to the latest version that whoever makes the copy knows, and at least up to the versions its signatures name, or up to a fork record that carries them (section 6.3). The key logs of third parties whose witnesses a copy holds (section 7) MAY be copied too. Key logs are never copied into an object's content. An archive MUST keep an owner object as long as it keeps an object whose signatures need it, unless the owner object is itself taken down; a tombstone then stands in for it, and a takedown of a line leaves its owner objects in place (section 13). An owner object MAY also be copied on its own, to keep a fresher copy of its key log.

Of two copies of a key log, compared up to their fork records (section 6.3), either one extends the other, and readers use the longer, or they differ from a fork point, as section 6.3 says. A reader that meets copies that differ from a fork point reads them, writing nothing, as an archive holding one of them would once it has appended a fork record carrying the other: the owner is ended at the fork point, and signatures naming versions of either side are judged against them (section 7.3). No one can prove offline that a key log is complete: a copy that stops early may hide that the owner has ended, and a reader holding only one side of a fork sees no fork. Readers judge by the versions they hold, and verifiers report the key-log version they judged against, so that a reader who later meets a longer copy, or the other side, judges again.

Moving. An owner moving to another archive copies its owner object there, with the lines it wants to keep there, and continues its lines in the new archive: the same owner and the same lines, not branches. The old copies stay valid where they are, as older copies of the same lines (section 7). In the owner-name layout this is one folder (section 3.2).

6.6 Keepers

An owner MAY name, in keeper of its genesis record (section 5.1), a single person or institution who answers for it, as a list of one URI: an ORCID iD (https://orcid.org/...), whose last character is a check digit (ISO 7064 MOD 11-2) that verifiers check (section 14.3), since no schema pattern can, or a domain written as https://<domain>/. The keeper is fixed by the owner name: no version of the key log names or changes it, and another keeper means another owner. The keeper MAY confirm it, in a place only the keeper controls: a link naming the owner in its ORCID record, or the file https://<domain>/.well-known/opensheaf on its domain, a JSON object with format "opensheaf-keeper/0.2", owners, the owner names it answers for, and OPTIONALLY successors, an object mapping owner names it answers for to their successors (on ORCID, a link naming both).

Successors. An owner has at most one accepted successor: the one named by an ending version of its key log before any fork point (section 6.3); failing that, the one its keeper names in the place it controls, as above. The keeper MAY name one for an owner that can no longer change its key log (fewer than nextThreshold rotation keys left), that a fork has ended, or that ended without naming one; that successor is reported as named by the keeper, and does not by itself end the owner. Any other successor, named in a version of either side of a fork from the fork point on, or by the keeper when an ending version before any fork point names another, is reported as a claim.

When a keeper is named, a verifier MAY check both directions, and reports the link as confirmed, claimed only (the keeper does not confirm it) or absent. A confirmation is read as it is now: a keeper who withdraws it ends the link, and what the owner signed stays authentic. The link says who answers for an owner, not who owns its lines, which only its keys decide, nor who wrote its documents, which creators in datacite.json say (#41). The keeper's other roles, in takedowns and for privacy, are in sections 13 and 15.

Open questions.

7. Lines and signatures

A line is the history of a work as decided by one owner, identified by the pair (name, owner) and so by the identifier sheaf:<name>:<owner> (section 4). Its object versions form a single sequence, each signed by its owner, except the first version of a key log, which is computed (section 6.1). A line is its signed versions, wherever they are stored: in an archive where its owner writes, or in a mirror (section 11). Lines of other owners with the same genesis record are branches (section 9). An owner's key log is the line of its owner object (section 6).

7.1 Signing

Every sealed object version of a line MUST be signed by its owner when it is made, except the first version of a key log, which is computed (section 6.1): by at least threshold distinct current keys of one version of the owner's key log, threshold being that version's, each key signing in its own signature file (section 7.2), which names that key-log version. The key-log version named SHOULD be the latest its signer knows. A signature is judged against the key-log version it names alone (section 6.1), and no signature is ever replaced. An owner MAY add signatures to a version later, with current keys that have not signed it, only to a version it knows it made, and only while it is not ended (section 6.3): so it signs again, with keys not exposed, a version contested by an exposed key (section 7.3), or one it has not yet added when a key that signed it was exposed (appendix A.1). Versions of a key log are signed as section 6.1 says.

7.2 Witnesses and signature files

A witness is evidence about an object version made after it: a signature, a timestamp, an external deposit (appendix A), a software archive snapshot. The witnesses kept with an object are in its witness folder, the OCFL object extension folder extensions/opensheaf-witnesses/ (not yet registered with OCFL, so validators may warn), which is part of no version, is not covered by the inventory digests, and travels with the object. Witnesses MAY be added at any time, by the owner of the line or by others; they are kept, never re-serialised or replaced once made, since some (timestamps) are made of their bytes, and MUST NOT be removed except as section 4 says.

Signature files. A signature file holds one signature of an object version by the owner of its line. The signature of version <version> by a key is the JSON file <version>/signature-<k>.json in the witness folder, where <k> is the first 16 characters of the lowercase base32 (RFC 4648, without padding) SHA-256 digest of the key's did:key URI, as UTF-8, so that a reader that knows the keys builds every name without listing the folder. It has:

The signed message. What is signed is not a file but the message made of these five lines, each ended by a line feed (LF, 0x0A), in UTF-8, with no other characters, spaces or blank lines:

opensheaf-signature/0.2
object <the value of object>
version <the value of version>
inventorySha512 <the value of inventorySha512>
keyLog <the value of keyLog>

The first line keeps these signatures apart from any other use of the key; each of the others is the name of a field of the signature file, a space and its value, and they bind the signature to one object version, its inventory and one key-log version. A verifier rebuilds the message from the fields of the signature file and verifies the signature as RFC 8032 (section 5.1.7) says, without the cofactor, and MUST reject it when its S is not less than the group order L, or when the key is not the canonical encoding of a point or is a point of small order, or R is not the canonical encoding of a point or is a point of small order; tools make keys as RFC 8032 (section 5.1.5) says.

Others' witnesses. A signature by someone other than the owner of the line, attesting a version, is a witness, not a signature of the line, and never a signature file: it is <version>/witness-<label>.json, where <label> is chosen by whoever adds it and matches ^[a-z0-9]+(-[a-z0-9]+)*$. It has the fields and the signed message of a signature file, with signer and keyLog naming the signer's own owner object, which MUST NOT be the line's owner; its key log MAY be copied beside the object (section 6.5).

Other witnesses. The timestamps extension keeps timestamps of signature files beside them, dates that readers may weigh; timestamps change no status by themselves, and section 7.3 admits trusted dates as evidence against contested. The parent signatures a branch carries are in its content (section 9).

Files that are not witnesses. A file of the witness folder that is not a witness (a stray file, a malformed or invalid signature file) is ignored, reported, never fatal, and kept; a file a reader does not recognise, stray or of an extension it does not know, is reported as an unknown file, not as an error: a host cannot break a version by adding a file. A copy MAY leave such files out (section 11).

7.3 Statuses

A signature file is invalid when:

  1. it is malformed, or its name does not match the digest of its key;

  2. its signature does not verify;

  3. its object, version and inventorySha512 are not those of the version whose folder holds it (the digest also as its checksum file states it; in parent/signatures/, those of the parent version, section 9; in forked/<d>/, those of the version carried, section 6.3);

  4. its signer is not the line's owner;

  5. the reader reaches the key-log version named, with that digest (also as carried by a fork record, section 6.3), and the key is not in its keys (for a signature of a key-log version, is not one of its rotation keys, section 6.1);

  6. the version named is not a version of the key log, or is a fork record; or

  7. for a signature of a key-log version, it signs the first version, or its keyLog names another number than that of the version before it (section 6.1).

A signature file that is not invalid is unchecked when the reader cannot reach the key-log version it names, with that digest (the key log is absent, taken down, or shorter, or the reader holds another version of that number, which verifiers report: a fork of the key log once the version named is found signed, section 6.3); a key-log version that the reader's copy neither holds nor carries, also after its fork record, is reached in a copy that holds it, and the signature is judged against that copy; nothing is added on unchecked signatures (section 7.5). Otherwise it is good, for ever: later versions of the key log, an end or a fork never change it.

A version of a key log is signed when it is signed as section 6.1 says, with good signature files; its first version is never signed, and counts as signed when it is the version section 6.1 computes. Key logs are read version by version from the first, and are never vouched for (below): each version is checked against the one before, and a fork record is a version when it is valid, though not signed (section 6.3).

A version of a line is:

Contested versions. A signed version of a line is contested when it would not be signed if these good signature files of its owner, its own or those of the versions that vouch for it, were left out:

  1. those made with a key that its owner's key log exposes, in any version, on either side of a fork (section 6.3);

  2. those naming a version of its owner's key log from a fork point on, of either side.

Such signature files count nonetheless when other evidence that the reader trusts (a timestamp of these signature files, with the timestamps extension) shows them made before the version of the key log that exposes the key, or before the fork. A key that another owner's key log exposes, shared between owners (section 15.5), counts only for that owner's lines. Only versions of lines are contested, never versions of key logs (section 6.1). A contested version is reported with its status (for archives, section 7.5); it is never the latest signed version (below), nor a confirmed branch point (section 9.3) or a verified member (section 8.5). A version signed directly with such signature files, and vouched for by a later version signed directly without them, is signed and not contested.

A signed version vouches for its past. The inventory of a version records the digests of every file of every version before it, and its object.json the digest of the inventory file of the version before (previous, section 4.3), so a version signed directly vouches for every version it extends, byte for byte, inventories included, whatever their own signatures; a version vouched for needs no signatures of its own, and its pin is as reliable as that of a version signed directly.

Readers use the latest signed version. The latest signed version of a copy of a line, its latest version that is signed and not contested, gives the line's history, current version and status (section 4.2). Nothing relies on a version that is not signed: not a pin, a resolution, a collection member or a branch point. An unchecked version is shown with its status until the key log is found, a contested one with its status. A reader that cannot list a witness folder (over HTTP, section 14.1) finds signature files only by the names that the keys of the owner's key log give (section 7.2): without the key log it finds none, and reports the versions unchecked, never unsigned.

Owner tools MUST show the owner, before signing a new version, the versions it would extend that are not signed or that need an exposed key, whatever evidence dates them, so that an owner never takes a thief's version into its line unknowingly. They MUST NOT sign it until the owner has acknowledged these versions explicitly (with an option given for that signature, for instance), and MAY sign it then.

7.4 One writer per line, and forks

An owner MUST NOT sign two different object versions with the same number for the same line, except as section 6.3 allows. Since every version directory keeps the inventory as of that version (section 4.1), two copies of a line whose latest signed versions (section 7.3) are vk and vm, with k not greater than m, agree when vk/inventory.json is the same file, byte for byte, in both. Versions held after the latest signed version of a copy are not versions of the line: they are reported with their status, and make no fork (an unchecked one is compared again once its key log is found). A copy that stops earlier is older: readers use the latest signed version among the copies that agree. Two copies that do not agree are a fork of the line, reported with the status of each side, and never recorded (an archive keeps the side it holds, section 5.3), except that a fork of a key log ends the owner and is recorded (section 6.3); since both sides of a fork of a line are signed, it was made with keys of the owner, and is attributable to whoever holds them.

7.5 Adding versions

An archive adds a version to a line only if, once added, it is signed and not contested (section 7.3) against the key log the archive holds: signed directly by its owner, or vouched for by a version signed directly that is added with it from the same copy. Tools SHOULD fetch the latest version of the key log they can find before adding. An archive adds no invalid signature file. An archive that continues another owner's line makes a branch, under its own owner (section 9).

Ended owners. For an owner whose key log has an ending version (section 6.3), an archive takes versions of its other lines only from copies found elsewhere, never as new deposits, and of copies that fork, only the versions they share.

A fork freezes the owner. Once an archive knows of a fork of an owner's key log (section 6.3), it adds no version of that owner's other lines, from a copy or as a deposit, unless other evidence it trusts (a timestamp, with the timestamps extension) dates signature files enough to make the version signed before any version of the key log at the fork point was signed.

Versions held stay. Nothing that a host or a thief can produce leads to removing a version an archive holds, except as section 4 says. A version let in against this section that is not signed is reported, and never shown as a version of the line. Since OCFL versions cannot be skipped, the owner's own version of that number can then never be added there: that archive's copy of the line grows no further, and the owner continues the line in another archive.

7.6 Integrity

Integrity rests on OCFL digests: every file is fixed by its SHA-512 digest in the inventory, every inventory by its checksum file, and every member of a collection by a pin (sections 4 and 8). Digests show that files were not changed, signatures which owner's keys signed them; neither shows who wrote them or when (sections 7.2 and 15.1).

8. Collections

A collection is an object of kind collection (section 4) whose versions hold a list of members, members.json. Each member is a line (section 7) of a document or of another collection, in any archive, pinned (section 4). A collection is a line like any other, signed by its owner (section 7), its curator; what it contains changes only by a new version.

8.1 Catalogues and selections

Collections are of two types, which treat the versions of their members differently; type in members.json states which.

Both types may have collections as members (an archive of archives, a selection of issues).

Owner catalogues. Each owner an archive hosts has there an owner catalogue: a catalogue of that owner, created when the owner is set up in the archive, and named with the owner in owners of the discovery document (section 3.1). It lists the documents of the owner's own lines in the archive, branches of its own included (section 9), never copies of lines (section 11); it need not list all of them: its curator MAY choose. It is a line of its owner like any other, so a change by one owner (a deposit, a new version, a branch) touches that owner's catalogue only, and no owner signs for another. An owner catalogue is not mirrored: a mirror of a line never brings its owner's catalogue (section 11). An archive MAY also keep, as one of the owners it hosts, a catalogue of the lines it holds as copies (section 11). An archive that makes other collections does so as an owner too, with a key log like any other (section 6). A selection is kept by the owner of the body that vets (a journal, a review journal), which also owns the accepted copies the selection keeps (section 9).

8.2 The member list: members.json

Every collection version MUST contain, besides the files of section 4.1, members.json, and no other files of its own but its renditions (a table of contents, the cover of an issue) and the files of its notes (section 4.3), with:

It MAY contain order, the rule by which tools maintaining the collection place members: manual, the default (tools append new members and never reorder); issued-desc or issued-asc, by the members' Issued date (section 4.4), then their Available date, members with neither last, ties broken by name and then owner, so that the result is reproducible.

Each member MUST have:

Each member MAY have doi, the version DOI, and conceptDoi, the concept DOI, of the member; and cite, a cached citation, not authoritative, so that the collection can be read and ordered without resolving its members, also when they become unavailable: title, creators (a list of names), year, issued, the member's Issued date, and available, its Available date, so that order can be followed from members.json alone. Since members.json is the source of the collection, any change of it, cite included, is a new document version (section 4.2); tools SHOULD refresh cite only when the member list changes otherwise.

8.3 Members of a catalogue

Each member of a catalogue MUST have version, the object version pinned, and inventorySha512, the SHA-512 digest of its inventory file: a pin (section 4), which fixes the object with all its versions up to that one. It MUST NOT have revisions.

A member MAY have follow, "latest": a setting of the curator, not a floating reference. A followed member pins the latest signed version of its line (section 7.3) when the document version of the collection that holds it was made; a description-only version of the collection keeps the member list of the document version it holds (section 4.2), so that a catalogue with followed members can be described and withdrawn without moving them (#45); a member without follow keeps the version its curator pinned, which MAY be earlier, until the curator changes it. A tool maintaining the catalogue reads the member's archive (its discovery document or feed) and, when a followed line has a new signed version, writes a new document version of the collection pinning it, whatever that version holds (a new document version, a description, a notice, a withdrawal): a catalogue does not judge the versions of its members, but never follows to a contested version, which is not the latest signed version (section 7.3), nor, once it knows the owner's key log forks, to a version that an archive would not add (section 7.5). A tool follows only a signed version that extends the version pinned; a copy that does not is a fork of the line (section 7.4), which it reports, keeping the pin.

A withdrawn member stays, and presentations show its withdrawal (section 13.1), also one made after the version pinned. Presentations show the current version of each member as read from the history of the version pinned (section 4.2), not from later versions of its line: a pin that is not followed is the curator's choice.

8.4 Members of a selection

A revision is a document version of a member as a selection vetted it, pinned by the object version that held it when it was vetted. A revision set is the revisions of one member vetted by a selection: usually one, more after a correction is accepted.

Each member of a selection MUST have revisions, its revision set: a non-empty list, in the order of the member's history (section 4.2), no two revisions with the same documentVersion, each with:

A member of a selection MUST NOT have version, inventorySha512 or follow. The revision presented as the selection's is the last of the list.

A revision pins what was vetted, and keeps its pin in later versions of the selection. Descriptions and notices added later by the member's owner are not vetted by the selection, and presentations that show them SHOULD say where they come from. If the member's owner withdraws it, its revisions stay vetted, and presentations show the withdrawal as section 13 asks, saying that it comes from the member's owner.

Tools MUST NOT change revision sets on their own. Adding a revision (a corrected version accepted after review), removing one, or adding or removing a member is a new version of the selection, made by its curator, whose deposit (section 4.1) records who and when, with a message saying what was decided.

A selection MAY also keep its own copy of a revision it vetted, an accepted copy, which is a branch of the member's line under the selection's owner, and lists it as a member (section 9).

8.5 Pins and statuses of members

Every member is pinned: a collection version states exactly which object versions it contains, whole objects up to a version in a catalogue, revisions in a selection. Since a pin fixes an inventory, which fixes every file and earlier version, a collection version fixes everything it contains, also across archives: collections are hash trees, and pins cannot form cycles. A pin fixes one history: a fork of a member's line found later (section 7.4) does not change the member, and is reported.

A collection pins only signed versions (section 7.3), never a draft (section 10). The kind, name and owner of a member are those of the object.json of every version pinned, and the documentVersion of a revision is the one its pinned version holds.

Members of other archives. A member may be kept in another archive. Nothing is copied: it is resolved from its at as section 12 says, and any copy whose bytes match the pin will do. A reference, a pin without a copy, needs no permission. An archive that also keeps a copy keeps it as a mirror (section 11) or a branch (section 9).

Statuses. A member, or in a selection each revision, is, as read by a verifier (section 14):

Whether a copy matches is decided by the bytes of its inventory file: a checksum file missing or wrong does not change the status. A copy that does not match, found beside one that does, does not change it either: the status is that of the copy that matches. Both are reported apart, with their location (section 12.3).

8.6 Description and rights

Description. A collection version's datacite.json (section 4.4) has resourceTypeGeneral Collection, and MUST have in relatedIdentifiers a HasPart relation to the version DOI of each member of a catalogue (its doi) and of each revision of a selection (the revision's doi) that has one; members without a DOI are listed only in members.json. Its document versions and the fields of its object.json are as sections 4.2 and 4.3 say.

Rights. A collection version holds only metadata, its renditions included, placed under CC0 (section 15.6), and its rightsList SHOULD say so. The licence of a collection never extends to its members.

Open questions.

9. Branches and accepted copies

A branch is a line of another owner that continues a work from a signed version of another line, its branch point or parent version: a co-author carrying the work on, the successor of an ended owner (section 6.4), a journal keeping the version it vetted. It has the work's genesis record, and so its name, or after a clash another name of the same record (section 5.3). It is a new object, with its own identifier sheaf:<name>:<owner> (section 4), holding the branch point and its own versions, never the parent's other versions. An originator never owns a branch of its own work (section 5.3). A branch is a line of its owner: an archive hosting that owner lists it in that owner's catalogue, never in the catalogue of the parent's owner (section 8.1).

9.1 The parent: parent in object.json

Every version of a branch MUST have in object.json (section 4.3) parent, its branch point, with:

The branch's owner MUST differ from parent.owner. Only a signed version is branched (section 7.3).

9.2 The first version and its evidence

The first object version of a branch holds exactly the files of the parent version, the genesis record included, except its datacite.json, its object.json and its own evidence; the branch's own datacite.json and object.json; and the evidence of the branch point, as files of its content in the folder parent/:

Every file copied is copied byte for byte, and never re-serialised or replaced. A branch MUST hold parent/signatures/ at every branch point, and parent/parent/ when its parent is a branch. The evidence is covered by the branch's own inventories and signatures; with the genesis record it forms the branch's identity files (section 4.1). The key logs that the evidence needs are kept beside every copy of the branch, never in it (section 6.5).

9.3 Checking a branch

The evidence shows, without access to the parent's line, that a branch point is the parent owner's. A branch point is consistent when:

A chain is finite, since each level is fixed by a digest in the level below. Verifiers MAY bound the depth they follow, and report where they stop; a branch point checked only down to that bound is unchecked.

Verdicts. A branch point is, in this order:

The verdict of a branch is the weakest of those of its branch points. Verifiers report apart whether the parent's line is found, unavailable or removed (section 13), and whether it is withdrawn.

Ended owners. A branch point stays confirmed when its parent's owner ends, also by a fork, or exposes keys afterwards, as long as the parent version is not contested (section 7.3), since signatures stay good; readers weigh it as they weigh that owner's history (section 6.4).

9.4 Later versions and new branch points

The later versions of a branch are its owner's, signed like those of any line (section 7). They MUST keep the identity files unchanged, byte for byte, until a version that takes a new branch point.

A new branch point. A branch MAY take as a new branch point, by a new object version of the same branch, a later version of the same parent line (a journal vetting the authors' corrected version): with the same owner and name, a higher object version, and a document version later than the previous branch point's in the history of the new parent version (section 4.2). A parent version holding the same document version (a DOI added) is not a new branch point; a branch point never moves back and is never dropped. Nothing is changed in place: the earlier object versions keep their branch point. The version whose parent differs from the one before is a new document version of the branch (and so reinstates a withdrawn branch, section 13.1); it holds the files of the new parent version with new evidence, and the files of the branch's own notices (section 4.2), which its object.json names and which MUST NOT have the logical path of a file of the new parent version; it is checked as a first version is (section 9.3), and also for continuity: the two parent inventories have the same id, every entry of versions of the previous one is equal, as a JSON value, to the entry of the same version in the new one, and every digest in those entries is in the manifest of the new one. The branch's earlier document versions, such as its version of record, stay in its earlier object versions.

Numbering. A branch numbers its own document versions, from 1 without gaps, as every line does (section 4.2): its first version is its document version 1, whatever the number of the parent version, which parent.documentVersion keeps, and a version that takes a new branch point has the next number of the branch. Presentations SHOULD show both numbers ("version 1, the authors' version 3"). The notices of a branch are its own, about its document versions; those of the parent stay in parent/object.json and in the parent's line, and the branch's object.json does not repeat them, although their files are among the files of the parent version it holds.

Naming. A branch is named as section 5.3 says. When the line it would take is its owner's branch of the same parent line, the owner gives that branch a new branch point instead if the new branch point is later in that line's history than that branch's current one, and otherwise the new branch is refused, since a branch point never moves back and an owner keeps one branch of a parent line; when it is another line of its owner, the new branch is renamed.

9.5 Continuing another owner's work

A line is not handed over. When another owner continues the work (an author leaving an institution whose line it was, a journal handing a report to its referee), the new owner makes a branch, and the previous owner MAY add a notice to its line pointing to it. An owner moving its lines to another archive hands nothing over: they stay its lines (section 6.5).

Taking in another line's work. Any line, the originator's included, takes in work from another line (a co-author's changes, a journal's corrections) by depositing it as a new document version of its own: its change note says where the work comes from, and its datacite.json SHOULD link the version taken in with IsDerivedFrom or IsNewVersionOf, by its DOI, or else by the gateway URL of a sheaf: URI with its sha512 (section 12.6), which fixes the version taken in. The originator never branches its own work (section 5.3); a branch takes in later work of its parent line by a new branch point instead, or by such a deposit.

A branch holds none of the parent's earlier versions. An owner who wants them at hand keeps beside the branch a copy of the parent's line (section 11), at the parent's identifier, with its signatures and key log.

9.6 Accepted copies

An accepted copy is a branch kept by the owner of a selection (section 8.4) from a revision it vetted. Selections that keep different accepted copies of the same document MUST have different owners, also in one archive, so that their accepted copies are different lines, never renamed against each other; the selections of one owner (the issues of a journal) share its accepted copy of a document, which each of them MAY list. The later versions of an accepted copy are acts of the selection's curator (a corrected version accepted, by a new branch point; a notice; a withdrawal); the authors' later versions change nothing in it.

The selection lists the accepted copy as a member; it MAY also list the original revision set. An accepted copy is not a mirror: a location holding only it is never given in at for the parent's line (section 8.2).

A version the selection makes itself, such as a typeset version of record, is a later version of its accepted copy, with the selection as publisher, the authors' agreement (section 4.3), and relations to the authors' versions (section 4.4). A branch carries versions of the same work; a derived work (a translation, a review, a collected edition) is a new object, with its own genesis record and a relation to its source.

9.7 Description and rights

Description. A branch's datacite.json has as publisher its owner, or for a selection the body behind it, and keeps the relations of the parent version. Its first version, and every version that takes a new branch point, SHOULD link the parent version with IsIdenticalTo: its DOI if it has one, otherwise parent.url as a URL.

Rights. A branch redistributes the files of its parent versions, and its archive is responsible for having the right to (section 11.2); a copy of the parent's line beside it is a mirror. The evidence is metadata, under CC0 (section 15.6).

10. Drafts and sealing

A draft is a sandbox for a work not yet sealed, on which nothing may rely. Sealing makes from a work, under a new genesis record (section 5), the first version of its originator's line (section 7); the work's other lines are branches (section 9).

10.1 Drafts

Identifier. A draft belongs to the reserved owner draft, never a name or an owner name (52 characters, section 5.2). Its identifier is sheaf:draft:<id>, where <id> is chosen by the archive, MUST match ^[a-z0-9]+(-[a-z0-9]+)*$, and MUST have at most 64 characters (76 for the identifier). It MUST NOT be reused in the archive while the draft exists, and MAY be once the draft is gone. It is local, never resolved. A draft is at the path its identifier gives (draft/<id>/ in the owner-name layout, section 3.2).

Format. A draft is a document or a collection, in the format of any object of its kind (section 4). It has no genesis record and no other identity files (section 4.1), and its object.json has no name, owner or parent (section 4.3). Its document versions are numbered by whoever keeps it, by the rules of section 4.2.

A draft is its archive's alone. A draft is never signed (section 7), pinned (sections 8, 9 and 12), copied out of its archive (section 11), indexed or named by a sheaf: URI (section 12). The discovery document does not list drafts in objects; it MAY list them apart, in drafts, as unfinished work on which nothing may rely, or not at all (section 3.1).

A draft may change. A draft is the only object that MAY be rewritten or deleted: the rule that object versions never change (section 4) does not apply to it, and a draft deleted leaves no tombstone (section 13). OCFL 1.1 expects the contents of a version directory to be immutable once created (OCFL 1.1, section 3.3), and its extension 0005-mutable-head keeps a mutable version outside the version directories, which a draft does not: a draft is an OCFL object as it stands, but outside OCFL's guarantees, and verifiers check it only as it stands, never against an earlier state (section 14.4).

Content. A tool MAY read any object and recreate its files in a draft, as far as their licences allow.

10.2 Sealing

When. A work is sealed before a version of it first leaves its owner's hands: shared privately (submitted to a journal, sent to a co-author) or published. Tools SHOULD seal only at the owner's request, never as a side effect of another operation.

What. An owner tool seals a work by writing its genesis record (section 5.1), with the owner as originator, and making a new object: the line sheaf:<name>:<owner>, at its path in the storage layout (section 3.2), whose first version holds the genesis record and the work as document version 1 (section 4.2), and is signed by the owner (section 7.1). If the line is taken, the tool draws a new nonce (section 5.3).

Drafts stay outside the line. A work may be sealed from a draft or from files outside any archive. The versions of a draft are never part of the line sealed from it, and nothing in the line refers to them. Sealed from a draft, the first version holds the files of the draft's latest version as document version 1: its object.json drops history and notices, with the files of the notices, which concern the draft's document versions; its datacite.json keeps the description, with version "1", and drops the Updated date (section 4.4).

Sharing before sealing. A draft is not shared as an object (section 10.1). Co-authors working on a draft share its files by any means outside this specification: a git repository, e-mail, a shared folder. Whatever a recipient must be able to rely on, cite or pin, a submission to a journal above all, is sealed first and shared as a line, privately if need be (section 3.1).

11. Copies and mirrors

A copy of a line is its object as held in one storage root; a mirror is a copy kept in an archive where the owner of the line does not write, which is the archive's policy (section 3). Nothing marks a mirror: it is listed in objects like any line (section 3.1), and the rules of every copy apply to it. Whoever keeps mirrors of other owners' lines, or indexes of them (section 12), is a custodian.

11.1 Mirrors

What a mirror holds. An archive MAY keep a mirror of a line written elsewhere: the object's versions up to the latest signed version of the copy it copies (section 7.3), with their inventories, files and the witnesses it can find (over HTTP, only those whose names it can compute, section 14.1), byte for byte, at the path its layout gives the line's identifier (section 3.2), and beside it the key logs its signatures need (section 6.5). Files of the witness folder that are not witnesses need not be copied (section 7.2): not copying them is not removing them. When a copy holds, under the same name, a witness file other than the mirror's, the mirror keeps its own and reports the other.

How a mirror grows. A mirror is the same line, signed by its owner, never a new one. It MUST NOT be changed except by adding the owner's signed versions as section 7.5 allows, from a copy that agrees with it (section 7.4); by adding witnesses (section 7.2); or as section 4 says. A copy that does not agree with it is a fork of the line (section 7.4).

Elsewhere. A mirror may be listed in a catalogue of copies, never in an owner catalogue (section 8.1), and located by the at of collection members (section 8.2). A copy of a parent's line kept beside a branch is a mirror (section 9.5); an accepted copy is a branch, not a mirror (section 9.6). Drafts are never mirrored (section 10.1), nor are owner catalogues: a mirror of a line never brings the catalogue of its owner, which lists the owner's lines in the archive that hosts it (section 8.1).

11.2 Rights

An archive that keeps a mirror redistributes the files it copies, and is responsible for having the right to: by their licences (rightsList, section 4.4, which a description-only version may change), by the agreement of the rights holders, or by law. This specification does not judge it, and verifiers do not check it; tools MAY warn when no licence of the versions copied is one they know to allow redistribution. Key logs, inventories, signature files and the other metadata are under CC0 (section 15.6), and are copied freely; a reference needs no permission (section 8.5).

Open questions.

12. Identifiers: sheaf: URIs, resolution, indexes

Lines, versions, pins, works and owners are written as sheaf: URIs. A resolver is a program that finds and checks what a sheaf: URI names; a gateway is a resolver serving web links (section 12.6).

12.1 sheaf: URIs

Where <name> is a name (section 5) and <owner> an owner name (section 6):

sheaf:<name>                                  the originator's line
sheaf:<name>:<owner>                          the line of that owner
sheaf:<name>:*                                the work: all its lines
sheaf:<name>[:<owner>]/v<n>                   document version n of the line
sheaf:<name>[:<owner>]/v<n>?sha512=<digest>   one object version holding it
sheaf:<owner>                                 an owner: its key log
sheaf:<owner>/v<n>?sha512=<digest>            a version of its key log

Syntax. The parts are, in this order: sheaf: and the name; OPTIONALLY the owner part, : and an owner name, or instead :*; OPTIONALLY /v and a positive integer without leading zeros; OPTIONALLY ? and parameters key=value joined by &, with at most one sha512, only after a version, whose value is an inventory digest as in a pin (section 4), 128 lowercase hexadecimal digits, and at most one at, after sha512 if both are present; other parameters MAY come anywhere among them, and tools write them after sha512 and at. Only the value of at is percent-encoded; no fragment is defined. The scheme, the name, the owner name, v, the digest and the parameter names are lowercase, and a resolver MAY fold uppercase letters in them; the value of at is case-sensitive. A resolver ignores parameters it does not know. An owner part of 52 characters is a name of algorithm 0, as every owner name is (section 6.2), and a resolver rejects any other.

The owner. Without an owner part, a URI names the originator's line (section 5.3), read from the genesis record every copy carries; never the latest or most authoritative line, so a branch is always written with its owner part. An owner is the originator of its own genesis record, so sheaf:<owner> names its key log.

The work. sheaf:<name>:* names every line of the work (section 12.4). It takes at, but a resolver rejects it with a version or sha512, since every line has its own document versions.

The version. /v<n> is a document version of the line (section 4.2, also on a branch), or for a key log an object version. It names only signed versions (section 7.3) whose object.json has the URI's name and the line's owner: a branch names only its own versions, numbered from 1 (section 9.4), and drafts are never named (section 10.1). Without a digest, it names the object version holding n that the history of the line's latest signed version lists (section 4.2), or without history the last signed one holding n; what it names may change as the line grows.

The pin. With a digest, the URI names exactly the object version whose inventory file has that digest. Citations of a fixed version SHOULD carry the digest.

The hint. at gives the base URL of an archive where a copy is expected, which a resolver tries first: an https URL ending with /, every character outside the unreserved characters of RFC 3986 percent-encoded, decoded once (sheaf:<name>/v3?sha512=<digest>&at=https%3A%2F%2Fauthors.example.org%2F). It is not part of what the URI names.

Canonical form. The canonical form has complete parts (section 12.2), lowercase where case is folded, no owner part when the owner is the originator, the genesis name (section 5.2) with :*, and no at or unknown parameters. Two URIs name the same thing when their canonical forms are equal byte for byte, which may need a copy of the genesis record to decide. Files record sheaf: URIs in canonical form (keyLog, section 7.2; relations, section 4.4), except identifiers (section 4), which always have the owner part.

12.2 Short forms

For people, the name and the owner name MAY be shortened to a prefix of at least 8 characters (sheaf:lvfmiq2z:iztwg6bj/v3); a part of 52 characters is complete. A resolver expands a short form among the lines it knows that pass the checks of section 12.3. The candidates are the lines whose name and owner name start with the parts given (without an owner part, the originators' lines; with :*, every name starting with the name part, whose work is then searched for, section 12.4). If exactly one line (with :*, one genesis record) is a candidate, the short form names it; otherwise it is ambiguous, and the resolver MUST NOT choose but lists the candidates with their full forms and originators.

Expansions may differ between resolvers and over time, so every file defined by this specification MUST use complete parts. A resolver SHOULD show the full form of what it resolved; landing pages and citation metadata SHOULD give the full form, in canonical form (section 12.1: without an owner part for the originator's line), and MAY add a short one. A short form printed where it cannot be corrected (a paper, a slide) SHOULD have at least 16 characters in each part.

12.3 Resolution

Where to look. A resolver tries, in any order, the locations it has: the URI's at first, the at of a collection member (section 8.2), a branch's parent.url (section 9.1), the indexes it knows (section 12.5), its user's configuration. That configuration MAY also map a base URL to another place where its files are read (a local folder, a test server), so that locations that at, always https, cannot give are tried; such a mapping is the reader's own, and is never written in files. At an archive it reads the discovery document, finds the line in the indexes or in objects, and fetches <storageRoot><path>/<version>/inventory.json, <path> being given by the archive's layout (section 3.2); a key-log version carried by a fork record is found under forked/ in the fork record, whose inventory lists it (section 6.3). The parent version of a branch is fetched at parent.url and otherwise found as any version of sheaf:<parent.name>:<parent.owner>. parent.url names no archive: a resolver that needs the archive serving it (for the parent owner's key log, section 6.5) tries as base URL each prefix of parent.url ending with /, and takes one whose discovery document has a storage root that parent.url starts with.

Checks. Every copy found is checked: the URI's name is a name of its genesis.json (section 5.2); its object.json has that name and the line's owner (the owner part, or the originator); its versions are signed (section 7.3), against the key log kept beside it (section 6.5) or a longer copy found elsewhere. For a pin, the bytes of the inventory file have the digest, whatever its checksum file states, and the version holds document version n (for a key log, is object version n, or is carried with that number by a fork record, section 6.3). A copy that does not match is reported with its location, and the pin is a mismatch only if no copy found matches (section 8.5); a resolver MAY stop at the first copy that matches. A checksum file missing, or not stating the digest of its inventory, is reported with its location, and does not make the copy fail; the archive holding it fails its own verification (section 4). A copy that passes is a copy of the line, wherever found. Unchecked versions and versions that are not versions (section 7.3) are reported with their status and location, and never resolved to; a contested version is resolved to only by a pin naming it, and reported as contested.

Copies, forks and ended owners. Since a copy that stops early looks complete, a resolver uses the latest signed version among the copies it found that agree (section 7.4), and says where it found them. A fork of the line (section 7.4) is reported with the status of each side; the resolver uses only signed versions and does not choose between signed sides. A fork of a key log is not one of a line: it ends and freezes the owner (sections 6.3 and 7.5), and signatures naming versions of either side are checked against them, wherever held, the versions they sign being contested from the fork point on (section 7.3). A resolver reports an owner that has ended, by an ending version or a fork, or has exposed keys (section 6.3), with any successor, its own or named by its keeper (section 6.6), and never follows a successor by itself.

Tombstones. A tombstone (section 13) is not signed and speaks for its archive only (section 13.3): a resolver that meets one keeps looking, and when it finds a copy that passes the checks, reports the copy and the tombstone.

External records. A deposit with an external service (external, section 4.3; appendix A) or a software archive snapshot is a witness (section 7.2), not a copy: it holds no inventory, so it is never checked against a pin and resolves nothing; a resolver MAY report it as a place where the files may be found. A snapshot holding an archive's storage root (an archive kept in git) is read as that archive.

12.4 Searching for a work

Resolving one line needs no search (the originator's line is always named by algorithm 0). But the lines of a work may carry any of the 16 names of its genesis record (section 5.2). To find them all (for :*, or a search by work), a resolver obtains the genesis record from any copy or index entry found under the name, checked against it; computes its 16 names and looks each up in the indexes it knows; keeps only the entries whose genesis record is byte for byte the one obtained, discarding others as collisions (removed entries without a genesis record are listed apart, as removed lines of those names, and removed entries that kept it are marked removed); and keeps only the lines that pass the checks of section 12.3 and hold back to the origin: the originator's line signed by its originator, and branches whose branch points are confirmed (section 9.3). A reused genesis record thus yields no line (section 5.4), and no hash is assumed free of collisions. If several genesis records have the URI's name, the URI is ambiguous: the resolver lists them with their originators.

12.5 Indexes

An archive SHOULD keep three indexes of its objects, by name, by owner and by inventory digest, next to its discovery document, declared in its indexes (section 3.1). A custodian (section 11) or a resolver MAY keep them for many archives at a base URL of its own, declared in indexes.json there. Indexes are maps, not witnesses: what they lead to is checked (section 12.3).

Files. An index is a folder of files <p>.json, where <p> is a prefix of the key, each a JSON object with format, "opensheaf-index/0.2"; index, its folder; and entries, every key starting with <p>. A file without entries is omitted, so a missing file means no entry. The declaration (indexes in the discovery document, or indexes.json, with format and indexes) maps each index kept to the length of its <p>, from 2 to 4 characters.

Content. An archive's indexes list every object with a genesis record and every sealed version of it, carried key-log versions included, never drafts. status is the object's, active or withdrawn, or removed after a takedown (section 13): a tombstoned object keeps its entries in names/ and sha512/, in sha512/ one for every version up to lastVersion, the tombstone's pin among them (section 13.3), of which those in names/ MAY drop originator and genesis, while a takedown removes the name from owners/, and the entry once it lists none. In indexes kept for several archives, every entry has at, a list of base URLs of the archive serving the copy, equal hints (section 3), and owners/ has an entry for each owner and archive.

Lookups. A resolver looks a line up in names/, starting from at, keeping the entries whose owner matches the owner part, or without one, whose owner is their originator; a removed entry without originator is matched against the originator of any copy of the genesis record, or reported as a removed line of that name, originator unknown. It looks a pin up in sha512/ and an owner's lines in owners/. At an archive without indexes, it MAY read objects of the discovery document and fetch genesis.json and object.json from the objects.

12.6 Gateways

A gateway serves a URI at its base URL followed by the URI unchanged (https://opensheaf.org/sheaf:<name>/v3, provisionally, #35); gateway links are written in full, since a relative link starting with sheaf: is read as a URI. A gateway:

Open questions.

13. Withdrawal, takedown and tombstones

An owner withdraws a line, which keeps its versions; an archive takes down an object, which leaves a tombstone. A draft is neither withdrawn nor taken down: it is deleted, and leaves no tombstone (section 10.1).

13.1 Withdrawal

A document or a collection is withdrawn by a description-only version (section 4.2), the withdrawal, whose object.json has status withdrawn and withdrawal (section 4.3), and whose datacite.json has withdrawal.date as Withdrawn (section 4.4). A withdrawal holds the files of an existing document version, unchanged (tools hold the current one), and adds no document version: it changes the meaning of the versions before it, which stay inspectable. It withdraws every document version deposited before it, in the order of deposit (section 4.1): a version found later and placed earlier by history is withdrawn if it was deposited before the withdrawal. A single document version is retracted by a notice instead (section 4.2).

Until a new document version. Every later description-only version (a notice, a DOI) keeps status withdrawn and the same withdrawal. A new document version reinstates the line: it has status active and no withdrawal, and its change note SHOULD say why the work is back. The document versions withdrawn stay withdrawn; those deposited after the reinstatement are not, until a later withdrawal, which withdraws them in turn. A new document version is never itself a withdrawal. These rules are read from the object versions of the line, every one of which stays: a document version is withdrawn when an object version after the one that first held it is a withdrawal, which gives its date and reason.

Status. The status of the line is that of its latest signed version (section 7.3), whatever document version that holds: withdrawn from a withdrawal until a reinstatement. A copy without a signed version has no status as a line, and its discovery document gives that of its head (section 3.1). A branch or an accepted copy is withdrawn only by its own owner (section 9). An ended owner signs nothing, and so withdraws nothing (section 6.3), nor does an owner that has lost its keys: an owner withdraws its lines before it ends.

A withdrawn document version keeps every object version, signed, pinned and copied as before. Presentations showing a document version they know to be withdrawn MUST show it as withdrawn, with the date and reason of the withdrawal, also when the line has been reinstated since; presentations showing a version of a line they know to be withdrawn MUST show the withdrawal, also when the version shown is earlier.

13.2 Takedown

A takedown deletes a sealed object, witness folder included, from an archive's storage root (with the folders the deletion leaves empty) and from its presentation files, and adds a tombstone (section 13.3). An archive removes what it holds only as section 4 says, and every removal of a sealed object is a takedown, whatever its reason: content that must not be served (by law, for a breach of rights, to erase personal data, section 15.5), or a line the archive stops keeping. It removes one object: others holding the same files, such as a branch holding its parent version (section 9), are taken down on their own. A takedown of a line listed by an owner catalogue SHOULD be followed by a version of that catalogue without it (section 8.1); earlier versions keep their pins, and the member is read there as removed (section 8.5).

Owner objects. A takedown of a line leaves in place the owner objects its copy carries (section 6.5). An owner object that an object of the archive needs is taken down only for itself, and only by law or at its keeper's request (section 6.6); never at a request signed by the owner's keys, which a thief may hold. The owner's signatures in what the archive keeps are then unchecked there (section 7.3), and the tombstone stands in for the owner object in the rule of section 6.5.

Returning. A line taken down (an owner object found elsewhere, for instance) MAY return to the archive only from a copy holding the version its tombstone pins, its inventory file having the pin's digest, so that the archive knows it is the line it held: up to that version or, when that version is not signed (a fork record counts as signed here), up to the latest signed version before it in that copy, added as section 7.5 says: it is the same line, not a reuse of its identifier (section 4), and its tombstone is dropped.

13.3 Tombstones

A tombstone is an entry of tombstones in the discovery document (section 3.1), one for each object taken down, with:

A tombstone is never removed, except when its line returns: it keeps the line taken (section 5.3), and objects never lists its id. It is not signed (section 12.3). A line, or a version of it no later than lastVersion, of which no copy is found but a tombstone is, is reported as removed (sections 8.5 and 9.3).

Elsewhere. A tombstone speaks for its archive only: it says that this archive no longer serves the line, not that nobody may. It binds no other archive, and does not stop resolution at copies elsewhere (section 12.3). Mirrors, branches holding the files, indexes kept by others, gateways and the records of external services (appendix A) do not follow a takedown by themselves: each answers for what it serves, as for what it copies (section 11.2), and content that must not be served anywhere is taken down at each archive that serves it, at a request made to each. Requests are outside this specification. Tools that meet a tombstone of a line they copy, index or serve from elsewhere (a mirror brought up to date, a resolver, a gateway) report it, with the copy they found. An owner who wants every copy to show that a work is no longer valid withdraws it (section 13.1), which copies follow, since it is a signed version.

Earlier versions. A tombstone pins the last version taken down. A pin of an earlier version of the line, of which no copy is found, is reported as removed (section 8.5); the archive's sha512/ index, if kept, holds the digest of every version (section 12.5).

Open questions.

14. Verification

A verifier is a program that checks an archive, or an object with the key logs kept beside it, against this specification. It checks every requirement of sections 3 to 13 that the files decide, in the order of sections 14.2 to 14.6, each step using the results of those before; the rules are those of the sections cited. The discovery document, the indexes and presentation files are maps: a verifier checks them against the storage root, and never takes them as authoritative (section 3.1). Rules on what an archive received or saw, rather than on what it holds, are not checked from the files: that an archive takes the lines of an ended owner only from copies, never as new deposits (section 7.5), and keeps the side of a fork of a key log it saw first (section 6.3).

14.1 Findings

A verifier reports every finding with its place (the archive, an object, a version, a file), and does not stop at the first. A finding is:

Checks not made. A verifier reading an archive over HTTP cannot list folders: it checks the objects the discovery document lists, and warns that it has not checked that the storage root holds no others, nor the files of witness folders whose names it cannot compute, nor that the indexes hold no entries but those of the archive's objects (section 14.6); one with access to the files checks them. A verifier MAY bound the depth of the chains and collections it follows (section 9.3), SHOULD bound the size of what it fetches (section 15.2), and warns where it stops. A verifier MAY check part of an archive (one line, a collection and what it pins, the versions the feed lists since a date), and warns that the rest is not checked: an archive too large to check at once is checked as it grows.

14.2 Files and storage

The verifier checks:

14.3 Key logs

The verifier checks the owner objects first, each from its first version (section 6):

  1. its genesis record (section 5.1), and that its first version is the one section 6.1 computes, by computing object.json, keys.json and the inventory file from the genesis record and comparing them with those held, byte for byte, with no other file (a signature file of the first version is invalid, section 7.3, and a warning, as any invalid file of a witness folder, section 7.2);

  2. when a keeper is named by an ORCID iD, its check digit (section 6.6);

  3. that every later version but a fork record holds keys.json, and that each later version is signed (section 7.3);

  4. that no version is held after a fork record, nor after an ending version but a fork record (section 6.3), a breach of these two being a warning, as for lines (section 14.4);

  5. that an ending version has no keys, threshold, next or nextThreshold, that successor is not the owner itself, and whether it is accepted or claimed (sections 6.3 and 6.6);

  6. the thresholds, and the rules of section 6.1 on keys, next and exposed, among them that no digest is in the next of two versions;

  7. each fork record (section 6.3): that it is valid, holding the genesis.json of the first version, byte for byte, an object.json with the fields of that of the first version and previous, no keys.json, and nothing else but the versions it carries, each under the name its inventory digest gives, with the owner object's id in its inventory, its keys.json and checksum file against its inventory, and its signatures against the version before, the first differing from the version of its number held.

It reports as results the latest version of each key log, the exposed keys, on either side of a fork, and ended owners, by an ending version or by a fork with its fork point, with their successors, accepted or claimed; when a keeper is named, it MAY check the link (section 6.6).

14.4 Objects

For every other object, the verifier checks:

14.5 Collections

For each collection version, the verifier checks the rules of section 8 on members.json and its members. It resolves every member of the current version (section 4.2; every revision, in a selection) as a resolver does (section 12.3), and the members held in the archive in every earlier version; resolving the other members of earlier versions is OPTIONAL. The status of each member is a result (section 8.5); a copy that does not match, beside one that does, and a checksum file missing or wrong at a location are warnings (section 12.3). It also checks that no owner of selections of the archive keeps two accepted copies, two lines, of the same document (section 9.6); several selections of one owner listing the same accepted copy are no breach. A member that is not a version is an error, and so is a mismatch of a copy held in the archive; any other status but verified, contested included, is a warning. A member whose document version pinned (in a selection, a revision) is withdrawn, as the verifier reads the member's line, is reported so, as a result, also when the line has been reinstated since (section 13.1).

14.6 The archive as a whole

The verifier then checks, against the objects:

Beyond the archive. A verifier SHOULD check the copies it knows elsewhere (the sources of mirrors, members, parents, longer key logs): whether they agree (section 7.4), reporting a fork of a line with the status of each side and where each copy was found, a later version of a key log (section 6.5), and a fork of a key log between its copy and copies elsewhere, with its fork point (section 6.3). It SHOULD check the requirements of the profiles the archive declares (appendix A), the witnesses it finds and the extensions it knows, and warns of those it does not know (sections 2 and 7.2).

15. Security, privacy and rights

15.1 What the format protects

Pins and signatures make every copy checkable wherever it is fetched (sections 4 and 7); discovery documents, indexes, locations and tombstones are maps and hints (sections 3, 12.3 and 13.3). A host or a network therefore cannot forge a version, nor add one to another owner's line (section 7.5), nor make a valid line from a reused genesis record (section 5.4), nor take over a short form (section 12.2). It can withhold: serve an older copy, or a key log that stops before an end or a fork record, which looks complete (sections 6.5 and 12.3); and it can delete what it serves, never a copy held elsewhere (section 13).

Whoever holds threshold current keys of an owner signs versions of its lines as that owner until the owner exposes them, after which what those keys alone sign is contested, and archives aware of it never add it (sections 7.3 and 7.5), though readers still find its signatures good; it cannot change the key log, which only rotation keys sign. Whoever holds nextThreshold rotation keys of the latest version of a key log, not revealed, takes the owner over (with a nextThreshold of 1, a single key, section 6.2), without a fork, by signing the next version with keys of its own; the owner can then only end it, and only if it still holds copies of those keys itself, by signing another version of that number, a fork (section 6.3). Whoever holds nextThreshold rotation keys of an earlier version, kept after use, can fork the key log there, which ends the owner and freezes it (section 7.5). No one can fork a key log at its first version, which is computed from the genesis record (section 6.1). The format cannot tell what was signed before an exposure from what was signed after (section 6.4).

The keeper. The keeper an owner names, at most one, fixed by its owner name, names the accepted successor when no ending version before any fork point names one, and may have the owner object taken down from an archive that keeps it (sections 6.6 and 13.2). Whoever controls the keeper's ORCID record or domain holds these powers, also after a domain lapses and is registered by someone else, or an account is taken over; an owner whose keeper may lapse is better named with an institution's domain, or with no keeper.

Residual risks. The format leaves these to readers and to other evidence:

Forks of a line. A fork of a line (section 7.4), whose sides are both signed, ends nothing by itself; whether to end is the owner's call. If the owner did not make both sides, its current keys may have been exposed, and section 6.3 applies; if it did (two tools, a version made again), it continues from one side, and archives holding the other keep it (section 7.5).

What a signature shows. A good signature shows that a key of the owner's key log signed one object version and one key-log version (section 7.2); not who wrote the document (section 4.4), who the owner is (section 6.6), when it was signed, or that no later version exists.

15.2 Untrusted input

Every file a program reads is untrusted until checked, also in its own storage root. A program reading files (a verifier, a resolver, an archive copying a line, a tool recreating files in a draft):

Deposited sources are code: a tool building renditions from sources it did not write SHOULD run the toolchain isolated, without shell escapes. MD5 (section 4.1) and SHA-1 (git) serve only comparison with external services, never integrity (section 7.6).

15.3 Serving and presentation

An archive does not vouch for the files of its objects (section 3). Its presentation files MUST NOT include files of objects, or pages of other archives, as HTML or scripts; they link to them. An archive SHOULD serve its storage root so that its files run no scripts in the origin of its presentation files: from another origin, or with Content-Security-Policy: sandbox. A host that sets no response headers and serves the archive from one origin (GitHub Pages) can do neither; its presentation files SHOULD then keep no state of their own (cookies, logins, stored data) that a script among the files of objects could reach. A gateway serves no archive's files (section 12.6).

15.4 Keys and secrets

Private keys, and other secrets (tokens of external services, the secrets of a review), MUST NOT be stored in an archive: in an object, a witness folder, a draft, presentation files, or the repository of an archive kept in git. Whatever an archive holds, a private archive included (section 3.1), may be made public and copied.

15.5 Privacy

What an archive serves is public, its drafts included (section 10.1); a sealed version, its witnesses and the key logs beside it travel with every copy and branch, and never change.

15.6 Rights

Metadata. The JSON files this specification defines, inventories with their checksum files, fork records and the evidence of branches are metadata, texts of notes and abstracts included. Whoever writes them dedicates them to the public domain under CC0 1.0, so that they can be harvested and copied freely; an archive admits only owners that accept this. Files of notes (section 4.3) are content.

Content. The files of a document version are under the licence its owner states (sections 4.3 and 4.4); "All rights reserved" is allowed, since depositing grants readers access, not reuse. Copies and branches keep the licences of what they copy; whoever keeps them is responsible for having the right to redistribute it (sections 9.7 and 11.2).

Open questions.

16. Versioning of this specification

16.1 Versions

This specification is versioned MAJOR.MINOR.PATCH:

Before 1.0, a minor version MAY be incompatible with the one before it. Version 0.2 is incompatible with version 0.1: it changes the format names, owners, signatures and storage layout. Version 0.1 is kept as published; archives made under it remain readable as 0.1, by its text, and move to 0.2 by being rebuilt. A reader tells them apart by specification in the discovery document and in every object.json, and by the format names (opensheaf-object/0.1 or opensheaf-object/0.2): a discovery document with specification "0.1" is of a 0.1 archive, and one without specification, or whose format and specification disagree, is of no version this specification defines (below). A draft MAY change in any way; archives made with a draft are rebuilt when its version is final. Drafts are told apart by the date in the heading and by the changelog (section 16.2).

In files. Files record the version as MAJOR.MINOR only, since a patch changes nothing that is valid: in the name of every format ("opensheaf-object/0.2"), and in specification of the discovery document and of every object.json (sections 3.1 and 4.3).

Readers. A reader that finds a major version it does not know, or before 1.0 a minor version it does not know, SHOULD report it, and MUST NOT treat the files as valid. From 1.0, a reader that finds a later minor version of a major version it knows reads the files as of that major version, ignores the properties it does not know, and SHOULD report the version; it does not validate such files against the schemas of its own version (section 2).

Publication. The text of each version is published at https://opensheaf.org/opensheaf-specification-<MAJOR.MINOR>.md, with its schemas (appendix B), and is not changed once final, except by patch versions, listed in its changelog.

16.2 Changelog

Appendix A. Profiles (normative for archives declaring them)

A profile is a set of rules for an external service or a tool, normative for an archive that lists it in profiles (sections 2 and 3.1), and checked by verifiers (section 14.6). A profile only adds rules. They apply to the versions that owners make in the archive, never to copies of lines made elsewhere (section 11); only sealed, signed versions are deposited (sections 7.3 and 10.1).

A.1 Zenodo (zenodo)

Zenodo registers DataCite DOIs (prefix 10.5281) and keeps files permanently. A record is a witness of the versions it holds, not a copy (section 12.3).

Open question. How a branch is deposited: the evidence of its branch point (the folder parent/) has folders, which records do not, and is not sources, which sources.zip holds (#65).

A.2 TeXmacs (texmacs)

For a document whose main source is a TeXmacs document:

An archive kept inside a website built with the TeXmacs website converter SHOULD place an empty file .texmacs-noconvert at its top (honoured by the max-html plugin), so that the converter never rewrites its files.

A.3 Website (website)

Presentation files (section 3) are generated from the storage root, never edited by hand, and regenerated after every change, a takedown included (section 13.2). Under this profile:

Appendix B. JSON Schemas (normative)

The schemas are written in JSON Schema 2020-12, published at https://opensheaf.org/schemas/<file>, their $id, and dedicated to the public domain under CC0 1.0 (section 15.6). They validate:

Validation. A file is valid when it validates against its schema with format asserted (section 14.2). The schemas of genesis.json, keys.json, signature files and the keeper's file allow no other properties; the others do, and such properties carry no meaning here (the data of extensions goes under extensions, section 2). Where a schema and the text disagree, the text prevails.

Other files. datacite.json is validated by converting it to XML against the DataCite 4.7 XML Schema, with the requirements of section 4.4. The conversion follows the correspondence between the attributes of a DOI in DataCite's REST API and the elements of DataCite XML that DataCite documents (its "DataCite XML to JSON Mapping", appendix E), property by property, for the properties of schema 4.7; a verifier without such a converter checks at least the requirements of section 4.4, and warns that the rest was not checked (section 14.1). Inventories, their checksum files and ocfl_layout.json are OCFL's (section 14.2). The schema of the timestamps extension is published with it.

Beyond the schemas. A schema checks one file alone; whatever relates it to another file, its place, a digest or a key (names and identifiers, documentVersion and datacite.json, thresholds, signatures, fork records, uniqueness across entries, index prefixes) is checked by verifiers (section 14).

Open questions.

Appendix C. Examples (non-normative)

The examples follow one paper of the first archive (section 1) through an illustrative history: its owner is created, the paper is sealed and revised, kept in its owner's catalogue in the archive, and accepted by a journal, which keeps an accepted copy and lists it in an issue. The title and the authors are those of the archive; the dates, the journal and its domain are invented, and the DOIs (with Zenodo's prefix) and the ORCID iD (with a valid check digit) are placeholders. Every name, owner name, did:key, file name derived from a key or a digest, and signature is computed: names from the genesis records shown (section 5.2), keys from private keys made for these examples, signatures over the messages shown (section 7.2), and inventory digests from inventories that are not shown. The exceptions are the names of the timestamp files of section C.6, which stand for tokens that are not shown, and the fingerprint of the timestamp authority, a placeholder. Every JSON file shown validates against its schema (appendix B).

The common path. In brief, what an owner does in the common case; the sections cited give the rules, and the examples below show the files.

  1. Create an owner (sections 5.1, 6.1 and 6.2). The owner tool makes a current key on each device the owner signs from, and rotation keys kept offline, apart from those devices and from each other: three hardware tokens with a nextThreshold of 2, or at least a single key, printed or on a USB key, with a nextThreshold of 1. It writes the owner's genesis record, with the current keys, the digests of the rotation keys and, if wanted, a keeper. The owner name is the digest of that record, and the first version of the key log is computed from it (section C.1). The rotation keys are then put away: they are used only to change keys.

  2. Deposit a paper (sections 4, 7.1 and 10.2). When the paper first leaves the owner's hands, the tool seals it: it writes a genesis record naming the owner as originator, makes the object sheaf:<name>:<owner> at <owner>/<name>/, whose version v1 holds the sources, a PDF, genesis.json, object.json and datacite.json, and signs it with a current key, naming the latest version of the key log (sections C.2 and C.3). The owner object goes beside it in the storage root, and the discovery document lists both (section 6.5, section C.6).

  3. Make a new version (sections 4.2, 4.3 and 7.1). A corrected paper is a new object version, v2, holding document version 2. Its object.json has previous, the digest of the inventory file of v1, and it is signed like the first; signing it fixes v1 too, byte for byte, so a pin of either is reliable (section C.2).

  4. Follow it in a catalogue (sections 8.1 to 8.3). The owner catalogue, a collection of the same owner made when the archive set the owner up, pins each paper by its object version and inventory digest; with follow latest, its tool writes a new document version of the catalogue pinning v2 once v2 is signed (section C.4). A journal that accepts the paper keeps an accepted copy, a branch of its own, and lists it in a selection (sections C.4 and C.5).

A new device, or a lost one, is a new version of the key log, signed by the rotation keys (section C.1); a stolen key is exposed the same way (section C.8).

C.1 An owner and its key log

The genesis record of the authors' owner, which follows section 6.2: one current key, made on the laptop the authors sign from, with a threshold of 1, and the digests of three rotation keys, each on a hardware token of its own kept apart, with a nextThreshold of 2; the keeper, an ORCID iD, fixed with the owner name (section 6.6); and the timestamps extension, adopted with one RFC 3161 authority (a placeholder fingerprint):

{
  "format": "opensheaf-genesis/0.2",
  "kind": "owner",
  "created": "2026-03-01T17:40:00Z",
  "nonce": "1b4d9964664d9825076eb8558af61162",
  "keys": [
    "did:key:z6MksKLDefPeXwhL6SJCLqpW1dGZcvBjfsv9mxGCFpMkMuVW"
  ],
  "threshold": 1,
  "next": [
    "oxthfb6b4q3sqathmcpnciqggfxlr3aekgfg2tpm2lgrm2qnalha",
    "h6k4k6c5u4dusj4szwimmaa5cozrwu4jo45xa6erpjggpyvla6vq",
    "lnaifwjnrmhyjj3x7uikmzxznxfbgydi25iftupd2ktobmnpaklq"
  ],
  "nextThreshold": 2,
  "keeper": [
    "https://orcid.org/0000-0002-1234-5677"
  ],
  "extensions": {
    "https://opensheaf.org/opensheaf-timestamps-0.2": {
      "timestampAuthorities": [
        "5b4e3f0c9d2a7e18c6f4b0a39d7e2c51f8a6b3d09e4c7a12f5b8d6e3a0c9f147"
      ]
    }
  }
}

Its name, the owner name, is 56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa: the SHA-256 digest of opensheaf-name-0, a line feed and the bytes shown, with a final line feed, in base32 (section 5.2). The owner object is at 56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa/56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa/ in the owner-name layout (section 3.2). The first version of its key log is computed from the genesis record, and holds nothing else (section 6.1): genesis.json, the bytes shown; object.json, whose fields every later version repeats, adding previous (below); and keys.json, which holds only the keys, threshold, next and nextThreshold of the genesis record. Both are the JCS form (RFC 8785) of their fields, without a final line feed:

{"format":"opensheaf-object/0.2","kind":"owner","name":"56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa","owner":"56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa","specification":"0.2","status":"active"}
{"format":"opensheaf-keys/0.2","keys":["did:key:z6MksKLDefPeXwhL6SJCLqpW1dGZcvBjfsv9mxGCFpMkMuVW"],"next":["oxthfb6b4q3sqathmcpnciqggfxlr3aekgfg2tpm2lgrm2qnalha","h6k4k6c5u4dusj4szwimmaa5cozrwu4jo45xa6erpjggpyvla6vq","lnaifwjnrmhyjj3x7uikmzxznxfbgydi25iftupd2ktobmnpaklq"],"nextThreshold":2,"threshold":1}

The inventory of the first version is the JCS form of the following JSON value, shown here indented: the digests are those of the three files, created is that of the genesis record, and there is no message or user. Its SHA-512 digest is afaabe7b9489bc408ecbb20e8477a7eeb4e8a0ebde0dc15e32d30be17d922207504953e3e52101015f770844449c8382c4c4d9bec472a908ed47200efaef1220, so this version is pinned by sheaf:56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa/v1?sha512=afaabe7b9489bc408ecbb20e8477a7eeb4e8a0ebde0dc15e32d30be17d922207504953e3e52101015f770844449c8382c4c4d9bec472a908ed47200efaef1220 (section 12.1). It is not signed, and the owner object's witness folder holds no signature file for it:

{
  "digestAlgorithm": "sha512",
  "head": "v1",
  "id": "sheaf:56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa:56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa",
  "manifest": {
    "1f44ad271940fd01fa7f1ed2c952c709a7ca075c9028cc732deb8a15197ba93337c2edd19a3f6f57539c18004c6a3493f088a8524ea1fcce3aded371ca654cd2": [
      "v1/content/object.json"
    ],
    "4b991411121c91115c9b15d685c1045916cf2cafdd9a377bf522ac01b96e805479469cf018d81af9da1b591942e5f538ce5af0a4555f2029f79eaf66115998eb": [
      "v1/content/genesis.json"
    ],
    "6ffe743532eaa77a16d66d2168f547cb00ca7905235e4f6a435a42a127efdb8fe998359eb560472fd7e57ee38a1484c9bbf1723756d684fd697157ffec275f52": [
      "v1/content/keys.json"
    ]
  },
  "type": "https://ocfl.io/1.1/spec/#inventory",
  "versions": {
    "v1": {
      "created": "2026-03-01T17:40:00Z",
      "state": {
        "1f44ad271940fd01fa7f1ed2c952c709a7ca075c9028cc732deb8a15197ba93337c2edd19a3f6f57539c18004c6a3493f088a8524ea1fcce3aded371ca654cd2": [
          "object.json"
        ],
        "4b991411121c91115c9b15d685c1045916cf2cafdd9a377bf522ac01b96e805479469cf018d81af9da1b591942e5f538ce5af0a4555f2029f79eaf66115998eb": [
          "genesis.json"
        ],
        "6ffe743532eaa77a16d66d2168f547cb00ca7905235e4f6a435a42a127efdb8fe998359eb560472fd7e57ee38a1484c9bbf1723756d684fd697157ffec275f52": [
          "keys.json"
        ]
      }
    }
  }
}

When the laptop is replaced, the second version lists the new laptop's key and retires the old one (section 6.2). It is signed by two of the three tokens, in v2/signature-oxthfb6b4q3sqath.json and v2/signature-h6k4k6c5u4dusj4s.json of the owner object's witness folder, each naming the first version by its pin; oxthfb6b4q3sqath and h6k4k6c5u4dusj4s begin two digests of next in the first version, whose keys the signature files reveal. The first of them:

{
  "format": "opensheaf-signature/0.2",
  "object": "sheaf:56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa:56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa",
  "version": "v2",
  "inventorySha512": "7673bfae6ba91f6e9acf862635649efde7b6af0e1a787f6dc2cb2f2a583d5d4fab7bf236f7284582a4894aebef2769eacbf69d9036f1ecd4f89c07bc31313f84",
  "signer": "56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa",
  "key": "did:key:z6Mkh5i2epG9LsWNnYbBHG7ctEiNLZPjsBNXxNUcsaYgEtNm",
  "keyLog": "sheaf:56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa/v1?sha512=afaabe7b9489bc408ecbb20e8477a7eeb4e8a0ebde0dc15e32d30be17d922207504953e3e52101015f770844449c8382c4c4d9bec472a908ed47200efaef1220",
  "signature": "1SHM2Xc8RX7/lE8fJq4cbJ/iNV5+v3jji4ObMcjjJZdDKjxsV+j3SKMn8g2kGnf6QCe0FOfPenFkXcjWYGauAQ=="
}

Every token of the first version, the third, which did not sign, included, is then destroyed, and next commits three new ones, since a rotation key is committed in one version only (section 6.1); the data of the timestamps extension, declared in the genesis record, is repeated:

{
  "format": "opensheaf-keys/0.2",
  "keys": [
    "did:key:z6MkugKqPPkysjyartSzszBbMh8fVhENmqGXvddtD8DDvThn"
  ],
  "threshold": 1,
  "next": [
    "j77iavvdclktxkwmwefs7lw6fisdi7lqphwe33g4nboea35t2zga",
    "nzvwkea25p62akdygzheep4qgoo3fw7ryimwytckea4njabtlfzq",
    "fhujijfn3zmvteieps5l6raae73kndteaoju5js3ja33l2wvrqmq"
  ],
  "nextThreshold": 2,
  "extensions": {
    "https://opensheaf.org/opensheaf-timestamps-0.2": {
      "timestampAuthorities": [
        "5b4e3f0c9d2a7e18c6f4b0a39d7e2c51f8a6b3d09e4c7a12f5b8d6e3a0c9f147"
      ]
    }
  }
}

Its object.json repeats the fields of that of the first version, and adds previous, the digest of the inventory file of the first version, which fixes the bytes of that inventory (section 4.3):

{"format":"opensheaf-object/0.2","kind":"owner","name":"56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa","owner":"56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa","previous":"afaabe7b9489bc408ecbb20e8477a7eeb4e8a0ebde0dc15e32d30be17d922207504953e3e52101015f770844449c8382c4c4d9bec472a908ed47200efaef1220","specification":"0.2","status":"active"}

The journal's owner, tqr6lchnd2vk7ezskdc5zdxpaidpsiuduo5sqhiis3i55iautdka, is a group: three current keys, one for each of its editors, with a threshold of 2, so that every version it makes carries two signature files, and three rotation keys with a nextThreshold of 2; its genesis record names its domain, https://journal.example.org/, as keeper.

C.2 A document version

The genesis record of the paper, written when the owner sealed it (section 10.2):

{
  "format": "opensheaf-genesis/0.2",
  "kind": "document",
  "created": "2026-03-02T09:14:00Z",
  "originator": "56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa",
  "nonce": "6f65cd32058c16d6d78b05011772ff1d"
}

Its genesis name is zzgdggwlldcrw4bdeuvntiaobtw2kge6bc4go737pfekhfc5oz4q; by algorithm 1 its name is aajozkubvmxu37pbu2lumdl37llv4ntkazd6j2es54zn23fkiknb, which a branch renamed after a clash would take (section 5.3). The line is sheaf:zzgdggwlldcrw4bdeuvntiaobtw2kge6bc4go737pfekhfc5oz4q:56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa. The object.json of its first version (section 4.3), which was deposited with Zenodo (appendix A.1):

{
  "format": "opensheaf-object/0.2",
  "specification": "0.2",
  "kind": "document",
  "name": "zzgdggwlldcrw4bdeuvntiaobtw2kge6bc4go737pfekhfc5oz4q",
  "owner": "56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa",
  "documentVersion": 1,
  "mainSource": "fractional-phi42-mass-gap.tm",
  "sourceFormat": "application/x-texmacs",
  "renditions": [ { "path": "fractional-phi42-mass-gap.pdf", "mediaType": "application/pdf" } ],
  "toolchain": [ { "name": "TeXmacs", "version": "2.1.5" } ],
  "stage": { "scheme": "NISO-JAV", "value": "AO" },
  "agreement": { "by": [ "P. Duch", "M. Gubinelli" ], "date": "2026-03-01", "method": "by e-mail" },
  "external": [ { "role": "deposit", "service": "Zenodo",
                  "record": "https://zenodo.org/records/1234567", "doi": "10.5281/zenodo.1234567" } ],
  "status": "active"
}

The datacite.json of the same version (section 4.4). The version has a Zenodo DOI, so Zenodo is its publisher, and url (section 4.4) is the version's landing page on the archive's website (appendix A.3), while Zenodo's own record of the DOI has Zenodo's (appendix A.1):

{
  "doi": "10.5281/zenodo.1234567",
  "url": "https://mgubi.org/papers/paper/zzgdggwlldcrw4bdeuvntiaobtw2kge6bc4go737pfekhfc5oz4q/",
  "version": "1",
  "types": { "resourceTypeGeneral": "Preprint" },
  "titles": [ { "title": "Mass gap for the fractional $\\Phi^4_2$ model" } ],
  "creators": [
    { "name": "Duch, P.", "nameType": "Personal", "givenName": "P.", "familyName": "Duch" },
    { "name": "Gubinelli, M.", "nameType": "Personal", "givenName": "M.", "familyName": "Gubinelli",
      "nameIdentifiers": [ { "nameIdentifier": "https://orcid.org/0000-0002-1234-5677",
                             "nameIdentifierScheme": "ORCID" } ] } ],
  "publisher": { "name": "Zenodo" },
  "publicationYear": 2026,
  "dates": [ { "date": "2026-03-02", "dateType": "Issued" },
             { "date": "2026-03-02", "dateType": "Available" } ],
  "rightsList": [ { "rights": "Creative Commons Attribution 4.0 International",
                    "rightsUri": "https://creativecommons.org/licenses/by/4.0/",
                    "rightsIdentifier": "cc-by-4.0", "rightsIdentifierScheme": "SPDX" } ],
  "descriptions": [ { "description": "We present a new, simple ...",
                      "descriptionType": "Abstract" } ],
  "formats": [ "application/x-texmacs", "application/pdf" ],
  "relatedIdentifiers": [ { "relatedIdentifier": "10.5281/zenodo.1234566",
                            "relatedIdentifierType": "DOI", "relationType": "IsVersionOf" } ]
}

The second object version holds document version 2 (section 4.2), corrected after the referee's report and accepted by the journal: its object.json has previous, the digest of the inventory file of the first version (section 4.3), documentVersion 2, changes, stage AM and the DOI 10.5281/zenodo.1234568, and its datacite.json has version "2" and IsNewVersionOf the DOI of version 1.

C.3 A signature

The signature of that version by the new laptop's key, extensions/opensheaf-witnesses/v2/signature-4hz7zgsiazl6hx7i.json in the paper's object, 4hz7zgsiazl6hx7i being the first 16 characters of the base32 SHA-256 digest of the did:key (section 7.2); it names version 2 of the key log, which lists the key:

{
  "format": "opensheaf-signature/0.2",
  "object": "sheaf:zzgdggwlldcrw4bdeuvntiaobtw2kge6bc4go737pfekhfc5oz4q:56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa",
  "version": "v2",
  "inventorySha512": "e3e1319055b967af645713c3baa4dc1974eb8ce02f6b2591bbcce55b068e7a98df54dfa8ab2fd8996d27a2b31df8bee814281d681187014eaa0316f048edbb25",
  "signer": "56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa",
  "key": "did:key:z6MkugKqPPkysjyartSzszBbMh8fVhENmqGXvddtD8DDvThn",
  "keyLog": "sheaf:56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa/v2?sha512=7673bfae6ba91f6e9acf862635649efde7b6af0e1a787f6dc2cb2f2a583d5d4fab7bf236f7284582a4894aebef2769eacbf69d9036f1ecd4f89c07bc31313f84",
  "signature": "Gf9KOxH/6Bg4HzaXGt/HHP+iwdDkSpc/3laukJ5YDSxT6Vy7YDJslpFB3zsi1H/L6QsIaf+mNFhsLCYYqipyBA=="
}

The message it signs, each line ended by a line feed (section 7.2):

opensheaf-signature/0.2
object sheaf:zzgdggwlldcrw4bdeuvntiaobtw2kge6bc4go737pfekhfc5oz4q:56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa
version v2
inventorySha512 e3e1319055b967af645713c3baa4dc1974eb8ce02f6b2591bbcce55b068e7a98df54dfa8ab2fd8996d27a2b31df8bee814281d681187014eaa0316f048edbb25
keyLog sheaf:56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa/v2?sha512=7673bfae6ba91f6e9acf862635649efde7b6af0e1a787f6dc2cb2f2a583d5d4fab7bf236f7284582a4894aebef2769eacbf69d9036f1ecd4f89c07bc31313f84

With a threshold of 1, this one good signature makes the version signed (section 7.3).

C.4 Collections

The members.json of the second version of the owner catalogue of the authors' owner in their archive (sections 8.1 and 8.3). The member is followed, so that when version 2 of the paper was signed, the catalogue's tool wrote this version, pinning it in place of version 1:

{
  "format": "opensheaf-collection/0.2",
  "type": "catalogue",
  "order": "issued-desc",
  "members": [
    { "kind": "document",
      "name": "zzgdggwlldcrw4bdeuvntiaobtw2kge6bc4go737pfekhfc5oz4q",
      "owner": "56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa",
      "at": [ "https://mgubi.org/papers/" ],
      "version": "v2",
      "inventorySha512": "e3e1319055b967af645713c3baa4dc1974eb8ce02f6b2591bbcce55b068e7a98df54dfa8ab2fd8996d27a2b31df8bee814281d681187014eaa0316f048edbb25",
      "follow": "latest",
      "doi": "10.5281/zenodo.1234568",
      "conceptDoi": "10.5281/zenodo.1234566",
      "cite": { "title": "Mass gap for the fractional $\\Phi^4_2$ model",
                "creators": [ "P. Duch", "M. Gubinelli" ], "year": 2026, "issued": "2026-03-02" } }
  ]
}

The members.json of an issue of the journal, a selection owned by the journal's owner (section 8.4). Its first member is the journal's accepted copy (section C.5); its second, the original revision set, which a selection MAY also list (section 9.6):

{
  "format": "opensheaf-collection/0.2",
  "type": "selection",
  "members": [
    { "kind": "document",
      "name": "zzgdggwlldcrw4bdeuvntiaobtw2kge6bc4go737pfekhfc5oz4q",
      "owner": "tqr6lchnd2vk7ezskdc5zdxpaidpsiuduo5sqhiis3i55iautdka",
      "at": [ "https://journal.example.org/" ],
      "revisions": [ { "documentVersion": 2, "version": "v1",
                       "inventorySha512": "1c4e62bb1f89510405cbf63998b049f49b8b5349231bc928313ad17ab1e9fd7460aa570e3bbbce70a9627f2ec71440f0f55facd1c4fc1fb5050f23f6127a9a5a" } ],
      "cite": { "title": "Mass gap for the fractional $\\Phi^4_2$ model",
                "creators": [ "P. Duch", "M. Gubinelli" ], "year": 2026, "issued": "2026-03-02" } },
    { "kind": "document",
      "name": "zzgdggwlldcrw4bdeuvntiaobtw2kge6bc4go737pfekhfc5oz4q",
      "owner": "56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa",
      "at": [ "https://mgubi.org/papers/" ],
      "revisions": [ { "documentVersion": 2, "version": "v2",
                       "inventorySha512": "e3e1319055b967af645713c3baa4dc1974eb8ce02f6b2591bbcce55b068e7a98df54dfa8ab2fd8996d27a2b31df8bee814281d681187014eaa0316f048edbb25",
                       "doi": "10.5281/zenodo.1234568" } ] }
  ]
}

C.5 A branch: an accepted copy

The object.json of the first version of the journal's accepted copy, a branch of the authors' line at their object version v2 (sections 9.1 and 9.6). No line of that name is the journal's, so the branch takes the genesis name, and its line is sheaf:zzgdggwlldcrw4bdeuvntiaobtw2kge6bc4go737pfekhfc5oz4q:tqr6lchnd2vk7ezskdc5zdxpaidpsiuduo5sqhiis3i55iautdka. The first version of a line, it has no previous:

{
  "format": "opensheaf-object/0.2",
  "specification": "0.2",
  "kind": "document",
  "name": "zzgdggwlldcrw4bdeuvntiaobtw2kge6bc4go737pfekhfc5oz4q",
  "owner": "tqr6lchnd2vk7ezskdc5zdxpaidpsiuduo5sqhiis3i55iautdka",
  "parent": {
    "owner": "56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa",
    "name": "zzgdggwlldcrw4bdeuvntiaobtw2kge6bc4go737pfekhfc5oz4q",
    "objectVersion": "v2",
    "documentVersion": 2,
    "inventorySha512": "e3e1319055b967af645713c3baa4dc1974eb8ce02f6b2591bbcce55b068e7a98df54dfa8ab2fd8996d27a2b31df8bee814281d681187014eaa0316f048edbb25",
    "url": "https://mgubi.org/papers/ocfl/56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa/zzgdggwlldcrw4bdeuvntiaobtw2kge6bc4go737pfekhfc5oz4q/v2/"
  },
  "documentVersion": 2,
  "mainSource": "fractional-phi42-mass-gap.tm",
  "sourceFormat": "application/x-texmacs",
  "renditions": [ { "path": "fractional-phi42-mass-gap.pdf", "mediaType": "application/pdf" } ],
  "stage": { "scheme": "NISO-JAV", "value": "AM" },
  "status": "active"
}

Its content holds the files of the parent version except datacite.json and object.json (genesis.json, the source and the PDF), its own datacite.json and object.json, and the evidence (section 9.2): parent/inventory.json, the authors' v2/inventory.json; parent/object.json, their object.json of that version; and parent/signatures/signature-4hz7zgsiazl6hx7i.json, the file of section C.3, byte for byte. Its witness folder holds two signature files of the journal's keys, naming the first version of the journal's key log. The journal's storage root keeps beside it the owner objects of the journal and of the authors (section 6.5).

C.6 The archive

The storage root of the authors' archive in the owner-name layout (section 3.2), with the plain text file that describes that layout in place of OCFL's ocfl_layout.json, which names only registered layouts, and showing the paper's witness folder, with an RFC 3161 token of each signature (timestamps extension; the tokens are not shown):

ocfl/
  0=ocfl_1.1
  opensheaf-owner-name-storage-layout.md
  56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa/
    56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa/      the key log
    zzgdggwlldcrw4bdeuvntiaobtw2kge6bc4go737pfekhfc5oz4q/      the paper
      0=ocfl_object_1.1
      inventory.json
      inventory.json.sha512
      v1/
      v2/
      extensions/opensheaf-witnesses/
        v1/signature-w7htq42yt7tllefi.json
        v1/signature-w7htq42yt7tllefi.json.3mpvi64zr26ezfvh.tsr
        v2/signature-4hz7zgsiazl6hx7i.json
        v2/signature-4hz7zgsiazl6hx7i.json.5xjh5tk24wrufjrz.tsr
    kdye5s4igsyn6i6c46lqhercobkiv5avkepkdy6hcs6wr2pakxeq/      the owner catalogue

In the hashed layout, the paper would be at 946/75e/b2e/sheaf%3azzgdggwlldcrw4bdeuvntiaobtw2kge6bc4go737pfekhfc5oz4q%3a56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjua-94675eb2e27de7146a912666db928784432a4c206a6b390da5a0ed7d15975580/: its identifier of 111 characters encodes to 115, each : becoming %3a, and is shortened (section 3.2).

The discovery document (section 3.1). The archive hosts one owner, whose key log, paper and catalogue it lists, with labels for the website, and which owners names with its catalogue; a second paper of the owner was taken down, and its tombstone (section 13.3) keeps its line taken:

{
  "format": "opensheaf-archive/0.2",
  "specification": "0.2",
  "name": "Papers of Massimiliano Gubinelli",
  "contact": "https://orcid.org/0000-0002-1234-5677",
  "storageRoot": "ocfl/",
  "storageLayout": "opensheaf-owner-name-storage-layout",
  "profiles": [ "zenodo", "texmacs", "website" ],
  "extensions": [ "https://opensheaf.org/opensheaf-timestamps-0.2" ],
  "owners": [
    { "owner": "56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa",
      "catalogue": "sheaf:kdye5s4igsyn6i6c46lqhercobkiv5avkepkdy6hcs6wr2pakxeq:56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa" }
  ],
  "indexes": { "names": 2, "owners": 2, "sha512": 2 },
  "objects": [
    { "id": "sheaf:56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa:56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa",
      "kind": "owner", "name": "56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa", "owner": "56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa",
      "head": "v2", "inventorySha512": "7673bfae6ba91f6e9acf862635649efde7b6af0e1a787f6dc2cb2f2a583d5d4fab7bf236f7284582a4894aebef2769eacbf69d9036f1ecd4f89c07bc31313f84",
      "status": "active" },
    { "id": "sheaf:zzgdggwlldcrw4bdeuvntiaobtw2kge6bc4go737pfekhfc5oz4q:56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa",
      "kind": "document", "name": "zzgdggwlldcrw4bdeuvntiaobtw2kge6bc4go737pfekhfc5oz4q", "owner": "56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa",
      "head": "v2", "inventorySha512": "e3e1319055b967af645713c3baa4dc1974eb8ce02f6b2591bbcce55b068e7a98df54dfa8ab2fd8996d27a2b31df8bee814281d681187014eaa0316f048edbb25",
      "status": "active", "label": "fractional-phi42-mass-gap" },
    { "id": "sheaf:kdye5s4igsyn6i6c46lqhercobkiv5avkepkdy6hcs6wr2pakxeq:56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa",
      "kind": "collection", "name": "kdye5s4igsyn6i6c46lqhercobkiv5avkepkdy6hcs6wr2pakxeq", "owner": "56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa",
      "head": "v2", "inventorySha512": "f587b029968a50cb91b31d64d8612e26a5f13f676584f46cc04a5c014442e9056398b560023e8d6a952a530c55d132fe6d21a9455c87fe30297a59d8579eff94",
      "status": "active", "label": "papers" }
  ],
  "tombstones": [
    { "id": "sheaf:eyr6bc6toi6a4m4fkipowx7qe7f23piugoqvzurxmfo5buhjmr5a:56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa",
      "kind": "document", "name": "eyr6bc6toi6a4m4fkipowx7qe7f23piugoqvzurxmfo5buhjmr5a", "owner": "56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa",
      "genesisName": "eyr6bc6toi6a4m4fkipowx7qe7f23piugoqvzurxmfo5buhjmr5a",
      "lastVersion": "v1", "inventorySha512": "0e1cbffdc6412511c0f178f2ae9c23247e02eba1b061c3dc799a75919f682d3f6471ab1f2b07af9871cf3ad6d1f388a28a5878c340b7c5e3ca072c8a5f2d6c81",
      "date": "2026-05-04", "reason": "Taken down at the request of the holder of the rights." }
  ]
}

C.7 sheaf: URIs

URIs of the paper, of the accepted copy and of the authors' owner (section 12):

sheaf:zzgdggwlldcrw4bdeuvntiaobtw2kge6bc4go737pfekhfc5oz4q
    the authors' line (its owner is the originator)
sheaf:zzgdggwlldcrw4bdeuvntiaobtw2kge6bc4go737pfekhfc5oz4q/v2
    document version 2 of the authors' line
sheaf:zzgdggwlldcrw4bdeuvntiaobtw2kge6bc4go737pfekhfc5oz4q/v2?sha512=e3e1319055b967af645713c3baa4dc1974eb8ce02f6b2591bbcce55b068e7a98df54dfa8ab2fd8996d27a2b31df8bee814281d681187014eaa0316f048edbb25
    the authors' object version v2, which the journal vetted
sheaf:zzgdggwlldcrw4bdeuvntiaobtw2kge6bc4go737pfekhfc5oz4q/v2?sha512=e3e1319055b967af645713c3baa4dc1974eb8ce02f6b2591bbcce55b068e7a98df54dfa8ab2fd8996d27a2b31df8bee814281d681187014eaa0316f048edbb25&at=https%3A%2F%2Fmgubi.org%2Fpapers%2F
    the same, with a hint
sheaf:zzgdggwlldcrw4bdeuvntiaobtw2kge6bc4go737pfekhfc5oz4q:tqr6lchnd2vk7ezskdc5zdxpaidpsiuduo5sqhiis3i55iautdka/v2
    document version 2 of the journal's line, its accepted copy
sheaf:zzgdggwlldcrw4bdeuvntiaobtw2kge6bc4go737pfekhfc5oz4q:*
    the work: the authors' line, the journal's and any other
sheaf:56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa
    the authors' owner: its key log
sheaf:56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa/v2?sha512=7673bfae6ba91f6e9acf862635649efde7b6af0e1a787f6dc2cb2f2a583d5d4fab7bf236f7284582a4894aebef2769eacbf69d9036f1ecd4f89c07bc31313f84
    version 2 of its key log, as keyLog names it
sheaf:zzgdggwl/v2
sheaf:zzgdggwl:tqr6lchn/v2
    short forms of the second and fifth (section 12.2)
https://opensheaf.org/sheaf:zzgdggwlldcrw4bdeuvntiaobtw2kge6bc4go737pfekhfc5oz4q/v2
    the second, through a gateway (provisional, #35)

C.8 An exposed key and a fork of a key log

Later, the new laptop is stolen. The owner signs with two tokens of the second version a version 3 of its key log, in v3/signature-j77iavvdclktxkwm.json and v3/signature-nzvwkea25p62akdy.json, naming version 2. It lists a new current key, made on another laptop, the stolen key in exposed, and the digests of three new tokens in next:

{
  "format": "opensheaf-keys/0.2",
  "keys": [
    "did:key:z6MkteCfnkhWgCnLtR7Wdzi81tk4FDb9Juk5CxgjqCRo4UHJ"
  ],
  "threshold": 1,
  "next": [
    "lnk5erp4kdue5zo5g6tryoy5jvxhjxzquopufqu7cfqaase5kdhq",
    "uilj7nmkhupsxi2isidszwwexj5w5ffieqxq27hhhlbpomh22ioa",
    "ibqesflkpunkv7w75elkgmbflw62jwi3uecj5hngyn6eq6ps475a"
  ],
  "nextThreshold": 2,
  "extensions": {
    "https://opensheaf.org/opensheaf-timestamps-0.2": {
      "timestampAuthorities": [
        "5b4e3f0c9d2a7e18c6f4b0a39d7e2c51f8a6b3d09e4c7a12f5b8d6e3a0c9f147"
      ]
    }
  },
  "exposed": [
    "did:key:z6MkugKqPPkysjyartSzszBbMh8fVhENmqGXvddtD8DDvThn"
  ]
}

The first of its signature files:

{
  "format": "opensheaf-signature/0.2",
  "object": "sheaf:56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa:56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa",
  "version": "v3",
  "inventorySha512": "d006b40d988e88c16cfe7d83d81c5b8a0cb318daad1a78180566568c2553f4b7ef7de1d3ebadd785fba94bb3648e70d6a8f8b40cb8a7cfdd913fc76ba959ce7e",
  "signer": "56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa",
  "key": "did:key:z6MksaMy3cmXbnUKqzGv18xhbBreY6berNYVtTZyDrYRb1Hn",
  "keyLog": "sheaf:56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa/v2?sha512=7673bfae6ba91f6e9acf862635649efde7b6af0e1a787f6dc2cb2f2a583d5d4fab7bf236f7284582a4894aebef2769eacbf69d9036f1ecd4f89c07bc31313f84",
  "signature": "1zEI4EoFG/ZJlZ+e2Y0iswNCCi4oceb8k/gTR8KV+qKM8FAcJocW/eCfJ2zLYhjRlguS1lpoVwGnxBX8lMGKCg=="
}

The thief, holding the stolen key, can sign versions of the owner's lines naming version 2; their signatures stay good, but these versions need a key that version 3 exposes, so they are contested, and archives that know version 3 never add them (sections 7.3 and 7.5). It can sign no version of the key log, which only rotation keys sign (section 6.1). The paper's version 2, signed only with the stolen key (section C.3), is contested too, though the owner made it: the owner signs it again with the new key, naming version 3 (section 7.1), and its RFC 3161 token, dated before version 3, is evidence a reader may trust (section 7.3).

Had the thief also copied, before the owner used them, the tokens whose digests begin nzvwkea25p62akdy and fhujijfn3zmvteie in next of the second version, it could sign another version 3, against version 2, listing a key of its own: a fork of the key log, which ends the owner (section 6.3). An archive holding the owner's versions 1 to 3 that meets the thief's version 3 keeps its own, and appends a fork record as version 4, which carries the other version 3:

56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa/56wo6cdpjsxk7ddgnqfp2quipfghukhtmvjuahvwzko7m4tkz3pa/
  inventory.json
  inventory.json.sha512
  v1/ v2/ v3/                        the archive's own versions
  v4/                                the fork record
    inventory.json
    inventory.json.sha512
    content/forked/f35la3m3ue36z36u/          the other version 3
      inventory.json
      inventory.json.sha512
      keys.json
      signature-nzvwkea25p62akdy.json
      signature-fhujijfn3zmvteie.json

The fork record's genesis.json is that of v1, byte for byte, and its object.json has the fields of that of v1 and previous, the digest of the inventory file of the owner's version 3 (section 4.3); it has no keys.json. The inventory carried has the owner object's id, and f35la3m3ue36z36u begins the base32 SHA-256 digest of its bytes. Readers report the owner ended at version 3, its fork point, and the fork freezes it: an archive that knows of the fork adds no version of its lines, from a copy or as a deposit, unless evidence it trusts shows it signed before either version 3 (section 7.5). The exposure in the owner's version 3 still counts, as an exposure does on either side of a fork (section 6.3), so the versions the thief signs with the stolen key naming version 2 stay contested; and versions of lines whose signatures name version 3, of either side, are contested too, the owner's new signature of the paper's version 2 included, so that the paper's version 2 is contested. Had the thief's version 3 also exposed the first laptop's key, the paper's version 1, signed with it, would be contested as well, though the owner made it. Archives holding the paper's versions keep them; others add them only if they trust their RFC 3161 tokens to date them before the fork, and readers weigh them by such evidence (section 6.4). The keeper may name a successor (section 6.6), under which the authors continue their papers as branches. An archive that met the thief's version 3 first keeps that one, and appends a fork record carrying the owner's.

Appendix D. Rationale (non-normative)

The reasons for the main choices, in the order of the sections.

D.1 Archives and objects

D.2 Names

D.3 Owners

D.4 Lines and signatures

D.5 Collections

D.6 Branches and accepted copies

D.7 Drafts and sealing

D.8 Copies and mirrors

D.9 Identifiers

D.10 Withdrawal, takedown and tombstones

D.11 Verification

D.12 Security, privacy and rights

D.13 Versioning

D.14 Profiles and schemas

Appendix E. References

Companion documents. OpenSheaf archives in git, for archives kept in git repositories, and the timestamps extension, for dating signatures with RFC 3161 tokens and OpenTimestamps proofs.