Skip to content

aes 0.9.0-pre.2 uses ParBlocksSize of 9 but has type alias for Block8 #462

@robinhundt

Description

@robinhundt

I recently used the current pre-release version of the aes crate and stumbled on a performance pitfall. In previous versions, the AES-NI implementation processed 8 blocks in parallel. This was changed in #442 to 9 blocks (see this comment). I chunked an iterator into 8 block chunks but got no speedup due to this.

Unfortunately, aes still exposes the Block8 type alias. Personally, I thought the reason for the type alias was it's usefulness when wanting to make use of parallel processing. Admittedly, this is not described by the Block8 documentation but supported by the hazmat API.

So my first suggestion would be to expand the docs of Block8 to clarify that its existence is not tied to the number of parallel rounds (which depend on the backend anyway). If this type is useful only in the context of the hazmat API, maybe it could even be moved there before the release of 0.9.

While I'm on the topic of ParBlockSize: Is there currently any way to get the ParBlocksSize for a Backend? If not, should I create an issue for this?

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