I'm using node:crypto
API, namely createCipheriv()
and createDecipheriv()
with aes-256-gcm
cipher to encode/decode a stream of data. However, it looks like I need to call decipher.setAuthTag()
in order to decode the stream correctly, otherwise it throws an authentication error in the end (however the data is decoded correctly).
Is there a way to avoid using the authentication checks with this cipher? I'm using streams of data and it's very inconvenient to store auth tag with the data (I'm using multiple storage options, one of which is a plain filesystem). The data consistency can be checked by other means.
Or maybe you could recommend a universal auth tag storage option that I could use with streams (which doesn't require random access and rewind)?