Open Charging Technology · Whitepapers

EVQI Transport: Key Pins and TLS 1.3 Raw Public Keys for Local Controllers

Version 0.3, Draft, 2026-11-13 CC-BY-SA 4.0 · OpenChargingTechnology/Whitepapers · reference implementations: Vanaheimr/Hermod (transport), OpenChargingCloud/WWCP_OCPP (OCPP), OpenChargingCloud/LocalController, OpenChargingCloud/ChargingStation (station)

This document belongs to EVQI Transport. It is about one hop: from a charging station to a Local Controller in the same private network, and to other local servers like it. A Local Controller has to offer an OCPP WebSocket server, and no public certificate authority will issue a certificate for it. Today this leaves an internal PKI or OCPP over SSH. This document adds a third way, TLS 1.3 with raw public keys (RFC 7250), weighs its advantages and disadvantages, and proposes how to build it, in C# included.

It is a concept. The specification that follows from it is Key Pins and TLS 1.3 Raw Public Keys - Specification (work package K8). The C# implementation is planned in chapter 10. Its first stage, key pins over certificates at the station and at the Local Controller, and their signed distribution by the CSMS (work packages K1 to K4), is built, and so is RFC 7250 in Hermod, over HTTP/3 and over TCP (K5 and K6); what the nodes above Hermod do with it is in sections 10.8 and 10.10.


Contents

  1. Summary
  2. Starting point
  3. How TLS 1.3 raw public keys work
  4. Advantages and disadvantages
  5. The alternatives compared
  6. Proposal: key pins
  7. Wire profile
  8. Mapping to OCPP and to the configuration
  9. Security considerations
  10. Library support
  11. Implementation in C#
  12. Work plan
  13. Open questions
  14. References

0. Summary

The problem. OCPP 2.1 treats a Local Controller as a CSMS towards its stations (Part 4 §6.5). The station checks the Local Controller's certificate like a CSMS certificate: a chain up to a CSMSRootCertificate (A00.FR.308) and a common name equal to the FQDN the station dialled (A00.FR.309, A00.FR.510). A Local Controller sits in a garage or a car park, under a private address or a local name, often without internet access. Public CAs may not issue certificates for such names and addresses. What remains is an internal PKI, with a CA, names, validity periods, a correct clock at the station and revocation that is unreachable offline.

The observation. What a station really needs to know about its Local Controller is one thing: is this the key of my Local Controller? A chain, a name and a validity period are the means a PKI uses to answer that question for strangers. Station and Local Controller are not strangers: they are commissioned together. SSH host keys, EEBUS SHIP and the RPK mode of LwM2M answer the question directly, by pinning the key.

The proposal: pin the key, not the name.

  1. Key pin. Per endpoint the station holds the SHA-256 hash of the Local Controller's DER encoded SubjectPublicKeyInfo (SPKI), as DANE writes it in a TLSA record 3 1 1. The pin is the whole trust decision: no chain, no name, no validity period, no revocation lookup. The signature in CertificateVerify, i.e. the proof that the server holds the key, is always checked.
  2. One key, three wrappers. The same key, and therefore the same pin, can be presented
    • in a CA-issued certificate (for unmodified stations, OCPP as written),
    • in a self-signed certificate whose content nobody reads (works with every TLS stack today, .NET's SslStream included), or
    • as a raw public key (RFC 7250, negotiated in the TLS 1.3 handshake; no certificate at all).
  3. Raw public keys are the lean wire format of key pins, not a trust model of their own. A station that can negotiate them does; one that cannot gets a certificate around the same key (section 5.3). The pin, its provisioning and its rollover are identical, so nothing has to be provisioned twice.
  4. Strict separation. An endpoint is either checked by CA (chain and name) or by key pin, never by both and never by whichever happens to fit. The CVEs of chapter 3.3 are exactly about that seam.
  5. Distribution. Pins come from the CSMS, signed end to end through the Local Controller (EVQI chapter 7), or from commissioning. Trust on first use exists only as an explicit option, and a learned pin stays on probation until the CSMS confirms it.
  6. Rollover. Up to four pins per endpoint, so that the next key is known before it is used.
  7. Stations by key, too. The Local Controller authorizes stations by their key pins, like authorized_keys of the SSH path. The station may present the key of its OCPP Charging Station certificate raw.

Advantages of raw public keys (chapter 3): no CA, no names, no clock, no X.509 parser on the station, the smallest handshake, and an explicit, negotiated meaning. Everything above TLS stays as it is: WebSocket, ALPN, HTTP/2 and HTTP/3 (EVQI chapter 2), TLS exporters. A stolen Local Controller key is useless outside the stations pinned to it, which fulfils OCPP's own requirement of Part 4 §6.5 better than a shared trust anchor does.

Disadvantages (chapter 3): outside OCPP 2.1 (A00.FR.506 asks for X.509), patchy library support (not in .NET's SslStream, Java, Go, Mbed TLS or browsers; in OpenSSL only since 3.2), no roles in the credential, keys without expiry, pins to be distributed, and young code paths with real authentication bypasses (OpenSSL CVE-2024-12797, wolfSSL CVE-2026-55960).

Recommendation.

Stage What Where it works
1 Key pins over a self-signed certificate (option B) every station whose TLS stack has a verify callback; in Hermod on all three bindings (SslStream for HTTP/1.1 and HTTP/2, its own TLS 1.3 for HTTP/3)
2 RFC 7250 negotiated on top, same pins (option C) stations with OpenSSL ≥ 3.5 LTS, GnuTLS, wolfSSL, rustls; Hermod's own TLS 1.3 (HTTP/3) and BouncyCastle (HTTP/1.1, HTTP/2)
always the Local Controller keeps presenting a CA-issued certificate to stations that ask for X.509 without a pin unmodified OCPP 2.x stations

OCPP over SSH stays where SSH is the management plane anyway, and for commissioning. Both paths share one trust model: a host key pin is a key pin. On both, trust on first use is explicit and on probation, and on both it is built that way (section 5.6).


1. Starting point

1.1 The Local Controller in OCPP 2.1

OCPP 2.1 Part 4 §6.5 (Local Controller Security) says:

Part 2, chapter A, adds what the station checks:

Requirement Content Consequence for a Local Controller
A00.FR.308 path validation of the server certificate (RFC 5280 §6) a CA whose root is installed as CSMSRootCertificate
A00.FR.309, A00.FR.510 the common name is the FQDN of the endpoint a name, and a name service that resolves it locally
A00.FR.512 dNSName SANs only where a CSMS has several network paths IP addresses are not foreseen
A00.FR.506 certificates are X.509 raw public keys are outside the specification
A00.FR.310 a failed check raises InvalidCsmsCertificate reused for pin mismatches (section 7.5)

1.2 Why there is no public certificate

An internal PKI is therefore the conformant answer, not the simple one. The TLS configuration paper already notes that OCPP defines no way to configure the TLS listener of a Local Controller at all, and names pairing and pinning as an option for exactly this hop.

1.3 The same problem elsewhere

1.4 Precedents

Where How the key is trusted
SSH (RFC 4251), and OCPP over SSH in EVQI host key in known_hosts, user keys in authorized_keys, trust on first use
EEBUS SHIP TLS with self-signed certificates; a device is trusted by its SKI after pairing
OMA LwM2M the security mode RPK over DTLS, next to PSK and Certificate
CoAP (RFC 7252 §9) RawPublicKey mode of DTLS
DANE (RFC 6698, RFC 7671) TLSA 3 1 1: the server's SPKI hash, published in DNSSEC
Chrome --ignore-certificate-errors-spki-list; Hermod's HTTP/3 server computes the value (ServerCertificate.SubjectPublicKeyInfoPin)
curl --pinnedpubkey sha256//…: SHA-256 over the SPKI

1.5 Non-goals


2. How TLS 1.3 raw public keys work

2.1 Negotiation

RFC 7250 adds a certificate type RawPublicKey (2) next to X509 (0) and two extensions:

Extension Code In TLS 1.3 sent in Says
client_certificate_type 19 ClientHello: the types the client can present, by preference; EncryptedExtensions: the type the server chose how the client authenticates
server_certificate_type 20 ClientHello: the types the client can accept, by preference; EncryptedExtensions: the type the server chose how the server authenticates

If RawPublicKey was negotiated, the Certificate message holds at most one entry, with the DER encoded SubjectPublicKeyInfo (RFC 9846 §4.4.2, RFC 7250 §3): a server always sends one, a client may send none when it has no key. A server that does not know the extensions ignores them and sends X.509: unmodified servers keep working. A server must not choose a type the client did not offer, and a client must reject such a choice.

sequenceDiagram
    autonumber
    participant CS as Charging station (TLS client)
    participant LC as Local Controller (TLS server)

    CS->>LC: ClientHello: key_share, signature_algorithms, ALPN,<br/>server_certificate_type = [RawPublicKey, X509],<br/>client_certificate_type = [RawPublicKey, X509]
    LC->>CS: ServerHello: key_share
    LC->>CS: EncryptedExtensions: server_certificate_type = RawPublicKey,<br/>client_certificate_type = RawPublicKey, ALPN
    LC->>CS: CertificateRequest
    LC->>CS: Certificate: one entry, the LC's SubjectPublicKeyInfo
    LC->>CS: CertificateVerify, Finished
    CS->>CS: SHA-256(SPKI) among the endpoint's key pins?<br/>CertificateVerify valid for this key?
    CS->>LC: Certificate: the station's SubjectPublicKeyInfo
    CS->>LC: CertificateVerify, Finished
    CS->>LC: GET /ocpp/CS001, Upgrade: websocket, Sec-WebSocket-Protocol: ocpp2.1
    LC->>LC: is this key pin authorized for identity CS001?
    LC-->>CS: 101 Switching Protocols

2.2 What is left out, what remains

Left out Remains
the certificate chain, intermediate CAs the full TLS 1.3 handshake: (EC)DHE, forward secrecy, AEAD
subject, names, SANs, the name check CertificateVerify: the proof that the peer holds the private key
validity period, clock ALPN, SNI (when a name is dialled), session resumption, 0-RTT rules
revocation (CRL, OCSP, stapling) TLS exporters (RFC 9846 §7.5, RFC 9266)
extensions: key usage, policies, EVQI roles encrypted Certificate messages: a passive observer sees neither key

Mixed cases are allowed: an RPK server and an X.509 client, or the reverse.

2.3 Sizes

A P-256 SPKI has 91 bytes, an Ed25519 SPKI 44. An ECDSA chain of leaf and sub-CA has about 1–1.5 kB, an RSA chain 2–4 kB. On a Local Controller's LAN this does not matter. It matters on narrowband links and in the many handshakes after a site-wide power cut, and only slightly.


3. Advantages and disadvantages

3.1 Advantages

  1. No CA. No root, no sub-CA, no issuing process, no CSRs, no renewals, no InstallCertificate of a root that then vouches for every connection of the station.
  2. No name. The station dials an address or a local name. A changed DHCP address or a renamed host changes the URL, not the trust.
  3. No clock. No validity period is read. A station without a real-time clock can authenticate its Local Controller right after a power cut, before its time is synchronized. This breaks the circle of time and TLS for the local hop.
  4. No revocation infrastructure. Revoking means removing a pin. No CRL has to be reachable, and no "status unknown" is accepted out of necessity.
  5. Scope of a stolen key. A stolen Local Controller key is accepted only by stations that pinned it, i.e. by the stations of that Local Controller. With an internal PKI its certificate works against every station that trusts the same CA and dials the same name, and local names such as lc.local repeat from site to site. Part 4 §6.5 asks for exactly the narrow scope.
  6. Less parsing. The station parses a SubjectPublicKeyInfo, not an X.509 certificate with its extensions, and builds no chain. X.509 parsing and path building are among the most frequent sources of vulnerabilities of TLS stacks.
  7. An explicit meaning. With a self-signed certificate both sides pretend that a certificate matters and then ignore it in a callback. With RFC 7250 both sides have negotiated that nothing but the key counts. No subject or validity period can be misread.
  8. The smallest handshake (section 2.3).
  9. Everything above TLS stays. OCPP-J, the WebSocket, ALPN, HTTP/2 with RFC 8441 and HTTP/3 with RFC 9220 (QUIC uses the TLS 1.3 handshake, RFC 9001), the channel sessions of EVQI chapter 4 and the TLS-bound TOTP of EVQI section 2.5. OCPP over SSH replaces all of this.
  10. Compatible on the same port. The server answers RPK only to clients that offer it. All others get X.509 on the same port.
  11. Privacy. In TLS 1.3 the Certificate messages are encrypted, so passive observers learn no key, as with certificates.
  12. Proven model. The trust model is that of SSH, SHIP and LwM2M, well understood in commissioning practice.

3.2 Disadvantages

  1. Outside OCPP 2.1. A00.FR.506 asks for X.509, A00.FR.308 and A00.FR.309 for a path and a name. RPK, like any key pin, is an extension to be negotiated per endpoint (chapter 7) and needs a firmware change on the station. An unmodified station cannot use it, and an OCPP conformance test does not cover it.
  2. Library support. .NET's SslStream (SChannel, OpenSSL and Apple PAL), System.Net.Quic, Java's JSSE, Go's crypto/tls, Mbed TLS and every browser lack it. OpenSSL has it since 3.2; OpenSSL 3.0 LTS, still common on embedded Linux and in Debian 12 and Ubuntu 24.04, does not (chapter 9).
  3. Middleboxes. A TLS-terminating reverse proxy in front of the Local Controller would have to support RFC 7250 itself. Hardly one does. For a Local Controller that terminates TLS itself this does not matter; for a CSMS behind a cloud load balancer it rules RPK out.
  4. No roles in the credential. The EVQI role extension (EVQI 6.2) lives in a certificate. With a raw key the role is part of the configuration of whoever holds the pin (section 5.9).
  5. No expiry. A key is valid until somebody removes its pin. Rollover must be designed (section 5.5) and keys must be watched for their age, or they live forever.
  6. Pins have to be distributed. The PKI's question "who vouches for this key?" does not disappear, it moves from the handshake to provisioning (section 5.7). Done carelessly, it degrades to trust on first use without confirmation.
  7. Young code paths. RPK is rarely used, so its code is rarely exercised, and it has failed where it meets the X.509 path (section 3.3).
  8. Tooling. openssl s_client -enable_server_rpk and Wireshark know RPK. curl, browsers, most OCPP test tools and the usual monitoring probes do not.

3.3 What the vulnerabilities teach

Vulnerability What went wrong
OpenSSL CVE-2024-12797 (3.2 to 3.4, fixed in February 2025) A client that authenticated the server by RPK did not abort the handshake when the key did not match, despite SSL_VERIFY_PEER. Clients that checked SSL_get_verify_result() were safe.
wolfSSL CVE-2026-55960 (builds with HAVE_RPK, fixed in 5.9.2) A raw public key that was never negotiated was accepted in place of an X.509 certificate, bypassing chain validation.

Both failures sit at the seam between the two paths: a key accepted where a certificate was expected, or a failed check that did not end the handshake. Hence the strict separation of section 5.4, the result check of section 6, rule 7, and the negative tests of section 10.7.


4. The alternatives compared

A internal PKI A′ public name B0 self-signed as root B key pin over X.509 C raw public key D OCPP over SSH
OCPP 2.1 as written yes yes formally yes no no no
unmodified stations yes yes yes no no no
CA to operate yes public, ACME no no no no (SSH CA optional)
clock needed yes yes yes no no no
name needed FQDN, local DNS public FQDN, DNS FQDN no no no
revocation CRL/OCSP, rarely reachable public, needs internet DeleteCertificate remove the pin remove the pin remove the host key
a stolen LC key works against every station of the CA that dials the same name (local names repeat) every station that dials the name every station that installed it, possibly for every name (see below) the stations that pinned it the stations that pinned it the stations that pinned it
roles in the credential (EVQI 6.2) yes no possible no no no
handshake (server credential) 1–4 kB 2–5 kB ~0.5 kB ~0.5 kB 44–91 bytes SSH host key
station's stack any any any verify callback RFC 7250 (chapter 9) SSH client
Hermod (.NET) today yes yes yes yes, SslStream no: BouncyCastle or own TLS (chapter 10) yes
HTTP/2, HTTP/3 bindings yes yes yes yes HTTP/2 yes, HTTP/3 with Hermod's TLS no, SSH channels instead
tools all all all most (curl --pinnedpubkey) few ssh -s

A, internal PKI. The CPO's CA issues the Local Controller a CSMS certificate for its FQDN. Conformant, and it carries roles. It needs a CA and its operation, a local name service, a correct clock at the station, and it gives a stolen key a scope wider than Part 4 §6.5 wants. A sub-CA per site with name constraints narrows the scope, at the price of even more PKI.

A′, public name. See section 1.2: possible, and fragile for sites that are offline at times.

B0, the self-signed certificate as CSMSRootCertificate. The Local Controller's self-signed certificate (CN = its FQDN) is installed at the station as a root. This works with unmodified stations today and is the cheapest way to start. But a root vouches for every connection of the station, the CSMS's included. If the station's TLS stack accepts the self-signed certificate as an issuer, its stolen key can sign a certificate for the real CSMS's name. The certificate must therefore carry basicConstraints CA:FALSE and no keyCertSign, and every station stack must be tested to refuse what it "issues". Name, clock and expiry stay: notBefore far in the past and notAfter at 99991231235959Z (RFC 5280 §4.1.2.5).

B, key pin over X.509. The Local Controller wraps its key in a self-signed certificate whose fields nobody evaluates. The station compares SHA-256 over the leaf's SPKI with the endpoint's pins and ignores chain, name and dates. This works with every TLS version and every stack that has a verify callback, SslStream and Mbed TLS included. On OpenSSL the pin is a DANE record: SSL_dane_tlsa_add with 3 1 1; a DANE-EE match skips chain and validity, and DANE_FLAG_NO_DANE_EE_NAMECHECKS switches off the name check (to be confirmed in K7, chapter 11). The weakness is the callback itself: "ignore all policy errors" is one keystroke away from "accept everything".

C, raw public key. B without the certificate, negotiated (chapter 2).

D, OCPP over SSH. Implemented: ssh:// endpoints, the subsystem ocpp@open.charging.cloud, the station pins the host key (sshHostKey), the Local Controller knows every station's key. Mature key management, natively multiplexed channels, the same listener for shell, SFTP and OCPP. But it is not OCPP-J: a second protocol stack in the station, other keep-alive semantics (EVQI chapter 12), no HTTP bindings, and every OCPP tool needs SSH.

E, others, briefly.

Assessment. B and C share the trust model and differ only in the wire format. B works today everywhere; C is cleaner and leaner, but needs support on both sides. A remains for stations that cannot be changed. D is the right choice where SSH is the management plane anyway. Chapter 5 therefore builds on key pins and treats RFC 7250 as their preferred encoding.


5. Proposal: key pins

5.1 The key pin

Not a certificate pin. The Secure Name Resolution (section 2.3) and Secure Time Synchronization (section 3.2.4) papers pin the SHA-256 of the whole certificate, deliberately, and only to narrow a chain that is still checked. A key pin is a different thing:

Certificate pin (SecureDNS, SecureTimeSync) Key pin (this paper)
hash over the whole DER certificate the DER SubjectPublicKeyInfo
DANE equivalent 1 0 1 (PKIX-EE: the chain is still checked) 3 1 1 (DANE-EE: nothing else is checked)
role narrows a CA's trust replaces it
chain, name, validity still checked not checked
survives a renewal with the same key no yes
works with raw public keys no yes
variable names CertificatePins, RootPins ServerKeyPins

A certificate pin by key is still a certificate pin. Since WWCP_Node ef6cb82 the certificate pins and root pins of a CA-checked server may name a key instead of a certificate, for every service of a node alike: time servers, name servers, meters and the CSMS of a wss:// endpoint (ChargingStation bd07b18). The hash is the one of this paper, the SHA-256 over the SubjectPublicKeyInfo, written spki:<64 hexadecimal digits> or sha256//<base64>. Its role is the one of the left column:

Certificate pin by fingerprint Certificate pin by key (spki:) Key pin (this paper)
hash over the whole DER certificate the DER SubjectPublicKeyInfo the DER SubjectPublicKeyInfo
role narrows a CA's trust narrows a CA's trust replaces it
chain, name, validity still checked still checked not checked
survives a renewal with the same key no yes yes
works with raw public keys no no yes
on a root the one root certificate the root's key, also when the root is issued anew does not apply

A pin of this kind never makes a server believed that its chain would not. A CA of the operator's own comes in through the certificate store, or through a group of roots the endpoint names (rootGroup), and not through a pin. An endpoint that carries such pins is CA-checked in the sense of section 5.4 and carries no serverKeyPins.

Not an SSH fingerprint. OpenSSH's SHA256:… hashes the SSH wire format of a key, not its SPKI. The two never match, even for the same key, and the same key should not serve both anyway (section 5.10).

5.2 What a key pin replaces, and what not

A key-pinned endpoint skips path validation (A00.FR.308), the name check (A00.FR.309), the validity period and revocation. It keeps:

5.3 One key, three wrappers

The Local Controller has one TLS server key per listener (plus the next one, section 5.5). It presents it

The pin is the same in all three cases. A site can thus start with A or B0 and move its stations to key pins one by one, without a new key and without a flag day. A carrier certificate can be regenerated at any time; its pin stays. The exception is B0: stations that installed the certificate itself as their root need exactly that certificate, so it stays unchanged as long as such stations exist.

5.4 Strict separation

5.5 Pin sets and rollover

An endpoint holds up to four pins: the current key, the announced next key, and room for a transition. Rollover of a Local Controller key:

  1. The Local Controller generates the next key in advance and reports both pins (section 7.4).
  2. The CSMS adds the next pin to every station of the site.
  3. The CSMS sees, by GetVariables or a Delta monitor on ServerKeyPins, when every station has it, and tells the Local Controller to switch.
  4. After a grace period the CSMS removes the old pin.

The Local Controller reports the creation date of its key. A key policy (e.g. one year) is the CPO's; the CSMS warns about old keys.

After a compromise the new pin must reach the stations over a path the old key does not control: the CSMS's signature (EVQI chapter 7) through the Local Controller, which a compromised Local Controller can withhold but not forge, or a technician on site. While stations reach the CSMS only through the compromised Local Controller, it can delay the rollover. An internal PKI has the same limit: a revocation list it withholds does not arrive either.

5.6 Mismatches and trust on first use

5.7 Distribution

sequenceDiagram
    autonumber
    participant CS as Charging station
    participant LC as Local Controller
    participant CSMS as CSMS

    LC->>CSMS: own connection, its login marked as a Local Controller's
    CS->>LC: TLS, TrustOnFirstUse = Key: pin learned, state Learned (probation)
    CS->>LC: BootNotification
    LC->>CSMS: BootNotification (forwarded: the station's name, the Local Controller as last hop)
    CSMS->>CSMS: notes the station behind this Local Controller
    CS->>LC: SecurityEventNotification KeyPinLearned
    LC->>CSMS: forwarded
    CSMS->>LC: GetVariables EVQICtrlr[TLSServer]: KeyPins (current, next)
    LC-->>CSMS: the pins of its station port
    CSMS->>LC: SetVariables TLSClientController[connection].ServerKeyPins<br/>and ServerKeyPinsVersion, signed, for the station
    LC->>CS: forwarded unchanged, under a message id of its own
    CS->>CS: signed by one of its pin set signers? version higher?<br/>learned pin among the signed pins?
    CS->>CS: state Confirmed, probation ends
    CS-->>LC: SetVariablesResponse (Accepted)
    LC-->>CSMS: forwarded

The diagram shows what is built (section 10.8). It differs from the proposal below in three places, listed in section 10.10: the variables are on TLSClientController instead of a NetworkConfiguration slot (section 7.2), the signature is a JWS signature with a nonce in place of the message id instead of COSE, and the station asks for one of its own pin set signers instead of the role evqi:security-admin. Where the learned pin is not among the signed pins the station answers Accepted all the same, takes the signed pins, and then drops the connection.

The ways, in order of preference:

  1. By the CSMS, signed. The CSMS knows its Local Controllers: they connect to it with credentials of their own. It writes the pins into the stations' configuration with a message signed end to end (EVQI chapter 7). The Local Controller forwards it but cannot change it. An impostor between station and Local Controller is detected even if it forwards everything faithfully, since the signed pin names the real Local Controller's key, not the impostor's. This needs a CSMS signing anchor in the station, from manufacturing or commissioning.
  2. At commissioning. The Local Controller shows its pins on its web page, on its command line and as a QR code on its label. The installer enters or scans them on the station's web page, over the station's SSH commissioning listener or with a commissioning tool. In the other direction the station shows its own key pin for the Local Controller's list (section 5.8): pairing, as in SHIP.
  3. DANE, where the site has DNSSEC: the pins as TLSA 3 1 1 records under _443._tcp.<name>. Rare in private networks.
  4. Trust on first use (section 5.6), for laboratories, test benches and small sites, confirmed by way 1 wherever there is a CSMS.

Authority. Writing key pins changes the security configuration, an action of the role evqi:security-admin (EVQI 6.3). A Local Controller holds no privileged role (EVQI 6.6), and its connection to the station is an everyday one. EVQI 7.4 lets the connection's role bound what a message may do, so it would refuse every pin set sent through the Local Controller. Pin sets are therefore an exception: a write of the key pin variables of section 7.2 is executed over any channel if a signer with evqi:security-admin signed it. The authority lies in the signature alone, which the Local Controller can neither forge nor change. Unsigned writes follow PrivilegedActionsOnControlChannel (EVQI 6.5, rule 2).

Replay. Replaying an older signed pin set needs no forgery: a Local Controller, or whoever held an old key, could bring back pins that were removed. Every pin set therefore carries a version, ServerKeyPinsVersion, and the station accepts only a higher one than it holds. This needs no clock, unlike the timestamp window of EVQI 7.2, which a station without a synchronized clock cannot apply.

Who is behind whom. Way 1 rests on what the CSMS knows about a site: which station is behind which Local Controller. It learns that from frames the Local Controller forwards - the station's BootNotification, and the KeyPinLearned it answers with a pin set. A forwarded frame names its sender and its path itself, so the CSMS has to decide whose word it takes for them. Without a rule any node that connects to the CSMS, a charging station as well, could name itself the way to a station and be handed a pin set of its own pins for it, signed by the CSMS: the signature the station trusts would vouch for the impostor. Three rules:

  1. The last hop is the connection. A frame is taken only where the last hop of its path is the node the connection it came over signed in as. A node that forwards puts itself last.
  2. A connection speaks for itself. It speaks for other nodes only where the operator marked its login at the CSMS as a Local Controller's. Dialling in a mode that forwards is no proof of being one: any station can do that.
  3. The first Local Controller keeps a station. Another node that names itself the way to a station already seen behind a Local Controller moves nothing, and a KeyPinLearned that comes through it is answered with no pin set. A station that really moved is released by the operator.

A frame refused by rule 1 or 2 is dropped without an answer: an answer goes to the node the frame names, not to the connection that sent it.

The rules need a Local Controller that forwards with a path. Over a plain OCPP uplink the CSMS sees one node where there are several, cannot address the stations behind it, and way 1 is not available; ways 2 to 4 remain.

5.8 Stations by key

5.9 Roles and privileged channels

5.10 Key types and key separation


6. Wire profile

Rules for an endpoint with RawPublicKeys ≠ Off, numbered for reference:

  1. TLS 1.3 only. RFC 7250 also works with TLS 1.2, but there the Certificate messages travel in the clear, so a passive observer sees both keys. A client that offers RawPublicKey offers TLS 1.3 only.
  2. Offer. server_certificate_type = [RawPublicKey] for Require, [RawPublicKey, X509] for Prefer. client_certificate_type lists RawPublicKey first when the station has a client key and the endpoint allows it.
  3. Unsolicited types. A client that did not offer a type aborts when the server chooses it: unsupported_extension if the extension was not offered at all (RFC 9846 §4.2), illegal_parameter if the type was not on the list. The server, in turn, refuses a client Certificate of another type than the one it chose (bad_certificate).
  4. At most one entry. A server's RPK Certificate message has exactly one CertificateEntry, a client's one or, without a key, none. The entry's extensions are ignored; there is no OCSP stapling for raw keys.
  5. The SPKI is parsed strictly: known algorithm OID, curve parameters for EC keys, a point on the curve, no trailing data. Only then is it hashed and compared.
  6. CertificateVerify is verified against the presented key with a signature scheme the verifying side offered (signature_algorithms of the ClientHello for the server's, of the CertificateRequest for the client's), as always.
  7. The result ends the handshake. A mismatch aborts with bad_certificate (client) or access_denied (server) and is never only logged. Where a library reports the result separately, as OpenSSL does with SSL_get_verify_result(), the application checks it before it sends a byte (lesson of CVE-2024-12797).
  8. Server choice. The server chooses RawPublicKey when the client offers it and the server has a key for it; otherwise it presents its certificate (CA-issued or carrier, section 5.3).
  9. Resumption. A ticket remembers the key pin it was issued under. When the pin is no longer authorized, the server refuses the resumption and requires a full handshake. The client does the same for a server pin it has removed.
  10. ALPN, SNI, exporters as without RPK. h2 and h3 are unaffected.

7. Mapping to OCPP and to the configuration

7.1 The station's own configuration

An endpoint of the peer list of EVQI section 11.7.1 gets five fields, next to sshHostKey for ssh:// endpoints:

{
  "url":                   "wss://192.168.10.5/ocpp/CS001",
  "binding":               "http/1.1",
  "serverKeyPins":         [ "6A1F0C…9B2E", "C47D18…03A5" ],
  "serverKeyPinsVersion":  3,
  "rawPublicKeys":         "Prefer",
  "trustOnFirstUse":       "None",
  "clientKeyId":           "tls-p256-1"
}
Field Meaning
serverKeyPins up to four key pins; set, or trustOnFirstUse = Key, means key-pinned (section 5.4)
serverKeyPinsVersion the version of the last signed pin set (section 5.7)
rawPublicKeys Off (key pin over X.509 only), Prefer, Require
trustOnFirstUse None or Key (section 5.6)
clientKeyId the station's TLS key, presented raw or in its certificate; by reference, like certificateId

The endpoint also keeps the state of its pins: Configured, Learned or Confirmed.

A CA-checked wss:// endpoint carries none of these five. It may carry pins, the same object every CA-checked server of a node is configured with (time servers, name servers, meters):

{
  "url":   "wss://csms.example.org/ocpp/CS001",
  "pins":  {
    "certificateFingerprints":  [ "spki:6A1F0C…9B2E" ],
    "rootFingerprints":         [ "3C9D…71E0", "sha256//x4QzPSC810K5/cMjb05Qm4k3Bw5zBn4lTdO/nEW/Td4=" ],
    "rootGroup":                "backend",
    "onMismatch":               "Refuse"
  }
}
Field Meaning
certificateFingerprints the certificates the server may show, any of up to sixteen: a fingerprint of the whole certificate, or the pin of its key as spki:<64 hexadecimal digits> or sha256//<base64>
rootFingerprints the roots its chain may end at, written the same way
rootGroup the group of roots the chain has to end at: the roots of the certificate store marked ocppca-<group>; without one, the roots kept for ocpp
onMismatch Refuse (the default), Record (used, and written down as evidence) or Accept (used, and logged)
pinsVersion, beside pins the version of the last signed pin set its root pins came from

Chain, name and validity are checked whatever pins says (section 5.1). pins and serverKeyPins on one endpoint are refused when it is written down: section 5.4 has no third mode. Root pins can be replaced by a signed, versioned pin set as key pins can (section 5.7); the station's store takes one (TryTakeSignedServerCAKeyPins), and no device-model variable hands it over yet.

7.2 OCPP 2.x

OCPP 2.1 represents every network profile slot as an instance of the component NetworkConfiguration and lets the CSMS set its variables one by one with SetVariables (Part 2, B09). EVQI adds five variables there, per slot:

Variable Required Mutability Type Default Values Description
ServerKeyPins optional rw string "" comma separated, ≤ 4 key pins (64 hexadecimal digits, with or without colons) of the keys the server of this slot may present. Set: the slot is key-pinned, chain, name and validity are not checked. Written only signed and together with a higher ServerKeyPinsVersion (section 5.7).
ServerKeyPinsVersion optional rw integer 0 ≥ 0 the version of the pin set; only a higher one is accepted (section 5.7)
ServerKeyPinState optional r OptionList Configured Configured, Learned, Confirmed where the pins come from
RawPublicKeys optional rw OptionList Off Off, Prefer, Require section 6, rule 2. Only allowed with ServerKeyPins or TrustOnFirstUse = Key.
TrustOnFirstUse optional rw OptionList None None, Key section 5.6

7.3 OCPP 1.6

OCPP 1.6 has one connection and no slots. Configuration keys, as in the time sync paper: evqi.serverKeyPins (CSL), evqi.serverKeyPinsVersion, evqi.rawPublicKeys, evqi.trustOnFirstUse, read-only evqi.serverKeyPinState and evqi.clientKeyPin.

7.4 The Local Controller

7.5 Security events and logging

Event When
InvalidCsmsCertificate (existing, A00.FR.310) a key pin mismatch, techInfo "key pin mismatch: "; once per change of the verdict
KeyPinLearned (new) a pin was learned on first use
KeyPinConfirmed (new) the CSMS confirmed a learned pin
KeyPinRejected (new) the CSMS's signed pins do not contain the learned pin; they replace it
KeyPinProbationExpired (new) no signed pin set arrived during probation; the learned pin is discarded

The events of a station behind a Local Controller reach the CSMS through it, with the Local Controller as the last hop of their path. The CSMS acts on a KeyPinLearned only where it came through the Local Controller the station is noted behind (section 5.7).

On the Local Controller, refused station keys are logged per identity, as refusals of a credential (EVQI 12.7). All of it goes into the security log; the metrological log only where the CPO opts in, as for name servers.


8. Security considerations


9. Library support

As of November 2026. "Yes" means RFC 7250 in TLS 1.3, client and server, unless noted.

Library RFC 7250 Notes
OpenSSL ≥ 3.2 yes SSL_CTX_set1_server_cert_type, SSL_CTX_set1_client_cert_type, SSL_add_expected_rpk (a wrapper around DANE's SSL_dane_tlsa_add), SSL_get0_peer_rpk, SSL_get_negotiated_server_cert_type; s_client/s_server -enable_server_rpk, -enable_client_rpk. Use a release with the fix for CVE-2024-12797. 3.5 is the current LTS line; 3.0 LTS has no RPK.
GnuTLS yes since the 3.6 series (2019), certificate type GNUTLS_CRT_RAWPK
wolfSSL yes, build option HAVE_RPK / --enable-rpk, off by default; at least 5.9.2 (CVE-2026-55960)
rustls yes AlwaysResolvesServerRawPublicKeys, AlwaysResolvesClientRawPublicKeys
picotls server side only server_certificate_type, not client_certificate_type; TLS 1.3 only by design
BouncyCastle (Java bctls, C# BouncyCastle.Cryptography 2.x) yes, in the low-level TLS API C# 2.7.0, already a dependency of Hermod, contains BcTlsRawKeyCertificate, TlsExtensionsUtilities.AddServerCertificateTypeExtensionClient and the related methods. Not through JSSE.
Mbed TLS no not supported according to its maintainers
BoringSSL no Cloudflare's boring crate carries a patch
.NET SslStream, System.Net.Quic (msquic) no no API, on any platform
Java JSSE, Go crypto/tls, browsers no
Hermod's own TLS 1.3 (QUIC) not yet a small extension (section 10.4)
Wireshark dissects it

Stations. Most station firmwares run on embedded Linux with OpenSSL. With 3.5 LTS, RFC 7250 is there and has to be enabled by the OCPP stack, which has to pass the setting through its WebSocket library to the SSL_CTX. Option B needs only a verify callback and works on Mbed TLS as well. Open-source stacks such as EVerest, which build on OpenSSL, are the natural place to contribute it upstream.


10. Implementation in C#

This chapter is the plan for step 2. Sections 10.1 to 10.7 name Hermod's state as of 2113faad, before anything was built; sections 10.8 to 10.10 say what has been built since, what building it found, and where it differs from this paper.

10.1 Where Hermod stands

Part TLS Relevant for key pins
HTTP/1.1 client and server, WebSockets, HTTP/2 .NET SslStream X.509 only; validation by RemoteTLSServerCertificateValidationHandler<T> (client) and RemoteTLSClientCertificateValidationHandler<T> (server), certificate selection by LocalCertificateSelectionHandler, ClientCertificateRequired. No TLS exporter.
QUIC, HTTP/3 Hermod's own TLS 1.3 (Hermod/QUIC/TLS, about 5,200 lines) one DER certificate per Certificate message (CertificateMessage); CertificateVerify is already verified against the leaf's SPKI (PeerCertificateValidator); CertificateValidationOptions with chain, host name, custom roots and Insecure; no certificate type extensions yet; exporters available; ServerCertificate.SubjectPublicKeyInfoPin computes the base64 SPKI pin
BouncyCastle.Cryptography 2.7.0 dependency full TLS 1.3 client and server over a Stream, with RFC 7250, ALPN and ExportKeyingMaterial
DNS TLSA records (DNS/ResourceRecords/TLSA.cs), selector SubjectPublicKeyInfo
SSH host key policy with trust on first use, keys per station (OCPP over SSH)

10.2 Building blocks for every stage

/// <summary>
/// SHA-256 over the DER encoded SubjectPublicKeyInfo of a key (TLSA 3 1 1, RFC 7469 pin-sha256).
/// </summary>
public sealed class KeyPin : IEquatable<KeyPin>
{
    private readonly Byte[] hash;   // 32 bytes

    public static KeyPin FromSubjectPublicKeyInfo(ReadOnlySpan<Byte> SPKI)
        => new (SHA256.HashData(SPKI));

    public static KeyPin FromCertificate(X509Certificate2 Certificate)
        => FromSubjectPublicKeyInfo(Certificate.PublicKey.ExportSubjectPublicKeyInfo());

    public static Boolean TryParse(String Text, out KeyPin? Pin);   // 64 hex digits, colons allowed, or "sha256//<base64>"

    public String  ToHex()    => Convert.ToHexString(hash);
    public String  ToBase64() => Convert.ToBase64String(hash);       // curl, Chrome, RFC 7469
    public Boolean Equals(KeyPin? Other) => Other is not null && hash.AsSpan().SequenceEqual(Other.hash);
}

public enum RawPublicKeyMode { Off, Prefer, Require }

/// <summary>
/// The trust of one key-pinned endpoint: up to four pins, how they were obtained, and the mode.
/// </summary>
public sealed record KeyPinPolicy(IReadOnlyList<KeyPin>  Pins,
                                  KeyPinState            State,              // Configured, Learned, Confirmed
                                  RawPublicKeyMode       RawPublicKeys,
                                  Boolean                TrustOnFirstUse);

10.3 Stage 1: key pins over SslStream (option B)

Works with all three bindings now, with no new TLS code:

10.4 Stage 2: RFC 7250 in Hermod's own TLS 1.3 (QUIC, HTTP/3)

The smallest step to real raw public keys, since Hermod owns the code:

10.5 Stage 3: RFC 7250 over TCP (HTTP/1.1, HTTP/2)

SslStream cannot do it, so the TLS stack must be replaceable per endpoint. Two routes:

(a) BouncyCastle TLS (b) Hermod's TLS 1.3 + a record layer
What TlsClientProtocol/TlsServerProtocol over the NetworkStream; the raw key as a Certificate of type CertificateType.RawPublicKey with a BcTlsRawKeyCertificate; the allowed types via GetAllowedServerCertificateTypes/GetAllowedClientCertificateTypes; the pin check in the client's server certificate notification and the server's client certificate notification reuse the handshake of section 10.4 and add the TLS 1.3 record layer for TCP (RFC 9846 §5): framing, per-record AEAD with sequence numbers, alerts, KeyUpdate, NewSessionTicket after the handshake
Effort M M–L, plus an external review
Maturity widely used TLS stack Hermod's TLS is a reference implementation, not for production, by its own README
Async blocking Stream API; non-blocking mode (OfferInput/ReadOutput) for a clean async wrapper async by design
Speed managed crypto, sufficient for a Local Controller with hundreds of stations as fast as .NET's AES-GCM
Exporters yes: TLS-bound TOTP (EVQI 2.5) becomes possible over TCP too yes

Recommendation: (a) for the Local Controller and the station; (b) only if Hermod's TLS is to become a general TLS stack anyway. A native OpenSSL binding by P/Invoke was considered and rejected: a native dependency on Windows, a second OpenSSL next to the one SslStream loads on Linux, and more risk than (a).

The abstraction: a TLS factory per endpoint, chosen by RawPublicKeyMode and the binding, which turns a connected Stream into an authenticated one and returns what the layers above need: the peer's key pin, the negotiated certificate type, the ALPN result and, where available, an exporter. SslStream stays the default; BouncyCastle is used only where an endpoint offers raw public keys.

As built (K6): route (a). There is no factory interface. BouncyCastleTLS.AuthenticateAsClientAsync and AuthenticateAsServerAsync turn a connected stream into a TLSSession (the stream, the ALPN result, both certificate types, the peer's TLSPeerKey with its key pin, an exporter); which stack a connection gets is decided in ATLSClient by the endpoint's KeyPinPolicy.RawPublicKeys, and in TCPConnection by a look at the ClientHello: a client that offers no raw public keys stays on SslStream.

10.6 Above Hermod

Repository Work
WWCP_Core KeyPinPolicy in the endpoint configuration of WWCPWebSocketClient; AuthorizedKeys and the key pin as an identity source in the WebSocket server
WWCP_OCPP the variables of section 7.2 for NetworkConfiguration and EVQICtrlr, the 1.6 keys of 7.3, the security events of 7.5; signed pin sets with their version, and their exception to the role bound of EVQI 7.4 (section 5.7)
ChargingStation endpoint fields of 7.1, probation, the commissioning page with the pins, the same trust-on-first-use rule for sshHostKey
LocalController / WWCP_Node server key, next key and carrier certificate; pins on the web page, on the command line and as a QR code; AuthorizedKeys per station
CSMS the site's Local Controller pins; writing them, signed, to the stations; rollover
EVChargingTestEnvironment station → Local Controller → CSMS end to end, with RPK on the first hop

10.7 Tests

10.8 What is built

Stage 1, key pins over certificates, at both ends of the hop, and their signed distribution by the CSMS. Built and pushed on 2026-11-11 and 2026-11-12:

Package Repository Commit What
K1 Hermod 8ac43004 KeyPin (SHA-256 over the SPKI; 64 hex digits with or without colons, or sha256//<base64>), KeyPinPolicy (up to four pins, their state, RawPublicKeyMode, trust on first use), KeyPinValidator (accepted, learned or refused; handlers for Hermod's TLS clients and servers and for SslStream), SubjectPublicKeyInfoCheck (rule 5 of chapter 6); for HTTP/3 CertificateValidationOptions.KeyPins, ClientCertificateOptions.RequirePinned and ServerCertificate.KeyPin
K2 ChargingStation 29148bb per wss:// endpoint serverKeyPins, serverKeyPinsVersion, serverKeyPinState, rawPublicKeys, trustOnFirstUse, serverKeyPinProbationTime and the learned pin; dialling and the connection test check the key with KeyPinValidator; trust on first use on probation, behind the request gate of the SSH path; TryTakeSignedServerKeyPins for K4; the events of section 7.5; the fields on the Connections page
K3 WWCP_Core f8093085 WWCPWebSocketServer.AcceptedByKeyPin: a client certificate accepted by its key pin names no node, the URL path does
K3 LocalController 8991ac0 a server key in a self-signed carrier certificate (ocpp-server-keys), a next key and the switch; the pins in the log, the JSON, the pages and with serverKeys; key pins per station (stationPins, stations/{id}/keyPins), the method keypin of login groups, a station admitted by its pin on its own path only
K3 LocalControllerCLI f88bd50 the pins in the start banner, the libraries pinned
K2 ChargingStationCLI cb26ae0 ChargingStation pinned
K4 WWCP_Core 018bc064, cae5410f VerificationRule.WithoutTimeWindow: a rule that holds a signature to neither its signing time nor its expiry, for a pin set a station takes by its version; a standard connection carries nothing for the node behind it
K4 WWCP_OCPP deeb37f7 to 18d45f41 TLSClientController and EVQICtrlr[TLSServer] (sections 7.2, 7.4), a device model of the Local Controller's own; an answer that is forwarded goes to whoever asked; the sender gate of the incoming adapter, asked before anything is done with a request or a send message, JSON or binary
K4 ChargingStation 9344871 a signed pin set over OCPP 2.1: taken where a pin set signer of the station signed it and its version is higher; a learned pin confirmed, or its server refused - answered first, then the connection is dropped and comes back held to the signed pins
K4 LocalController b3bd90d the station port's key in its device model, switched by the CSMS; the uplink in the overlay network by default; what only the CSMS may ask is refused to a station
K4 CSMS bdab32e the signing key for pin sets; which station is behind which Local Controller, kept across restarts; a pin set on KeyPinLearned; keyPins rollover, confirm, forget; the mark of a Local Controller's login and the three rules of section 5.7
K4 EVChargingTestEnvironment 336c2a6 station, Local Controller and CSMS end to end: a learned pin confirmed, and the Local Controller's key rolled over without the station losing its connection

Tests: Hermod 66 (Windows and Linux), ChargingStation 25 new (935 in all, Linux too), LocalController 42 new (686), WWCP_Core 3 new (243). Every negative test is red on a deliberate mutation: 12 in Hermod, 41 in ChargingStation, 31 in LocalController and WWCP_Core.

With K4, on 2026-11-12: WWCP_Core 270, WWCP_OCPP 3228 (OCPP 2.1) and 699 (OCPP 1.6), ChargingStation 1004, LocalController 767, CSMS 772, EVChargingTestEnvironment 49, among them the two end-to-end tests of the work plan's "done when". The rules of section 5.7 are red on 16 deliberate mutations of the CSMS and the adapter. One test of the station is not stable with the Hermod pinned then: see section 10.9, the last entry.

The Local Controller's own line, on 2026-11-13. What a station does with the key of its Local Controller, the Local Controller does with the key of its CSMS, one level up:

Repository Commit What
WWCP_OCPP 7a743d31, 0509901a the key pin rules of the station taken out of it, into WWCP_OCPP_Node/KeyPins, for every node that dials: learning on first use, probation and its gate, the signed pin set, TLSClientController. A write that ends a probation holds the endpoint while it is made, so that no connection is, in between, neither on probation nor refused
ChargingStation 724bae19 the station on that core; the same order on its SSH path
LocalController d1931aeb the line to the CSMS key-pinned: TLSClientController[csms] with the variables of section 7.2, pin set signers of its own (csmsKeys, the page, the API), kept in csms-keypins.json. On probation it carries out nothing the CSMS asks but a signed pin set and GetVariables/GetReport of TLSClientController, and sends nothing on to a station. Its events are those of section 7.5, in its own name, with the endpoint csms
CSMS 8d26be6 a KeyPinLearned of a login marked as a Local Controller's, over its own line: where the pin is the pin of the key this CSMS presents itself, a signed pin set at once; where it is not - TLS ends at a proxy before the CSMS, or somebody answered in its place - or where the CSMS presents no key itself, nothing is sent, the pin is shown beside the CSMS's own, and the operator names the pins (keyPins uplink <controller> <pin>[,<pin>...], or the API)
LocalControllerCLI 4a48ca4 LocalController d1931aeb and WWCP_OCPP 0509901a pinned; with these pins LocalControllerTests 785, WWCP_Node_Tests 1452 and the tests of OCPP 2.1 3279, all green
WWCP_OCPP d6bdac48 the sender gate of section 5.7 in the adapter of OCPP 1.6 as well

Tests: CSMS 792, among them 8 new, red on three deliberate mutations; OCPP 1.6 896, the two of the sender gate red with the check switched off. Two end-to-end tests - a real Local Controller that learns the pin of a real CSMS and is confirmed at once, and one that is handed pins without the one it learned and refuses its server - are green against these commits; they are not in EVChargingTestEnvironment yet, whose suite is not green with every library at its master.

Raw public keys, on 2026-11-13: RFC 7250 itself, in Hermod.

Package Repository Commit What
K5 Hermod 4f58520a a QUIC client believes only a server that authenticated itself (section 10.9)
K5 Hermod 5e8f64e8 RFC 7250 in Hermod's TLS 1.3 under QUIC and HTTP/3, as client and as server: the two extensions, a Certificate message with a bare SubjectPublicKeyInfo, the key pin checked without a certificate, a ticket bound to its key pin; raw keys on P-256, P-384, Ed25519 and ML-DSA-65
K6 Hermod d4c1eac8 raw public keys over TCP - HTTP/1.1, HTTP/2 and WebSockets - with BouncyCastle 2.7.0 as a second TLS stack beside SslStream, chosen per connection (section 10.5); TLS 1.3 alone; the node's own raw key on P-256 or P-384
K7 Hermod, WWCP_OCPP, LocalController 30dd670c, dd939b01, 8e16c36 an endpoint with RawPublicKeys = Require is dialled, and Require is taken by a signed SetVariables; a Local Controller that learns the key of its CSMS raw, over a WebSocket and BouncyCastle at both ends, and is confirmed by a signed pin set
K8 Whitepapers this version the specification

Tests, as the session that built them reports: K5 38 handshake tests, red on 20 deliberate mutations, and 3 against openssl s_client -quic (OpenSSL 3.5.9); K6 12 and 20 tests, 7 against openssl s_server and s_client, red on 20 mutations; Hermod's suite 6080; on Linux (WSL, OpenSSL 3.5.7) the 148 tests of key pins and raw public keys. Where what is built differs from chapter 6, Annex A of the specification says so.

10.9 What building it found

10.10 What is not built, or differs from this paper

Today This paper
Raw public keys in Hermod over HTTP/3 and over TCP (section 10.8). Above it: a node that dials offers them as its endpoint says; the Local Controller's station port and the CSMS present no raw key yet and take no raw station keys; no raw client key at a WebSocket server over HTTP/3; no resumption over TCP chapter 6
Signed pin sets over OCPP OCPP 2.1 only, on TLSClientController[<connection>] instead of NetworkConfiguration; the OCPP 1.6 keys are let through the probation gate, but nothing hands them over sections 5.7, 7.2, 7.3
The signature of a pin set a JWS signature of the signed-messages paper, with a nonce in place of the message id, by a pin set signer the station was given at commissioning; no COSE, and no role evqi:security-admin is asked of the signer section 5.7, Authority
The Local Controller's own uplink key-pinned as a station's connection is, and confirmed by the CSMS where the pin learned is the CSMS's own (section 10.8); behind a TLS proxy the operator names the pins by hand; no rollover of the CSMS's key is driven for it section 1.5 (a non-goal)
A Local Controller unmarked at the CSMS what it forwards is dropped, and only the log says so section 7.4
A station that moved forgotten by hand (keyPins forget); not detected section 5.7, rule 3
OCPP 1.6 at the CSMS the adapter of OCPP 1.6 has the sender gate, and nobody sets it: the CSMS builds no OCPP 1.6 node of its own, and a central system built from WWCP_OCPP has to bring the rules of section 5.7 itself section 5.7
Probation the gate refuses every request but a pin set; BootNotification, queued security events and the offline queue are sent, as on the SSH path only BootNotification (section 5.6)
clientKeyId the endpoint's existing certificateId names the station's TLS client key section 7.1
Events at the Local Controller refusals are logged; no security events section 7.5
Which station came with which pin and type; a QR code of the pins not shown section 7.4
Station keys from the CSMS kept locally only (page, command line, API) open question 5
Basic and TOTP for a station with key pins still decided by its group open question 6
Key age the creation date is kept and shown; no warning section 5.5, open question 9
An existing CA key as the server key not taken over; a server key is always generated section 5.3
End to end station, Local Controller and CSMS over key pins in certificates. With raw public keys: a Local Controller against a server of the tests (K7); no station, no CSMS of its own, not in EVChargingTestEnvironment section 10.7, K7

11. Work plan

# Package Size Done when
K1 Hermod: KeyPin, KeyPinPolicy, KeyPinValidator; stage 1 for the HTTP/1.1 and HTTP/2 clients and servers, and for HTTP/3 S a WebSocket client connects to a server with a self-signed certificate by pin only, and refuses the same server with another key
K2 ChargingStation: endpoint fields, trust on first use, probation, events; the same rule for sshHostKey S–M a station pins its Local Controller at commissioning and survives a restart without a synchronized clock
K3 LocalController / WWCP_Node: server key, next key, carrier certificate, AuthorizedKeys, web page and command line S–M the Local Controller shows its pins and admits a station by its key pin
K4 WWCP_OCPP and CSMS: the variables of 7.2 to 7.4, signed pin distribution, rollover M a CSMS confirms a learned pin and rolls a Local Controller key over without a station losing its connection
K5 Hermod: RFC 7250 in its own TLS 1.3 (section 10.4) S–M HTTP/3 between Hermod client and server with raw public keys in both directions
K6 Hermod: TLS factory per endpoint and the BouncyCastle stack (section 10.5) M a WebSocket over HTTP/1.1 and over HTTP/2 with raw public keys, interoperable with OpenSSL 3.5
K7 Tests of section 10.7, interop and end to end M every negative test is red on its mutation and green on the code
K8 Specification: wire profile, variables, events; proposal to the OCA S a text that a second implementation can follow

Order: K1 → K2/K3 (parallel) → K4; K5 → K6; K7 along the way; K8 at the end. K1 to K3 already give a usable result with option B; K5 and K6 add RFC 7250 without changing what K1 to K4 provision.

Status, 2026-11-12: K1 to K4 are built (section 10.8), with the negative tests of 10.7 that stage 1 can have, each red on its mutation. K4 is built for OCPP 2.1; what it leaves out is in section 10.10. K5 to K8 are open.

Status, 2026-11-13: the Local Controller's own line to the CSMS is key-pinned as well, and the adapter of OCPP 1.6 has the sender gate (section 10.8). K5 and K6 are built and published in Hermod; K7 is built and published as well (Hermod 30dd670c, WWCP_OCPP dd939b01, LocalController 8e16c36); K8 is the specification, version 0.1. What remains before a Local Controller in the field speaks raw public keys: the nodes pin the libraries of K7, the Local Controller's station port and the CSMS get the switch to present their key raw, and stations by raw key are admitted (section 10.10).


12. Open questions

  1. Probation: what may a station do over a learned, not yet confirmed connection, and for how long? Proposed: BootNotification and the signed confirmation, 10 minutes. Built for both paths: the station executes nothing but a signed pin set, for 10 minutes by default; what it sends of its own accord is not held back yet (section 10.10).
  2. Implicit trust on first use: off by default for TLS (proposed here). Does the same apply to sshHostKey, i.e. does an empty host key stop meaning "learn"? Decided on 2026-11-10: yes. Trust on first use of a host key only where configured, and on probation until a signed pin set confirms it (OCPP over SSH, decision 4, section 10.4). Built: for SSH since then, for TLS with K2 (section 5.6).
  3. Notation: hexadecimal, as in the other white papers (proposed), or base64, as in RFC 7469 and curl? Both are accepted on input.
  4. Downgrade: is the change of a slot from CA-checked to key-pinned a security downgrade in the sense of NoSecurityDowngrade? Proposed: no, but it needs the security role.
  5. Station keys at the Local Controller: a new message from the CSMS, the device model of the Local Controller, or only local maintenance?
  6. Basic authentication on a hop with client keys: dropped, or kept as a second factor?
  7. TCP stack: BouncyCastle (proposed) or Hermod's own record layer?
  8. Standardization: an OCPP extension per endpoint (proposed), or a security profile of its own in a future OCPP version?
  9. Key policy: a default key lifetime for Local Controllers, or only reporting the age?
  10. The exception of section 5.7 to the role bound of EVQI 7.4: limited to pin sets, as proposed? And is it written into EVQI 7.4 itself?
  11. Who is a Local Controller: a mark the operator sets at the CSMS (built), a role in the credential the Local Controller signs in with, or a statement the CSMS signs for the station? And what tells the CSMS that a station moved to another Local Controller, other than an operator?

13. References

OCPP (Open Charge Alliance):

IETF:

Libraries and vulnerabilities:

Further:

Related documents:


License

This document is licensed under CC-BY-SA 4.0.