Crates.io | quantum-worm |
lib.rs | quantum-worm |
version | 0.1.0 |
source | src |
created_at | 2024-08-30 14:21:13.328784 |
updated_at | 2024-08-30 14:21:13.328784 |
description | A quantum-resistant secure file transfer system. |
homepage | |
repository | https://github.com/goldenhippo58/quantum-worm |
max_upload_size | |
id | 1357742 |
size | 30,775 |
Quantum-Worm is a Rust crate that implements a secure, quantum-resistant file transfer system. By leveraging post-quantum cryptographic algorithms, it ensures robust security for file transfers, protecting against potential future threats from quantum computing.
serde
and bincode
for fast and compact serialization of file metadata.tokio
runtime.Add Quantum-Worm to your Cargo.toml
:
[dependencies]
quantum-worm = "0.1.0"
Here's a basic example demonstrating how to use the Quantum-Worm crate for file transfer:
use quantum_worm::{send_file, receive_file};
use tokio;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Example file paths
let source_file = "path/to/source/file.txt";
let destination_file = "path/to/destination/file.txt";
// Send file
let file_data = tokio::fs::read(source_file).await?;
send_file(destination_file, &file_data).await?;
// Receive file
let received_data = receive_file(destination_file).await?;
tokio::fs::write(source_file, received_data).await?;
Ok(())
}
send_file
pub async fn send_file(destination: &str, data: &[u8]) -> Result<(), Error>
Encrypts and sends a file to the specified destination.
destination
: The path where the encrypted file will be saved.data
: The file contents to be sent.receive_file
pub async fn receive_file(source: &str) -> Result<Vec<u8>, Error>
Receives and decrypts a file from the specified source.
source
: The path of the encrypted file to be received.Quantum-Worm uses the following cryptographic primitives:
rand
crate.While these algorithms are considered secure against known quantum attacks, it's important to keep the crate updated and follow best practices for key management and secure coding.
The crate uses a custom Error
type that encompasses various error conditions:
Always handle potential errors when using the crate's functions.
bincode
for serialization provides a good balance between speed and compact representation.Contributions to Quantum-Worm are welcome! Please feel free to submit pull requests or create issues for bugs and feature requests.
This project is licensed under the MIT License - see the LICENSE file for details.
While Quantum-Worm uses post-quantum cryptographic algorithms, the security landscape is constantly evolving. Always stay informed about the latest developments in cryptography and update your security practices accordingly.