Questions tagged [cbc-mode]

CBC Mode is cipher block chaining.

CBC mode was originally specified by NIST in FIPS 81. The standard, issued in 1981, only offers confidentiality. Other modes, such as CCM and GCM, offer authenticated encryption which places an integrity assurance over the encrpyted data.

In CBC mode, an initialization vector must be used in the first block of plaintext. Then each subsequent block of plaintext is XORed with the previous ciphertext block before being encrypted thus making all the blocks dependent on all the previous blocks. This means that in order to find the plaintext of a particular block, you need to know the ciphertext, the key, and the ciphertext for the previous block.

247 questions
-1
votes
1 answer

How to encode plaintext ASCII or hex?

If I have a given ciphertext (from CBC mode with random IV with AES) that is in hexadecimal and its plaintext that is ASCII encoded, do I need to encode that ASCII plaintext into hex before encryption? Plaintext is "Pay Bob $100" ASCII 080 097 121…
user3628628
  • 1
  • 1
  • 1
-2
votes
1 answer

What This "E" Part Is Doing in CBC mode?

I need to implement this mode in java by hand ( DES ) What is going in that E (encryption) box?
Zopcuk App
  • 71
  • 5
-2
votes
1 answer

xoring bytes and str (AES CBC)

Hi I would really appreciate the help on this one since i'm really lost and I don't get why it's not working. I have a 16 byte key and 16 byte block but the key type is 'str' and the block type is 'bytes' and I want to xor between them but the value…
LiorA
  • 441
  • 3
  • 13
-2
votes
1 answer

What is the equivalent of this Cipher.encrypt() function in PHP

A client has sent me an encrypted message using the Cipher.encrypt()function (from some programming language unknown to me) as detailed below : var key : String = "I deleted the key intentionally"; var encodedKey : Bytes =…
MasterCX
  • 13
  • 4
-2
votes
2 answers

DES encryption in linux

I'm trying to use the glibc cbc_crypt function to encrypt strings in c the program should be as portable as function which is why I'm using this library here's my code: #define _GNU_SOURCE #include #include #include…
Adel Ahmed
  • 638
  • 7
  • 24
-2
votes
1 answer

Decrypt of file displays both original and cipher text?

I am working to encrypt and decrypt files using Crypto++. In encryption, key and random IV are generated and hexencoded where as text from file is encrypted. Both IV and cipher text are written to the same file. In decryption, key is generated…
user4812502
  • 157
  • 1
  • 8
-4
votes
1 answer

Wrong Encryption (QT c++ OpenSSL AES 256 CBC)

I wrote a small program to encrypt and decrypt data using OpenSSL AES 256 CBC but after decrypting the encrypted data I ended up with garbage data so there must be something wrong in the code but I couldn't figure it out can you please take a look…
1 2 3
16
17