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.

2
votes
1answer
9 views

Length of password requirement using openssl aes-256-cbc

I am using the following OpenSSL command to AES 256 encrypt a file: ...
0
votes
0answers
49 views

What does XOR mean in regards to AES cryptography? [on hold]

This might be too basic to answer but I am learning about the different modes of operation and I am trying to grasp the material and having trouble deciphering the meaning. I was just wondering if ...
22
votes
1answer
3k views

Why does AES have exactly 10 rounds for a 128-bit key, 12 for 192 bits and 14 for a 256-bit key size?

I was reading about the AES algorithm to be used in one of our projects and found that the exact number of rounds is fixed in AES for specific key sizes: $$ \begin{array}{|c|c|} \hline \begin{array}...
4
votes
0answers
109 views

Why does the Signal protocol use AES/CBC instead of AES/GCM?

AES/GCM has obviously proved itself to be better than AES/CBC. Unless the key is re-used with the same initialization vector (see disadvantages of GCM). More information of its advantages against CBC ...
0
votes
0answers
12 views

I2P Tunnel Creation Build on Request Record Question en(de)cryption method

Not sure if anyone here can help, but if so, sure would appreciate the help. If we read the https://geti2p.net/spec/tunnel-creation documentation page on how I2P creates a tunnel, we can read on the ...
0
votes
1answer
53 views

Does encrypting a result of AES block cipher provide more security?

I would like to know if encrypting a result of AES256 block cipher provides more security. Concretely, I am developing a system in which a client sends to a server a ciphertext encrypted with AES256. ...
2
votes
1answer
56 views

Attacking AES using Round 1 output

I was reading the paper Differential Scan Attack on AES with X-tolerant and X-masked Test Response Compactor and I have a question in the section Differential Scan Attack on AES. What I understand is ...
3
votes
2answers
108 views

Deterministic Encryption using AES

I am in need of a deterministic encryption algorithm I can use on social security numbers (9 character string, numbers only) that I will store encrypted in a MongoDB and need to be able to search for ...
0
votes
0answers
57 views

Calculating the inverse for a Rijndael s-box [duplicate]

I want to calculate a Rijndael S-box but something went wrong. How can I calculate the inverse? In the following is my approach: given: $f(x)=x^8+x^4+x^3+x+1 \rightarrow$ binary: 100011011 0x12 = ...
1
vote
1answer
50 views

AES-GCM cipher tag and IV size, while attempting to render encrypted ciphertext useless by removing them

I'm using AES in GCM mode of operation for encryption/decryption & authentication of segments of data in a file. The layout of each segment can be summerized by this diagram. Each segment is ...
0
votes
0answers
35 views

I calculated multiplicative inverses of my polynomial in AES using the EEA. How do I find the multiplicative inverses using Fermat's Little Theorem? [duplicate]

How do we find multiplicative inverses using Fermat's Little Theorem? I have the basic understanding of how we compute inverses of numbers, but can someone help with calculating inverses of ...
0
votes
0answers
29 views

Aes brute force when part of data known [duplicate]

I have buffer of 16 bytes that encrypt with AES 128 cbc with IV =000000......(all IV is 0) I have the encrypted buffer, and I know 7 bytes from 16 bytes before the encryption , I dont know the key . ...
1
vote
1answer
35 views

While doing the affine mapping after calculating the inverse of my polynomial using the EEA, I am not getting the value of the inverse as it should be

This is the image of matrix multiplication. It is the affine mapping step in the s box layer of AES. My value is not what it should be, therefore I just wanted it to be confirmed by someone else. I'...
0
votes
1answer
77 views

How many bytes of data does AES 256 encrypt at one time?

Since the block size of AES 256 is 256, how would we calculate the bytes of data AES 256 encrypts at one time?
0
votes
0answers
8 views

Disabling the AES cipher suites without ECDHE key exchange algorithm [migrated]

Currently, we are having below cipher suites used in our platform. AES128-GCM-SHA256 AES128-SHA256 AES128-SHA ECDHE-RSA-AES128-GCM-SHA256 ECDHE-RSA-AES128-SHA256 ECDHE-RSA-AES128-SHA Post ...
2
votes
1answer
49 views

What is the difference between the 23 bi-affine and the 39 fully quadratic equations of the rijndael sbox?

In Cryptanalysis of Block Ciphers with Overdefined Systems of Equations Nicolas Courtois and Josef Pieprzyk define 23 so called bi-affine equations (in Appendix A of the paper) between the input x and ...
2
votes
1answer
36 views

Does the AES-KW (Key Wrap Algorithm) perform authenticated encryption?

The RFC for AES-KW doesn't actually mention authentication, only integrity, where the unwrapping/decryption process should produce an identical IV of ...
0
votes
1answer
56 views

The role of IV when AES is used as $PRF$

We want to use AES as a pseudorandom function. Given a random master key, we want to derive a set of pseudorandom values/keys, e.g say $n$ keys. Then from each of those derived keys, we want to derive ...
0
votes
0answers
9 views

What is the length of ciphertext for AES encryption using C#? [migrated]

From: Can we calculate AES ciphertext length based on the length of the plaintext? I see: output_size = input_size + (16 - (input_size % 16)) But this does not seem to correspond with what I see ...
2
votes
1answer
39 views

Encrypt challenge instead of storing it on the server

My server and my smartcard (MIFARE DESFire) want to establish that they have the same shared AES key. They want to do that with an untrusted client in the middle. Usually it works like this: Now ...
2
votes
0answers
65 views

Is AES resilient to chosen plaintext with access to related keys (key expansion primitives)?

I'm interested in knowing whether a cryptosystem is broken given access to a few primitives. $\DeclareMathOperator{\KEYEXP}{KEY\_EXP}$ $\DeclareMathOperator{\E}{E}$ Suppose that you have access to an ...
2
votes
1answer
71 views

Using a KDF (PBKDF2) properly

I am new to crypto. I have a password for my user, e.g. &&38:while:HAVE:havana:60&& I want to encrypt several documents with 10 pages each with AES....
0
votes
1answer
65 views

Can block ciphers encrypt messages larger than the key length?

I am trying to learn some basic cryptography and I am reading some conflicting statements about block cipher. My current understanding is that we start with an XOR to obfuscate our data. We can then ...
2
votes
1answer
50 views

HMAC computation using AES key

I want to compute an HMAC value of a data set using CKM_SHA256_HMAC mechanism with AES key. I have the error code CKR_KEY_TYPE_INCONSISTENT because it seems that I need to use a key of key_type ...
0
votes
1answer
63 views

What if AES-128 key / text length is more or less than 16 characters

In this example ( https://kavaliro.com/wp-content/uploads/2014/03/AES.pdf ), the AES-128 key and text are 16 characters each, but how would this example be explained if the key or text was more/less ...
3
votes
2answers
126 views

Efficient pen-and-paper calculation of the Galois Field multiplication?

I have been reading on multiplication over GF for the Inverse Matrix Step in AES, and I feel like converting the hex numbers to binary, multiplying them and then doing the modifications required for ...
1
vote
1answer
123 views

AES oracle with bad S-box

Say you run in to a messed up AES (128) implementation which has the s-box configured as [0x0, 0x1, ..., 0xFE, 0xFF] and where you can query a few plaintexts to get the corresponding ciphertexts. How ...
1
vote
0answers
49 views

Difference in the key schedule of AES for decryption given different orders of operation

As per the Stallings book, the normal decryption of AES has different sequence of transformations [method 1 below], which leads to two separate software or firmware modules and that is undesirable. ...
0
votes
1answer
36 views

how to compute IV with AES CTR if key, plaintext and ciphertext are known?

Given $E_k$, which a block-cipher using the (known) key $k$, and a plaintext-ciphertext pair $(p,c)$ where $c$ is the encryption of $p$ using CTR mode, can the initialization vector be recovered using ...
3
votes
3answers
521 views

Truncating the output of AES-128

I'd like to use the output of a pseudorandom function (PRF) as a one time pad. I want to use AES-128 (as it's commonly used as a PRF). As we know AES-128 output 128 bits. Question: Would be secure ...
12
votes
1answer
2k views

Can neural cryptanalysis be applied to AES?

In this Wikipedia article about Neural cryptography (section applications) it states: In 1995, Sebastien Dourlens applied neural networks to cryptanalyze DES by allowing the networks to learn how ...
-1
votes
2answers
106 views

Can you encrypt a 256bit password with a 256bit key so that it cannot be bruteforced?

Lets say we have an arbitrary but dictionary attackable password that is less than 256bit. (Lets just say the password is '1234Password'). We encrypt this password with a securely random 256bit key ...
3
votes
1answer
88 views

AES-128 (CBC) brute force given 90+ rightmost bits of key, known IV and Ciphertext?

Given: Known ciphertext (in hex) (ciphertext is the exact length of the message (i.e. non-padded). It is known that the cipher was developed using CBC. There is one and only one ciphertext message ...
2
votes
1answer
55 views

DES/AES invertibility

My professor has posted a couple of practice questions that so far I haven't been able to find the answer for and I was hoping you could help. DES would remain invertible—it would still be ...
0
votes
1answer
35 views

Caculating Correlation for CPA attack on AES

I am having some trouble understanding how to calculate the correlation coefficient for CPA attack on AES. In the article Study of Deep Learning Techniques for Side-Channel Analysis and Introduction ...
4
votes
2answers
164 views

Is it hypocritical to use AES-256 and RSA 2048 in the same application?

I see a common claim that AES-256 is the gold standard and is good future proofing, often in the same wind as "just use 2048-bit keys for RSA". Security documents seem to recommend both AES-256 and ...
2
votes
1answer
48 views

Extracting Zip using Only the AES Key

I have set myself a little challenge, to see if I can decrypt my own text file from with a ZIP file... The AES Key from my encrypted ZIP is all I have managed to extract, how do I decrypt the ...
0
votes
2answers
61 views

Question about IV from CBC/AES-256

I'm developing a program to encrypt and decrypt a file with AES-256/CBC in Java. And I want it to be safe enough. In my case, I generated random AES key for each file to encrypt and decrypt them. My ...
0
votes
2answers
90 views

Why does Laravel only support AES-256-CBC?

Modern Laravel uses OpenSSL to provide AES-256-CBC encryption along with a MAC. However, I was under the impression that this is not a particularly secure approach. Why does Laravel only support AES-...
1
vote
1answer
69 views

Alter plaintext through IV in block cipher AES in CBC mode

IV: 69bb375aa919c72aa561dd7b7ffacf66 Ciphertext: "c28ea025d10186510855d083747d6435c808d9857075abd9bfc54b094e60eaf3" Plaintext: "SEND ENCRYPTED DATA" I want to be able to change the resulting ...
3
votes
2answers
341 views

Encrypting between nodes that have RSA keys: Diffie-Hellman or random secret key?

I have two peers with RSA keys; they want to encrypt a non-trivially sized message between them, so I want a random AES symmetric secret key, which is encrypted with Bob's public RSA key, and sent ...
2
votes
1answer
83 views

Does Java SunJCE Provider use AES for encrypting nonce in Poly1305?

RFC 8439 states: AES is used there for encrypting the nonce, so as to get a unique (and secret) 128-bit string, but as the paper states, "There is nothing special about AES here. One can replace ...
0
votes
1answer
38 views

What is the purpose of multiple key addition layers in AES?

I understand the purpose of the SubBytes layer (confusion) and the ShiftRows and MixColumns layers (diffusion). But I don't see the purpose of having more than one key addition layer. What I've been ...
2
votes
1answer
56 views

What should I use for consequent AES key derivation?

I am writing a small chat program to explore some methods and concepts in cryptography and currently I am using a shared AES key tunneled with RSA which upon further reading revealed many flaws both ...
1
vote
2answers
274 views

In which cases AES doesn't need IV?

I was trying to decrypt a text encrypted with AES and ECB mode. I did try several key and IV. I solved it by ignoring IV. (The IV was given, but it was maybe a distractor) My question is in which ...
2
votes
2answers
355 views

AES256 GCM IV guidelines

If I use for example AES256 (GCM), and my message is bigger than 256bit (breaked into smaller 256bit blocks for encryption), should the IV change every 256bit of the message?
1
vote
1answer
63 views

How to determine the fastest OpenSSL cryptographic algorithm

This question does have to do with cryptography, but not necessarily with encrypting meaningful data. This is my first post here, so if I'm going about this question incorrectly please let me know. ...
2
votes
1answer
75 views

AES-CBC ciphertext manipulation with known IV and plaintext! [duplicate]

I'm currently practicing on a purposely flawed login page, where I have to change the value of a cookie to enter. The cookie is an encrypted and encoded form of a simple JSON string with fields "admin"...
0
votes
0answers
31 views

XORing with 1B in MixColumn transformations for AES encyption

In MixColumn transformations in AES encryption, do we have to Xor the shifted input with 1B only when the leftmost bit is high or is it like the number of times we shift it, and then when a one ...
1
vote
1answer
94 views

AES Diffusion at Block Level

AES provides diffusion at the block level by implementing the ShiftRows and MixColumn sublayers. The former permutes data on a byte level, wheres the latter combines blocks of four bytes. Can it ...