Galois/Counter mode of the Advanced Encryption Standard: A mode of operation of the AES block cipher which both encrypts and authenticates its input data.
Questions tagged [aes-gcm]
393 questions
4
votes
1 answer
AES/GCM/NoPadding encrypt from node and decrypt on java, throw AEADBadTagException: Tag mismatch
I want to encrypt data with NodeJS and then decrypt the data with Java. I searched a lot of examples on the Internet, but did not find a suitable answer.
The NodeJS code is as follows:
const crypto = require('crypto');
function encrypt(content) {
…

WangShen.Xu
- 43
- 1
- 4
4
votes
2 answers
Cipher Alogrithm 'AES-256-GCM' Not Found (OpenVPN Error)
I was trying to connect to a .ovpn file using OpenVPN but when I try to connect it with this command:
sudo openvpn --config downloaded-client-config.ovpn
It failed with the following output:
Wed Jun 17 23:53:03 2020 OpenVPN 2.3.10…

Sparsh Dutta
- 103
- 2
- 11
4
votes
1 answer
Can the value from node crypto.createCipheriv('aes-256-gcm', ...).getAuthKey() be public?
I'm having trouble finding some information. Does anyone know if the value returned from cipher.getAuthTag() (--> returns MAC) can be publicly visible?
TL;DR
Can a message authentication code be publicly visible, or does this need to be kept secret…

tuffant21
- 441
- 3
- 10
4
votes
1 answer
How to encrypt message using Java then decrypt message using Python for AES GCM algorithm
I am working on the problem to encrypt the message using Java, then decrypt the message using Python based on AES GCM algorithm.
Based on python doc, the authentication tag is proved by…

Turbocv
- 41
- 4
4
votes
2 answers
SonarQube: Make sure that encrypting data is safe here. AES/GCM/NoPadding, RSA/ECB/PKCS1Padding
I'm using:
1. RSA/ECB/PKCS1Padding
2. AES/GCM/NoPadding
To encrypt my data in my Android (Java) application. At the documentation of SonarQube it states that:
The Advanced Encryption Standard (AES) encryption algorithm can be used with various…

Dionis Beqiraj
- 737
- 1
- 8
- 31
4
votes
0 answers
AEADBadTagException: Tag mismatch
I encrypt data in android phone using AES GCM mode and sent it to java application in windows
The cipher text is created and received successfully
at decryption process an exception appeared(Tag miss match)
I tried to remove associated data…

Sherif Awad
- 171
- 2
- 10
4
votes
1 answer
Is it possible to do use GCM with BC on JDK 1.7?
I'm trying to do a TLS connection using any of the AES GCM variants and from what I understand in the docs this should be possible but I get this error:
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at…

ddreian
- 1,766
- 5
- 21
- 29
4
votes
1 answer
Reusing PBKDF2 salt for AES/GCM as IV: dangerous?
I'm developing an encryption utility class to be reused for common operations.
A very common case is to encrypt a plaintext with a user-provided password.
In this case, I'm using PBKDF2 to derive a valid AES key, then use it in GCM mode to encrypt…

Michele Mariotti
- 7,372
- 5
- 41
- 73
4
votes
1 answer
Cannot decrypt AES-256 GCM with Java
I have a node module that can both encrypt and decrypt with AES-256 GCM. Now I am also trying to decrypt with Java whatever the node module encrypts, but I keep getting a AEADBadTagException.
I have tested the node module by itself and can confirm…

bitscuit
- 976
- 1
- 11
- 26
4
votes
3 answers
GCMParameterSpec throws InvalidAlgorithmParameterException: unknown parameter type
I am doing android data encryption to save in SharedPreferences. GCMParameterSpec was introduced in Android in API 19 which I'm using for AES/GCM/NoPadding encryption. This is how I'm implementing it:
Cipher c =…

Ricardo
- 9,136
- 3
- 29
- 35
4
votes
0 answers
xmlsec with AES-GCM
I have compiled the newest release of XMLSec from https://www.aleksey.com/xmlsec/news.html in a cygwin enviroment.
Now i am following this example to encrypt a XML file using a session key and digital signatures.…

chenino
- 454
- 2
- 7
- 19
4
votes
1 answer
extreme difference in time between AES-CBC + HMAC and AES-GCM
So I've been searching far and wide for different AES implementations for CBC and GCM, i do not want to implement this my self in case I make mistakes so i have found the following AES CBC codes and tested the speed of them on my RX63NB (Rennesas…

Vincent
- 1,497
- 1
- 21
- 44
4
votes
2 answers
AES, 128 and 256 Invalid Key Length
I am trying to encrypt a text using Crypto++. It worked well last time when using AES CTR, but now when using CBC or GCM the max key length I can use is 32 bits??
The code that handles the encryption:
string xAESPlain,…
user3460574
4
votes
2 answers
Adding additional authenticated data to AES-GCM on Android
I'm trying to add the additional authenticated data (AAD) to AES-GCM on Android. I see the Java 7 version of Cipher notes about using GCMParameterSpec and the updateAAD(...) method but given Android is Java 6 based I'm all out of ideas. I'm using…

scottyab
- 23,621
- 16
- 94
- 105
4
votes
1 answer
Late authentication in OpenSSL GCM decryption
I am using OpenSSL's EVP interfaces to implement AES encryption using GCM mode.
Now GCM, being one of the authentication modes, provides cipher text integrity. Meaning it generates a tag (MAC - message authentication code) on the cipher text (and…

sg1
- 477
- 1
- 4
- 21