assh/assh_prng.h header reference

Description [link] 

This header file contains descriptors for random number generator modules implemented in the library.

See also coremod.

Header inclusion [link] 

Members [link] 

Types [link] 

Functions [link] 

  • const struct assh_prng_s * assh_default_prng(void )
  • assh_status_t assh_prng_get(struct assh_context_s *c, uint8_t *rdata, size_t rdata_len, enum assh_prng_quality_e quality)

Macros [link] 

Members detail [link] 

const struct assh_prng_s * assh_default_prng(void ) [link] 

This function is declared in assh/assh_prng.h source file, line 110.

This function returns the default prng. This depends on the platform and build configuration. This may return NULL.

assh_status_t assh_prng_get(struct assh_context_s *c, uint8_t *rdata, size_t rdata_len, enum assh_prng_quality_e quality) [link] 

This function is declared in assh/assh_prng.h source file, line 105.

This function fills the buffer with random data.

enum assh_prng_quality_e [link] 

This enum is declared in assh/assh_prng.h source file, line 42.

This enum specifies quality of randomly generated data.

IdentifierValueDescription
ASSH_PRNG_QUALITY_WEAK0weak random data for use in the testsuite
ASSH_PRNG_QUALITY_PUBLIC1random data for use as public parameter
ASSH_PRNG_QUALITY_PADDING2random data for use as ssh packet padding
ASSH_PRNG_QUALITY_NONCE3random data for use as nonce in signature algorithms
ASSH_PRNG_QUALITY_EPHEMERAL_KEY4random data for use in ephemeral key generation
ASSH_PRNG_QUALITY_LONGTERM_KEY5random data for use in long term key generation

struct assh_prng_s [link] 

This struct is declared in assh/assh_prng.h source file, line 95.

This struct is the prng module interface descriptor structure.

See also coremod.

#define ASSH_PRNG_BIGNUM_FLAG 16 [link] 

This macro is for internal use only.

This macro is declared in assh/assh_prng.h source file, line 62.

This macro is passed to the assh_prng_get_t function when the random data is used as a big number.

#define ASSH_PRNG_CLEANUP_FCN(n) [link] 

This macro is for internal use only.

This macro is declared in assh/assh_prng.h source file, line 85.

This macro expands to:

void (n)(struct assh_context_s *c)

See also assh_prng_cleanup_t.

#define ASSH_PRNG_GET_FCN(n) [link] 

This macro is for internal use only.

This macro is declared in assh/assh_prng.h source file, line 75.

This macro expands to:

ASSH_WARN_UNUSED_RESULT assh_status_t (n)(struct assh_context_s *c,
uint8_t *rdata, size_t rdata_len,
uint_fast8_t quality)

See also assh_prng_get_t.

#define ASSH_PRNG_INIT_FCN(n) [link] 

This macro is for internal use only.

This macro is declared in assh/assh_prng.h source file, line 65.

This macro expands to:

ASSH_WARN_UNUSED_RESULT assh_status_t (n)(struct assh_context_s *c,
const struct assh_buffer_s *seed)

See also assh_prng_init_t.

#define ASSH_PRNG_QUALITY(n) [link] 

This macro is for internal use only.

This macro is declared in assh/assh_prng.h source file, line 58.

This macro extracts the enum assh_prng_quality_e value from the argument passed to the assh_prng_get_t function.

This macro expands to:

(enum assh_prng_quality_e)((n) & 15)

typedef void (assh_prng_cleanup_t)(struct assh_context_s *c) [link] 

This typedef is for internal use only.

This typedef is declared in assh/assh_prng.h source file, line 90.

This declaration involves expansion of the ASSH_PRNG_CLEANUP_FCN macro.

This typedef defines the function type for the cleanup operation of the prng module interface.

typedef assh_status_t (assh_prng_get_t)(struct assh_context_s *c, uint8_t *rdata, size_t rdata_len, uint_fast8_t quality) [link] 

This typedef is for internal use only.

This typedef is declared in assh/assh_prng.h source file, line 83.

This declaration involves expansion of the ASSH_PRNG_GET_FCN macro.

This typedef defines the function type for the random generation operation of the prng module interface.

See also assh_prng_get and ASSH_PRNG_QUALITY.

typedef assh_status_t (assh_prng_init_t)(struct assh_context_s *c, const struct assh_buffer_s *seed) [link] 

This typedef is for internal use only.

This typedef is declared in assh/assh_prng.h source file, line 73.

This declaration involves expansion of the ASSH_PRNG_INIT_FCN macro.

This typedef defines the function type for the initialization operation of the prng module interface. The prng can store its private data in assh_context_s::prng_pv.

Valid XHTML 1.0 StrictGenerated by diaxen on Sun Oct 25 23:31:03 2020 using MkDoc