Stack Exchange Network

Stack Exchange network consists of 174 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
0answers
50 views

JWK vs. raw for key wrapping

Context (TLDR below) So I’m developing an application that uses a high-iteration-count PBKDF2 algorithm to derive a symmetric AES-GCM key from a user-provided (enforced to be reasonably strong) ...
-1
votes
1answer
110 views

How can I protect AES-256 encrypted data?

In April 2017, Jacob Henning asked "What are the chances that AES-256 encryption is cracked?" and part of his question was how best the transmitted data, now in his web database, a.k.a. "data at rest" ...
0
votes
1answer
372 views

How can I generate key scheduling for AES 256 bit key

I want to implement AES algorithm,instead of 128 bit key encryption I wanted to do it for 256.But I’m stuck at point creating scheduling for 256 key generation. Can anyone help in this.
0
votes
2answers
119 views

TLS1.2 AES 128 CBC Encrypted Data size is not a multiple of block size [closed]

I know that TLS ciphers such as TLS_RSA_WITH_AES_128_CBC_SHA transmit data as shown https://tools.ietf.org/html/rfc5246#section-6.2.3.2. From my understanding the ciphertext MUST be a multiple of the ...
0
votes
2answers
222 views

Which is slower, AES or GCM hash (GHASH), if CPU has no special instructions?

In an answer to this question: Security of GCM if Implemented with Stream Cipher instead of Block Cipher ...it was stated that: The GHASH part of GCM is usually the problematic one when it comes to ...
3
votes
0answers
123 views

AES key reuse between CTR and CBC

The question Given the same plaintext content that is encrypted two times. One time with AES-CTR and the other time with AES-CBC. Both times with the same AES key but with different IVs. What are ...
1
vote
0answers
44 views

Is it safe to calculate the counter based on the block number in the stream rather than increasing it every write?

I've come to use AES/SIC for my purpose as I want to write an encrypted file and read it back with the possibility to seek (I only need to read parts of it and don't want to decrypt the whole file ...
0
votes
0answers
35 views

If an attacker knows 2nd to last AES key/state, can they get the key? [duplicate]

I recall reading somewhere that if an attacker were able to know the 2nd to last round key and/or state in AES that would be enough decrypt the ciphertext. Is that just a rumor and if not, how would ...
2
votes
1answer
115 views

Is it safe to use unauthenticated AES CBC when encrypting random bytes?

I am studying an application with an AES crypto implementation that works that like the following: PBKDF2 is used with X iterations and SHA-256 to generate a 256-bit "master key" from a user-provided ...
0
votes
0answers
49 views

JSON Web Encryption: direct password-based encryption with PBES2

So the JOSE spec describes using password-based encryption for key wrapping, but what about using PBES2 for content encryption directly, rather than using an intermediary key? Here is what I would ...
-1
votes
2answers
147 views

What is the use of Byte-Substitution,Shiftrows,MixColumn steps in AES, if 128 bit key is known for decryption?

I have just started learning AES algorithm. S-Box is using Galois Fields $\text{GF}(2^8)$ math behind its computation and Shiftrows & MixColumn steps also doing some math at both encryption and ...
2
votes
2answers
143 views

Does Diffie Hellman guarantee secrecy?

I am studying my Cryptology exam and one question I got stuck below; Recall the Diffie-Hellman key establishment protocol. Alice runs this protocol over the Internet to communicate with Bob. ...
0
votes
1answer
1k views

Create key for AES-256 in Node.JS [closed]

I'm trying to create a strong key for encrypting some data using AES-256 for fun and practice. For my own practice, I want to make this as strong as possible, I don't care how long it takes to ...
0
votes
1answer
47 views

Which symmetric algorithm should I use for storing files in untrusted servers?

I have gigabites of files, which I have to backup. I have some servers for storing this files. But these servers are untrusted. So I need to encrypt files, then backup files. When my PC breaks down, ...
1
vote
1answer
56 views

Can you point me to an MDS table reference for the Kalyna cipher?

I'm working with cipher Kalyna. Kalyna — like AES — has MDS tables in its MixColumns step. But Kalyna's documentation doesn't list these MDS tables. Could you give me a hint where to find proper ...
0
votes
0answers
180 views

Having trouble with padding oracle attack (in AES-256-CBC)

I have problems in understanding padding oracle attack and testing it on a given ciphertext on a server. The ciphertext is encoded with AES-256-CBC and padding is used such that the encoded message ...
2
votes
2answers
86 views

AES Is it safe to expose the plaintext and cyphertext in the same place,

In a web application, I need to send in a webpage form an id (my plain text) and then retrieve it back when the user submit the form. But i need the id to be protected, so malicous users can't send an ...
0
votes
1answer
77 views

Is this method of speeding up a symmetrical algorithm secure? (AES output joining)

I was trying to find out a way of speeding up a given symmetrical algorithm the reason and programing launguage in this case are unimportant. I have came up with the following thing: Divide data into ...
-2
votes
1answer
54 views

restore an aes-128 key with 5 letters missing

I have an encrypted file which I want to decrypt but I dont know the last 5 letters (which are probably literally numbers / letters) of the key / password. The Initialization vector is known. Is it ...
10
votes
1answer
1k views

After ECDH with Curve25519, is it pointless to use anything stronger than AES128?

Is the following reasoning correct: After ECDH with Curve25519, the resulting shared secret will be an EC public key with a bit strength of 128 bits. This public key would then be hashed (let's say ...
2
votes
1answer
151 views

Is XTS-AES a NIST-approved nonce-misuse-resistant AES mode?

If I use XTS-AES and treat the tweak as a nonce/IV would the result be considered nonce-misuse-resistant? I'm thinking of something like the following AEAD-like scheme: ...
0
votes
0answers
54 views

Why Diaspora Federation pod communication protocol shares AES keys over asymmetric encrypted channels?

As I was looking over the diaspora federation Magic Envelope documentation, I noticed something weird: { "aes_key": "...", "encrypted_magic_envelope": "..." } ...
-1
votes
1answer
274 views

How can you change this message which is in block cipher AES-256 in CBC?

Given is the secret message encrypted with AES-256 in CBC mode 5a04ec902686fb05a6b7a338b6e07760 14c4e6965fc2ed2cd358754494aceffa The first 16 Byte is the initial ...
7
votes
1answer
713 views

TLS 1.2 Cipher Suites With AES-GCM – What data (if any) is passed to the AES-GCM cipher as the Additional Authentication Data?

TLS 1.2 defines a number of cipher suites that employ AES-GCM, e.g.: ...
2
votes
1answer
146 views

Is transporting a salt, IV, ciphertext and HMAC in an encrypted token an acceptable practice?

I’m porting over some crypto code from Mcrypt (deprecated) to OpenSSL. I’m following a process that a former employee implemented, which is as follows: Create a random salt for use in a PBKDF2 key ...
0
votes
1answer
92 views

AES Cryptanalysis

I have a list of 128bit ciphertexts. I know that the plaintexts were encrypted with AES, 256bit key, ECB mode. Same key was used every time. So I know that if I see ciphertexts that are the same, the ...
1
vote
1answer
100 views

Retrieve AES Key

If I have a set of AES ciphertexts, and I know all possible plaintext values. I do not however know which plaintext corresponds to which ciphertext. I also know that the same KEY and IV was used to ...
2
votes
2answers
77 views

How much data do I leak if I use the first bytes of a file as AES-CBC IV?

I found a piece of code that uses the first 16 bytes of the input file as IV. This immediately set off some flags in my head, but I have no idea how bad it really is. So, how bad is it? Obviously we'...
0
votes
1answer
98 views

Padding vs Hashing Encryption Key

I am making a program for personal use that will not contain super-sensitive information. I am using this to explore cryptography. Would it be acceptable to use a password to generate a key for AES, ...
3
votes
2answers
803 views

Are TLS 1.2 AES-CBC and AES-GCM Authenticated Encryption ciphersuites?

In the answer of the following post: Why was AES CBC removed in TLS 1.3?, I quote the following from the chosen answer: After the Lucky13 attack (a timing oracle caused by MAC-then-encrypt), it ...
-2
votes
1answer
130 views

Is AES practically unbreakable? [duplicate]

Is AES practically unbreakable? Is brute force attack practical on AES?
3
votes
1answer
241 views

How is multiplication in field $GF(2^{8})$ done?

I am working on AES and I am stuck on multiplication in $GF(2^{8})$ field. In terms of polynomial it is easy; I just have to multiply polynomials modulo $(x^{8} + x^{4} + x^{3} + x + 1)$. But I do ...
0
votes
1answer
150 views

AES and GOST 28147-89 “Magma” Comparison

I am trying to understand how AES is comparable to GOST 28147-89 "Magma". Like for parameters such as bit shifting and addition of the subkey to the input, which are a part of Magma, what is their ...
0
votes
2answers
34 views

Static ciphertext length for any plaintext length less or equal than x?

I am encrypting buffers using AES-256-CTR encryption. My encryption is working but I have a requirement that I want to make sure I implement correctly. The requirement is as follows: Given any ...
3
votes
0answers
97 views

Optimizing the AES key schedule when round keys cannot be cached

I have an implementation of AES which can cache at most a 256-bit value between encryptions. Currently, the master key is cached and the key schedule is re-computed for each and every block. Is there ...
1
vote
1answer
158 views

Storing Salt in Ciphertext?

I found the cryptomator encryption documentation online, because I was looking for something to learn about x). I altered the process a bit to fit "my need" / so that I would not have a vault, but a ...
1
vote
1answer
268 views

Is it possible to recover an AES encrypted file that was decrypted with incorrect key/password?

I am new to cryptography and have been experimenting with AES to encrypt files. I was testing some code I found online which allows the user to enter the directory of the files that they went to ...
1
vote
1answer
687 views

AES-CBC then SHA vs AES-GCM for encrypting and authenticating a web token

I am trying to have something like JWT but kinda ad hoc and encrypted. The token itself is simply a stringified JSON that contains the user ID and Unix timestamp. Now, I tried to use AES-128-GCM, ...
1
vote
1answer
46 views

Problem with AES128 AddRoundkey Step

I'm trying to self-learn the AES128 algorithm and ran into a snag while following these slides I found online: https://kavaliro.com/wp-content/uploads/2014/03/AES.pdf For the sixth round in the ...
0
votes
1answer
42 views

AES number of Round calculation

I wondering about the formula for calculating the number of AES rounds. The formula is $R=(\text{Keysize}/32)+6$ I would like help understanding why we divided by $32$ and add $6$ in this formula.
2
votes
1answer
129 views

AES-PMAC-SIV AE algorithm

AES-SIV is a very robust and safe algorithm but performance isn't great. AES-PMAC-SIV, should provide a great parallelization, increasing performance and ensuring the same robustness. Indications of ...
1
vote
1answer
30 views

Encryption program conseil

I'm writing a little program to encrypt and decrypt a file. I'm using AES encryption in CTR mode that takes a key generated by a KDF (script). I have read some articles about cryptography but I have ...
3
votes
2answers
112 views

Counter mode with $\operatorname{AES}_k(m)$ vs $\operatorname{AES}_m(k)$

In theory, for an ideal cipher $E_k: \{0,1\}^{128} \to \{0,1\}^{128}$, it would be completely fine to use the key and the input interchangeably, but obviously AES is not perfect. For AES128, the key ...
2
votes
1answer
1k views

8-bit CFB in DES and AES - error propagation

I have two questions for an assignment that I need to answer in relation to Error Propagation in 8-bit CFB mode for AES and DES encryption. The questions are as follows: If there is an error in ...
4
votes
4answers
177 views

Mitigating Side Channel Attack (SCA)

The SCA power attack described in 2016 article called "Power Side Channels in Security ICs: Hardware Countermeasures", depends on the measurement of power consumption fluctuations during AES-128 ...
1
vote
2answers
559 views

Understanding how padding works when using Block Cipher

I'm trying to understand how padding works when using block ciphers. Padding may be required when the size of the plain text is not a multiple of the block size If that's so, then I don't ...
3
votes
1answer
152 views

Combining multiple cryptographic keys to generate an encryption key

We have a system that has several SecretKeys (for example, one for a user, and one for us). We want to encrypt data in a way that requires all of those keys to be available in order to decrypt. I ...
0
votes
1answer
57 views

is it safe to leak some information about scrypt result?

I am encrypting a file via AES-CBC and am using scrypt to extract a key from a user-provided password. The IV is public and is stored with the encrypted file. Is it safe to generate my IV (public) ...
0
votes
2answers
204 views

Key wrapping - encrypting many times with AES-GCM

When encrypting many short plaintexts with a single key, lets say about 2^64 total plaintexts at under 64 bytes each: (edit note - was 2^70 in the original question) Is there a way to use AES-GCM, as ...
0
votes
3answers
352 views

AES Decryption Process

How the decryption process of AES is the reverse process of Encryption process of AES? Mean Reverse in what sense mean final round would be conducted first or steps in each round would be conducted ...