Skip to content

Cipher: IV must not be set in case ECB mode of operation is used #105

Open
@mohamedasaker-arm

Description

@mohamedasaker-arm

In cipher.rs
psa_crypto_sys::psa_cipher_set_iv is called without checking if the operation requires setting IV or not.
In case ECB operations this function psa_crypto_sys::psa_cipher_set_iv should not be called.

Available approaches:

  • Check operation mode and call the function if iv is required.
  • Pass the IV as an Option and here the responsibility of the caller is to determine if the iv is required or not.
    if the user misused it then the function will propagate the error.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions