assh/assh_kex.h header reference

Description [link] 

This header file contains API descriptors for key-exchange algorithm modules implemented in the library.

It also contains declaration of key-exchange related events.

See also Key-exchange algorithms and Core and modules.

Members [link] 

Types [link] 

Functions [link] 

  • const struct assh_algo_kex_s * assh_algo_kex(const struct assh_algo_s *algo)
  • assh_status_t assh_algo_kex_by_key(struct assh_context_s *c, const struct assh_key_s *key, assh_algo_id_t *pos, const struct assh_algo_kex_s **ka)
  • assh_status_t assh_algo_kex_by_name(struct assh_context_s *c, const char *name, size_t name_len, const struct assh_algo_kex_s **ka, const struct assh_algo_name_s **namep)
  • assh_status_t assh_algo_kex_by_name_static(const struct assh_algo_s **table, const char *name, size_t name_len, const struct assh_algo_kex_s **ka, const struct assh_algo_name_s **namep)
  • assh_status_t assh_kex_set_order(struct assh_context_s *c, uint_fast8_t safety_weight)
  • assh_status_t assh_kex_set_threshold(struct assh_session_s *s, uint32_t bytes)

Constant [link] 

Members detail [link] 

const struct assh_algo_kex_s * assh_algo_kex(const struct assh_algo_s *algo) [link] 

This function is declared in assh/assh_kex.h source file, line 364.

This function casts and returns the passed pointer if the algorithm class is ASSH_ALGO_KEX. In other cases, NULL is returned.

assh_status_t assh_algo_kex_by_key(struct assh_context_s *c, const struct assh_key_s *key, assh_algo_id_t *pos, const struct assh_algo_kex_s **ka) [link] 

This function is declared in assh/assh_kex.h source file, line 399.

This function finds a registered key-exchange algorithm which can be used with the given key.

See also assh_algo_by_key.

assh_status_t assh_algo_kex_by_name(struct assh_context_s *c, const char *name, size_t name_len, const struct assh_algo_kex_s **ka, const struct assh_algo_name_s **namep) [link] 

This function is declared in assh/assh_kex.h source file, line 389.

This function finds a registered key-exchange algorithm.

See also assh_algo_by_name.

assh_status_t assh_algo_kex_by_name_static(const struct assh_algo_s **table, const char *name, size_t name_len, const struct assh_algo_kex_s **ka, const struct assh_algo_name_s **namep) [link] 

This function is declared in assh/assh_kex.h source file, line 378.

This function finds a key-exchange algorithm in a NULL terminated array of pointers to algorithm descriptors.

See also assh_algo_by_name_static.

struct assh_algo_kex_s [link] 

This struct is declared in assh/assh_kex.h source file, line 348.

This struct is the key-exchange algorithm descriptor. It can be casted to the struct assh_algo_s type.

See also Core and modules.

struct assh_event_kex_done_s [link] 

This struct is declared in assh/assh_kex.h source file, line 312.

The ASSH_EVENT_KEX_DONE event is returned when a kex exchange has completed.

The remote software version string is exposed in the ident field as well as selected algorithms in the algo* fields.

The initial field is only set for the first key exchange of the session.

FieldDescription
struct assh_key_s *const host_key;The host key used during the key-exchange. (ro)
struct assh_cbuffer_s const ident;Remote software version string. (ro)
const struct assh_algo_kex_s *const algo_kex;Key-exchange algorithm used. (ro)
const struct assh_kex_keys_s *const algos_in;The set of algorithms used to process incoming packets. (ro)
const struct assh_kex_keys_s *const algos_out;The set of algorithms used to process ougoing packets. (ro)
assh_safety_t const safety:8;Key-exchange overall safety factor. (ro)
assh_bool_t const initial;True when this is the first key-exchange of the session. (ro)

struct assh_event_kex_hostkey_lookup_s [link] 

This struct is declared in assh/assh_kex.h source file, line 290.

The ASSH_EVENT_KEX_HOSTKEY_LOOKUP event is returned when a client needs to lookup a server host key in the local database. The accept field must be updated accordingly before calling the assh_event_done function.

The initial field is only set for the first key exchange of the session.

FieldDescription
struct assh_key_s *const key;Public host key provided by the server. (ro)
assh_bool_t accept;May be updated to acknowledge that the host key is trusted. (rw)
assh_bool_t const initial;Set when this is the first key-exchange of the session. (ro)

union assh_event_kex_u [link] 

This union is declared in assh/assh_event.h source file, line 138.

This union contains all key-exchange related event structures.

struct assh_kex_keys_s [link] 

This struct is declared in assh/assh_kex.h source file, line 270.

This object contains the various symmetric cipher algorithm contexts initialized from the shared secret. This is used by the transport layer code to process the ssh packet stream.

FieldDescription
const struct assh_algo_cipher_s * cipher_algo;
void * cipher_ctx;
const struct assh_algo_mac_s * mac_algo;
void * mac_ctx;
const struct assh_algo_compress_s * cmp_algo;
void * cmp_ctx;
assh_safety_t safety;

const struct assh_algo_kex_s assh_kex_none [link] 

This constant is declared in assh/assh_kex.h source file, line 406.

Dummy key-exchange algorithm using a not so secret value.

See also Key-exchange algorithms.

assh_status_t assh_kex_set_order(struct assh_context_s *c, uint_fast8_t safety_weight) [link] 

This function is declared in assh/assh_kex.h source file, line 88.

This function sets the algorithm order by defining the weight of the safety factor. This changes how algorithms safety must be favored over speed. Valid range for this parameter is [0, 99].

assh_status_t assh_kex_set_threshold(struct assh_session_s *s, uint32_t bytes) [link] 

This function is declared in assh/assh_kex.h source file, line 82.

This function changes the amount of ssh stream that is allowed to flow between the client and server before starting a new key-exchange process.

Valid XHTML 1.0 StrictGenerated by diaxen on Sun Oct 25 23:30:45 2020 using MkDoc