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
0
votes
1 answer
AES-128-GCM Tag doest not match
I'm trying to encrypt and decrypt with aes-128-gcm.
But when I'm running a test I have an error :
System.Security.Cryptography.CryptographicException : The computed authentication tag did not match the input authentication tag.
I don't understand…

Donald Duck
- 1
- 1
- 2
0
votes
0 answers
Can a encrypted message using BouncyCastle AESGCM get decrypted using AESGCM in .Net core 3.1
I have to use BouncyCastle AESGCM(https://www.bouncycastle.org/docs/docs1.5on/org/bouncycastle/crypto/modes/gcm/package-summary.html) to encrypt the message. So, I wonder if I could use AESGCM in .Net core 3.1 to decrypt this message. However, I got…

wbing520
- 1,501
- 1
- 9
- 9
0
votes
1 answer
What is the alternative of crypto.subtle.exportKey in golang
I'm trying to achieve the JS code below in golang, but I can't find any export key methods in crypto package of golang:
JS Code:
return Crypto.subtle.generateKey({
name: 'AES-GCM',
length: 256
}, !0, ['encrypt',…

Ali Padida
- 1,763
- 1
- 16
- 34
0
votes
0 answers
jdk1.6.0_161 supports AES/GCM/NoPadding Cipher?
I have read multiple questions regarding same issue, but the Java version were different. I got the idea about how it can be enabled in Java 7 and 8. But unfortunately, I am willing to enable it in Java 6.
Already tried to replace the policy jar as…

Manpreet
- 125
- 3
- 11
0
votes
1 answer
Access non class functions of another file into a class function in Kotlin
I have just started working on the Kotlin and my code is performing a normal operation. I need to call a function from a class which is defined in another file and this file does not have class. For example,
File1.kt
The main function is called…

Amit Raj
- 1,358
- 3
- 22
- 47
0
votes
1 answer
What is the additional authenticated data used by swift api SecKeyCreateEncryptedData?
I am using rsaEncryptionOAEPSHA256AESGCM to encrypt some data using SecKeyCreateEncryptedData on iOS and then decrypting the same data on backend in golang. I am using a 3072 bit rsa public key to encrypt the symmetric key. When I get the data from…

shobhit
- 89
- 2
- 8
0
votes
1 answer
Why is there a difference in generated cipher text between OpenSSL EVP C libraries and Python?
I'm seeing a difference in the cipher text generated ( and decryption fails as well but that's another story - I need the encrypted output to be correct/ as expected first). I ran the encryption using Python ( Pycryptodome) and saw different results…

umayneverknow
- 190
- 1
- 3
- 13
0
votes
1 answer
AES GCM encryption and decryption: PHP VS C# BouncyCastle
I am currently working on transforming my C# AES-GCM cryptography code to PHP. However, after some research, the text encrypted by my PHP system cannot be decrypted by the C# one. I want to know if there is any difference from both codes:
C# with…

Sunny Leung
- 103
- 4
- 15
0
votes
1 answer
How to use nettle library, GCM mode
I am using nettle cryptography library. I could not do GCM mode properly.
Here is how I am doing it.
What am I doing wrong?
#include
#include
#include
using namespace std;
int main()
{
unsigned char key[]…

Zeta
- 913
- 10
- 24
0
votes
0 answers
AES-GCM decryption error iaik.cms.CMSException: Unable to decrypt encrypted content-encryption key: Invalid padding
I am using following code to encrypt data using AES-GCM:
// the stream to which to write the EnvelopedData
ByteArrayOutputStream resultStream = new ByteArrayOutputStream();
EnvelopedDataOutputStream envelopedData;
// wrap EnvelopedData into a…

Shweta
- 1
0
votes
0 answers
Incorrect buffer size returned by the default provider
With Android 9 and API 28 the Bouncy Castle provider ("BC") is no longer supported and trying using it results in the NoSuchAlgorithmException. As per the official blog post from the Android the way to fix this is to not specify the provider at…

Pawel
- 31,342
- 4
- 73
- 104
0
votes
0 answers
mode aes-gcm - can i use data block 64bit
Does anyone have an idea how to change source code from https://github.com/mko-x/SharedAES-GCM
in the way, that supports 64 bit blocks? The implementation of this algorithm is for 128bit data block and have 96bit Initialization Vector (IV) + 32bit…

q4engineer
- 11
- 1
0
votes
0 answers
Web push message decryption aes128gcm
guys!
I'm trying to decrypt push message from my own push server.
So, i know public key and auth secret parameters.
I got encoded request payload in file, and trying to decode it:
$ciphertext = trim(file_get_contents("logs.txt"));
$publicKey =…

Jdoe
- 1
0
votes
1 answer
Python Pycryptodome AES-GCM encryption code performance improvement
I am having around 19G of data which I am doing tar and then encrypt. I use below code to do the job.
from subprocess import call
from Crypto.Cipher import AES
from Crypto.Random import get_random_bytes
import sys
cmd =…

Ibrahim Quraish
- 3,889
- 2
- 31
- 39
0
votes
2 answers
Encrypting many buffers with same key
I have a large dataset (say 1GB) comprised of many blocks, some with a size of ~ 100 bytes, some around a megabyte. Each block is encrypted by AES-GCM, with the same 128b key (and different IV, naturally). I have a structure that keeps the offset…

gidon
- 271
- 2
- 8