Questions tagged [aes]

Advanced Encryption Standard (AES) is a cryptographic block cipher algorithm.

The latest addition to the block cipher algorithms. DES was published in 1977 based on IBM's previous work on the Lucifer cipher with an expected life span of 10 years. As a result of DES's fame, it has been targeted and probed by cryptanalysis for any weaknesses. The price of fame came at a cost, as a result NIST launched a competition announcing a successor to DES which would be known as AES. Several proposals were submitted and the winner was announced on October 2, 2000.

The cipher uses a default 128-bit block size, with varying key sizes of 128, 192 and 256 bits. (AES deviated from the original Rijndael proposal)

The Rijndael cipher was developed by two Belgian cryptographers: Joan Daemen and Vincent Rijmen

7171 questions
2
votes
2 answers

Java - Why is my AES program not encrypting/decrypting double quotes?

I'm implementing a simple AES-128 encryption program using Java's Crypto library. Unfortunately, this doesn't work very well all the time. Sometimes it happens that the double-quotes (") in the plaintext String are when encrypted and then decrypted,…
2
votes
2 answers

How to derive an AES 256 bit key from an arbitary byte array it Java?

Given an arbitrary Java byte array for example 1024 byte array I would like to derive an AES-256 bit key. The array is generated from ECHD via javax.crypto.KeyAgreement using byte[] secret = keyAgreement.generateSecret() My current solution is to…
ams
  • 60,316
  • 68
  • 200
  • 288
2
votes
2 answers

encrypt data using aes-128-ecb in nodejs

I have To encrypt data using aes-128-ecb in nodejs my code is I am using Crypto to encrypt data const crypto = require('crypto'); const secret = '1000060000000000'; const cipher = crypto.createCipher('aes-128-ecb', secret); const ciphertext =…
Anshu Rai
  • 21
  • 1
  • 1
  • 2
2
votes
1 answer

how to properly decrypt text via Subtle Crypto which was encrypted via CryptoJS

I have code that encrypts user's data using CryptoJS.AES, stores key, iv and encrypted content in different places. Also it decrypts encrypted content using stored key and iv by user demand. I want to use Subtle Crypto browser API for…
Senid
  • 563
  • 5
  • 13
2
votes
1 answer

Decrypt AES/CBC/PKCS5Padding Encryption in Dart

I am already having encryption code in java. Now I want to consume APIs from my server. Even after trying various tutorials and sample codes I am not able to successfully decrypt the hash. I know fixed salt and IV is not recommended at all. But for…
Mayur_Thakur
  • 651
  • 8
  • 15
2
votes
1 answer

How to properly use the aes cbc api from mbedtls

My current approach doesn't even produce the correct encrypted data as checked against golang's aes implementation. It also doesn't decrypt back to the original plaintext, but that's expected if the encryption step isn't working correctly. My best…
Dalton Sandbothe
  • 501
  • 2
  • 7
  • 16
2
votes
0 answers

How do I encrypt with AES, CBC, and Nopadding

func AESEncryptWithNopadding(origData []byte,key []byte,iv []byte) (string, error) { block, err := aes.NewCipher(key) if err != nil { return "", err } blockMode := cipher.NewCBCEncrypter(block, iv) crypted := make([]byte,…
ChengXiao
  • 21
  • 1
2
votes
0 answers

Do I understand correctly how to encrypt TCP traffic via RSA + AES?

I am working on a project where I need to implement encryption for sending quite large amounts of data through a tcp connection. I wish to write it in C#. The project is also a part of my learning, by implementing such encryption I'll get…
Petrusion
  • 940
  • 4
  • 11
2
votes
1 answer

AES IV into file with FileSource and FileSink

I have the need to crypt big files (multi GB) with crypto++. I managed to find an example on the documentation that helped me create the 2 followings functions : bool AESEncryptFile(const std::string& clearfile, const std::string& encfile, const…
grunk
  • 14,718
  • 15
  • 67
  • 108
2
votes
1 answer

CryptoSwift throws invalidKeySize because of base64 encoded aesKey and aesIV

I have a project that retrieve data from API and shows in the app. But API uses AES encryption, I have aesKey and aesIV key and these keys are base64 encoded. I need to encode another string with these keys. To do that I use CryptoSwift library but…
Suat Alkan
  • 39
  • 6
2
votes
1 answer

Delphi Aes Decrypt function

I have this Python decryption function which I am trying to convert to Delphi. It uses AES CFB mode: def aes_decrypt(data,key,iv): ctx = AES.new(key, AES.MODE_CFB, iv=iv, segment_size=128) decrypted = ctx.decrypt(data) return…
Maaz
  • 131
  • 8
2
votes
1 answer

AES-256-CBC in .NET Core (C#)

I am searching for C# Code to reproduce the following openssl command. openssl enc -d -aes-256-cbc -in my_encrypted_file.csv.enc -out my_decrypted_file.csv -pass file:key.bin Additional information: The encrypted file in present as byte[] The…
MikeJ82
  • 153
  • 1
  • 12
2
votes
0 answers

GGplot2 - error 'mapping' must be created by 'aes()'

I am new to R and have a little problem with ggplot. Here's part of the data: dput(base_df[1:5, -c(1,4:18)]) base_df <- structure(list(pre_exposure = structure(c(8L, 4L, 3L, 3L, 3L), .Label = c("All seronegative", "B seropositive only", "H3…
2
votes
2 answers

Node.js crypto: too short encryption key

I want to encrypt a user's data with AES-256 to store it securely in my database. However, I have the problem that the key must be 32 characters long. But the passwords of my users are usually much shorter. Is there a way how I can "extend" the…
Holla
  • 21
  • 5
2
votes
0 answers

AES method for data stream in Python

I want to apply an AES 128b encryption (probably CBC + Padding) on a data stream. In case it matters, I'm sending chunks of around 1500bits each. I work in Python, and I did a small test with M2Crypto with AES encrypt in one side and decrypt at the…
RoeeK
  • 1,112
  • 12
  • 23