Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Why AesCbc encrypted ciphertext is prefixed with IV? #72

@carlonzo

Description

@carlonzo

Hi I have a question about the implementation of AesCbc:
I see that the result of encryption is prefixed with the iv and the decryption, instead, removes the iv decrypting.

Is that a reason for this? from the RFC or usage examples of the Cipher dont do anything similar.

Even the tests vectors from https://datatracker.ietf.org/doc/html/rfc3602#section-4 the cipher does not include the iv and the assertions you implemented need to modify the result to match the test vectors.

Thanks for that!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions