Library Layers
Protocol and Cryptography Bridge Layer
The protocol bridge layer implements the cryptographic and protocol operations defined by IEEE 1609.2.1. It sits above the codec abstraction layer and below the Rust-based SCMS service layer.
This layer is responsible for:
- SPDU construction and verification: Building and validating IEEE 1609.2.1 Secured Protocol Data Units (SPDUs), including enrollment requests, certificate responses, and misbehavior reports.
- Cryptographic operations: Performing signing, verification, encryption, and decryption using NIST P-256 and Brainpool curves.
- Certificate and key management: Handling certificate chains, trust anchors, and cryptographic key material.
- Protocol-level semantics: Enforcing the rules and constraints defined in the IEEE 1609.2.1 specification.
By implementing these operations in C, the protocol bridge layer ensures high performance and security for cryptographic operations while remaining independent of the Rust-based application logic.
Codec Abstraction Layer (API)
The codec abstraction layer defines a common API for encoding and decoding IEEE 1609.2.1 data structures, independent of the underlying ASN.1 transpiler or code generator used.
This abstraction ensures that protocol logic, cryptographic operations, and SPDU construction
remain fully decoupled from the specific codec implementation. In the current version, the
concrete implementation relies on asn1c, but this design allows alternative
transpilers to be integrated in the future without requiring changes to higher-level layers.
Key Design Principles
- Codec-agnostic API: Protocol logic interacts only with abstract types and functions defined in the codec API layer.
- Encapsulation of complexity: ASN.1-specific details (e.g., memory management, type conversions) are hidden behind a well-defined interface.
- Future extensibility: Support for other transpilers can be added by implementing the same abstract API.
Concrete Codec Implementation Layer
The concrete low-level implementations of the ASN.1 codecs used by the system, focused on efficient parsing, serialization, and performance-critical operations.