Questions tagged [aes-gcm]

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.

393 questions
9
votes
1 answer

OpenSSL Authenticated Encryption

I'm trying to use OpenSSL for authenticated encryption. Specifically, I'm trying to use AES-256-GCM (or CCM). However, when I run openssl list-cipher-commands, I don't see it. The only AES ciphers shown are…
LanguagesNamedAfterCofee
  • 5,782
  • 7
  • 45
  • 72
8
votes
2 answers

Ruby - unsupported cipher algorithm (AES-256-GCM)

I'm getting the error: unsupported cipher algorithm (AES-256-GCM) (RuntimeError) But I seem to have all the requirements: Ruby version: $ ruby --version ruby 2.1.2p95 OpenSSL does list gcm: $ openssl enc -help 2>&1 | grep gcm -aes-128-ecb …
user3813959
  • 83
  • 1
  • 3
8
votes
2 answers

Adding Zero padding to an array

I am doing a GHASH for the AES-GCM implementation. and i need to implement this where v is the bit length of the final block of A, u is the bit length of the final block of C, and || denotes concatenation of bit strings. How can I do the…
Anne
  • 123
  • 8
8
votes
1 answer

Data encryption on Android, AES-GCM or plain AES?

My team needs to develop a solution to encrypt binary data (stored as a byte[]) in the context of an Android application written in Java. The encrypted data will be transmitted and stored in various ways, during which data corruption cannot be ruled…
Matthias
  • 569
  • 1
  • 9
  • 30
7
votes
1 answer

Why AES-256 with GCM adds 16 bytes to the ciphertext size?

I'm using Golang's crypto package, crypto/aes specifically, with a 32 bytes key (so, AES-256) and the GCM method (Galois/Counter Mode). I read from a file multiple chunks of 16384 bytes and generate a cipher block, a GCM method and a random nonce of…
DanielVip3
  • 179
  • 1
  • 2
  • 12
7
votes
1 answer

AES GCM encrypt in nodejs and decrypt in browser?

I am trying to encrypt a piece of string in nodejs and need to decrypt that in front end javascript. In nodejs I was using the crypto library and in front end using web crypto. Facing some error while decrypting in the front end. NodeJS const crypto…
7
votes
3 answers

openssl aes gcm encryption with authentication TAG; command line

I'm trying to encrypt a file in AES-GCM mode with 'openssl' th/ command line openssl enc -aes-256-gcm -p -iv 000000000000000000000000 -K 00000000000000000000000000000000000000000000000000000000000000 -nosalt -in file.raw -out file.enc` Encryption…
user3124812
  • 1,861
  • 3
  • 18
  • 39
7
votes
2 answers

AES-GCM with BouncyCastle throws "mac check in GCM failed" when used with IV

I'm relatively new to developing something with encryption. Right now I'm trying to write a class which encrypts and decrypts Strings using BouncyCastle with AES-GCM. I read about the things you have to consider when implementing encryption. One of…
thaasoph
  • 325
  • 1
  • 3
  • 11
7
votes
2 answers

AES-GCM: AEADBadTagException: mac check in GCM failed

While trying to implement AES-GCM for the first time, we are facing issue in generating AuthenticationTag, Encrypted cipher & GCM mac check fails in the end. For out current implementation tag[] is being populated but byte[] encrypted remains empty.…
user36009
  • 115
  • 1
  • 2
  • 6
7
votes
1 answer

aes-gcm using libgcrypt api in C

I'm playing with libgcrypt (v1.6.1 on Gentoo x64) and i've already implemented (and tested thorugh the AEs test vectors) aes256-cbc and aes256-ctr. Now i am looking at aes256-gcm but i have some doubt about the workflow. Below there is a skeleton of…
polslinux
  • 1,739
  • 9
  • 34
  • 73
6
votes
1 answer

javax.crypto.AEADBadTagException: Tag mismatch for AES/GCM/No Padding encryptor/decryptor

I have been trying to figure this out for days now. Encryption method works fine, but during the decryption tests I am getting the exception below. Especially I am using: AES/GCM/NoPadding . As far as I know T_LEN should be IV_LENGTH*8 as a byte…
xross
  • 597
  • 4
  • 9
  • 25
6
votes
1 answer

Decrypt data using AES.GCM.SealedBox in Swift

I am trying to decrypt data using AES.GCM.The encrypted data works fine but when I try to decrypt the data using the same key it gives authentication error. Below is the code to decrypt func decryptData(decryptToData: Data, key: SymmetricKey) ->…
md12
  • 111
  • 1
  • 8
6
votes
2 answers

Android - javax.crypto.AEADBadTagException

I'm currently getting an AEADBadTagException when trying to decrypt a file I have encrypted. I have searched pretty much everywhere on stackoverflow and unable to find a solution, and hoping there is just a small mistake I have made or something to…
FalseNull
  • 151
  • 1
  • 8
6
votes
1 answer

How to decrypt data from the result of an IE 11 encrypt operation using AES-GCM

I've managed to encrypt some data with AES-GCM using IE 11 on Windows 10 but I can't get decryption to work. Example encryption JS code: let plainText = new Uint8Array([1]); let key; let keyBuf = window.msCrypto.getRandomValues(new…
6
votes
1 answer

AES GCM with hardware accelerated support before Java 9

My use case involves encrypting large amounts of sensitive data on the order of petabytes using AES with GCM in Java and I will need high throughput to make that task complete in reasonable time. As was previously asked and answered on here, AES/GCM…
Wolfgang
  • 155
  • 9
1
2
3
26 27