assh/assh_kex.h header reference

Description  

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  

Types  

Functions  

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

Constant  

Members detail  

const assh_algo_kex_s * assh_algo_kex(const assh_algo_s *algo)  

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(assh_context_s *c, const assh_key_s *key, assh_algo_id_t *pos, const assh_algo_kex_s **ka)  

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(assh_context_s *c, const char *name, size_t name_len, const assh_algo_kex_s **ka, const assh_algo_name_s **namep)  

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 assh_algo_s **table, const char *name, size_t name_len, const assh_algo_kex_s **ka, const assh_algo_name_s **namep)  

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  

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 assh_algo_s type.

See also Core and modules.

struct assh_event_kex_done_s  

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
assh_key_s *const host_key;The host key used during the key-exchange. (ro)
assh_cbuffer_s const ident;Remote software version string. (ro)
const assh_algo_kex_s *const algo_kex;Key-exchange algorithm used. (ro)
const assh_kex_keys_s *const algos_in;The set of algorithms used to process incoming packets. (ro)
const 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  

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
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  

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  

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.

const assh_algo_kex_s assh_kex_none  

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(assh_context_s *c, uint_fast8_t safety_weight)  

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(assh_session_s *s, uint32_t bytes)  

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 Sep 27 13:33:12 2020 using MkDoc