aes-gcm

Is it possible to use AES128 with GCM mode on iOS?

时光怂恿深爱的人放手 提交于 2019-11-29 11:41:06
So my question for you stackoverflow geniuses is: if there a way (native, library, framework, whatever..) to encrypt data with AES (preferably 128 but could be 256 too) using a strong Authenticated encryption algorithm , let's say GCM mode ? Question is short, I have done some research and I only found one library that seems to support it ( RNCryptor ) but it also seems to use password to crypt instead of keys (like you provide a password and the library made the key) and I don't like that a lot, I prefer to manage my keys myself . I also look at CommonCryptor.h and I found that line, which

AES GCM decryption bypassing authentication in JAVA

筅森魡賤 提交于 2019-11-28 14:19:05
I have some AES/GCM encrypted data and wanted to decrypt it. I want to decrypt it bypassing authentication as the data does not contain authentication information(Data is encrypted by a third party application). I tried decryption with javax.crypto package and it is always throwing tag mismatch error. Is there any way to bypass this tag checking and decrypt data. Data is encrypted with AES128 and it is using 12 byte initialization vector. Edit: I got a temporary solution for this issue. Not sure if this is correct method. Key key = new SecretKeySpec(hlsKey, "AES"); GCMParameterSpec

AES GCM decryption bypassing authentication in JAVA

▼魔方 西西 提交于 2019-11-27 08:25:07
问题 I have some AES/GCM encrypted data and wanted to decrypt it. I want to decrypt it bypassing authentication as the data does not contain authentication information(Data is encrypted by a third party application). I tried decryption with javax.crypto package and it is always throwing tag mismatch error. Is there any way to bypass this tag checking and decrypt data. Data is encrypted with AES128 and it is using 12 byte initialization vector. Edit: I got a temporary solution for this issue. Not

Slow AES GCM encryption and decryption with Java 8u20

早过忘川 提交于 2019-11-27 04:14:36
I am trying to encrypt and decrypt data using AES/GCM/NoPadding. I installed the JCE Unlimited Strength Policy Files and ran the (simple minded) benchmark below. I've done the same using OpenSSL and was able to achieve more than 1 GB/s encryption and decryption on my PC. With the benchmark below I'm only able to get 3 MB/s encryption and decryption using Java 8 on the same PC. Any idea what I am doing wrong? public static void main(String[] args) throws Exception { final byte[] data = new byte[64 * 1024]; final byte[] encrypted = new byte[64 * 1024]; final byte[] key = new byte[32]; final byte

Java AES/GCM/NoPadding - What is cipher.getIV() giving me?

十年热恋 提交于 2019-11-26 19:24:05
问题 I'm using AES/GCM/NoPadding encryption in Java 8 and I'm wondering whether my code has a security flaw. My code seems to work , in that it encrypts and decrypts text, but a few details are unclear. My main question is this: Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding"); cipher.init(Cipher.ENCRYPT_MODE, key); byte[] iv = cipher.getIV(); // ????? Does that IV satisfy the requirement of "For a given key, the IV MUST NOT repeat." from RFC 4106? I'd also appreciate any answers / insight

Slow AES GCM encryption and decryption with Java 8u20

拈花ヽ惹草 提交于 2019-11-26 11:08:18
问题 I am trying to encrypt and decrypt data using AES/GCM/NoPadding. I installed the JCE Unlimited Strength Policy Files and ran the (simple minded) benchmark below. I\'ve done the same using OpenSSL and was able to achieve more than 1 GB/s encryption and decryption on my PC. With the benchmark below I\'m only able to get 3 MB/s encryption and decryption using Java 8 on the same PC. Any idea what I am doing wrong? public static void main(String[] args) throws Exception { final byte[] data = new