-
Notifications
You must be signed in to change notification settings - Fork 143
Description
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?