Format overview

DiME, the open and trust-based data format building secure Application-based Public-Key Infrastructures (APKIs) in a breeze.

The data format has been designed with inspiration from other modern data formats in use today. Major principles during design have been human readability and ease of use, this to support developers during implementation and making troubleshooting easier.

DiME works with envelopes that contains items and are protected by signatures on diffrent levels, and possibly by diffrent keys. Items may contain additional data like encrypted payloads or application-specific instructions.

A combination of plain text, JSON and Base64 encoding makes up a typical DiME item:

Di:MSG.eyJhdWQiOiJjYzMwNWY3NC02MWRjLTRlY2UtYmQ1MC1jYTg4NWQwYzM2OWYiLCJleHAiOiIyMDIyLTEwLTIyVDExOjQ0OjU3LjM5Mjk4OFoiLCJpYXQiOiIyMDIyLTEwLTIyVDExOjQ0OjQ3LjM5Mjk4OFoiLCJpc3MiOiJlZjRkNWJmMC1mOWVkLTQzZTktYmE3ZC0wMGNkNDEwYzJmMmMiLCJ1aWQiOiJjNmUwNDE4Yy1mZjgyLTQ0ZTEtYTQ4Ny1mYjQ2NTg3NzBmZWMifQ.UmFjZWNhciBpcyByYWNlY2FyIGJhY2t3YXJkcy4.YjkyMjMwYzBkNTY0YjU0NS4yMWZlNTdjNzY5MDI1ODIwMGM3OTQ0OTJjOTU5MGE3Y2M5ODM4MGJhZDNiZDhmODIyMDNlY2UxNGJhMTE3MTA4YzI5NmU3MzM4MjA5NDk4NzMwMTE5OTU1NGZlNzQ3MGI1NTJmNzBjZjk4YjcxY2JlNzdjYzViNDhkMjliZjcwOA

Although it may look cryptic, there is many details revealed just by a quick glance. First the header ‘Di’, stating this is a DiME envelope. Then, in this case, it is followed by ’MSG’, indicating there is an attached message item. The following Base64 encoded string can be quickly decoded to reveal easy to read JSON claims.

{
    "aud": "cc305f74-61dc-4ece-bd50-ca885d0c369f",
    "exp": "2022-10-22T11:44:57.392988Z",
    "iat": "2022-10-22T11:44:47.392988Z",
    "iss": "ef4d5bf0-f9ed-43e9-ba7d-00cd410c2f2c",
    "uid": "c6e0418c-ff82-44e1-a487-fb4658770fec"
}

The decoded JSON claims contain information that is used to verify and process a DiME item. The claim ‘aud’ indicates the receiver (audience), whereas ‘exp’ (expires at) and ‘iat’ (issued at) specifies when the massage was created and when it will expire. All claims are human readable, including any dates.

The DiME data format specifies a series of components known as items. These include:

  • Envelope (Di)

  • Key (KEY)

  • Identity (ID)

  • Identity Issuing Request (IIR)

  • Data (DAT)

  • Message (MSG)

  • Tag (TAG)

Envelope (Di)

The core element of Dime is the Envelope. Although a DiME item, it is more of a wrapping component. Envelopes come in two flavors, anonymous and signed. An anonymous envelope is just a simple way to string together several other Dime items in one easy to manage package. Whereas the signed envelope adds additional integrity protection for all included items inside the Dime envelope.

pageEnvelopes

Key (KEY)

This item carries a cryptographic key, which could be a public key pair, a single public key, or a secret key. It includes metadata (claims) for the key. When carrying a public-key pair it forms the bases of an Application-based Public-Key Infrastructure.

pageKey

Identity (ID)

The Identity item is the core of the authentication mechanisms built into Dime. This is in many ways similar to a X.509 certificate, as it contains information about the subject (holder), a public key, an optional trust chain, and at least one signature to both prove trust and protect the integrity of the information.

pageIdentity

Identity Issuing Request (IIR)

The Identity Issuing Request item serves the same purpose as a Certificate Signing Request (CSR) when using X.509 certificates. An entity that wishes to be included in a Dime-based trust chain creates an IIR and a trusted issuer then issue a new identity item and return it to the requesting entity. The returned identity item is then used by the requesting entity to authenticate withing the network.

pageIdentity Issuing Request

Data (DAT)

The Data item is a simple carrier of binary data. Unlike Message there is no target audience and no support for End-To-End Encryption. This may be used to package data into a Dime envelope for integrity protection and trust and then distributed to multiple receivers.

pageData

Message (MSG)

The message item is used to transmit information inside a DiME-based network. Apart from integrity protection, messages support confidentiality-protected communication using End-To-End Encryption (E2EE), where only the issuer (sender) and the audience (receiver) can read the content.

pageMessage

Tag

Tag items makes it easy to quickly sign one or more DiME items without modifying the signed items. The tags can then be included in a DiME envelope or transmitted separately as proof of verification, reception, or processing.

pageTag

Last updated