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
1answer
215 views

Hash-Then-Encrypt or Encrypt-the-Hash?

My question is would it make any difference if I use SHA3 and hash a block of data and then encrypt it using RSA is most secure to do the reverse? The question is about Site-To-Site transmission ...
0
votes
1answer
54 views

AES-128 (cbc mode), is it possible to deduce the IV if the plaintext, ciphertext and key are known?

I have the plain text, key and the ciphertext stored in DB. Can I deduce the IV based on this information?
2
votes
1answer
179 views

AES - which cipher is the safest one out there and what are the best practices for creating and storing the key

I just started to learn cryptography. I've read a ton of articles but couldn't find a book or a course that is based on this subject (and also is not outdated). Therefore I have a few questions (...
8
votes
2answers
1k views

Hardware AES: can we have a decryption implementation only?

I'm wondering if implementing only the AES decryption can reduce the hardware cost? And does anybody have some examples of the cost (speed, size) of hardware AES implementation? Thanks, Abaobaide
2
votes
1answer
56 views

Is using derived keys for HKDF + AES-GCM safe

I have an existing system which takes a cryptographically secure BLOB from user and pass it to lower API which calls HKDF-Expand to get 2 keys: one is effectively discarded in this scenario and second ...
2
votes
1answer
71 views

AES ECB mode for both encryption and authentication

Can AES ECB mode be used for both encryption and authentication, assuming the following conditions are always true? Encryption of exactly 128-bit (1 block) size messages Different keys used for both ...
1
vote
1answer
177 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 with with the cipher text?
4
votes
1answer
151 views

Is it ok to transmit an IV as a custom HTTP header?

Considering an AES OFB encryption algorithm, suppose that I'm sending a message over HTTP (not HTTPS) and my message body contains the cyphertext. I'd like to know if transmitting a random ...
7
votes
3answers
1k views

Can I hash a secret key and used the hash as key ID?

I am using AES-CBC to provide confidentiality for protocol messages. I want to allow the receiver to know the secret key by using a key ID. For this I hash the secret key to generate a key ID. Every ...
-1
votes
1answer
46 views

what is the impact of smaller bit size sbox

There are multiple S-boxes type, as DES uses 4 bit S-box and AES uses 8 bit S-box. I want to know how this effect the security?? If we use 4 bit or 8 bit. apart from the DC attack. Both provides ...
1
vote
0answers
43 views

Help decrypting AES-256-CBC data with bad initialization vector of 0xC0FFEE

For a game I am trying to decrypt data that was originally encrypted using AES-256-CBC given a key and the following initialization vector: 0xC0FFEE The initialization vector appears to be short, ...
14
votes
2answers
3k views

Calculate all possible keys for AES 128 encryption to exploit hardware encryption

Some background: I am using the MicroChip ATAES132a for hardware encryption/decryption. The ATAES132a is very configurable and can be misconfigured in such a way that the encryption/decryption will be ...
2
votes
1answer
56 views

Is it possible to unpad a file that is not padded

I used "AES/CBC/PKCS5Padding" to encrypt some files. But I did not provide any identifier to detect if the file is encrypted or not. Now one way to detect if a file ...
2
votes
1answer
230 views

Use AES in CTR mode with pycrypto

The doc of pycrypto gives an example of using AES in CTR mode: ...
3
votes
1answer
89 views

What is ANSI X.923 padding standard?

Wikipedia defines ANSI X.923 padding as follows: In ANSI X.923 bytes filled with zeros are padded and the last byte defines the padding boundaries or the number of padded bytes. Example: In ...
-1
votes
1answer
134 views

How much time does AES decryption take?

I am attempting to decrypt a 90 GB file that is encrypted using AES-256. I have the password. How long should this take to complete? I've had the process running for over 3 days with no progress.
2
votes
1answer
81 views

Reverse cascaded AES encryption

I was wondering if it is possible to decrypt a cipher-text using a single key which was encrypted twice. For example: Let's assume that we encrypt a plaintext using AES-CTR and encrypt the output ...
0
votes
1answer
202 views

AES-GCM GHASH calculation;

I'm trying to make an GHASH() function and need some clarification. Implementation is based on gcm-spec. Page 8 describes polynomial mult and page 27 has a "Test Case 2" which I use to verify result. ...
2
votes
1answer
155 views

Real time video stream AES encryption with authentication

I am now studying the AES encryption for real-time video stream. It seems that Netflix uses the AES-GCM (or CBC + MAC) mode for real-time video encryption and authentication. With MAC authentication, ...
1
vote
0answers
346 views

Support for hardware-accelerated crypto AES on ARMv8 processors running in 32-bit mode?

As I understand it, all ARM processors based on the 32/64-bit ARMv8-A architecture (and more recent iterations) support hardware-accelerated AES instructions. Under Linux, the feature flags in ...
2
votes
2answers
119 views

AES alternate equation for the S-Box affine transformation

The Wikipedia article for the AES S-Box gives an alternate equation for the affine part of the S-Box transformation: $$b_{out} = (b_{in} \times 31_d) \operatorname{mod} 257_d \oplus 99_d$$ It is not ...
3
votes
3answers
713 views

When do I need to use CBC and HMAC?

As I know CBC does not provide integrity for the message, thus HMAC is used to provide integrity for CBC message. Also, I hear about CBC-MAC which can provide integrity and confidentiality. Which one ...
2
votes
2answers
199 views

Encryption using static AES256 symmetric key vs ephemeral session key

For a hackathon I am designing an information exchange system for healthcare. Healthcare data is stored on unsecured systems. I want to assure confidentiality, integrity and authenticity of this data ...
2
votes
1answer
185 views

AES with linear S-Box

If the AES S-Box is replaced with a linear or affine transformation, for instance the identity mapping $\sigma(x)=x$, does the cipher become entirely affine and hence trivially weak?
15
votes
1answer
3k views

Why would anyone choose 3DES over AES in software?

I'm well aware of what NIST and PCI say about the usage of 3DES and its deprecation/disallowance and I also know that AES is the actual recommended standard for software and hardware encryptions. I'm ...
0
votes
2answers
228 views

AES-GCM conformance test

Is there any conformance tests/sequences to validate AES-GCM & GHASH() implementation? Details: I'm implementing AES-GSM, that's just for better understanding of that stuff, nothing more. Well I ...
1
vote
1answer
77 views

Hybrid encryption for MQTT payload?

i've written a simple code for payload encryption, i'v done it with AES-128 CBC mode ,it works fine ,the senario is very simple : the publisher send a JSON payload format that includes the encryption ...
2
votes
2answers
525 views

AES and ECDH key

I am trying to understand public key encryption. I found the table below in a paper online. I am struggling to understand the meaning of this. From the bits and pieces read, I am tempted to think that ...
1
vote
1answer
166 views

AES encryption using MPC SPDZ protocol

I'm reading the article about SPDZ protocol for secure multiparty computation (and also improvements for offline phase like MASCOT). However I'm thinking about practical application of SPDZ for AES ...
0
votes
1answer
91 views

Is encrypting multiple message with same key and iv secure for this case? [duplicate]

AES256, CBC IV is sha512 of key. Ek[random padding | message | random padding] How much information would be leaked from the use of the same IV & key in this way, assuming the adversary has ...
1
vote
5answers
221 views

What is the mathematical property stating that it is hard to find a collision in the AES algorithm?

Finding a collision in the AES algorithm is (apparently) hard. Why ? What is the mathematical property stating that there is a negligible probability to find a collision by taking two random ...
2
votes
1answer
37 views

Correlation Immunity of AES SBox

How do I calculate the correlation immunity of the standard AES Sbox. All material ive read gives out calculation of correlation immunity of boolean functions with single bit outputs. How can it be ...
1
vote
1answer
60 views

What constitutes 1 AES round?

I'm a little confused as to what constitutes a single AES round. Most sources say it's this: ...
2
votes
2answers
261 views

Security of AES ECB for 128 bit random data

I am using AES ECB mode to encrypt and decrypt 128 random data. I have read on drawbacks on using ECB but it seems that it is feasible to use it for random data. However my concern is that my ...
0
votes
2answers
147 views

Is an AEAD the recommended method to add encryption + HMAC to a protocol?

Assuming you are dealing with a competent developer/team, and you are advising on adding security to their protocol. Also for the time being lets not worry about the key establishment and validating ...
0
votes
1answer
62 views

AES256 mix column code generating output bigger than 8 bits

I'm implementing AES256 in javascript with block size 128 bits and i understand every thing about AES except mixcolumn transformation. so i copied this code from the internet and both mixColumn and ...
1
vote
0answers
67 views

Securing MQTT communication

I am building kinda simple IoT project, but I would like to implement good security (just for educational purposes and fun). My plan is to build simple solution where one arduino board reads some data ...
0
votes
1answer
69 views

Basic encrypted custom protocol

I've been suggested to ask here instead of stackoverflow, so here I am. I'd like to encrypt the data of my application that uses a custom protocol I've created. I know about TLS and other protocols ...
0
votes
0answers
30 views

Computing non linearity of an AES Sbox [duplicate]

The non linearity of a n variable boolean function is defined as the min hamming distance between that function and all possible linear functions. How do i use this to calculate the Non linearity of a ...
0
votes
1answer
41 views

Encryption / Decryption method secure

I was wondering whether this encryption / decryption flow is very solid / secure. I encrypt the data using AES CBC 256 bit with an static IV. When the user logs in with his Firebase account (first ...
0
votes
2answers
119 views

UDP and AES with C++

I'm implementing different applications that will use UDP to exchange real-time data, thus a low impact on performance is very important. This system will not be connected to the Internet so I just ...
0
votes
1answer
44 views

OCB-AES: Ambiguous definition of “Encipher” in RFC document

I'm implementing an OCB-AES cipher (which is described in RFC 7253), now I have to call the AES encipher function (I'll refer to that as AES-256, described in FIPS 197) Pre-summary: I'm not sure ...
2
votes
1answer
158 views

Strict Avalanche Criterion (SAC)

I would like to know the step by step method to construct the SAC dependence matrix for AES S-Box. Can someone help me?
2
votes
1answer
164 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$ ...
1
vote
4answers
301 views

Can “collisions” occur with encryption algorithms?

I might be misunderstanding something quite fundamental but here goes: For a given Key K and two messages m1, m2 is it possible for an encryption algorithm (say AES256) to produce this: AES(K, m1) == ...
4
votes
1answer
150 views

I have this list of LibSodium primitives, which should I pick so that the implementations tend to be interoperable?

When I integrate lib sodium, into a c# project, and try to consume, encryption and decryption in a particular way, it works, but the confusion is about, which method to use while encryption or ...
0
votes
0answers
97 views

ECDSA authentication + ECDH key exchange +AES encryption - Replay attack

I am using ECDSA for authentication of two embedded devices, later after authentication I am using ECDH for key generation, which after hashing the keys I am using it as part of AES-CTR for ...
0
votes
1answer
317 views

AES CBC MAC Generation

I am working with Atmel's/MicroChip's ATAES132A 32K AES Serial EEPROM chip for hardware encryption and decryption. This is my first venture into cryptography. I've been reading through the datasheet ...
1
vote
2answers
72 views

Mix Column of Rjindael

In the mix column stage when multiplying the byte value by 2 the following gives the correct answer. If the MSB of the byte value is 1, then left shift the byte value by 1 bit and then XOR the ...
1
vote
1answer
251 views

Why is Poly1305, which is based on AES, faster than AES?

The web pages of BearSSL have the following performance numbers: Poly1305 1730.92 MB/s, amd64, ctmulq AES-128 CTR 92.38 MB/s, amd64, ct64 It seems that constant-time Poly1305 is over an order of ...