Skip to content

[hpke-rs-rust-crypto] macOS builds don't use AES HW-accelerated instructions #1583

Closed

Description

@pjunod-duokey

The current version of the HPKE rust crypto provider relies on the version 0.10 of the aes-gcm crates, which itself relies on the version 0.8 of the aes crate. As a result, when building hpke-rs with Rust crypto and relying on AES-GCM, by default, the fixed-slice software-only implementation of AES is used, with suboptimal performances.

A possibility consists in bumping the aes-gcm dependency to 0.11, which itself depends on aes v0.9 that implements underlying HW capabilities auto-detection on macOS.

In the meanwhile, a workaround consists in explicitly setting a configuration flag at the compiler level, possibly with side effects wrt to other crates:

[target.aarch64-apple-darwin]
rustflags = ["-C", "target-cpu=native", "--cfg", "aes_armv8"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions