Skip to main content

Crate aocl_securerng

Crate aocl_securerng 

Source
Expand description

Safe wrappers for AOCL-SecureRNG.

Wraps the AMD secure-RNG entry points around the x86 RDRAND (already conditioned, suitable for general-purpose random) and RDSEED (raw entropy, suitable for seeding cryptographic generators) instructions.

Enums§

Error
Errors that can be returned by safe AOCL wrappers.

Constants§

DEFAULT_RETRY_COUNT
Default retry budget AOCL recommends for transient failures of RDRAND / RDSEED.

Functions§

is_rdrand_supported
Returns true if the host CPU exposes the RDRAND instruction.
is_rdseed_supported
Returns true if the host CPU exposes the RDSEED instruction.
rdrand_bytes
Fill out with random bytes from RDRAND.
rdrand_u16
Read a single random u16 from RDRAND.
rdrand_u32
Read a single random u32 from RDRAND.
rdrand_u64
Read a single random u64 from RDRAND.
rdrand_u32_array
Fill out with random u32s from RDRAND.
rdrand_u64_array
Fill out with random u64s from RDRAND.
rdseed_bytes
Fill out with random bytes from RDSEED.
rdseed_u16
Read a single random u16 from RDSEED.
rdseed_u32
Read a single random u32 from RDSEED.
rdseed_u64
Read a single random u64 from RDSEED.
version
Library version reported by AOCL-SecureRNG.

Type Aliases§

Result
Crate result alias — used by every aocl-* safe wrapper crate.