mintBlue

Peppol v1

The Peppol v1 envelope, its use of the General JWE Serialization Syntax, and the OP_RETURN arguments it publishes.

Current SDK format generation. This page documents the envelope format the mintBlue SDK writes today. The open SDX Protocol specifies a later generation of this format; the two are not wire-compatible. Read the open specification

Generations sets out which of the two documents applies to the code you installed.

The Peppol envelope follows the General JWE Serialization Syntax of the JSON Web Encryption standard (JWE) specified in RFC 7516

JWE is chosen because

  • support for multiple recipients
  • support for multiple encryption algorithms
  • support for additional authenticated data

High Level Overview

High level overview of the Peppol v1 format. Dashed lines denote optional features

Creating a Peppol V1 Envelope with createTransaction

ArgumentTypeDescription
versionnumber1
valueBufferraw file contents
pubKeystring | JWKES256 Public key of the receiver, either as JWK or as uncompressed hex string
optionsObject
options.extraBufferExtra data to include in the encrypted payload
signingKeyJWKOptional key to sign the envelope

General JWE Serialization Syntax

FieldDescriptionUse in Peppol v1
protectedintegrity protected headerdeclares algorithm A256GCM
unprotectedheader without integrity protection
ivinitialization vectorused by A256GCM
aadadditional authenticated dataunused currently
ciphertextencrypted payloadencrypted content. contains compressed file and extra dataencrypt(lzma(cbor([file, extraData]))
tagauthentication tag
recipientsarray containing information about a single recipientcontains information for the receiver to be able to decrypt the ciphertext

OP_RETURN Format

The OP_RETURN arguments are structured as follows:

IndexDescriptionValue
0Protocol ID"mB:peppol"
1Peppol EnvelopeSerialized JWE/JWS
2Receiver pubkeyPublic key of the receiver, intented for quick indexing

On this page