Skip to content Skip to footer

An Authentic File Needs Its Context

Four fictional young adults in black-and-white glamorous fashion, smiling together in a bright chrome and stone interior.
Conceptual AI-generated editorial illustration. Fictional people; not a photograph of an event or product test.

A file can pass a cryptographic integrity check and still be the wrong file for the operation in front of the user. An old approved invoice may be genuine. So may a document belonging to a different account. Neither should silently replace the current invoice in the current account. Protecting bytes and establishing their intended context are related, but separate, engineering tasks.

Ask what the application actually accepted

Imagine a document application displaying “Approved budget, version 8”. Its encrypted object arrives from storage, decryption succeeds and the viewer opens it. If the visible label came from a different database record, the screen can make a stronger statement than the cryptography supports. The document may be authentic under a key without being the document described by that label.

This example is hypothetical. It is not a finding about UseCrypt or another product. It illustrates why a useful test records the whole acceptance decision: object identity, account, version, permissions and display state. A green integrity indicator is incomplete evidence when nobody has defined what it covers.

Associated data can protect context without hiding it

RFC 5116 defines an interface for authenticated encryption with associated data. Associated data receives integrity protection, but is not encrypted by that operation. An application can therefore authenticate relevant context alongside protected content, provided its design specifies exactly which context is supplied and how the receiver reconstructs it.

Suppose a protocol includes a document identifier and format version in that authenticated context. Those fields need an unambiguous encoding. Concatenating loosely formatted strings invites disagreements between producers and consumers. The protocol must also establish which values the receiver expects; blindly accepting values supplied with the object does not establish that the object belongs in the current workflow.

Authenticity does not establish freshness

An attacker may not need to forge anything. Replaying a previously valid object can be enough. RFC 5116 explicitly leaves anti-replay services outside its interface. The application must decide whether a valid object is current, already consumed or no longer acceptable.

RFC 8613, Object Security for Constrained RESTful Environments, provides a useful protocol-level example: it specifies replay protection as well as message protection. It is not a claim about a cloud-file product. Its relevance is the discipline of specifying receiver state and rejection rules rather than treating encryption as a substitute for them.

A key capsule is not the complete acceptance policy

The historical Safe material discussed in our HVKM and RSA chapter describes protection of a file key through client and server operations. That raises a further review question: how does the implementation bind the recovered key to the intended file, recipient and version? The available architectural description should not be stretched into an answer about checks it does not document.

The January 2019 Safe demonstration shows a person selecting a contact and sharing a file. It documents an interface workflow, not the authenticated representation of that contact or the freshness policy for a stored object. Those require different evidence.

Make the negative cases visible

A practical acceptance test can use two accounts, two files and two versions of one file. Exchange the encrypted objects while keeping the displayed labels unchanged. Attempt to present an earlier valid version as the current one. Repeat a request that should have been consumed. Record whether the system rejects the operation and whether the interface explains the failure accurately.

These tests need an authorised environment and a written expected result. Some products intentionally allow old versions to remain available; that is a policy to label, not automatically a vulnerability. The failure is an undocumented mismatch between what the screen promises and what the receiver actually verifies.

A strong privacy design should make that boundary inspectable. “The bytes were not modified” is a valuable result. “This is the current document intended for this account and this action” is a different result, and deserves its own evidence.

Show CommentsClose Comments

Leave a comment

0.0/5