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]

The Advanced Encryption Standard (AES) is a symmetric-key encryption standard adopted by the U.S. government. The standard comprises three block ciphers, AES-128, AES-192 and AES-256, adopted from a larger collection originally published as Rijndael.

0
votes
0answers
5 views

AES 256 GCM encryption decryption in nodejs [migrated]

I am implementing a basic encryption/decryption set of functions in nodejs and I keep getting the following error in the decryption part: Error: Unsupported state or unable to authenticate data This ...
0
votes
0answers
23 views

Trailing garbage after Python decryption of JavaScript AES-CGM [migrated]

I have JavaScript tied to an HTMl button, which does an AES-CGM encoding and logs the useful info to the console. function strToArrayBuffer(str) { let buf = new ...
0
votes
1answer
27 views

OpenSSL: what's the difference between -kfile and -pass?

It seems both -kfile and -pass can be used to encrypt files with a 2048 bit keyfile? I don't understand the difference between the two methods: $ openssl enc -salt -aes-256-cbc -in inputfile.txt -...
3
votes
2answers
470 views

The way to determine IV for AES encryption, possible security problems with this approach

I am trying to make a folder encryption with maximum automation (except password input). Inside a bash script I do the following: echo $RANDOM | md5sum | cut -d' ' -f1 > iv and then using it: ...
1
vote
1answer
41 views

Ensuring key integrity

I have encrypted AES key stored in the database with the encrypted data. AES key is encrypted with a key derived from the passphrase. I want to ensure the integrity of the stored AES key. Is the ...
0
votes
1answer
43 views

Is AES+hash rather than HMAC problematic?

I will now ask a strange question, but bear with me. I can't share the entire usecase, but the point is to allow the holder of a secret key to create "strings" (used in other systems). The strings ...
1
vote
0answers
35 views

using a hashed IV for AES128-CBC [migrated]

I would like to minimize the encrypted packet size. Is it possible to derive the IV from a non-repeatable counter? For example, take a 32 bit counter, hash it with a key (different from the AES key), ...
1
vote
2answers
147 views

AES-256 decryption after key destruction. Possible or not?

Can AES-256 be decrypted if after the encryption process you destroy the key that must be used to decrypt the data, is it possible?
0
votes
1answer
59 views

Advantages of encrypting IV in AES GCM

I've got a friend who stores some important data locally in a database. Before storing, he however first encrypts it with AES GCM with a certain key. He then encrypts the IV with another key, and then ...
0
votes
0answers
86 views

Using RSA private key as AES key for encryption

Example application need: An application pulls down data from a web service and needs to encrypt and persist this data locally to disk. Only this application should be able to decrypt the data stored ...
1
vote
2answers
133 views

Does using AES-256 encryption really grant any further security?

AES-256, as far as I know, generates an 256 bit key to encrypt a message, and the 256-bit key is generated by a known algorithm starting from the password the user chooses. Since the encryption is ...
0
votes
1answer
84 views

Is AES + MAC more secure than encrypting plaintext along with its hash

Suppose I want to encrypt some plaintext and I can only use an unauthenticated AES mode like CBC. One way of adding authentication is encrypt-then-MAC, where the two different keys for AES and MAC ...
-1
votes
1answer
71 views

What exactly is unsafe in using openssl AES with a password? [duplicate]

An answer about AES encryption starts with a disclaimer: Please note: You can use this to hide birthday-gift-ideas.txt from your roommate, but don't expect it to be secure against a determined ...
0
votes
1answer
70 views

Using AES encryption to generate MAC (and provide authentication/integrity)

Ignoring that there are far better and more standard approaches to providing authentication and integrity guarantees, what (if any) weaknesses would a system as outlined below that relies on AES (AES/...
2
votes
0answers
19 views

Why is MySQL 8.0 AES_ENCODE unsafe for statement-based replication?

I read this interesting note in the MySQL 8.0 documentation that seemed a bit confusing to me: Statements that use AES_ENCRYPT() or AES_DECRYPT() are unsafe for statement-based replication. As I ...
1
vote
1answer
70 views

Storing RSA private/public key pairs in a file, on linux

Would it be wise to: Generate a lot of priv./pub. key pairs, and store them in a file on the server machine(Linux). (Let's say in a companies server room) Then encrypt the file with AES, and store ...
3
votes
2answers
172 views

Is AES easier to crack when the input is small? [closed]

Say you just want to encrypt a number. For example, say the number could be any double. A double in C# and Java is 8 bytes. If you were to encrypt a double using AES: var cypherText = AES.Encrypt(...
1
vote
1answer
26 views

How harmfull might be predictable bytes when using AES-CTR

I use AES-CTR to perform on the fly encryption of packets. Each packet is 16 bytes long, however, depending on what is being transferred, the 16 bytes may not be used. So far, unused bytes are left to ...
0
votes
0answers
44 views

Microsoft Cryptographic Service Providers

I have a few questions about Microsoft's Cryptographic Service Providers. I am creating an AES encryption method whose key is encrypted using the RSA. I am trying to figure out a way to store the RSA ...
1
vote
0answers
33 views

What is this key management scheme called

We are building a system, where the messages between services is encrypted with Data Encryption Key (DEK). The DEK is attached to the message, but encrypted with another key, Key Encryption Key (KEK)....
0
votes
0answers
31 views

User specific AES-256 key for file. Retroactive encryption

I may be falling into a classic encryption-problem trap here... I've been developing applications using AES and public/private key encryption for some time so I have a good understanding of straight ...
0
votes
0answers
26 views

Issue with Sakura X(Sasebo GIII)

I am working with a Sakura-X (SASEBO GIII) board for side-channel attacks. Even after changing the AES S-box to some other S-box, I am getting the output of the original AES (283 irreducible ...
1
vote
1answer
97 views

Is it possible to encrypt a file using both AES-256 cipher, password and keyfile using OpenSSL?

Is it possible to encrypt a file using both AES-256 cipher, password and keyfile using OpenSSL? I want to encrypt a file using OpenSSL. After hours of testing I have found a command which may ...
1
vote
0answers
70 views

Javascript asymmetric password-based encryption

I want to code a web app that allows 2 users to send encrypted messages to each other, and I want to maximize security, so I want to minimize the amount of trust I put in my cloud provider (both the ...
0
votes
0answers
32 views

WPA2 IV all zero in EAPOL message of 1,2 and 4

While we know that in the best practice in any AES communication is to not use a constant or all zero IV. However, when I capture my authentication progress between my STA and AP. I found out that ...
2
votes
1answer
56 views

Is there any need for PBKDF2 with AES when using a uniform key space?

I'm looking at some code that encrypts data in a database using AES. Before doing so, the encryption key is passed through a PBKDF2 function. Reading up on this, it appears this is for when the key ...
-1
votes
1answer
101 views

OpenSSL how to get the speed od AES-128 from the results I got

so first what do these values stand for are they cycles per 3 seconds? and can I how can I get the speed from these results for AES-128 ? $pi@raspberrypi:~/iot_c3 $ openssl speed aes-128-cbc Doing ...
4
votes
2answers
163 views

Is it safe to encrypt my password with the password itself?

I'm using a password to encrypt some data. However, upon decrypting, I want to check if the entered password is correct. In order to do so I encrypt the password itself. Then upon decrypting, I check ...
1
vote
1answer
335 views

Where to store AES keys when encrypting files at rest?

I've gone through the below question: How to store an AES Key? an Initialization Vector(IV)? And read the below articles about how to encrypt files using AES in CBC mode: http://www.novixys.com/...
1
vote
2answers
401 views

MySQL AES_ENCRYPT string key length

In MySQL there are builtin AES_ENCRYPT() and AES_DECRYPT() functions which take the form of: AES_ENCRYPT(str, key_str) What length is required for the key_str argument? Can it be variable? What is ...
3
votes
4answers
273 views

Common format to send encrypted data + IV?

I have an app that receive data from third parties using various protocols: MQTT, HTTP, AMQP, ... Some clients cannot use TLS (iot devices without TLS support), so we need to find some compact and ...
2
votes
2answers
129 views

Should a password based AES CBC encrypted string have extra security?

For a Java application that I wrote, I take a password provided by a user and generate a 128-bit AES key from it using 100,000 iterations of PBKDF2-HMAC-SHA512 with a randomly generated 512-bit salt. ...
0
votes
0answers
55 views

Bluetooth low energy encryption using chacha20-poly1305

The BLE data is encrypted using AES-CCM. the TLS1.3 removed AES-CCM from the cipher-suits due to security issue. My question : why don't they encrypt the BLE using chacha20-poly1205 ? is it because ...
0
votes
2answers
106 views

Help to review 2FA algorithm

First of all, I know, don't reinvent the wheel... But there's a good reason for this. So I have been implementing a generic 2 factor authentication code generation/validation algorithm in order to re-...
0
votes
1answer
286 views

AES successful decryption using wrong secret key

I have a problem with AES encryption. I need to encrypt plaintext using CTR with a random IV. Then I need to encrypt the IV with the same key. I know that it is not required to encrypt the IV, but I ...
1
vote
1answer
2k views

How can I use openssl to decrypt AES-encrypted data using the key and initialization vector?

I am attempting to follow the example in this question: Where is the salt on the OpenSSL AES encryption? but I'm having some trouble decrypting using the key and initialization vector. When I ...
1
vote
0answers
128 views

How to recover forgotten AES-256 password with bruce force?

The password was set on a flash drive using LaCie Private-Public for Windows 10. The password is 12 character long. For each character, I know if it is a number, special character, lower case letter ...
0
votes
1answer
269 views

Is CBC mode for AES still safe to use in 2018?

I'm using AES-256 CBC mode in C# to encrypt various amounts of texts. The key and IV are always generated properly randomly. However, would GCM mode provide any noticeable security gains over CBC?
2
votes
1answer
184 views

Providing data integrity with AES

A question for an exam asks me to provide data integrity of a file F with AES and a shared secret key between Alice and Bob, if there is a way. The message is sent by Alice to Bob. I thought of the ...
5
votes
1answer
140 views

TLS1.2 AES 128 CBC Encrypted Data size

I know that TLS ciphers such as TLS_RSA_WITH_AES_128_CBC_SHA transmit data as shown. From my understanding, the ciphertext must be a multiple of the block size, which in this case is 16 bytes. However,...
1
vote
1answer
1k views

How to encrypt data in frontend/backend with a key that is not stored anywhere and is only known to owner?

I have read bunch of answers and tutorials on how client side cryptography is not a good idea because of many reasons listed mainly in Javascript Cryptography Considered Harmful article. Some facts ...
-2
votes
2answers
189 views

Using AES CBC PKCS5PADDING for REST API?

I am planning to use AES CBC PKCS5PADDING with a passphrase to encrypt my REST API traffic to POST/GET over HTTPS from an Android application. the scope is to protect user data from MITM attacks and ...
3
votes
2answers
231 views

Can AES and SHA-256 outputs with the same inputs be used to break each other?

An abstract representation of my question looks like this: byte[] encrypted = AES.Encrypt(bytesToEncrypt, password); byte[] hash = SHA256.Hash(password); If an attacker obtains the values of both ...
0
votes
0answers
92 views

Problem using padding oracle attack on this base64 - url coded message (AES CBC 256)

I'm supposed to write a script that will get the plaintext of a message which is firstly coded in base64, then URL coded (encoded ciphertext in AES-256-CBC). Padding is used as well such that the ...
3
votes
1answer
155 views

How can you change the plaintext of the given secret message which is in AES-256 CBC

Say you have the secret message encrypted with AES-256 in CBC mode 5a04ec902686fb05a6b7a338b6e07760 14c4e6965fc2ed2cd358754494aceffa where the first 16 Byte is the initial vector, the second 16 Byte ...
-1
votes
1answer
141 views

AES Algorithm shared secret key length

I am confused with the AES Algorithm specifically regarding the shared secret key and the key length. For example, AES 128 needs a key length of 128 bits but in most of the scenarios, we use general ...
0
votes
1answer
187 views

File encryption with AES-256-CBC vs Chunk encryption

I'm basically designing a protocol that requires a synchronous and ordered file transmission from a server (implemented in Node.js) to a device, over TCP. Streaming the file is not an option, so each ...
1
vote
0answers
333 views

NFC Android (Ntag213 vs Ultralight C)

I have an (university) project where I basically write and read text out of NFC Tags with Android devices in order to store one's balance in the card (wich can be used on the cafeteria, for example). ...
-1
votes
1answer
548 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, ...
0
votes
2answers
184 views

Is there a difference between encryption keys and encryption certificates?

Learning about cryptography. Experimenting with attacking the algorithm it's self. My question regards vocabulary basically. Are encryption keys and certificates the same thing or are they different? ...