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
6
votes
3 answers
How Can We Use GCM Mode Encryption in PHP?
I have been reading a lot about GCM and how awesome it is and I would like to know how could I use AES-GCM authenticated encryption using PHP. Is it supported in mcrypt()? I found some references to GCM in the Codeigniter framework documentation…

xendi
- 2,332
- 5
- 40
- 64
6
votes
2 answers
CNG Import ECC Pub/Priv Keyfrom file
I've been trying to find how to import an ECC key from a file by ANY MEANS for ages. I have tried accessing an ECC cert from the Windows certificate store, from a .p12 file, and from a PKCS#8 OpenSSL key file with no success.
Just one of the many…

Jim
- 587
- 2
- 6
- 19
5
votes
1 answer
AES-GCM with arbitrary tag length
For algorithm test vector evaluation, I am trying to perform an AES in GCM mode for encryption and decryption with arbitrary tag length values such as 32 bits.
When I try to initialize my cipher with such an arbitrary tag length as follows:
final…

factor2
- 155
- 9
5
votes
2 answers
Apple eciesEncryptionCofactorVariableIVX963SHA256AESGCM vs BouncyCastle ECCDHwithSHA256KDF
I'm trying to encrypt communication between Java (BouncyCastle) and iOS using the Apple algorithm eciesEncryptionCofactorVariableIVX963SHA256AESGCM.
The algorithm by Apple is not well documented, but I found this article which helps quite a bit.
I…

mahler
- 526
- 5
- 25
5
votes
3 answers
Trying to decrypt with aes-256-gcm with php
I wondered whether anyone can help,
I am using encryption method aes-256-gcm, I can encrypt, but cannot decrypt.
Below is my code, can anyone see where I'm going wrong
$textToDecrypt = $_POST['message'];
$password = '3sc3RLrpd17';
$method =…

C.lau
- 51
- 1
- 1
- 4
5
votes
1 answer
pycryptodome : MAC Check Failed (using decrypt_and_verify)
I am working on an encryption program with Pycryptodome in Python 3.6 I am trying to encrypt a file and then decrypt it and verify the MAC tag. When I get to verify it, an error is thrown
import os
from Crypto.Cipher import AES
bib Cryptodome…

jeff tran
- 51
- 1
- 3
5
votes
2 answers
Pycrypto AES GCM encryption and Java decryption
I'm using Pycryptodome (a PyCrypto fork) to create AES-GCM ciphertexts. I use the following Python code to encrypt:
cek = os.urandom(16)
nonce = os.urandom(12)
cipher = AES.new(cek, AES.MODE_GCM, nonce=nonce, mac_len=16)
ciphertext =…

Alastair McCormack
- 26,573
- 8
- 77
- 100
5
votes
1 answer
GCM encryption and decryption in xws-security (webservices-rt)
I've successfully implemented support for GCM encryption in xws-security (EncryptionProcessor.java) using JDK8 as tested against other systems. However I have a problem with decryption. The first problem was as…

tkr
- 93
- 1
- 6
5
votes
2 answers
Checking tag and associated data in an AEAD cipher in Java
I need to use AEAD to share information between two users, part of which must be encrypted and part of which should be kept in cleartext.
Is there an API to check the ciphertext tag and access the associated data once a message has been encrypted…

Thomas
- 705
- 5
- 13
5
votes
3 answers
Is it possible to use AES128 with GCM mode on iOS?
So my question for you stackoverflow geniuses is: if there a way (native, library, framework, whatever..) to encrypt data with AES (preferably 128 but could be 256 too) using a strong Authenticated encryption algorithm, let's say GCM mode?
Question…

tanou
- 1,083
- 2
- 13
- 33
5
votes
6 answers
GCM Multiplication Implementation
I am puting up a C code for the Multiplication of block (Alogrithm 1) in the GCM SP-800-38D document here. Page 11-12.
Having completed the code, I want to see if there are any way I can test the code. You can find attached below the code I have put…

Paul A.
- 449
- 1
- 4
- 22
4
votes
2 answers
Extract tag from cipher aes 256 GCM Golang
I have encryption and decryption in Ruby and try to rewrite with Go. I try step by step, so start with encryption in ruby and try to decryption in go, it's works. But when I try to write encryption in Go and decrypt in ruby. I'm stuck when try to…

itx
- 1,327
- 1
- 15
- 38
4
votes
1 answer
Method to encrypt data in Python/Airflow and decrypt in BigQuery
I need a pipeline that
ingests sensitive data from an API
de-identify/encrypt specific fields based on certain conditions
upload data post encryption (newline delimited JSON format) into BigQuery table
In addition to the above, I also need to be…

Korean_Of_the_Mountain
- 1,428
- 3
- 16
- 40
4
votes
1 answer
Decrypt an encrypted message with AES GCM in Python
I use the AES method to encrypt a sentance called from a txt file. I used the GCM Mode and created a specific key too. Everything is working (the code is below).
from Crypto.Cipher import AES
from Crypto.Protocol.KDF import scrypt
from…

Julien
- 45
- 1
- 3
- 15