Skip to content
This repository

Compare: Frequently Asked Questions

Frequently-Asked-Questions.md
... ... @@ -14,4 +14,4 @@ RbNaCl is a complete NaCl binding designed to work everywhere via Ruby FFI. RbNa
14 14
15 15 ## Q: Is there any kind of streaming API for Crypto::Box/Crypto::SecretBox?
16 16
17   -**A:** No. This would involve presenting you with decrypted ciphertext which has not been authenticated. If you need to encrypt a plaintext so large it can't reasonably fit in RAM, consider breaking it into chunks which you encrypt with separate keys and/or nonces. Each block of plaintext you encrypt will have its own MAC to authenticate it and can be safely decrypted in isolation, unlike trying to decrypt only a portion of data inside of a Crypto::(Secret)Box
18 17 \ No newline at end of file
  18 +**A:** No. This would involve presenting you with decrypted ciphertext which has not been authenticated. If you need to encrypt a plaintext so large it can't reasonably fit in RAM, consider breaking it into chunks which you encrypt with separate keys and/or nonces. Each block of plaintext you encrypt will have its own MAC to authenticate it and can be safely decrypted in isolation, unlike trying to decrypt only a portion of data inside of a Crypto::(Secret)Box. If you do this, you should also provide some authenticator or signature over the whole plaintext (an Ed25519 signature, merkle tree or similar) to guard against the ciphertext chunks being reordered or deleted.
19 19 \ No newline at end of file
Something went wrong with that request. Please try again.