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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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
0answers
17 views

How to implement this encryption related code in JavaScript? [migrated]

I have following code in Java. ...
-1
votes
0answers
18 views

How to Securely Transmit Salt and IV vector

Hello I wanted to ask something about my scheme. As we know, salt is being used to prevent rainbow attacks. In my scheme, in order to let the receiver to decrypt some data,generated one time to be ...
3
votes
3answers
493 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
67 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 ...
0
votes
0answers
45 views

Showing that a cipher is not a perfect cipher

I was given this problem: Prove that the following ciphers are not perfect, using as few blocks as you can. There is no need to prove that the number of blocks is indeed minimal. DES AES-128 AES-256 ...
2
votes
1answer
126 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?
0
votes
0answers
27 views

AES acquisition traces

When taking some hardware AES acquisition traces, I don't understand the difference between synchronized traces and desynchronized traces. I would be very grateful if you could explain for me the ...
0
votes
0answers
30 views

Want to know which encrypting algorithm shall I go for the wired connection RS485 the device has 52Mb memory

I have embedded Linux device in which total memory I have is 52MB. This device is distributed system in which 100 nodes can connect each other in wired connection using RS485 as master and slave ...
15
votes
1answer
2k 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
1answer
34 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 ...
0
votes
1answer
29 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
113 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
80 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
36 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
197 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
30 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
57 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
215 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 ...
-1
votes
0answers
30 views

Why is an error thrown in Python cryptography RSA decryption of encrypted AES key? [migrated]

I am trying to decrypt an AES key from a DER-encoded file that has been encrypted in RSA format. With the following code: ...
0
votes
0answers
80 views

AES 128 decryption with ciphertext shorter than key [migrated]

We are developing an application that has to work with data that is enycrpted by LoraWan (https://www.lora-alliance.org) We have already found the documentation of how they encrypt their data, and ...
0
votes
2answers
43 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
44 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
8 views

error on Decrypting AES. The input data in not a complete block. vb.net [migrated]

Good day. I'm using encrypting a text using AES then save the encrypted byte to a txt file. -- code of btnencrypt in form1.frm ...
1
vote
0answers
38 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
47 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
29 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
34 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
98 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 ...
-1
votes
1answer
34 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
57 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
90 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$ ...
0
votes
4answers
106 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
75 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
48 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
63 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
41 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
187 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 ...
0
votes
0answers
14 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
84 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
89 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
51 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
104 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
69 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
39 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
31 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
59 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
29 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
54 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
103 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. ...
-1
votes
1answer
220 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 ...