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
0
votes
1 answer

Why does aes_128_cbc() work but not aes_128_gcm() for encryption/decryption using EVP?

The code below uses aes_128_cbc and it encrypts the code properly, but when I change it to aes_128_gcm, there is not output encrypted.The code below is my original working code. My key is 128 bits (length 16) and the iv is also length 16 as well. …
Sam
  • 319
  • 1
  • 4
  • 11
0
votes
0 answers

AES GCM in C without EVP interface

I have to write a AES_GCM encrypt/decrypt but without EVP interface. Is it possible to implement AES_GCM without EVP-* interface?
dead programmer
  • 4,223
  • 9
  • 46
  • 77
0
votes
1 answer

Java AES / GCM decryption fails

I am trying to use GCM Mode for encryption and decryption. Unfortunately decryption doesn't work. Do I have to use the same initialization vector for both encryption and decryption classes? I already tried that, unsuccessfully... Could the random…
Fabs
  • 1
  • 1
0
votes
1 answer

Why use Authenticated Encryption instead if hashes?

What is the benefit of using Authenticated Encryption schemes like GCM or EAX compared to simpler methods like CRC or hash functions like SHA? As far as I understand these methods basically add a Message Authentication Code (MAC) to the message so…
Karsten
  • 1,814
  • 2
  • 17
  • 32
0
votes
1 answer

AES GCM porting from python to C#

I am trying to port AES GCM implementation in python OpenTLS project, to C# (.Net). Below is the code in OpenTLS code: ####################### ### Galois Counter Mode ####################### class AES_GCM: def __init__(self, keys, key_size,…
frenzy man
  • 81
  • 1
  • 7
0
votes
1 answer

Python - encrypt AES-GCM to be compatible with Web cryptographic API

What is the correct way to encrypt data via AES-GCM in Python to be decryptable with Web cryptographic API? (using PyCryptodome) Since PyCryptodome uses nonce and WCA IV. Is it a problem? Python: from Crypto.Cipher import AES from Crypto.Random…
d3im
  • 323
  • 2
  • 4
  • 18
0
votes
1 answer

Encrypt AES-GCM in JavaScript, decrypt in Java

We are using the SJCL (Stanford Javascript Crypto Library) to encrypt in JavaScript and we are supposed to implement decryption in Java. The encryption code looks like this:
B.E.
  • 5,080
  • 4
  • 35
  • 43
0
votes
0 answers

Cannot decrypt long AES-256 GCM message with Java

Related to this question: Cannot decrypt AES-256 GCM with Java The Java decrypt issue seems to only be fixed if the encrypted message is short, i.e. two words or so. I've tried with the words, "hello" and "short string", and both of these words were…
bitscuit
  • 976
  • 1
  • 11
  • 26
0
votes
1 answer

linux kernel crypto API,In AES-GCM algorithm how to set the length of aad is zero bit?

In my work I want to use the aes-gcm algorithm to encrypt data in linux kernel module, so I choose the aead api. In aes gcm the aad data can be setted 0-264 bits,but in the code if i use aead_request_set_ad() function set the data of scatterlist…
whh
  • 1
  • 1
0
votes
2 answers

What is the SALT role in AES128GCM encryption algorithm

I'm trying to implement an aes128gcm encryption algorithm so I can push notifications over the web. However there is something that I'm missing because I don't find the purpose of using the salt anywhere. Encryption Content Coding Header must have…
Muck Felo
  • 27
  • 4
0
votes
1 answer

How to get AES-128-GCM with Ruby 2.3.1

I am using OpenSSL 1.0.2k with Ruby 2.3.1, which supports the "aes-128-gcm", not "AES-128-GCM", algorithm. Ruby 2.4.0 supports both of them when bundled with OpenSSL 1.0.2k. Where exactly does the difference lie between the two? Does being…
Abhishek
  • 63
  • 6
0
votes
1 answer

How to add AES-GCM support for Tomcat 7 running in Java 7

I'm well aware that Java 7 by default doesn't support GCM based ciphers. Therefore I have tried to get it done via Bouncy Castle. I have the following ciphers configured in my Tomcat's HTTPS…
drox
  • 7,523
  • 4
  • 23
  • 34
0
votes
1 answer

How to use MySQL AES_DECRYPT with aes-256-gcm

I'm using MySQL v5.7.17. I'm trying to decrypt data I encrypted via Ruby using the aes-256-gcm algorithm. So far I have this: SELECT AES_DECRYPT(UNHEX(@encrypted_account_number), @key, @encrypted_account_number_iv); Which would work, however is…
content01
  • 3,115
  • 6
  • 41
  • 61
0
votes
0 answers

aes-gcm throws no error when message, tag, or key is changed

I am using AES/GCM/NoPadding encryption in java and (I am fairly new to it). If I understand it right GCM should recognize if encrypted message was manipulated, if so it should not decrypt it. As stated in this anwser: The authentication TAG is an…
David Novák
  • 1,455
  • 2
  • 18
  • 30
0
votes
0 answers

aes ccm code error using OpenSSL

This is aes-ccm example code. I turn on the my visual studio using the c languages. But it is dosen't work. I think the problem point is void handleErrors(void); How can solve this problem? Please give me adviece. Thank you #include…