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

Reading AES/GCM encoded data in chunks with BouncyCastle in Java

I am trying to figure out how to read data that was encoded with AES/GCM/NoPadding. The data that I am working with will be arbitrarily large, and I'm hoping to read it in chunks, but I'm having difficulties figuring out how that would be…
danBhentschel
  • 863
  • 7
  • 24
3
votes
0 answers

Parallelizing AES GCM in BouncyCastle

I'm using AES-GCM with the BouncyCastle provider in Java and it works fine. The NIST documentation seems to suggest that GCM is an algorithm that allows parallelization -- however, on looking at the Java API I fail to understand how parallelizing…
user8882851
3
votes
2 answers

Detecting incorrect key using AES/GCM in JAVA

I'm using AES to encrypt/decrypt some files in GCM mode using BouncyCastle. While I'm proving wrong key for decryption there is no exception. How should I check that the key is incorrect? my code is this: SecretKeySpec incorrectKey = new…
Ariyan
  • 14,760
  • 31
  • 112
  • 175
3
votes
1 answer

AES cipher in GCM, CCM, or CBC-MAC mode?

I've been looking around for an article describing these modes in layman's terms but have not yet found anything helpful. So, what are the positives and negatives of each mode? Thanks GCM CCM CBC-MAC
crawfish
  • 853
  • 4
  • 11
  • 14
3
votes
1 answer

AES GCM implementation in c#

I am implementing an AES cipher in GCM mode in c#. My question pertains to the "additional authenticated data"(AAD). In the following code from http://blogs.msdn.com/b/shawnfa/archive/2009/03/17/authenticated-symmetric-encryption-in-net.aspx it is…
crawfish
  • 853
  • 4
  • 11
  • 14
2
votes
1 answer

Decrypting a string in C# that was encoded in GO using the AES-GSM method

I've got a string that was AES-GCM encrypted in Go, along with it's pass phrase and am trying to decrypt it in C#. However, I'm unable to find the right methods to decrypt the same in C#. The errors I'm getting mentions the size of the IV, block not…
Ayan S
  • 31
  • 4
2
votes
0 answers

Why is the runtime complexity of GCM mode encryption O(n²) in Java?

The title pretty much sums up the question. The quadratic runtime of the cipher compared to the input, can be see using this sample code: import java.io.BufferedInputStream; import java.io.ByteArrayInputStream; import…
Paul Wagland
  • 27,756
  • 10
  • 52
  • 74
2
votes
3 answers

Should I be using Iterations in AesGcm?

Having read that RijndaelManaged is deprecated and AesGcm (introduced in .NET Core 3.1) is preferred over AesManaged, I'm trying to implement AesGcm using this tutorial and this answer. Here's my code: /// Perform AES Encryption, returning the…
JsAndDotNet
  • 16,260
  • 18
  • 100
  • 123
2
votes
1 answer

How to decrypt of AES-256-GCM created with ruby in sjcl.js

I'm trying to decrypt an AES cipher generated by Ruby with the sjcl.js library. I'm getting a "corrupt" error for an unknown reason……. I want to fix the problem. For reference, when encryption and decryption were attempted in CBC mode, decryption…
YiJisol
  • 45
  • 3
2
votes
1 answer

Javascript decrypt for aes-gcm not working, but in Python it works

I want to port a small python library to JavaScript, running in Node.JS. I get an encrypted message, the initialization vector and the key. In python3 these are the imports: from cryptography.hazmat.primitives.ciphers.aead import AESGCM from…
fritz
  • 143
  • 7
2
votes
1 answer

Nodejs AES-256-GCM decrypt the encrypted client message by webcrypto api

I've Encrypted my text by a key in Client by AES-256-GCM algorithm and I can decrypt it in Client, But when I send it to the Backend which has a SharedKey(the same as the Client has), it can decrypt the message by AES-256-CTR algorithm(I used this…
Ali Torki
  • 1,929
  • 16
  • 26
2
votes
0 answers

How to protect a non-extractable Secret Key in indexedDB?

I have encrypted data in AES-GCM with the crypto API. The initialisation vector is then added to the data, forming a unique encrypted string stored in local-storage. Finally, the secret key is stored in IndexedDB. Since the secret key is…
DoneDeal0
  • 5,273
  • 13
  • 55
  • 114
2
votes
2 answers

AES-256-GCM Encryption from Ruby & Decryption with Golang

I have an encryption in Ruby with aes-256-gcm require 'openssl' key = "972ec8dd995743d981417981ac2f30db" iv = "6a825c25ea74" auth_data = "73f6828fc5be" plaintext = "John Doe play foo bar" cipher =…
itx
  • 1,327
  • 1
  • 15
  • 38
2
votes
0 answers

PowerShell - Apply AES-256-GCM decryption on Chrome 91.0.4472.106 cookies stored in the local device

I am working on a PowerShell script for decrypting Chrome cookies stored in the local machine. According to the documentation related to Chrome 80+ versions, the encryption process at high level for cookies is divided in two main phases: Master key…
Develobeer
  • 425
  • 1
  • 8
  • 19
2
votes
3 answers

How to destroy SecretKey in Java 14?

I am trying to clear my Secretkey after decrypting. From what I've read, SecretKeys can be destroyed via the destroy method since Java 8. I am using Java 14 so it should be possible. However, whenever I use the destroy method on a key, a…
Dahlin
  • 157
  • 1
  • 11