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.

Filter by
Sorted by
Tagged with
1
vote
0answers
44 views

What if an AES Whitebox 1024-bit (or larger key) is created? Does it increase complexity consistently?

Following the Chow et al paper and Muir's tutorial, I was able to implement the AES algorithm using tables embedding keys of 128, 192 and 256-bit sizes, later extended to 1024, 2048 and 4096-bit sizes....
1
vote
3answers
92 views

AES Cipher Block Chaining 128 bit message

I understand that for AES CBC you need to split the plaintext up into blocks and perform XOR'ing using the previous blocks calculations etc. However, if your message is exactly 128 bits long, do you ...
3
votes
2answers
661 views

Is it possible to identify a Serpent encryption key in memory?

It has been shown that AES keys that are in use can be identified in memory. This identification relies on discovering expected round keys in memory that are contained within the key schedule. My ...
2
votes
1answer
103 views

XTS or XEX mode?

Modern hardware and software disk encryption uses AES mode of operation. But XTS was designed to "pad" the last block when the disk sector was not divisible by block size. However all typical disk ...
3
votes
1answer
86 views

Best practices for IV generation

What are the best practices for IV generation for AES and other algorithms? Is RNG enough? What if I cannot use RNG and need to use a variable that is related to some characteristic of the ...
2
votes
0answers
54 views

Extracting RC4 and 3DES keys from system memory

I have read papers [1], [2] that have presented techniques on extracting symmetric encryption keys from memory during the process of encryption. There are tools [3] that can extract AES keys from ...
0
votes
0answers
42 views

Encrypting data on both iOS and Android without external dependencies (can I use AES-CBC?)

I am trying to achieve AWS KMS envelope encryption on both iOS and Android. From the KMS API I get a 256 bit data key in both plaintext and encrypted forms (encrypted by a master key held only on KMS ...
0
votes
1answer
61 views

AES CCM replay attack and nonce

My wireless sensor nodes and gateway application use timestamps as nonce and will guaranty that different messages use different nonces so security is not compromised. If for some reason the gateway ...
0
votes
1answer
35 views

Signing AES Cipher

Alice and Bob have a pre-shared long-term Ed25519 key used for veryfying/signing ephemeral keys. They have a shared key which resulted from the DH exchange. They compute HKDF SHA256 of the shared key ...
3
votes
1answer
106 views

Why weak modes of operations are not banned?

If some modes of operations of AES are not secure (like ECB or CBC), which are prone to bit flipping / manipulation attacks, and why they haven't they been banned or advised against by NIST for other ...
5
votes
2answers
697 views

Does AES-ECB with random padding added to each block satisfy IND-CPA?

I present a modified version of AES-ECB. Suppose I want to encrypt the string hello, world. this is a test. For each block, I use the first eight bytes as my actual ...
1
vote
1answer
49 views

Disk encryption with AES

have few more questions about disk encryption with AES cipher: Do we consider all zeros (0000000) as empty block of data or is it still a data? Do we really need padding to the data blocks if a disk ...
0
votes
0answers
24 views

AES Stream Cipher Mode Key Reuse With Random IV Per Message [duplicate]

Im using AES OFB mode, which is a stream cipher. It will be used to encrypt many seperate small amounts of data in very short amounts of time. If for every separate piece of data encrypted I use a ...
0
votes
1answer
45 views

AES key vs sector key

I have read about AES and different modes of operation (CBC, ECB etc) and have 2 questions related to disk encryption: -AES data block is 16 bytes - how does it relate to sector sizes on the drive ...
2
votes
0answers
16 views

What should the hamming weights be between every iteration of AES?

I have an assignment where I have to print out the hamming weights between every iteration of AES's diffusion steps and I have been getting a maximum weight on every iteration, but I can't seem to ...
2
votes
1answer
67 views

How does gpg know what cipher algorithm is needed for decryption?

I am using gpg to make encrypt a tar.gz. My first try uses --verbose --symmetric and then the decryption is done with ...
2
votes
1answer
81 views

Why can't AES-GCM be used in IKEv1 phase 1?

I was configuring a VPN on a firewall (fortigate) and realized that I could use AES-GCM for encryption in the IKEv1 phase 2 but not in the phase 1 and I was wondering why knowing that in IKEv2 we ...
1
vote
2answers
83 views

Hybrid cryptosystem

I'm using RSA (4096) and AES GCM (256) to exchange messages between A and B. A random key for AES is generated, the plain message is encrypted with AES, and the random AES key is encrypted with Bs ...
4
votes
1answer
111 views

Is AES in XTS mode insecure for data stream encryption?

Can anybody explain to me why AES in XTS mode is supposedly insecure for data stream encryption? I have been unable to find a clear explanation for this.
0
votes
1answer
104 views

Which is the best AES mode of operation? [closed]

Is there any reason to choose, say ECB over CBC? Or GCM over AEX? Or CTR over CFB? Is there a best AES mode of operation? And, when required, which is the best padding to use?
0
votes
1answer
103 views

Why is $S(y) = y^{2^8-2} = y^{254}$ a one-to-one function and a permutation on $GF(2^8)$

I'm taking a course on cryptography and I have some confusions concerning the materials in our notes. Say we have the field $GF(2^8)$, we create a substitution algorithm (the S Box in AES) so we need ...
1
vote
1answer
62 views

Why algorithmic symmetry is important in hardware implementation?

In AES, the encryption and decryption functions ordered in a symmetric way, I mean the same order of functions are used inside the round structure of both encryption and decryption (subbytes, ...
2
votes
0answers
48 views

Complexity of AES key reconstruction from state 1 output and plaintext

Assuming that I am able to read the plaintext as well as the output of round 1 of an AES-128 encryption: Is it possible (if yes: how?) to obtain the RoundKey with a lower complexity than brute-force ...
1
vote
1answer
158 views

Authenticated AES 256 CBC HMAC SHA512 - What's the right way to implement in C#? [closed]

I have a "Encrypt-then-Mac" C# implementation of "AE_AES_256_CBC_HMAC_SHA_512" WITHOUT associated data, only authentication. In my code, I follow these steps to encrypt strings: Generate a crypt ...
0
votes
1answer
71 views

AES Threat Model

I've read/skimmed a few documents about the AES family of encryption, but haven't seen anything about what exactly it protects against. There are many ways to "encrypt" things, and not all of them ...
1
vote
1answer
79 views

What is the relation between AES and PTK in WPA2 wifi

I know that modern wpa2 wifis use AES key to encrypt data. a client who has the password, can obtain psk/pmk use it for handshaking . so what is the purpose of ptk, and how AES key is generated?
0
votes
1answer
84 views

Is using the same MAC twice insecure?

I was thinking last night about whether or not a HMAC-Encrypt-HMAC would be secure if you used the same HMAC key. Here is the full recipe: Compute a HMAC on the data to encrypt, and append it to the ...
1
vote
2answers
98 views

AES-128 with doubled 8Byte key

Assuming I encrypt data with AES-128 and a random 8-byte key x in the following way: ...
1
vote
1answer
43 views

Size of Key Material of TLS_DHE_RSA_WITH_AES_256_CBC_SHA

What is the size of key material required for generating MAC keys, encryption keys and IV when use TLS_DHE_RSA_WITH_AES_256_CBC_SHA ? How to calculate it?
1
vote
1answer
95 views

AES-128: can any two keys generate the same ciphertext from the same plaintext?

This is a purely theoretical question. I've found some similar questions, but they're not what I'm asking. Most importantly, I'm not asking whether anyone can find the hypothetical duplicate. I'm not ...
5
votes
1answer
91 views

AEAD (for AES128-GCM): is it necessary to add a zero-length AAD?

In an implementation of AEAD_AES_128_GCM, if the AAD is defined as a "zero-length octet sequence", is it necessary to call the encryption code that adds an AAD at all? In particular, does an OpenSSL/...
4
votes
3answers
961 views

Should we run PBKDF2 for every plaintext to be protected or should we run PBKDF2 only once?

I am going to store secrets from users. The secrets need to be stored confidentially. For this question, I am concerned only with confidentiality (not integrity). Here is how my encryption scheme is: ...
4
votes
1answer
92 views

Fundamental difference between the constant, key, nonce, and counter bits in Salsa20/ChaCha20 or AES-Encrypt?

The Salsa20 core function takes a 128-bit constant, 256-bit key, 64-bit counter, and 64-bit nonce and produces a 512-bit value. Or more generically, it is a mapping from 512-bit values to 512-bit ...
2
votes
4answers
174 views

Is an invulnerable code possible (including brute force attack)?

If I double encrypted a text with for example AES wouldn't it be invulnerable to bruteforce attacks due to the computer not knowing when it has reached the plain text? Plain text->1st layer of ...
0
votes
1answer
75 views

How DES/AES can guarantee by feeding different secret keys, the encrypted outputs are different?

I am learning the meet-in-the-middle on DES attack. I understood the basic logic behind how it is performed; however, one further question is: why can we guarantee to find one and only one pair of k1 ...
-2
votes
1answer
123 views

AES encryption with 2048-bit RSA key

I have the following draft to keep my data secure in transit. Generate 2048 bit RSA key sha256sum that private key and use that sum as aad, key and iv parameters in the following aes encryption ...
2
votes
1answer
117 views

Using an AES-256-GCM key as a salt to SHA-256

Assume 256 bit keys are randomly generated and data is encrypted using AES-GCM-256 prior to being sent to a server. The goal is to enable the server to determine uniqueness of data it receives ...
0
votes
0answers
16 views

Are there any specific weakness in this crypto implementation?

I am reverse engineering the firmware of a particular router/modem. I am focusing on the functionality to export the router configuration. I an searching for a way to decrypt the configuration backup ...
2
votes
3answers
177 views

Use a SHA256 as a key for AES256

Is it safe to use the SHA256 of a hard-to-bruteforce string as the key to encrypt data with AES256?
1
vote
1answer
120 views

Is it safe to reuse the password when using AES-CTR with scrypt?

I want to encrypt several files with the scrypt encryption utility. Here is an overview of its file format, which gives an indication of what it does: ...
3
votes
3answers
368 views

What security risks does exposing the size of the plaintext entail?

For this question my focus is exclusively on symmetric block ciphers (with a particular interest in AES256 in CBC mode). I have read much discussion on various ways to pad the plaintext so that the ...
13
votes
3answers
6k views

How do I detect a failed AES-256 decryption programmatically?

I have implemented a simple encryption/decryption program based on AES-256 in CBC mode1. Actually, it is more precise to describe it as a compression+encryption / decryption+decompression program. ...
2
votes
2answers
145 views

Any benefit to encrypting IV and MAC in a mode like AES-GCM or ChaChaPoly?

Would there be any benefit to symmetrically encrypting the IV and MAC in an AEAD mode of operation? More specifically would this prevent someone from exploiting the accidental use of a duplicate IV ...
-3
votes
1answer
52 views

Is this a Matrix for AES, and why? [closed]

My task is to check if this S-BOX is an AES S-BOX. My Idear is, that you cant use it because 16 - 10 and 17 - 9 will give you the same output. Given Matrix:
1
vote
1answer
68 views

Decrypt authenticated cipher while still encrypting [duplicate]

Normal AES-GCM generates an authentication tag at the end of encryption. I want to decrypt it while it is still being encrypted. This would be useful to send, encrypt, receive and decrypt a large file ...
1
vote
1answer
328 views

Is the Java function AES/CBC/PKCS5Padding vulnerable to padding oracle?

I have an application that stores data on the devices. Currently AES/CBC/PKCS5Padding from javax.crypto.Cipher(see reference) is ...
2
votes
1answer
55 views

Understanding need for PKI

For simplicity let's say I only have RSA and AES on my hands and I want Alice to talk with Bob over a secure channel. With secure I am implying no MITM and Alice and Bob know they are talking to each ...
3
votes
1answer
308 views

AES-CBC streaming configuration IV usage

I am interested in the implications of using AES-CBC in a streaming configuration. Reading the specifications of a few protocols I notice that when using AES-CBC they include IV + ciphertext + HMAC ...
1
vote
1answer
104 views

Is it possible to truncate AES output and keep uniqueness (no decryption needed)? [duplicate]

I would like to hash numbers less than 1000000000, so generally they could be stored on 30 bits. The aim is to obtain numbers that are not reversible, so my initial plan was to use SHA256 (with some ...
2
votes
1answer
99 views

Is there any asymmetric encryption algorithm for eliptic curve(secp256k1) without AES? [duplicate]

I am looking for asymmetric encryption using SECP256K1. But all over the internet, I see that it also requires AES encryption. Instead of generating an AES secret key, is it possible to encrypt using ...