Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
IEC 62055-21 defines the overarching framework for the Standard Transfer Specification (STS), the globally dominant open standard for prepayment (payment) metering systems. This standard establishes the architectural model, functional components, and security mechanisms that enable any STS-compliant vending system to generate tokens accepted by any STS-compliant meter. With over 50 million STS meters deployed across 100+ countries, IEC 62055-21 is one of the most impactful metering standards in the developing world.
IEC 62055-21 defines a modular architecture with clearly separated functional components. This separation enables an open market where components from different manufacturers can interoperate seamlessly:
| Component | Abbreviation | Function | Example |
|---|---|---|---|
| Payment Meter | PM | Manages credit transfer, consumption measurement, and disconnection/reconnection | STS-compliant electricity meter with keypad |
| Vending System | VS | Generates encrypted tokens upon payment; manages tariffs and customer accounts | Point-of-sale terminal, mobile app, web portal |
| Token Carrier | TC | Physical or electronic medium for transferring the token from VS to PM | Printed receipt, SMS, smart card, NFC |
| Customer Interface Device | CID | Transfers the token from the carrier to the meter | Meter keypad, card reader, smartphone app |
| Key Management Centre | KMC | Generates and manages cryptographic keys; operated by the STS Association | Centralized secure facility |
The security of the STS system is built on three cryptographic layers, each defined in IEC 62055-21:
STS tokens are decimal numbers that customers enter into their meter keypad. Edition 1 tokens are 20 digits; Edition 2 tokens are 22 digits (the extra digits accommodate the enhanced AES-128 security). The token encodes the amount of credit, the meter identifier, a timestamp (Token Identifier), and a cryptographic message authentication code (MAC).
| Token Field | Edition 1 (20-digit) | Edition 2 (22-digit) |
|---|---|---|
| Amount/Data field | 6 digits | 6 digits |
| Meter identifier (KRN) | 4 digits | 4 digits |
| Token Identifier (TID) | 4 digits (12 bits) | 5 digits (16 bits) |
| Message Authentication Code | 6 digits | 7 digits |
| Total | 20 digits | 22 digits |
Edition 1 uses DES/3DES encryption with a 112-bit effective key length. Edition 2 (defined in IEC 62055-21:2018) migrates to AES-128 with a 128-bit key. The cryptographic MAC is computed over the concatenated token data fields using the selected algorithm.
The STS Association operates a centralized Key Management Centre (KMC) that generates and distributes cryptographic keys to authorized utilities and meter manufacturers. Each meter is loaded with a unique decryption key at the point of manufacture. The key hierarchy includes:
Implementing IEC 62055-21 in a payment meter or vending system presents several engineering challenges:
The STS protocol stack occupies roughly 8-12 KB of flash on a typical meter microcontroller. The critical components include the token decoder (verifying the MAC), the TID replay protection mechanism (storing the last 2-10 TIDs in EEPROM to prevent token reuse), and the credit management logic (deducting consumed energy).
A vending system must implement the STS encryption algorithm in a secure environment — typically a Hardware Security Module (HSM) or a software equivalent that has been certified by the STS Association. The vending system must also manage the TID counter (which increments with each token) and handle the KMC synchronization protocol.
Modern STS deployments support multiple token carriers simultaneously:
A: Originally developed for electricity, STS has been extended to water and gas metering through the IEC 62055 series. The same token structure and security framework apply, but the OBIS codes and measurement units differ. Water STS meters typically measure in liters or cubic meters with different credit decay rates.
A: STS provides four layers of security: (1) cryptographic MAC prevents token forgery, (2) TID replay protection prevents using the same token twice, (3) meter tamper detection (magnetic, cover-open, terminal cover) is part of the meter hardware spec, and (4) the KMC key management ensures that even the utility cannot extract the meter’s private key after deployment.
A: Yes, and this is the fastest-growing deployment model. The vending system is integrated with mobile money platforms (M-Pesa, Airtel Money, etc.). When a customer makes a payment via mobile money, the VS generates an STS token and sends it to the customer’s phone via SMS. The customer enters the token into the meter keypad.
A: The vending system maintains a transaction log and can reprint/re-send the token. However, if the token has already been entered into the meter (consumed), the TID replay protection will reject a second attempt. The vending system can check the token status against the TID database to verify if it has been used.