let decipher = crypto.createDecipheriv('aes-256-gcm', serverKeyArr, iv, {authTagLength: 12});
to define auth tag to 12 bytes, however, when I execute decipher.final(), inside that function, the tag it calculated is still 16 bytes, then when it do xor test for the tag function calculated and the auth Tag I've received (which already cut off by server side from 16 bytes to 12 bytes), it will results in error because the length is different.
I wonder why the argument {authTagLength: 12} do not work?
Besides, is there any way I can use shorter auth tag length to pass decipher.final() function, because in my program, I only can get the first 12 bytes auth tag.
I am facing the same issue, any updates on this?
Not only for createDecipheriv(), but the same also happens for createCipheriv().
The option authTagLength doesn't seem to work and is simply ignored.
For 'aes-256-gcm', I've tried to use:
let decipher = crypto.createDecipheriv('aes-256-gcm', serverKeyArr, iv, {authTagLength: 12});
to define auth tag to 12 bytes, however, when I execute decipher.final(), inside that function, the tag it calculated is still 16 bytes, then when it do xor test for the tag function calculated and the auth Tag I've received (which already cut off by server side from 16 bytes to 12 bytes), it will results in error because the length is different.
I wonder why the argument {authTagLength: 12} do not work?
Besides, is there any way I can use shorter auth tag length to pass decipher.final() function, because in my program, I only can get the first 12 bytes auth tag.
Thanks