A .NET library for encrypting and decrypting files of any size using libsodium and protobuf with a chunked streaming approach.
StreamCryptor is a .NET library designed for encrypting and decrypting files using a streaming approach that processes data in chunks. It solves the problem of handling large files without loading them entirely into memory, ensuring efficient and secure file operations. The library uses libsodium for cryptography and protobuf for serialization, outputting files in a custom SCCEF format.
.NET developers who need to implement secure file encryption and decryption in applications, particularly those dealing with large files or requiring low memory usage.
Developers choose StreamCryptor for its ability to handle files of any size through chunked streaming, its robust security via libsodium, and its practical features like async progress reporting and file integrity checks.
Stream encryption & decryption with libsodium and protobuf
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Processes files in configurable chunks (default ~1MB) using FileStream, allowing encryption of unlimited-sized files with minimal memory usage, as demonstrated in performance tests with 1GB files.
Leverages libsodium for proven algorithms like XSalsa20/Poly1305 and Curve25519, ensuring strong security based on audited libraries, with a source code audit by Cure53.
Includes checksums in headers, chunks, and footers of the SCCEF format to detect and prevent file manipulation, enhancing data reliability across the entire file structure.
Provides asynchronous methods that support progress reporting via IProgress<T>, making it easy to integrate with responsive UIs, as shown in the async demo examples.
Outputs files in the custom SCCEF format, which is not widely supported, limiting interoperability with other encryption tools and requiring decryption with StreamCryptor itself.
Targets .NET Framework 4.5, an older version that may not be compatible with modern .NET Core or .NET 5+ projects without additional work or updates to dependencies.
While ephemeral keys enhance sender privacy, the README explicitly states that this makes it impossible to authenticate who encrypted the file, which could be a drawback for audit trails or accountability.