Qualitative Frame Entanglement (QFE)
This repository contains a Rust implementation simulating an experimental protocol for secure communication, referred to here as 'QFE'. The protocol relies on establishing a unique shared state (SQS) between two parties (represented as Frames) and uses stateful, modulated encoding with built-in integrity checks designed to detect tampering.
Disclaimer: This library is an experimental simulation based on conceptual principles. It has not undergone formal security analysis or peer review and should not be considered cryptographically secure or suitable for production use cases involving sensitive data.
Core Concepts
- Frames: Represent communication participants (
Framestruct). - Shared Qualitative Structure (SQS): A shared secret context (
SQSstruct) established between two Frames via an interactive process (establish_sqsorsetup_qfe_pair). Contains secret components and synchronization parameters (likeshared_phase_lock). - Stateful Encoding/Decoding: Messages are encoded sequentially (
encode/encode_str), where each output unit (EncodedUnit) depends on the previous state (phase) and the SQS. Decoding (decode/decode_to_str) reverses this process. - Integrity Verification: Each
EncodedUnitcontains an integrity hash calculated using the original data and theSQScomponents. The decoding process verifies this hash, causing decoding to fail if tampering or context mismatch (wrong SQS) is detected.
Features
- Initialization of participant
Frames. - Establishment of a shared secret state (
SQS) between twoFrames. - Encoding of byte arrays (
&[u8]) and string slices (&str). - Decoding of encoded signals back into byte arrays or
Strings. - Built-in detection of tampering via integrity checks during decoding.
- Structured error handling using the
QfeErrorenum. - Basic API for simplified setup (
setup_qfe_pair).
Tests
Usage Example
This example demonstrates setting up two frames, establishing the shared state (SQS), encoding a message, decoding it, and verifying tamper detection.
// qfe/examples/hello.rs
// Import necessary items from the qfe library crate
use ; // Use setup_qfe_pair and the error type
use Error;
Status
This library is experimental and intended as a simulation and exploration of the underlying concepts. It lacks formal proofs, security audits, and is likely unsuitable for any real-world cryptographic applications. Use for educational or research purposes only.
License
Licensed under
MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.