Project Description: libcimbar
What is the project about?
libcimbar
is an experimental high-density 2D barcode format (Color Icon Matrix Barcodes) designed for air-gapped data transfer. It allows transferring data between devices (like a computer and a smartphone) without any network connection (internet, Bluetooth, NFC, etc.). The data is encoded into an animated sequence of colored tiles, displayed on a screen, and captured by a camera.
What problem does it solve?
It solves the problem of transferring data between devices in situations where network connections are unavailable, unreliable, or undesirable (e.g., for security reasons). This is often referred to as "air-gapped" data transfer. It provides a relatively high-speed solution compared to other visual data transfer methods.
What are the features of the project?
- High-Density Encoding: Stores data in a grid of colored tiles, encoding bits based on tile and color selection.
- Animated Barcodes: The encoder generates an animated barcode for display.
- Error Correction: Uses Reed-Solomon error correction to handle the lossy nature of video-to-digital decoding, ensuring data integrity.
- File Encoding Protocol: Includes a protocol built on fountain codes (
wirehair
) and zstd compression for encoding files. - Out-of-Order Decoding: The decoder can reconstruct the original file even if image frames are received out of order or some are missing.
- Cross-Platform: Developed and tested on amd64+linux, arm64+android (decoder), and emscripten+WASM (encoder).
- Web-Based Encoder: The encoder can be compiled to WebAssembly (WASM) and run in a web browser (cimbar.org), including offline use as a Progressive Web App.
- Command-line tools: Provides command-line utilities for encoding and decoding.
What are the technologies used in the project?
- C++: The core language of the library.
- OpenCV: Used for image processing.
- GLFW: Used for window and OpenGL context management.
- OpenGL ES: Used for graphics rendering.
- WebAssembly (WASM): Used for the web-based encoder.
- Reed-Solomon Error Correction: (via
libcorrect
) - Fountain Codes: (specifically
wirehair
) - zstd Compression: (via
zstd
) - Other libraries: base, catch2, concurrentqueue, cxxopts, fmt, intx, libpopcnt, PicoSHA2, stb_image.
What are the benefits of the project?
- Air-Gapped Data Transfer: Enables data transfer without network connections.
- High Speed: Achieves relatively high data transfer rates (up to ~106 KB/s) for a visual method.
- Robustness: Error correction and out-of-order decoding ensure reliable data transfer.
- Cross-Platform Compatibility: Works on various platforms, including web browsers.
- Offline Availability: The web encoder can be used offline.
What are the use cases of the project?
- Transferring files between air-gapped computers (e.g., in high-security environments).
- Sharing data between devices when network connections are unavailable (e.g., in remote areas).
- Securely transferring sensitive data without relying on potentially vulnerable network protocols.
- Emergency data transfer when traditional communication methods are down.
- Educational tool for demonstrating data encoding and error correction.
