Introduction
Overview
The oscms-codecs-bridge library is the low-level cryptographic and protocol core of
OpenSCMS. It is implemented in C and provides all security-critical functionality, including
cryptographic operations (encryption and decryption) and IEEE 1609.2.1 ASN.1 SPDUs encoding and
decoding.
This library is designed as a standalone component, independent of the Rust backend and OpenSCMS
service logic. Integration with the Rust-based services is performed transparently through Rust
bindings generated using bindgen. From the perspective of a Rust developer, the
library appears as a native Rust module, while all cryptographic and protocol complexity remains
encapsulated in C.
The architecture of oscms-codecs-bridge is layered to clearly separate
codec-specific logic from protocol processing and cryptographic operations.
At a high level, the library consists of:
- Protocol and Cryptography Bridge Layer
- Codec Abstraction Layer
- Codec Implementation Layer
See Library Layers for more details.
This separation allows the library to remain codec-agnostic at higher layers, making it possible to support alternative ASN.1 transpilers in the future without modifying protocol or cryptographic logic.
Development Overview
The oscms-codecs-bridge library follows a clean and consistent development style
adapted from the Google C++ Style Guide. The C codebase is formatted with
clang-format and structured to be readable, maintainable, and portable.