Skip to content

v2.2.0

Latest

Choose a tag to compare

@rjriajul rjriajul released this 06 Nov 18:18
d6adf6f

WarpCrypto v2.2.0

Hardware AES on ARM for Rust users, a new Ctr256 stream type, and faster short calls. The Python API is unchanged.

Rust

  • Hardware AES on ARM by default. Moved to aes 0.9, which picks the ARMv8 AES instructions at runtime. The --cfg aes_armv8 build flag is no longer needed (or used).
  • New Ctr256: AES-256-CTR with the key expanded once, for a stream processed piece by piece. Gives the same bytes as calling ctr256 on each piece.
    • Ctr256::new(&key, &iv)
    • Ctr256::with_state(&key, &iv, state) continues a stream that ctr256 left mid-block
    • apply_keystream(&mut data), iv(), state()
  • Minimum Rust version stays 1.85.

Security

  • AES key schedules are overwritten with zeros when they are dropped. This replaces aes's byte-by-byte zeroize with a word-at-a-time wipe, and is checked with Miri in CI.

Python

  • No API changes.
  • Faster on short inputs: each call now builds only the encryption or decryption key schedule it needs.
  • On ARM, ctr256 with large buffers (128 KiB and up) is about 7% slower than v2.1.0. This comes from aes 0.9's ARM backend.

Thanks

  • @z7vian for the aes 0.9 port, Ctr256 and the key wipe in #4

Full Changelog: v2.1.0...v2.2.0