StreamCryptor (nuget): You can use StreamCryptor to encrypt and decrypt files without size limit and the need to load every file completely into memory.  StreamCryptor uses FileStream to read and write files in chunks, there is also an asynchronous implementations for progress reporting available.   Files are encrypted into SCCEF (StreamCryptor Chunked Encrypted File) format.  Every file contains an EncryptedFileHeader some EncryptedFileChunks and an EncryptedFileFooter to prevent file manipulation.  The file serialization is realised with Google`s protobuf, it has a small overhead and offers an automatic length prefix for all file parts.  All cryptographic operations are performed via libsodium-net (and thus libsodium).  For more details and examples visit the github project site.
Keywords: stream|encryption|protobuf|libsodium|XSalsa20|Curve25519|Poly1305|c-sharp|crypto|cryptography