Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [aes]

AES (Advanced Encryption Standard) is a symmetrical block-cipher algorithm with a 128-bit block size, and key sizes of 128, 192 or 256 bits.

0
votes
1answer
18 views

How to generate whitebox AES decryption algorithm and code, with existing WB-AES encryption code?

I can find several whitebox AES 128 implementations on Github, such as wbaes-1, wbaes-2, wbaes-3, etc. All of them are developed based on WB AES encryption. Ideally, most implementations include two ...
0
votes
2answers
34 views

What encryption shoud I use for single char encryption?

I'm very new to encryption and I wanted to know if it is secure or just possible to use encryption on single chars. I did some research, but nothing to clear and i'm a bit confused. The modes I think ...
4
votes
3answers
791 views

Can a 1 byte difference in AES 128 bit keys make huge difference in output?

If we take some randomly generated key of AES-128 and we change any random 1 byte of that 16 byte key, will this make huge difference in the AES cipher text generated over same input string? Does ...
1
vote
1answer
36 views

how are variable key sizes produced?

I am current learning the internal working of several Symmetric key Cryptographic algorithms, and came across DES and AES. DES takes in input a 64 bit key and AES-128 takes in input a 128 bit key ...
0
votes
1answer
24 views

Encrypt UDP packet with time-generated encryption key

I'd like you to help me solve a dilemma of mine. I am currently building a home automation from scratch for my next house. The basic gist of it is that I will send UDP packets over a local network. ...
4
votes
3answers
163 views

Ways to make white-box cryptography AES implementation more difficult to be broken

Background: I want to use white-box cryptography to hide the keys stored in a client application. I am looking for existing implementations of white-box cryptography, such as AES 128 or 256. But I ...
1
vote
1answer
419 views

Does an IV need to be used in AES CTR mode?

If I encrypt a message once using AES CTR, will I need an IV? Additionally, if I do use an IV, will I need to send it with the cipher text?
0
votes
0answers
38 views
3
votes
2answers
142 views

How are these AES MixColumn multiplication tables calculated?

I'm using the mul2, mul3, mul9, mul11, mul13 and mul14 tables for the MixColumn and InvMixColumn steps in AES-128. However, I got these off some Github repository, and now I'm looking for an actual ...
0
votes
1answer
52 views

AES-GCM cipher - Nonce vs IV

I am using a Python library called PyCryptodome, which offers the following API for AES-GCM ciphers: https://pycryptodome.readthedocs.io/en/latest/src/cipher/aes.html As you see, IV is not ...
-1
votes
1answer
64 views

How does ECDHE fit with AES and SHA?

Hi I'm trying to piece together how AES, ECDHE, and SHA all work together. From what I understand ECDHE is uses asymmetric cryptography to generate a shared key from a public and private key which are ...
0
votes
0answers
62 views

AES encryption question

If we consider the generation of keys as $$\begin{aligned} K_0 &= E_K(IV); \\ K_{i+1} &= E_{K_i}(A) \end{aligned}$$ Where A is a block of zeroes, and the ciphertext blocks are computed as ...
1
vote
3answers
347 views

What happens if you increment MAX counter in AES-CTR?

Suppose you use a IV/counter = ffffffffffffffffffffffffffffffffin AES-CTR. What will happen if you encrypt the next block, and thereby increment the counter by one? ...
-1
votes
2answers
40 views

aes invmixcolumns process? [duplicate]

I want to know how to obtain mixcolum -> invmixcolumns mixcolumn = [2 3 1 1 1 2 3 1 1 1 2 3 3 1 1 2 ] -> -1/35 [4 3 11 17 17 4 3 11 11 17 4 3 ...
0
votes
1answer
57 views

Apple CryptoKit - Understanding its portability

I've been playing with Apple's CryptoKit (their effort to make their old CommonCrypto lib more modern and easy to use via Swift, their programming language). I'm interested to see how portable it is.....
0
votes
1answer
88 views

Best practices when encrypting a file with three different ciphers [closed]

I have some files that contain important information, so I want to encrypt them by the most secure encryption method possible. I've read countless StackExchange answers on similar questions and some ...
2
votes
1answer
55 views

AES with no SubByte - recover the key

I was wondering if it was possible to recover an AES-128 blockcipher key, knowing that there is no substitution box (it can be seen as the identity mapping). I thought it would be feasible. I ...
2
votes
1answer
65 views

In GnuPG, what's the difference between --s2k-cipher-algo and --cipher-algo? [duplicate]

I want to change some encryption options while using GnuPG to encrypt a file symmetrically. 1) However, for choosing the cipher algorithm, GnuPG has two commands and I don't know which one to use. ...
0
votes
0answers
65 views

How the counter of AES-CTR in SSH is used

I am currently trying to decrypt an SSH session using memory derived keys and IVs. My current problem is that the counter value seems to be the IV plus some value < 256. My question is now why the ...
4
votes
2answers
124 views

Does ChaCha20/Salsa have the same Bit Strength as AES for identical key sizes?

i.e. does ChaCha20 with a 128bit key, require 2^128 attempts to brute force, as with AES-128, theoretically? Ps. notwithstanding that ChaCha is a stream cipher.
5
votes
1answer
128 views

AES reverse Rijndael key schedule with decryption round keys

I want to get the original encryption key (32 byte) of AES 256 (CBC) implementation. The implementation has the values of the inversed round keys values hard coded into the decryption function. I ...
2
votes
2answers
313 views

DES and AES cryptography

I have a question that I can't answer: A plain text has been encrypted 3 times in a DES method with 3 different keys 56 bit each, after it the text was encrypted for the forth time using a AES ...
1
vote
1answer
149 views

Cipher Block Chaining - How do you change the plaintext of all blocks?

I've just read about CBC encryption and decryption and was wondering how you can change every plaintext block? Let's say you have an initialization vector, 3 ciphertext blocks, know each block-cipher-...
1
vote
1answer
104 views

Key-Bijective Secure Symmetric Encryption Methods

In AES, an N-bit message is mapped 1-to-1 message-to-output (for a fixed key). If we use a key with N bits, however, the key is not mapped 1-to-1 key-to-output (for a fixed message). So, is there any ...
2
votes
1answer
253 views

Simplified AES S-box multiplication - calculation error

I have a problem to calculate the S-box in S-AES. The affine transformation is defined: I read that it is a normal matrix multiplication. I chose the bits $0101$ and built the inverse $1011$. $b_0$ ...
2
votes
1answer
30 views

LoRaWAN 1.0.2 Session Key Security

I am reading about LoRaWAN 1.0.2 specification. For the confidentiality and integrity of the comunication the protocol generate two session keys, the NwkSKey and the AppSKey (part 6.2.5 of the ...
1
vote
0answers
55 views

Can $AES_{k1}(m)$ be equal to $AES_{k2}(m)$? [duplicate]

Context: We have a generic bloc cipher composed of an encryption function $E_k$ and a decryption function $D_k$ operating on blocs of $n$ bits. For a key $k$ fixed, we can see $E_k$ as a pseudo-...
4
votes
2answers
114 views

Is there a maximum amount of data which can be encrypted using a symmetric (AES256) key?

I am working on an application where we will be encrypting billions of small (< 2,000 bytes) records. Combined, we are facing many TB of data. Each record will be encrypted independently, using a ...
0
votes
0answers
12 views

Counter block problem using aes-ctr decrypt from pycryptodome [migrated]

So I am trying to decrypt a connection over SSH using pycryptodome. I have the key and the IV extracted from memory (I am working inside a virtual environment), which are 100% correct, which were used ...
1
vote
1answer
828 views

How Secure is gpg Command Using Symmetric AES-256 From Being Cracked

How secure is any data encrypted using the following command: gpg -o *encrypted_output_file_name* --symmetric --cipher-algo AES256 *file_to_be_encrypted* Can ...
3
votes
1answer
124 views

What is the most secure way to check that a given masterkey is valid?

For the purposes of learning, I'm writing a small utility that allows encrypting a list of passwords using a single master key (using AES-256 and PBKDF2) Before encrypting or decrypting any password ...
1
vote
1answer
64 views

Protocol Design for IoT devices having PSK using AES-GCM

Handshake: 1) Client To Server: "AES-GCM(Client_random_128bit,client_iv,psk),client_id,tag,client_iv" 2) Server To Client: "AES-GCM(Server_random_128bit,client_iv++,psk),tag ...
2
votes
1answer
100 views

Guessing the key in AES256-GCM? [duplicate]

I assume that my case is weird but I've the following information: IV: 0x263e or 0x3e26 Auth tag: 0x25 AES256-GCM encrypted payload: 0x4eec96df534ade4c013a AES256-GCM decrypted payload: ...
3
votes
1answer
359 views

Do aes_256_gcm IVs just need to be unique for that key?

I'm using GCM (via openssl's EVP_EncryptInit_ex(ctx, EVP_aes_256_gcm(), NULL, NULL, NULL))). The IV's default length is 12 bytes. It says that the IV must be ...
2
votes
1answer
1k views

AES-256 password cracking time

My question is kinda simple. I want to use AES-256 encryption to encrypt my backup. Using a password like this: ...
2
votes
1answer
192 views

Is it possible to reverse Ansible vault data?

I would like to publish on github a full set of ansible playbooks. Some files contains sensitive data, so I have 'vaulted' them, encrypted. You can find the format description here and some relevant ...
3
votes
1answer
1k views

Why can't decrypt with OpenSSL if salt changed (for CBC and ECB)

A file encrypted with OpenSSL (with, for example, AES 256-bit mode CBC) using the Linux command openssl enc -aes-256-cbc -in texte -out encrypted_texte -k password ...
1
vote
0answers
269 views

Encrypt multiple files with OpenSSL securely [closed]

I wish to encrypt potentially gigabytes of data on my pc, and I wish to be able to decrypt and use those files. However, I am a noob, so bear with me. My idea is to use ...
3
votes
1answer
151 views

What are the disadvantages of XOR key derivation?

Assume a 256-bit Key and a 256-bit Salt, with uniformly distributed entropy, both fully independent. Assume ...
68
votes
1answer
96k views

What is the difference between PKCS#5 padding and PKCS#7 padding

One runtime platform provides an API that supplies PKCS#5 padding for block cipher modes such as ECB and CBC. These modes have been defined for the triple DES, AES and Blowfish block ciphers. The ...
3
votes
1answer
235 views

Is order of Correlation Immunity of AES S_box Zero?

I am working on AES S_box and trying to find out its properties like Correlation Immunity, Balancedness, Algebraic Degree, ANF form etc. These Papers 1, 2 give a nice definitions to above said terms. ...
8
votes
2answers
3k views

How bad it is using the same IV twice with AES/GCM?

I understand that initialization vectors (IV) should not be used twice when using AES/GCM. I am using a counter as an initialization vector. Every time I send out a new packet (I am developing an UDP ...
3
votes
2answers
65 views

Why BouncyCastleAesCbcBytesEncryptor is using a salt and an initialization vector?

I'm using the class BouncyCastleAesCbcBytesEncryptor from Spring Security. One of the constructor has the following signature: ...
1
vote
0answers
40 views

Acceptable points of failure when applying encryption in an application [closed]

I am working an a Windows application that will encrypt and decrypt files using AES Encryption. The 32 byte key which is diversified and derived using a ATSHA204 unique serial number and some addition ...
0
votes
0answers
22 views

what is the probability of breaking AES algorithm in GCM mode if the Initialization vector and the key is kept fixed and secret? [duplicate]

we use 6 bytes of data and initialization vector is kept secret and fixed and a secret key is used. what is the probability of hacking? the possibilities 2^128 increase or decrease and to what extend?
3
votes
5answers
6k views

Why don’t all AES encryption tools produce the same key from the same password?

Alice and Bob meet regularly. They have agreed face-to-face a 128 bit password which they want use to encrypt/decrypt emails written between them. They decide to use 256-bit AES. Alice wrote her ...
3
votes
1answer
187 views

AES-XTS vs AES-CTR for Write Once Storage

I have a disk on which each sector can only be written once (like a journal, only appending is possible). Unused sectors are reported as being filled with zeroes, while used sectors should not be ...
1
vote
0answers
40 views

How to find multiplicative inverse of a hexadecimal number in the finite field GF(2^8)? [duplicate]

I am new to cryptography. As I was reading a note regarding S-box construction, I found a step mentioning multiplicative inverse of a number in the finite field GF(2^8). I couldn't understand it!! Can ...
1
vote
2answers
113 views

Can AES ans SHA-2 algorithms be implemented in parallel?

As I understood AES GCM mode of operation gets good performance result because parallel execution of both encryption and hashing part. Why AES and SHA-2 computation cannot be pipelined ?
0
votes
1answer
44 views

Does GCM improve the strenght of weak passwords?

If I am encrypting a file with GCM/AES256 with a weak key (say a sha256), does the fact that it takes time to brute force a long message improve my security? Example: I use the sha256 of "ARainyDay" ...