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
2
votes
1 answer
Unable to decrypt encrypted message using another instance of cipher
I am using ruby version 2.4.0 and openssl version "OpenSSL 1.0.1f 6 Jan 2014", I am trying to implement an encryption/decryption for a security layer.
The code works fine if I write it as follows using the same cipher object.
# Example 1
require…

Deepak
- 341
- 1
- 10
2
votes
1 answer
How to make GCM Encrypt with authentication tag for Android
I want to make a function encrypt data by GCM mode with authentication tag for Android.
This is my source code:
public static byte[] GCMEncrypt(String hexKey, String hexIV, byte[] aad) throws Exception {
byte[] aKey =…

Nguyễn Hải Long
- 53
- 1
- 7
2
votes
1 answer
How can a server get symmetric key from android application?
I'm working on an Android application about encryption. And the following codes are used to generate a GCM key:
KeyGenerator generator=KeyGenerator.getInstance(KeyProperties.KEY_ALGORITHM_AES, "AndroidKeyStore");
generator.init(
new…

Ren
- 37
- 2
- 4
2
votes
3 answers
Does compiled Crypto++ library code that uses AES/GCM encryption utilize Intel's AES-NI instructions?
I'm implementing AES256/GCM encryption and authentication using Crypto++ library. My code is compiled using Visual Studio 2008 as a C++/MFC project. This is a somewhat older project that uses a previous version of the library, Cryptopp562.
I'm…

c00000fd
- 20,994
- 29
- 177
- 400
2
votes
2 answers
Can AES-GCM tag be set after calling EVP_DecryptUpdate?
In all the code snippets I see involving using OpenSSL EVP interfaces for AES-GCM (example), the code looks approximately like this:
EVP_DecryptInit(...);
EVP_CIPHER_CTX_ctrl(..., EVP_CTRL_GCM_SET_TAG, ...);
while (...) {
…

jacobsa
- 5,719
- 1
- 28
- 60
2
votes
2 answers
GCM-AEAD support for ubuntu system running linux kernel-3.10
I am trying to implement a AEAD sample code for encryption Using GCM encryption. But I always get invalid argument error while setting the key
static int init_aead(void)
{
printk("Starting encryption\n");
struct crypto_aead *tfm…

addy
- 33
- 5
2
votes
1 answer
Does node.js crypto use fixed tag size with GCM mode?
I am implementing a scheme with cipher in GCM mode in node.js.
I have to append/prepend GCM tag to the ciphertext in order to check the integrity. However, I am not sure how big the tag will be!
On crypto++ wiki, I read that the size could vary and…

Karel Bílek
- 36,467
- 31
- 94
- 149
2
votes
1 answer
AES GCM non-EVP implementation in openssl?
Does openssl have a "raw" (non-EVP) interface to do AES GCM encryption and decryption? I'm looking for something comparable to AES_cbc_encrypt() or DES_ede3_cbc_encrypt(), but for AES GCM. I found the openssl EVP interfaces for AES GCM but I can't…

juhraffe
- 545
- 6
- 16
2
votes
2 answers
What is the correct format for final block in EVP_DecryptFinal_ex for decryption?
I have implemented a simple AES-256-GCM encryption and decryption for learning purposes. While testing my code if I enter strings lengths multiples of 6 then I get the correct output but for other cases the decrypted data has some garbage characters…

bawejakunal
- 1,678
- 2
- 25
- 54
2
votes
2 answers
decrypting aes-gcm encrypted with java using openssl
I have the following code in Java:
public static void deriveKeyAndIV(String password)
throws Exception
{
SecureRandom random = new SecureRandom();
if (salt == null)
{
salt = new byte[HASH_BYTE_SIZE…

elyashiv
- 3,623
- 2
- 29
- 52
2
votes
1 answer
Does OpenSSL have GMAC API and examples
I am working on a project which needs to do authentication on large volume of data. It seems GMAC is designed for high throughput operation. I only need the message authentication code, encryption is not required.
Does OpenSSL has GMAC API or…

Tom
- 321
- 2
- 9
2
votes
0 answers
Decryption with rfc3686(ctr(aes)) not using AES-NI instructions in linux kernel
I am trying to figure out the difference AES-NI brings to AES crytpo opertaions. After trying with AES-CBC it seems it makes none, as is stated by Intel. However for AES-CTR and AES-GCM modes, Intel promises a great performance improvement.
I am…

CodeQ
- 319
- 1
- 3
- 13
2
votes
1 answer
AES/GCM (AES-128-GCM) authentication-tag differs in C# and Ruby
I'm trying to generate a authentication-tag in C# which I already generated in Ruby (for testing purposes). However the results are different, but as far as I can see,the inputs are equal.
In Ruby 2.0 using OpenSSL 1.0.1c (Ubuntu 13.04):
require…

user2594963
- 21
- 1
- 2
1
vote
4 answers
should you authenticate the initialization vector in ipsec?
I'm trying to implement IPSEC in the form of ESP in transport mode with using aes in galois/counter mode, according to RFC4106.
I'm supposed to put the initialization vector just before the ciphertext in the transformed packet.
Should it be part of…

John Lawrence Aspden
- 17,124
- 11
- 67
- 110
1
vote
2 answers
Decrypt an encrypted string in Databricks using GCM mode
I'm trying to decrypt a string in databricks using aes_decrypt function with GCM mode. But, it doesn't seem to work with IV. Didn't find any details about how to use IV with aes_decrypt function :…

sm925
- 2,648
- 1
- 16
- 28