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
25 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
47 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-...
0
votes
0answers
43 views

A problem with implementation of AES in Python [on hold]

I am learning Python implementation of AES on github And when I came across the encrypt() function, I got a problem. Compare with the Standard (Figure 5. Pseudo Code for the Cipher), it seems that ...
4
votes
2answers
86 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 ...
2
votes
0answers
30 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 ...
3
votes
2answers
57 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
36 views

Acceptable points of failure when applying encryption in an application

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 ...
-1
votes
0answers
25 views

Web Crypto: What is the differance between wrapKey and normal encryption? [duplicate]

I can wrap a key with wrapKey but i also can encrypt the key again with the normal encrypt method. So what is the differance and the benefit of wrapKey?
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?
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 ...
0
votes
1answer
43 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" ...
0
votes
0answers
15 views

AES - How do I write Inverse Sub Bytes in C++? [migrated]

How do I write Inverse Sub Bytes for AES Decryption in C++? I only found Sub Bytes for AES Encryption, which is shown below. ...
1
vote
1answer
50 views

Difference with round keys and round constant in AES

I am confused with round keys and round constant in AES. Are they the same? Can someone explain it to me?
2
votes
1answer
36 views

Finding the AES key with access to the function

Say an attacker has access to a non-rate-limited API that takes (IV, data) and outputsAES-CBC(key, input, data), with the key ...
26
votes
3answers
301 views

Why does BitLocker not use RSA?

If understand correctly from this post and the Wikipedia page for BitLocker and TPM, by default, BitLocker uses symmetric cryptography like AES. However, TPM is capable of performing RSA encryption. ...
1
vote
1answer
62 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 ...
0
votes
1answer
26 views

How many bytes of the last keystream block are used to XOR the final block of partial plaintext in CFB, OFB & CTR modes?

I apologize if this is a dumb question but I'm trying to understand how the final block of partial plaintext is XORed using only n number of bytes in the final keystream block. How do we determine ...
1
vote
0answers
45 views

How to implement correctly a “secure” authentication protocol? [closed]

Due to my lack of knowledge in this matter I am facing some problems to identify which features are sign of a bad implementation of a symmetric authorization application. As I am concerned the system ...
1
vote
2answers
91 views

How to implement correctly an Integrated Encryption Scheme?

I am developing a REST client (from an Android Point Of Sale) where I'm given a public RSA 2048-bit key and I need to encrypt transaction information. Since that single block cannot be encrypted (and ...
0
votes
0answers
42 views

How to change the known ciphertext so the known plaintext is changed in AES CBC mode?

I already read a blog about the padding oracle and also some posts about how to change the plaintext but it didn't work out. So I have the encrypted cookie (AES_CBC): ...
8
votes
3answers
1k views

Can a zero nonce be safely used with AES-GCM if the key is random and never used again?

I could generate a random nonce and prepend it to the ciphertext, but storage space is at a premium and the only constraint AES-GCM has on the nonce (if I'm reading correctly) is that the same nonce ...
2
votes
1answer
43 views

I need help determining the best encryption options based on System.Security.Cryptography in .NET

I asked a question here, and received a great summary but was redirected here. Covering the answers of the post, it was noted and suggested that: Use of plain (CBC) mode. They suggested to use GCM ...
1
vote
1answer
41 views

AES, CMAC and “3 pass authentication protocol” Explained

I am struggling a bit to understand how authentication systems are properly used in NFC tag environments so I'm posting this thread to clarify some concepts.(In advance, this is not my field, so ...
1
vote
0answers
39 views

AES: Why ShiftRows() before MixColumns()? [duplicate]

In above picture you can see a AES state array over 2 rounds through the S- and P-Boxes of AES. It's taken from here and intends to show how 2 rounds of transformation are necessary to achieve full ...
4
votes
1answer
74 views

The small key-search circuit for brute-force of Bernstein

I'm trying to understand Understanding brute force by Bernstein. I couldn't understand how the described machine can brute force the AES. The attacker builds a very small key-search circuit. The ...
4
votes
2answers
97 views

What's the reason for Monte Carlo tests for block ciphers?

NIST specifies that implementations were required to create Monte Carlo test vectors for ECB and CBC mode for the AES competition. What's the reason for these tests? The only thing I can think of is ...
2
votes
1answer
47 views

Inconsistency with PKCS#11 v2.40 CKM_AES_KEY_WRAP_PAD

There appears to be some inconsistencies between the PKCS#11 v2.40 Current Mechanism Specification and the specification for AES Key Wrap Pad as defined in SP800-38F. First, according to PKCS#11: ...
1
vote
0answers
61 views

Weak/Vulnerable AES Implementations [closed]

I'm trying to complete a cryptography CTF challenge in which I have a cipher I'm supposed to attain the original plaintext from. I have reason to believe it's been encrypted using AES, but I'm unaware ...
1
vote
1answer
61 views

AES: Given two deterministic plaintexts, compute two keys let the ciphertext is the same, is it possible?

Given two plaintexts $p_1$ and $p_2$, is it possible to find two keys for AES(-CBC) so that $$E_{k_1}(p_1) = E_{k_2}(p_2) $$ I want to make sure that will never happen, or is there any way to ...
7
votes
1answer
3k views

AES: Why is it a good practice to use only the first 16 bytes of a hash for encryption?

I'd like to encrypt Text with AES/CTR and a password defined by the user in java. I already checked the internet (and stackoverflow) for answers. The most used version is to hash the user password ...
3
votes
1answer
731 views

Is it possible to mathematically extract an AES key from black-box encrypt/decrypt hardware?

I presented our mathematician with an idea: If you have a black box that encrypts or decrypts AES with the same 128 bit key (you don't have any direct access to the key), and you control the input ...
1
vote
0answers
94 views

If the S-Box is given. How to calculate the affine transformation matrix?

Example using SAGE sage: sr = mq.SR(1, 1, 1, 8, gf2=True) sage: S = sr.sbox(); S (99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, ...
2
votes
1answer
103 views

Is this protocol for masking DB ids sound?

Problem Statement I don't want to expose my internal database ids (or other internal private ids) so to make it harder to abuse them, by e.g. guessing the next id of a sequence or similar. It is not ...
1
vote
1answer
64 views

Are there any security drawbacks for simply encrypting and MACing my JWS token (JWT)?

This question, while related, doesn't answer the security aspect I have in mind. I understand that signatures make it impossible for the tokens to be modified. But if I want the JWS token content to ...
0
votes
0answers
17 views

Effects on security of each stage AES [duplicate]

I was thinking about what happens if we ommit one operation of AES. If we ommit ADDROUNDKEY then AES is trivial. But what happens if we ommit SUBBYTES? I was thinking about the linearity of the ...
2
votes
1answer
68 views

Length of password requirement using openssl aes-256-cbc

I am using the following OpenSSL command to AES 256 encrypt a file: ...
23
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
173 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
14 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 ...
1
vote
1answer
60 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
71 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 ...
4
votes
2answers
187 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 ...
2
votes
1answer
96 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: ...
0
votes
0answers
59 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
63 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
36 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
39 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
218 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?