rdseed 0.1.0-beta.10

Rust interface for RDRAND / RDSEED CPU instructions
Documentation

RDSEED / RDRAND

Version License MSRV dependency status Documentation Downloads

Simple interface to rdseed / rdrand instructions.

API

  1. get64, 32, 16 - nonblocking variants returning random number as an Option.
  2. fill_bytes - fills byte slice with random values. blocking function.
  3. blocking - wrapper returning random number when ready and panicking if operation is not supported by hardware.
  4. is_available - query if hardware supports random operations.
  5. rand module - strong pseudo random RDRAND operations. These operations will less likely to block. Useful for generating lot of random numbers quickly.
  6. Crate defaults to true random RDSEED operations.

Portability

Intel or AMD x64 CPU with RDSEED / RDRAND instructions.

Security

  1. AMD Zen 5 / Ryzen 9000HX - 16 and 32-bit version of RDSEED can return 0 if entropy is exhaused by attacker.
  2. Intel SRBSD Crosstalk - Side channel access to shared internal buffers including SGX. Possible to read result of RDRAND and RDSEED.
  3. AMD Cyan Skillfish - RDSEED returned fixed value 0xFFFFFFFF.

License

This is free and unencumbered software released into the public domain.

This code can be used under terms of CC0 or the Unlicense.

Unlicense logo