Skip to content

ECB cipher mode in AESEncryption doesn’t provide serious message confidentiality. #3324

@kongleong86

Description

@kongleong86

Describe the bug
Encryption operations should use a secure mode and padding scheme so that confidentiality and integrity can be guaranteed.
Existing AESEncryption.java is using ECB (Electronic Codebook) cipher mode.
The ECB cipher mode doesn’t provide serious message confidentiality: under a given key any given plaintext block always gets encrypted to the same ciphertext block. This mode never be used.

Expected behavior
The GCM (Galois Counter Mode) mode which works internally with zero/no padding scheme, is recommended, as it is designed to provide both data authenticity (integrity) and confidentiality.

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