Skip to main content

Peppol v1

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

For more information about OP_RETURN see here. 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