assh/assh_sign.h header reference

Description [link] 

This header file contains API descriptors for signature algorithm modules implemented in the library.

See also authalgos and coremod.

Header inclusion [link] 

Members [link] 

Types [link] 

  • struct assh_algo_sign_s
  • typedef assh_status_t (assh_sign_check_t)(struct assh_context_s *c, const struct assh_key_s *key, size_t data_count, const struct assh_cbuffer_s data[], const uint8_t *sign, size_t sign_len, assh_safety_t *safety)
  • typedef assh_status_t (assh_sign_generate_t)(struct assh_context_s *c, const struct assh_key_s *key, size_t data_count, const struct assh_cbuffer_s data[], uint8_t *sign, size_t *sign_len)

Functions [link] 

  • const struct assh_algo_sign_s * assh_algo_sign(const struct assh_algo_s *algo)
  • assh_status_t assh_algo_sign_by_key(struct assh_context_s *c, const struct assh_key_s *key, assh_algo_id_t *pos, const struct assh_algo_sign_s **sa)
  • assh_status_t assh_algo_sign_by_name(struct assh_context_s *c, const char *name, size_t name_len, const struct assh_algo_sign_s **sa, const struct assh_algo_name_s **namep)
  • assh_status_t assh_algo_sign_by_name_static(const struct assh_algo_s **table, const char *name, size_t name_len, const struct assh_algo_sign_s **sa, const struct assh_algo_name_s **namep)
  • assh_status_t assh_sign_check(struct assh_context_s *c, const struct assh_algo_sign_s *sa, const struct assh_key_s *key, size_t data_count, const struct assh_cbuffer_s data[], const uint8_t *sign, size_t sign_len, assh_safety_t *safety)
  • assh_status_t assh_sign_generate(struct assh_context_s *c, const struct assh_algo_sign_s *sa, const struct assh_key_s *key, size_t data_count, const struct assh_cbuffer_s data[], uint8_t *sign, size_t *sign_len)

Constant [link] 

Macros [link] 

Members detail [link] 

const struct assh_algo_sign_s * assh_algo_sign(const struct assh_algo_s *algo) [link] 

This function is declared in assh/assh_sign.h source file, line 115.

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

assh_status_t assh_algo_sign_by_key(struct assh_context_s *c, const struct assh_key_s *key, assh_algo_id_t *pos, const struct assh_algo_sign_s **sa) [link] 

This function is declared in assh/assh_sign.h source file, line 150.

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

See also assh_algo_by_key.

assh_status_t assh_algo_sign_by_name(struct assh_context_s *c, const char *name, size_t name_len, const struct assh_algo_sign_s **sa, const struct assh_algo_name_s **namep) [link] 

This function is declared in assh/assh_sign.h source file, line 140.

This function finds a registered signature algorithm.

See also assh_algo_by_name.

assh_status_t assh_algo_sign_by_name_static(const struct assh_algo_s **table, const char *name, size_t name_len, const struct assh_algo_sign_s **sa, const struct assh_algo_name_s **namep) [link] 

This function is declared in assh/assh_sign.h source file, line 129.

This function finds a signature algorithm in a NULL terminated array of pointers to algorithm descriptors.

See also assh_algo_by_name_static.

struct assh_algo_sign_s [link] 

This struct is declared in assh/assh_sign.h source file, line 69.

This struct is the signature algorithm descriptor structure. It can be casted to the struct assh_algo_s type.

See also coremod.

FieldDescription
struct assh_algo_with_key_s algo_wk;
uint16_t groups;Bit mask used to define groups in a set of algorithms which can use the same type of key. This used to reduce the number of authentication retries with the same key.
assh_sign_generate_t * f_generate;
assh_sign_check_t * f_check;

const struct assh_algo_sign_s assh_sign_none [link] 

This constant is declared in assh/assh_sign.h source file, line 153.

Dummy signature algorithm

#define ASSH_SIGN_CHECK_FCN(n) [link] 

This macro is for internal use only.

This macro is declared in assh/assh_sign.h source file, line 53.

This macro expands to:

ASSH_WARN_UNUSED_RESULT assh_status_t (n)
(struct assh_context_s *c,
const struct assh_key_s *key, size_t data_count,
const struct assh_cbuffer_s data[],
const uint8_t *sign, size_t sign_len, assh_safety_t *safety)

See also assh_sign_check_t.

#define ASSH_SIGN_GENERATE_FCN(n) [link] 

This macro is for internal use only.

This macro is declared in assh/assh_sign.h source file, line 42.

This macro expands to:

ASSH_WARN_UNUSED_RESULT assh_status_t(n)
(struct assh_context_s *c,
const struct assh_key_s *key, size_t data_count,
const struct assh_cbuffer_s data[], uint8_t *sign, size_t *sign_len)

See also assh_sign_generate_t.

assh_status_t assh_sign_check(struct assh_context_s *c, const struct assh_algo_sign_s *sa, const struct assh_key_s *key, size_t data_count, const struct assh_cbuffer_s data[], const uint8_t *sign, size_t sign_len, assh_safety_t *safety) [link] 

This function is for internal use only.

This function is declared in assh/assh_sign.h source file, line 108.

This function checks the signature of the passed data using the provided key. The data can be split into multiple buffers. The data_count parameter must specify the number of data buffers used.

typedef assh_status_t (assh_sign_check_t)(struct assh_context_s *c, const struct assh_key_s *key, size_t data_count, const struct assh_cbuffer_s data[], const uint8_t *sign, size_t sign_len, assh_safety_t *safety) [link] 

This typedef is for internal use only.

This typedef is declared in assh/assh_sign.h source file, line 63.

This declaration involves expansion of the ASSH_SIGN_CHECK_FCN macro.

This typedef defines the function type for the signature checking operation of the signature module interface.

See also assh_sign_check.

assh_status_t assh_sign_generate(struct assh_context_s *c, const struct assh_algo_sign_s *sa, const struct assh_key_s *key, size_t data_count, const struct assh_cbuffer_s data[], uint8_t *sign, size_t *sign_len) [link] 

This function is for internal use only.

This function is declared in assh/assh_sign.h source file, line 99.

This function computes the signature of the passed data using the provided private key then writes it to the sign buffer. The sign_len parameter indicates the size of the buffer and is updated with the actual size of the signature blob.

The data to sign can be split into multiple buffers. The data_count parameter must specify the number of data buffers to use.

If the sign parameter is NULL, the function updates the sign_len parmeter with a size value which is greater or equal to what is needed to hold the signature blob. In this case, the data_* parameters are not used and the key need not be private.

typedef assh_status_t (assh_sign_generate_t)(struct assh_context_s *c, const struct assh_key_s *key, size_t data_count, const struct assh_cbuffer_s data[], uint8_t *sign, size_t *sign_len) [link] 

This typedef is for internal use only.

This typedef is declared in assh/assh_sign.h source file, line 51.

This declaration involves expansion of the ASSH_SIGN_GENERATE_FCN macro.

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

See also assh_sign_generate.

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