Background
How AS4 market communication, the BSI Smart Metering PKI, MP-IDs and the BSI technical guidelines fit together, and which document sets which TLS rule.
Market communication over AS4
German energy suppliers, grid operators, metering point operators and balancing parties exchange EDIFACT messages for supplier switches, metering data and billing. This is Marktkommunikation, and the Bundesnetzagentur sets its formats.
The transport is AS4, an OASIS ebMS 3 profile for SOAP messages over HTTPS. AS4 became mandatory for electricity in April 2024 and for gas in April 2025. The BDEW sets the rules in two documents:
- AS4-Profil (version 1.2, applies from 1 October 2026): message exchange, signatures, encryption, and §2.2.6.1 for TLS.
- Regelungen zum Übertragungsweg AS4 (RzÜ AS4, version 2.6): certificates, endpoints, SNI and revocation.
Every AS4 connection is mutual TLS. Both sides authenticate with certificates from one PKI: the Smart Metering PKI.
The Smart Metering PKI (SM-PKI)
The BSI runs the root of the SM-PKI. Sub-CAs, called Vertrauensdiensteanbieter, issue end-user certificates to four roles:
| Role | Who | In this crate |
|---|---|---|
| EMT | external market participants: suppliers, grid operators, metering point operators | BDEW_AS4 (the market-communication EMT, CN ….EMT.MAK…) |
| GWA | smart meter gateway administrators | BSI_TR_03116_3 |
| GWH | gateway manufacturers | BSI_TR_03116_3 |
| SMGW | the smart meter gateways themselves | BSI_TR_03116_3 |
Every participant holds three certificates on three separate key pairs: one each for TLS, signature and encryption. AS4 uses the TLS certificate for the channel and the other two for the messages. utility-pki checks the TLS certificate.
The MP-ID
A market participant is identified by its MP-ID (Marktpartner-ID). For market communication the CP SM-PKI puts it in the subject's organisational unit (OU), and the AS4-Profil requires it to equal the PartyId of the AS4 messages. Partner routing and authorisation therefore rest on reading exactly one OU from the certificate. Certificate::mp_id() returns None when the OU is missing or repeated, so a crafted certificate cannot choose which MP-ID you see.
The test PKI
The BSI also runs an SM-Test-PKI for onboarding. Its certificates carry O = SM-Test-PKI-DE instead of SM-PKI-DE. The production profiles reject them; Certificates shows the one-statement profile for testing.
Which document sets which rule
| Document | What it sets | Used for |
|---|---|---|
| BSI TR-03116-3 (Stand 2025) | the cryptography of the SM-PKI: TLS versions, suites, curves, signature schemes, session lifetime, extensions; the certificate signature algorithms | BSI_TR_03116_3, BDEW_AS4 |
| BSI TR-03109-4 (1.2.1) | the SM-PKI certificate profile (Annex A: extensions, criticality, KeyUsage, EKU) and validity periods | certificate rules |
| CP SM-PKI (1.1.2) | names (O, OU, CN per role), SubjectAltName rules, revocation by CRL | certificate rules |
| BDEW AS4-Profil (1.2) | TLS for AS4: TR-03116-3, with every recommended suite made mandatory | BDEW_AS4 |
| RzÜ AS4 (2.6) | SNI, exactly one endpoint URI, CRL availability | BDEW_AS4 |
| BSI TR-02102-2 (2026-01) | the general federal TLS recommendation, with sunset years | BSI_TR_02102_2 |
All of them are free to download. Sources lists versions and links.
Brainpool, and why OpenSSL
The SM-PKI is built on the Brainpool curves (RFC 5639). TLS gives them two sets of code points:
- 26–28 (RFC 7027) for TLS 1.2;
- 31–33 (RFC 8734) for TLS 1.3.
A profile that mixes them up fails against a strict peer, which is why utility-pki keeps its rules per TLS version.
TR-03116-3 also requires a CBC suite in TLS 1.2, and BDEW AS4 requires AES-CCM in TLS 1.3. rustls supports neither, nor Brainpool. OpenSSL 3.2 or later supports all of them, so it is the practical choice for AS4, and utility-pki exports its configuration.
Glossary
| Term | Meaning |
|---|---|
| AS4 | OASIS ebMS 3 / AS4 messaging profile; the transport of German market communication |
| BDEW | Bundesverband der Energie- und Wasserwirtschaft; publishes the AS4-Profil and RzÜ |
| BSI | Bundesamt für Sicherheit in der Informationstechnik; publishes the TRs and runs the SM-PKI root |
| CP | Certificate Policy of the SM-PKI |
| CTLS | the TLS certificate of an SM-PKI participant |
| EMT | externer Marktteilnehmer; MAK marks one in market communication |
| MP-ID | Marktpartner-ID, in the certificate's OU; equals the AS4 PartyId |
| RzÜ | Regelungen zum Übertragungsweg (BDEW) |
| SMGW | Smart-Meter-Gateway |
| TR | Technische Richtlinie (BSI technical guideline) |