BECKN CONCEPT · UPDATED 11 AUG 2026

Signing and the registry: trust on an open network

On a closed integration you know who you are talking to because you exchanged credentials with them. On an open network you have never met most of the participants — and you still have to decide, per message, whether to act on it.

PART OF THE BECKN FOR EV CHARGING GUIDE · 10 ACTION & CONCEPT GUIDES

IN ONE PARAGRAPH

Beckn solves trust with cryptographic signatures plus a network registry. Every message carries a signature made with the sender's private key; the registry maps a subscriber ID to its public key. Verifying is what separates a real participant from anyone who found your callback URL, and skipping it leaves a wide-open endpoint.

The trust problem

A BAP publishes bap_uri in every context object. That address receives callbacks from providers it has never contracted with — that openness is the point of the network.

It also means the endpoint is reachable by anyone who knows the URL. Without verification, an attacker could POST a fabricated on_search advertising cheap charging that does not exist, or a fake on_confirm carrying an authorization token for a charger they do not operate.

Two mechanisms answer this. The registry establishes who is a legitimate participant. Signatures prove a given message actually came from one of them.

The registry

A network-level directory maintained by the Network Operator. Every participant is a subscriber with a record:

FieldMeaning
subscriber_idUsually the domain, e.g. cpo.electreefi.in
subscriber_urlWhere this participant receives messages
typeBAP, BPP, BG or BPP-side variants
domainWhich network, e.g. ev-charging:uei
signing_public_keyThe Ed25519 public key used to verify signatures
encr_public_keyPublic key for encryption where used
valid_from / valid_untilKey validity window — what makes rotation possible
statusSUBSCRIBED, INITIATED, UNSUBSCRIBED

The registry is the network's root of trust. A participant not in it, or not SUBSCRIBED, is not part of the network no matter what its messages claim.

Cache registry lookups, but bound the cache. Hitting the registry on every inbound message makes it a hard dependency on your request path and a single point of failure for the whole network. Cache keys for minutes, not hours — long enough to absorb traffic, short enough that a revoked participant stops being trusted quickly.

How signing works

The sender signs a digest of the request body with its Ed25519 private key and puts the result in an Authorization header:

Authorization: Signature keyId="cpo.electreefi.in|key-1|ed25519",
  algorithm="ed25519",
  created="1786518000",
  expires="1786518030",
  headers="(created) (expires) digest",
  signature="Base64EncodedSignatureValue=="

Verification is mechanical:

  1. Parse keyId to get the subscriber ID and key identifier.
  2. Look that subscriber up in the registry and fetch signing_public_key.
  3. Confirm the subscriber is SUBSCRIBED and the key is within its validity window.
  4. Recompute the digest of the received body.
  5. Verify the signature over the signing string.
  6. Check created and expires to reject replays.

A gateway that forwards a message adds its own X-Gateway-Authorization alongside the original. Both are meaningful: one proves the originator, the other proves the forwarder. Verify both when you are downstream of a gateway.

What signature verification actually buys

CheckPrevents
Signature validForged messages from non-participants
Subscriber is SUBSCRIBEDMessages from removed or suspended participants
Key within validity windowUse of rotated or revoked keys
created/expires windowReplay of a previously valid message
bpp_id matches keyIdA real participant impersonating another

The last row is easy to miss. A valid signature proves the message came from someone on the network, not that it came from the party it claims to be. If context.bpp_id says cpo.electreefi.in but the signature belongs to a different subscriber, that is impersonation by a legitimate participant — and only a cross-check catches it.

Key management

  • Rotate on a schedule. The valid_from and valid_until fields exist so a new key can be published and become active without an outage. Overlap the windows.
  • Never put private keys in application config. They belong in a key vault or HSM, with the signing operation behind an interface.
  • Support multiple active keys. During rotation, inbound messages may be signed with either the old or the new key, so verification must accept both while the windows overlap.
  • Have a revocation runbook. Compromise means updating the registry immediately and rotating — know who can do that and how long it takes before you need it.

Production lessons

  • Verify every inbound message. No exceptions, no bypass flag for staging. Unverified endpoints do not stay internal.
  • Cross-check keyId against the claimed bap_id or bpp_id.
  • Cache registry lookups for minutes. Never make the registry a synchronous dependency on every request.
  • Fail closed. If the registry is unreachable and the key is not cached, reject — do not accept unverified traffic to stay available.
  • Log verification failures with the subscriber ID and reason. A spike is either an attack or a partner who just rotated keys badly, and you need to tell them apart quickly.
  • Reject stale signatures. An unbounded expires window makes replay protection meaningless.

Frequently asked questions

How does Beckn establish trust between participants?

Through a network registry and cryptographic signatures. The registry, maintained by the Network Operator, maps each subscriber ID to its Ed25519 public key and subscription status. Every message carries a signature in the Authorization header that the receiver verifies against that key.

What is the Beckn registry?

A network-level directory of every participant, holding subscriber_id, subscriber_url, type, domain, signing and encryption public keys, key validity windows and subscription status. It is the network's root of trust — a participant not listed as SUBSCRIBED is not part of the network.

Is a valid Beckn signature enough to trust a message?

No. A valid signature proves the message came from someone on the network, not from the party it claims to be. You must also cross-check that the keyId matches the bap_id or bpp_id in the context, otherwise a legitimate participant can impersonate another.

Should you cache Beckn registry lookups?

Yes, but for minutes rather than hours. Querying the registry on every inbound message makes it a synchronous dependency and a single point of failure, while caching too long means a revoked participant stays trusted. Fail closed if the registry is unreachable and the key is not cached.