Closed oilel closed 1 year ago
(Synchronous) stream ciphers work by generating keystream and XORing it with data, so encryption and decryption is the same operation. In other words, "encrypting" plaintext twice with the same cipher will result in plaintext. Stream ciphers are rarely used in isolation (a naive use of unauthenticated stream ciphers often leads to serious vulnerabilities), usually it's a building block for higher-level constructs. I strongly recommend you use one of the AEAD algorithms.
The document says:
Does it have explicit methods for encryption and decryption rather than applying key again?