### BR_PEM_BEGIN_OBJ Source: https://www.bearssl.org/apidoc/globals_p.html Macro representing the start of a PEM object. ```APIDOC ## Macro BR_PEM_BEGIN_OBJ ### Description Represents the beginning marker for a PEM-encoded object. ### File bearssl_pem.h ``` -------------------------------- ### br_hkdf_init Source: https://www.bearssl.org/apidoc/bearssl__kdf_8h.html Initializes an HKDF context with a specified hash function and salt. This function starts the HKDF-Extract process. ```APIDOC ## Function Documentation ## ◆ br_hkdf_init() void br_hkdf_init ( br_hkdf_context * hc, const br_hash_class * digest_vtable, const void * salt, size_t salt_len ) --- HKDF context initialization. More... Parameters hc| HKDF context. digest_vtable| Pointer to the hash function class to be used. salt| Pointer to the salt value. Can be NULL if salt_len is 0. salt_len| Length of the salt value in bytes. ``` -------------------------------- ### br_x509_class_::start_chain Source: https://www.bearssl.org/apidoc/bearssl__x509_8h_source.html Callback function to indicate the start of a certificate chain. It may receive the server name if applicable. ```APIDOC ## br_x509_class_::start_chain ### Description Start a new chain. ### Signature ```c void(* start_chain)(const br_x509_class **ctx, const char *server_name) ``` ### Parameters - **ctx** (*const br_x509_class ***): Pointer to the X.509 class context. - **server_name** (*const char*): The server name, if provided. ``` -------------------------------- ### Global Functions Starting with 'c' Source: https://www.bearssl.org/apidoc/globals_c.html This section details global functions in BearSSL whose names start with the letter 'c'. ```APIDOC ## Global Functions ### br_ccm_aad_inject() * **Description**: Injects Additional Authenticated Data (AAD) into the CCM mode context. * **File**: bearssl_aead.h ### br_ccm_check_tag() * **Description**: Checks the authenticity tag in CCM mode. * **File**: bearssl_aead.h ### br_ccm_flip() * **Description**: Flips the direction of CCM mode operation (e.g., from encryption to decryption). * **File**: bearssl_aead.h ### br_ccm_get_tag() * **Description**: Retrieves the authentication tag generated in CCM mode. * **File**: bearssl_aead.h ### br_ccm_init() * **Description**: Initializes the CCM mode context for AEAD operations. * **File**: bearssl_aead.h ### br_ccm_reset() * **Description**: Resets the CCM mode context, preparing it for a new operation. * **File**: bearssl_aead.h ### br_ccm_run() * **Description**: Executes the CCM mode encryption or decryption process. * **File**: bearssl_aead.h ### br_chacha20_ct_run() * **Description**: Runs the constant-time Cha-Cha20 stream cipher. * **File**: bearssl_block.h ### br_chacha20_sse2_get() * **Description**: Gets the Cha-Cha20 implementation optimized for SSE2. * **File**: bearssl_block.h ### br_chacha20_sse2_run() * **Description**: Runs the Cha-Cha20 stream cipher using SSE2 optimizations. * **File**: bearssl_block.h ``` -------------------------------- ### br_x509_minimal_init_full Source: https://www.bearssl.org/apidoc/globals_func_x.html Initializes a full X.509 decoder context. ```APIDOC ## br_x509_minimal_init_full() ### Description Initializes a full X.509 decoder context. ### Method (Not specified, likely a function call in C) ### Endpoint (Not applicable, this is an SDK function) ### Parameters (Not specified in source) ### Request Example (Not applicable) ### Response (Not specified in source) ``` -------------------------------- ### br_sslio_init Source: https://www.bearssl.org/apidoc/bearssl__ssl_8h_source.html Initialises a simplified I/O wrapper context, setting up the callback functions for reading and writing data to the transport medium. ```APIDOC ## br_sslio_init ### Description Initialises a simplified I/O wrapper context. This function sets up the provided callback functions (`low_read` and `low_write`) which will be used by the SSL engine to interact with the underlying transport medium. Each callback receives an opaque context pointer that can be used arbitrarily. ### Parameters - **io** (br_sslio_context *) - Pointer to the simplified I/O wrapper context to be initialised. - **engine** (br_ssl_engine_context *) - Pointer to the SSL engine context. - **low_read** (int (*)(void *, unsigned char *, size_t)) - Callback function for reading data from the transport medium. - **read_context** (void *) - Opaque context value for the `low_read` callback. - **low_write** (int (*)(void *, const unsigned char *, size_t)) - Callback function for writing data to the transport medium. - **write_context** (void *) - Opaque context value for the `low_write` callback. ``` -------------------------------- ### Global Variables and Functions starting with 'a' Source: https://www.bearssl.org/apidoc/globals_vars.html Lists global variables and functions in BearSSL that start with the letter 'a', along with their respective header files. ```APIDOC ## Global Variables and Functions starting with 'a' ### Description Lists global variables and functions in BearSSL that start with the letter 'a', along with their respective header files. ### Variables and Functions - `br_aes_big_cbcdec_vtable` : bearssl_block.h - `br_aes_big_cbcenc_vtable` : bearssl_block.h - `br_aes_big_ctr_vtable` : bearssl_block.h - `br_aes_big_ctrcbc_vtable` : bearssl_block.h - `br_aes_ct64_cbcdec_vtable` : bearssl_block.h - `br_aes_ct64_cbcenc_vtable` : bearssl_block.h - `br_aes_ct64_ctr_vtable` : bearssl_block.h - `br_aes_ct64_ctrcbc_vtable` : bearssl_block.h - `br_aes_ct_cbcdec_vtable` : bearssl_block.h - `br_aes_ct_cbcenc_vtable` : bearssl_block.h - `br_aes_ct_ctr_vtable` : bearssl_block.h - `br_aes_ct_ctrcbc_vtable` : bearssl_block.h - `br_aes_pwr8_cbcdec_vtable` : bearssl_block.h - `br_aes_pwr8_cbcenc_vtable` : bearssl_block.h - `br_aes_pwr8_ctr_vtable` : bearssl_block.h - `br_aes_pwr8_ctrcbc_vtable` : bearssl_block.h - `br_aes_small_cbcdec_vtable` : bearssl_block.h - `br_aes_small_cbcenc_vtable` : bearssl_block.h - `br_aes_small_ctr_vtable` : bearssl_block.h - `br_aes_small_ctrcbc_vtable` : bearssl_block.h - `br_aes_x86ni_cbcdec_vtable` : bearssl_block.h - `br_aes_x86ni_cbcenc_vtable` : bearssl_block.h - `br_aes_x86ni_ctr_vtable` : bearssl_block.h - `br_aes_x86ni_ctrcbc_vtable` : bearssl_block.h - `br_aesctr_drbg_vtable` : bearssl_rand.h ``` -------------------------------- ### Variables starting with 'p' Source: https://www.bearssl.org/apidoc/functions_vars_p.html This section lists variables in BearSSL whose names start with the letter 'p', along with their corresponding data types. ```APIDOC ## Variables ### p - **Type**: `br_rsa_private_key` - **Description**: Represents an RSA private key. ### pkey - **Type**: `br_x509_trust_anchor` - **Description**: Represents an X.509 trust anchor. ### plen - **Type**: `br_rsa_private_key` - **Description**: Likely related to the length or size of an RSA private key structure. ``` -------------------------------- ### br_sslio_init Source: https://www.bearssl.org/api1.html Initializes the simplified I/O context over an SSL engine and user-defined read/write callbacks. ```APIDOC ## br_sslio_init ### Description Initializes a `br_sslio_context` structure with an SSL engine and two callback functions: one for reading and one for writing. ### Parameters - **`ctx`** (`br_sslio_context*`) - Pointer to the `br_sslio_context` to be initialized. - **`ssl_engine`** (`br_ssl_engine*`) - Pointer to the SSL engine to wrap. - **`read_cb`** (`br_sslio_read_cb`) - Callback function for reading data. - **`write_cb`** (`br_sslio_write_cb`) - Callback function for writing data. ``` -------------------------------- ### Global Functions and Variables starting with 'g' Source: https://www.bearssl.org/apidoc/functions_vars_g.html Lists global functions and variables in BearSSL that start with 'g', along with their associated types or classes. ```APIDOC ## Global 'g' - Functions and Variables ### Description This section lists global functions and variables in the BearSSL library that start with the letter 'g'. It provides their names and the types or classes they are associated with. ### Functions and Variables - **gen** - Associated types: `br_sslrec_ccm_context`, `br_sslrec_chapol_context`, `br_sslrec_gcm_context` - **generate** - Associated class: `br_prng_class` - **generator** - Associated class: `br_ec_impl` - **get_pkey** - Associated class: `br_x509_class` - **get_tag** - Associated class: `br_aead_class` - **get_tag_trunc** - Associated class: `br_aead_class` ``` -------------------------------- ### br_ssl_client_init_full Source: https://www.bearssl.org/apidoc/bearssl__ssl_8h.html Initializes the SSL client context with all supported algorithms and cipher suites, and sets up a companion X.509 validation engine. ```APIDOC ## br_ssl_client_init_full() ### Description Initialises the provided SSL client context with all supported algorithms and cipher suites. It also initialises a companion X.509 validation engine with all supported algorithms, and the provided trust anchors; the X.509 engine will be used by the client context to validate the server's certificate. ### Parameters - **cc** (br_ssl_client_context *) - client context to initialise. - **xc** (br_x509_minimal_context *) - X.509 validation context to initialise. - **trust_anchors** (const br_x509_trust_anchor *) - trust anchors to use. - **trust_anchors_num** (size_t) - number of trust anchors. ``` -------------------------------- ### Global Variables and Functions starting with 'x' Source: https://www.bearssl.org/apidoc/globals_vars.html Lists global variables and functions in BearSSL that start with the letter 'x', along with their respective header files. ```APIDOC ## Global Variables and Functions starting with 'x' ### Description Lists global variables and functions in BearSSL that start with the letter 'x', along with their respective header files. ### Variables and Functions - `br_x509_knownkey_vtable` : bearssl_x509.h - `br_x509_minimal_vtable` : bearssl_x509.h ``` -------------------------------- ### br_x509_minimal_init Source: https://www.bearssl.org/apidoc/globals_func_x.html Initializes a minimal X.509 decoder context. ```APIDOC ## br_x509_minimal_init() ### Description Initializes a minimal X.509 decoder context. ### Method (Not specified, likely a function call in C) ### Endpoint (Not applicable, this is an SDK function) ### Parameters (Not specified in source) ### Request Example (Not applicable) ### Response (Not specified in source) ``` -------------------------------- ### Global Variables and Functions starting with 's' Source: https://www.bearssl.org/apidoc/globals_vars.html Lists global variables and functions in BearSSL that start with the letter 's', along with their respective header files. ```APIDOC ## Global Variables and Functions starting with 's' ### Description Lists global variables and functions in BearSSL that start with the letter 's', along with their respective header files. ### Variables and Functions - `br_sha1_vtable` : bearssl_hash.h - `br_sha224_vtable` : bearssl_hash.h - `br_sha256_vtable` : bearssl_hash.h - `br_sha384_vtable` : bearssl_hash.h - `br_sha512_vtable` : bearssl_hash.h - `br_sslrec_in_cbc_vtable` : bearssl_ssl.h - `br_sslrec_in_ccm_vtable` : bearssl_ssl.h - `br_sslrec_in_chapol_vtable` : bearssl_ssl.h - `br_sslrec_in_gcm_vtable` : bearssl_ssl.h - `br_sslrec_out_cbc_vtable` : bearssl_ssl.h - `br_sslrec_out_ccm_vtable` : bearssl_ssl.h - `br_sslrec_out_chapol_vtable` : bearssl_ssl.h - `br_sslrec_out_clear_vtable` : bearssl_ssl.h - `br_sslrec_out_gcm_vtable` : bearssl_ssl.h ``` -------------------------------- ### br_x509_minimal_init_full Source: https://www.bearssl.org/apidoc/bearssl__x509_8h.html Initializes a minimal X.509 engine with default algorithms. This function is similar to `br_x509_minimal_init` but also sets default implementations for RSA, ECDSA, and standard hash functions, simplifying the setup process. ```APIDOC ## br_x509_minimal_init_full() ### Description Initialise a "minimal" X.509 engine with default algorithms. This function performs the same job as `br_x509_minimal_init()`, but also sets implementations for RSA, ECDSA, and the standard hash functions. ### Parameters - **ctx** (br_x509_minimal_context *) - Context to initialise. - **trust_anchors** (const br_x509_trust_anchor *) - Trust anchors. - **trust_anchors_num** (size_t) - Number of trust anchors. ``` -------------------------------- ### br_ssl_server_init_minu2g Source: https://www.bearssl.org/apidoc/bearssl__ssl_8h.html Initializes an SSL server context with the 'minu2g' profile, including certificate chain and private key. ```APIDOC ## br_ssl_server_init_minu2g ### Description SSL server profile: minu2g. ### Signature `void br_ssl_server_init_minu2g (br_ssl_server_context *cc, const br_x509_certificate *chain, size_t chain_len, const br_ec_private_key *sk)` ``` -------------------------------- ### Global Variables and Functions starting with 'm' Source: https://www.bearssl.org/apidoc/globals_vars.html Lists global variables and functions in BearSSL that start with the letter 'm', along with their respective header files. ```APIDOC ## Global Variables and Functions starting with 'm' ### Description Lists global variables and functions in BearSSL that start with the letter 'm', along with their respective header files. ### Variables and Functions - `br_md5_vtable` : bearssl_hash.h - `br_md5sha1_vtable` : bearssl_hash.h ``` -------------------------------- ### br_sslio_init Source: https://www.bearssl.org/apidoc/bearssl__ssl_8h.html Initializes a simplified I/O wrapper context for SSL connections. ```APIDOC ## br_sslio_init ### Description Initializes a simplified I/O wrapper context for SSL connections. ### Signature `void br_sslio_init (br_sslio_context *ctx, br_ssl_engine_context *engine, int(*low_read)(void *read_context, unsigned char *data, size_t len), void *read_context, int(*low_write)(void *write_context, const unsigned char *data, size_t len), void *write_context)` ``` -------------------------------- ### Global Variables and Functions starting with 'h' Source: https://www.bearssl.org/apidoc/globals_vars.html Lists global variables and functions in BearSSL that start with the letter 'h', along with their respective header files. ```APIDOC ## Global Variables and Functions starting with 'h' ### Description Lists global variables and functions in BearSSL that start with the letter 'h', along with their respective header files. ### Variables and Functions - `br_hmac_drbg_vtable` : bearssl_rand.h ``` -------------------------------- ### br_ssl_server_init_minv2g Source: https://www.bearssl.org/apidoc/bearssl__ssl_8h.html Initializes an SSL server context with the 'minv2g' profile, including certificate chain and private key. ```APIDOC ## br_ssl_server_init_minv2g ### Description SSL server profile: minv2g. ### Signature `void br_ssl_server_init_minv2g (br_ssl_server_context *cc, const br_x509_certificate *chain, size_t chain_len, const br_ec_private_key *sk)` ``` -------------------------------- ### Global Variables and Functions starting with 'g' Source: https://www.bearssl.org/apidoc/globals_vars.html Lists global variables and functions in BearSSL that start with the letter 'g', along with their respective header files. ```APIDOC ## Global Variables and Functions starting with 'g' ### Description Lists global variables and functions in BearSSL that start with the letter 'g', along with their respective header files. ### Variables and Functions - `br_gcm_vtable` : bearssl_aead.h ``` -------------------------------- ### Global Variables and Functions starting with 'e' Source: https://www.bearssl.org/apidoc/globals_vars.html Lists global variables and functions in BearSSL that start with the letter 'e', along with their respective header files. ```APIDOC ## Global Variables and Functions starting with 'e' ### Description Lists global variables and functions in BearSSL that start with the letter 'e', along with their respective header files. ### Variables and Functions - `br_eax_vtable` : bearssl_aead.h - `br_ec_all_m15` : bearssl_ec.h - `br_ec_all_m31` : bearssl_ec.h - `br_ec_c25519_i15` : bearssl_ec.h - `br_ec_c25519_i31` : bearssl_ec.h - `br_ec_c25519_m15` : bearssl_ec.h - `br_ec_c25519_m31` : bearssl_ec.h - `br_ec_p256_m15` : bearssl_ec.h - `br_ec_p256_m31` : bearssl_ec.h - `br_ec_prime_i15` : bearssl_ec.h - `br_ec_prime_i31` : bearssl_ec.h ``` -------------------------------- ### br_ssl_server_init_minu2g Source: https://www.bearssl.org/apidoc/bearssl__ssl_8h_source.html Initializes the SSL server context for the 'minu2g' profile, using an EC private key. ```APIDOC ## br_ssl_server_init_minu2g ### Description SSL server profile: minu2g. ### Signature `void br_ssl_server_init_minu2g(br_ssl_server_context *cc, const br_x509_certificate *chain, size_t chain_len, const br_ec_private_key *sk)` ``` -------------------------------- ### br_ssl_server_init_minf2c Source: https://www.bearssl.org/apidoc/bearssl__ssl_8h.html Initializes an SSL server context with the 'minf2c' profile, including certificate chain and private key. ```APIDOC ## br_ssl_server_init_minf2c ### Description SSL server profile: minf2c. ### Signature `void br_ssl_server_init_minf2c (br_ssl_server_context *cc, const br_x509_certificate *chain, size_t chain_len, const br_ec_private_key *sk)` ``` -------------------------------- ### Global Variables and Functions starting with 'd' Source: https://www.bearssl.org/apidoc/globals_vars.html Lists global variables and functions in BearSSL that start with the letter 'd', along with their respective header files. ```APIDOC ## Global Variables and Functions starting with 'd' ### Description Lists global variables and functions in BearSSL that start with the letter 'd', along with their respective header files. ### Variables and Functions - `br_des_ct_cbcdec_vtable` : bearssl_block.h - `br_des_ct_cbcenc_vtable` : bearssl_block.h - `br_des_tab_cbcdec_vtable` : bearssl_block.h - `br_des_tab_cbcenc_vtable` : bearssl_block.h ``` -------------------------------- ### br_ssl_server_init_minf2g Source: https://www.bearssl.org/apidoc/bearssl__ssl_8h.html Initializes an SSL server context with the 'minf2g' profile, including certificate chain and private key. ```APIDOC ## br_ssl_server_init_minf2g ### Description SSL server profile: minf2g. ### Signature `void br_ssl_server_init_minf2g (br_ssl_server_context *cc, const br_x509_certificate *chain, size_t chain_len, const br_ec_private_key *sk)` ``` -------------------------------- ### Global Variables starting with 'o' Source: https://www.bearssl.org/apidoc/functions_vars_o.html This section lists and describes global variables in BearSSL that start with the letter 'o'. It includes their data types and the contexts or structures they are associated with. ```APIDOC ## Global Variables ### - o - * **oid** : `br_name_element` * **order** : `br_ec_impl` * **out** : `br_hash_class`, `br_sslrec_ccm_context`, `br_sslrec_chapol_context`, `br_sslrec_gcm_context` ``` -------------------------------- ### Variables starting with 'c' Source: https://www.bearssl.org/apidoc/functions_vars_c.html This section details various variables in the BearSSL project that start with the letter 'c'. Each entry lists the variable name and the data structures or functions it is associated with. ```APIDOC ## Variables starting with 'c' ### Description This section details various variables in the BearSSL project that start with the letter 'c'. Each entry lists the variable name and the data structures or functions it is associated with. ### Variables - **c_big**: Associated with `br_aes_gen_cbcdec_keys`, `br_aes_gen_cbcenc_keys`, `br_aes_gen_ctr_keys`, `br_aes_gen_ctrcbc_keys` - **c_ct**: Associated with `br_aes_gen_cbcdec_keys`, `br_aes_gen_cbcenc_keys`, `br_aes_gen_ctr_keys`, `br_aes_gen_ctrcbc_keys`, `br_des_gen_cbcdec_keys` - **c_ct64**: Associated with `br_aes_gen_cbcdec_keys`, `br_aes_gen_cbcenc_keys`, `br_aes_gen_ctr_keys`, `br_aes_gen_ctrcbc_keys` - **c_pwr8**: Associated with `br_aes_gen_cbcdec_keys`, `br_aes_gen_cbcenc_keys`, `br_aes_gen_ctr_keys`, `br_aes_gen_ctrcbc_keys` - **c_small**: Associated with `br_aes_gen_cbcdec_keys`, `br_aes_gen_cbcenc_keys`, `br_aes_gen_ctr_keys`, `br_aes_gen_ctrcbc_keys` - **c_tab**: Associated with `br_des_gen_cbcdec_keys` - **c_x86ni**: Associated with `br_aes_gen_cbcdec_keys`, `br_aes_gen_cbcenc_keys`, `br_aes_gen_ctr_keys`, `br_aes_gen_ctrcbc_keys` - **chain**: Associated with `br_ssl_client_certificate`, `br_ssl_server_choices` - **chain_len**: Associated with `br_ssl_client_certificate`, `br_ssl_server_choices` - **check_length**: Associated with `br_sslrec_in_class` - **check_tag**: Associated with `br_aead_class` - **check_tag_trunc**: Associated with `br_aead_class` - **choose**: Associated with `br_ssl_client_certificate_class`, `br_ssl_server_policy_class` - **cipher_suite**: Associated with `br_ssl_server_choices`, `br_ssl_session_parameters` - **context_size**: Associated with `br_block_cbcdec_class`, `br_block_cbcenc_class`, `br_block_ctr_class`, `br_block_ctrcbc_class`, `br_hash_class`, `br_prng_class`, `br_ssl_client_certificate_class`, `br_ssl_server_policy_class`, `br_ssl_session_cache_class`, `br_sslrec_in_class`, `br_sslrec_out_class`, `br_x509_class` - **ct**: Associated with `br_des_gen_cbcenc_keys` - **ctr**: Associated with `br_block_ctrcbc_class` - **curve**: Associated with `br_ec_private_key`, `br_ec_public_key` ``` -------------------------------- ### br_x509_minimal_init Source: https://www.bearssl.org/apidoc/bearssl__x509_8h_source.html Initializes a 'minimal' X.509 engine. This function sets up the context for certificate path validation, requiring a hash function for Distinguished Name (DN) comparisons and a list of trust anchors. ```APIDOC ## br_x509_minimal_init ### Description Initialises a "minimal" X.509 engine. The `dn_hash_impl` parameter shall be a hash function internally used to match X.500 names (subject/issuer DN, and anchor names). Any standard hash function may be used, but a collision-resistant hash function is advised. After initialization, some implementations for signature verification (hash functions and signature algorithms) MUST be added. ### Parameters - **ctx** (*br_x509_minimal_context* *) - Context to initialise. - **dn_hash_impl** (*const br_hash_class* *) - Hash function for DN comparisons. - **trust_anchors** (*const br_x509_trust_anchor* *) - Trust anchors. - **trust_anchors_num** (*size_t*) - Number of trust anchors. ``` -------------------------------- ### BearSSL Variables and Functions starting with 'e' Source: https://www.bearssl.org/apidoc/functions_vars_e.html This section details specific elements within the BearSSL library that are accessible and start with the letter 'e'. It covers data structures, functions, and macros. ```APIDOC ## Variables and Functions starting with 'e' ### Description This section lists various components within the BearSSL library whose identifiers begin with the letter 'e'. This includes data structures, functions, and macros. ### Components * **e** : `br_rsa_public_key` * Represents an RSA public key structure. * **ec** : `br_x509_pkey` * Represents an X.509 public key structure. * **elen** : `br_rsa_public_key` * Likely related to the length or size of an RSA public key component. * **encrypt** : `br_block_ctrcbc_class`, `br_sslrec_out_class` * Refers to encryption functionalities, possibly within CTR-CBC mode or SSL record output. * **end_cert** : `br_x509_class` * Functionality to end processing of an X.509 certificate. * **end_chain** : `br_x509_class` * Functionality to end processing of an X.509 certificate chain. * **end_name** : `br_ssl_client_certificate_class` * Functionality to end processing of a client certificate name. * **end_name_list** : `br_ssl_client_certificate_class` * Functionality to end processing of a list of client certificate names. * **eng** : `br_ssl_client_context`, `br_ssl_server_context` * Likely refers to an engine or context for SSL client or server operations. ``` -------------------------------- ### br_ssl_server_init_full_ec Source: https://www.bearssl.org/apidoc/bearssl__ssl_8h.html Initializes an SSL server context with the 'full_ec' profile, including certificate chain and private key. ```APIDOC ## br_ssl_server_init_full_ec ### Description SSL server profile: full_ec. ### Signature `void br_ssl_server_init_full_ec (br_ssl_server_context *cc, const br_x509_certificate *chain, size_t chain_len, unsigned cert_issuer_key_type, const br_ec_private_key *sk)` ``` -------------------------------- ### br_ssl_server_init_minu2g Source: https://www.bearssl.org/apidoc/bearssl__ssl_8h_source.html Initializes the SSL server context with the 'minu2g' profile, using only TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256. ```APIDOC ## br_ssl_server_init_minu2g ### Description This profile uses only TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256. ### Parameters - `cc` (br_ssl_server_context *) - Server context to initialise. - `chain` (const br_x509_certificate *) - Server certificate chain. - `chain_len` (size_t) - Certificate chain length (number of certificates). - `sk` (const br_rsa_private_key *) - RSA private key. ``` -------------------------------- ### Big Integer Representation Example (i15) Source: https://www.bearssl.org/bigint.html An example showing the memory representation of the integer 257871904 for the i15 implementation with an announced bit length of 35 bits. It is encoded as four uint16_t values. ```hex 0025 5020 1EBD 0000 ``` -------------------------------- ### br_poly1305_ctmulq_get Source: https://www.bearssl.org/apidoc/globals_p.html Gets the Poly1305 multiplication quotient. ```APIDOC ## Function br_poly1305_ctmulq_get ### Description Retrieves the quotient from a Poly1305 multiplication operation. This is part of the Poly1305 MAC calculation. ### File bearssl_block.h ``` -------------------------------- ### br_ssl_server_init_minr2g Source: https://www.bearssl.org/apidoc/bearssl__ssl_8h.html Initializes an SSL server context with the 'minr2g' profile, including certificate chain and private key. ```APIDOC ## br_ssl_server_init_minr2g ### Description SSL server profile: minr2g. ### Signature `void br_ssl_server_init_minr2g (br_ssl_server_context *cc, const br_x509_certificate *chain, size_t chain_len, const br_rsa_private_key *sk)` ``` -------------------------------- ### br_x509_decoder_init Source: https://www.bearssl.org/apidoc/globals_func_x.html Initializes an X.509 decoder context. ```APIDOC ## br_x509_decoder_init() ### Description Initializes an X.509 decoder context. ### Method (Not specified, likely a function call in C) ### Endpoint (Not applicable, this is an SDK function) ### Parameters (Not specified in source) ### Request Example (Not applicable) ### Response (Not specified in source) ``` -------------------------------- ### br_poly1305_ctmulq_run Source: https://www.bearssl.org/apidoc/globals_p.html Runs the Poly1305 multiplication and gets the quotient. ```APIDOC ## Function br_poly1305_ctmulq_run ### Description Performs the Poly1305 multiplication and returns the quotient. This function is part of the Poly1305 message authentication code (MAC) computation. ### File bearssl_block.h ``` -------------------------------- ### br_x509_minimal_init_full Source: https://www.bearssl.org/apidoc/bearssl__x509_8h_source.html Initializes a 'minimal' X.509 engine with default algorithms. This function sets up the context for certificate validation using default hash implementations and a list of trusted anchors. ```APIDOC ## br_x509_minimal_init_full ### Description Initialise a "minimal" X.509 engine with default algorithms. This function configures the engine with default hash algorithms and a set of trusted certificate anchors. ### Parameters #### Path Parameters - `ctx` (br_x509_minimal_context *) - Pointer to the minimal X.509 context to initialize. - `trust_anchors` (const br_x509_trust_anchor *) - An array of trusted certificate anchors. - `trust_anchors_num` (size_t) - The number of trusted certificate anchors in the array. ``` -------------------------------- ### br_multihash_getimpl Source: https://www.bearssl.org/apidoc/globals_func_m.html Gets the implementation for a given multihash algorithm. ```APIDOC ## br_multihash_getimpl() ### Description Gets the implementation for a given multihash algorithm. ### Function Signature `const br_multihash_class **br_multihash_getimpl(int algorithm)` ### Parameters - `algorithm` (*int*): The identifier for the multihash algorithm. ### Returns - A pointer to the `br_multihash_class` structure for the requested algorithm, or NULL if the algorithm is not supported. ``` -------------------------------- ### br_ssl_server_init_full_rsa Source: https://www.bearssl.org/apidoc/bearssl__ssl_8h.html Initializes an SSL server context with the 'full_rsa' profile, including certificate chain and private key. ```APIDOC ## br_ssl_server_init_full_rsa ### Description SSL server profile: full_rsa. ### Signature `void br_ssl_server_init_full_rsa (br_ssl_server_context *cc, const br_x509_certificate *chain, size_t chain_len, const br_rsa_private_key *sk)` ``` -------------------------------- ### br_rsa_i62_oaep_encrypt_get Source: https://www.bearssl.org/apidoc/globals_r.html Gets the default OAEP encryption implementation for i62. ```APIDOC ## br_rsa_i62_oaep_encrypt_get() ### Description Gets the default OAEP encryption implementation for i62. ### File bearssl_rsa.h ``` -------------------------------- ### br_ssl_server_init_minf2g Source: https://www.bearssl.org/apidoc/bearssl__ssl_8h_source.html Initializes the SSL server context with the 'minf2g' profile, using only TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256. ```APIDOC ## br_ssl_server_init_minf2g ### Description This profile uses only TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256. Server key is EC, and ECDHE key exchange is used. This suite provides forward security, with a higher CPU expense on the client and server (by a factor of about 3 to 4), and a somewhat larger code footprint (compared to "minu2g" and "minv2g"). ### Parameters - `cc` (br_ssl_server_context *) - Server context to initialise. - `chain` (const br_x509_certificate *) - Server certificate chain. - `chain_len` (size_t) - Certificate chain length (number of certificates). - `sk` (const br_ec_private_key *) - EC private key. ``` -------------------------------- ### br_poly1305_ctmulq_get Source: https://www.bearssl.org/apidoc/globals_func_p.html Gets the Poly1305 cipher context with Q-based multiplication. ```APIDOC ## br_poly1305_ctmulq_get bearssl_block.h ### Description Gets the Poly1305 cipher context with Q-based multiplication. ### Method (Not specified, likely a function call) ### Endpoint (Not applicable, SDK function) ### Parameters (Not specified) ### Request Example (Not applicable) ### Response (Not specified) ``` -------------------------------- ### br_hkdf_init() Source: https://www.bearssl.org/apidoc/globals_h.html Initializes an HKDF context with a specific hash algorithm. ```APIDOC ## br_hkdf_init() ### Description Initializes an HKDF context with a specific hash algorithm. This function sets up the context for subsequent operations like injecting key material and producing output. ### File bearssl_kdf.h ``` -------------------------------- ### br_x509_minimal_init Source: https://www.bearssl.org/apidoc/bearssl__x509_8h.html Initializes a minimal X.509 engine. This function requires explicit configuration of signature verification algorithms after initialization. It takes a context, a hash implementation for Distinguished Name comparisons, and an array of trust anchors. ```APIDOC ## br_x509_minimal_init() ### Description Initialise a "minimal" X.509 engine. The `dn_hash_impl` parameter shall be a hash function internally used to match X.500 names (subject/issuer DN, and anchor names). Any standard hash function may be used, but a collision-resistant hash function is advised. After initialization, some implementations for signature verification (hash functions and signature algorithms) MUST be added. ### Parameters - **ctx** (br_x509_minimal_context *) - Context to initialise. - **dn_hash_impl** (const br_hash_class *) - Hash function for DN comparisons. - **trust_anchors** (const br_x509_trust_anchor *) - Trust anchors. - **trust_anchors_num** (size_t) - Number of trust anchors. ``` -------------------------------- ### br_rsa_i62_pkcs1_sign_get Source: https://www.bearssl.org/apidoc/globals_r.html Gets the default PKCS#1 signing implementation for i62. ```APIDOC ## br_rsa_i62_pkcs1_sign_get() ### Description Gets the default PKCS#1 signing implementation for i62. ### File bearssl_rsa.h ``` -------------------------------- ### br_ssl_server_init_minr2g Source: https://www.bearssl.org/apidoc/bearssl__ssl_8h_source.html Initializes the SSL server context with the 'minr2g' profile, using only TLS_RSA_WITH_AES_128_GCM_SHA256. ```APIDOC ## br_ssl_server_init_minr2g ### Description This profile uses only TLS_RSA_WITH_AES_128_GCM_SHA256. Server key is RSA, and RSA key exchange is used (not forward secure, but uses little CPU in the client). ### Parameters - `cc` (br_ssl_server_context *) - Server context to initialise. - `chain` (const br_x509_certificate *) - Server certificate chain. - `chain_len` (size_t) - Certificate chain length (number of certificates). - `sk` (const br_rsa_private_key *) - RSA private key. ``` -------------------------------- ### Session Parameters Management Source: https://www.bearssl.org/apidoc/bearssl__ssl_8h.html Functions to get and set session parameters for the SSL engine. ```APIDOC ## br_ssl_engine_get_session_parameters ### Description Retrieves a copy of the current session parameters from the SSL engine context. ### Signature ```c static void br_ssl_engine_get_session_parameters(const br_ssl_engine_context *cc, br_ssl_session_parameters *pp) ``` ## br_ssl_engine_set_session_parameters ### Description Sets the session parameters for the SSL engine to the provided values. ### Signature ```c static void br_ssl_engine_set_session_parameters(br_ssl_engine_context *cc, const br_ssl_session_parameters *pp) ``` ``` -------------------------------- ### Initialize Simplified SSL I/O Wrapper Source: https://www.bearssl.org/apidoc/bearssl__ssl_8h_source.html Initializes a simplified I/O wrapper context for an SSL engine. It uses provided callback functions for reading from and writing to the transport medium. ```c /** * \brief Initialise a simplified I/O wrapper context. * * The simplified I/O wrapper offers a simpler read/write API for a SSL * engine (client or server), using the provided callback functions for * reading data from, or writing data to, the transport medium. * * The callback functions have the following semantics: * * - Each callback receives an opaque context value (of type `void *`) * that the callback may use arbitrarily (or possibly ignore). * ``` -------------------------------- ### br_chacha20_sse2_get Source: https://www.bearssl.org/apidoc/globals_func_c.html Gets an implementation of the ChaCha20 cipher optimized with SSE2 instructions. Declared in bearssl_block.h. ```APIDOC ## br_chacha20_sse2_get() ### Description Retrieves a ChaCha20 cipher implementation that is optimized using SSE2 instructions for better performance. ### Header bearssl_block.h ``` -------------------------------- ### AEAD Reset Source: https://www.bearssl.org/apidoc/bearssl__aead_8h_source.html Starts a new AEAD computation. The nonce value is provided as a parameter to this function. ```APIDOC ## br_xxx_reset() ### Description Start a new AEAD computation. The nonce value is provided as parameter to this function. ### Method (Implicitly a function call) ### Parameters - **nonce** (pointer to byte array) - The nonce value for the new computation. ``` -------------------------------- ### Initialize Full RSA Server Context Source: https://www.bearssl.org/api1.html Initializes the server SSL context using the 'full RSA' profile. Requires a certificate chain and an RSA private key. Consider alternative methods for managing private keys instead of hardcoding. ```c br_ssl_server_context sc; br_ssl_server_init_full_rsa(&sc, CHAIN, CHAIN_LEN, &SKEY); ``` -------------------------------- ### init Method Source: https://www.bearssl.org/apidoc/structbr__prng__class__.html The init method is responsible for initializing the PRNG context. It takes parameters, an initial seed, and its length to set up the PRNG. ```APIDOC ## ◆ init void(* br_prng_class::init) (const br_prng_class **ctx, const void *params, const void *seed, size_t seed_len) --- Initialisation method. The context to initialise is provided as a pointer to its first field (the vtable pointer); this function sets that first field to a pointer to the vtable. The extra parameters depend on the implementation; each implementation defines what kind of extra parameters it expects (if any). Requirements on the initial seed depend on the implemented PRNG. Parameters ctx| PRNG context to initialise. --- params| extra parameters for the PRNG. seed| initial seed. seed_len| initial seed length (in bytes). ``` -------------------------------- ### Data Structure Fields (i) Source: https://www.bearssl.org/apidoc/functions_i.html This section lists fields starting with 'i' across various data structures. ```APIDOC ## Data Structure Fields ### Fields starting with 'i' - **in** - Belongs to: `br_sslrec_ccm_context`, `br_sslrec_chapol_context`, `br_sslrec_gcm_context` - **init** - Belongs to: `br_block_cbcdec_class`, `br_block_cbcenc_class`, `br_block_ctr_class`, `br_block_ctrcbc_class`, `br_hash_class`, `br_prng_class`, `br_sslrec_in_cbc_class`, `br_sslrec_in_ccm_class`, `br_sslrec_in_chapol_class`, `br_sslrec_in_gcm_class`, `br_sslrec_out_cbc_class`, `br_sslrec_out_ccm_class`, `br_sslrec_out_chapol_class`, `br_sslrec_out_gcm_class` - **inner** - Belongs to: `br_sslrec_in_cbc_class`, `br_sslrec_in_ccm_class`, `br_sslrec_in_chapol_class`, `br_sslrec_in_gcm_class`, `br_sslrec_out_cbc_class`, `br_sslrec_out_ccm_class`, `br_sslrec_out_chapol_class`, `br_sslrec_out_gcm_class` - **iq** - Belongs to: `br_rsa_private_key` - **iqlen** - Belongs to: `br_rsa_private_key` ``` -------------------------------- ### br_md5_init Source: https://www.bearssl.org/apidoc/globals_func_m.html Initializes the MD5 hashing context. ```APIDOC ## br_md5_init() ### Description Initializes the MD5 hashing context. ### Function Signature `void br_md5_init(br_md5_context *ctx)` ### Parameters - `ctx` (*br_md5_context*): Pointer to the MD5 context structure to be initialized. ``` -------------------------------- ### Data Structure Fields (e) Source: https://www.bearssl.org/apidoc/functions_e.html Lists fields starting with 'e' and the data structures they belong to. ```APIDOC ## Data Structure Fields (e) ### Description This section lists fields that start with the letter 'e' and indicates the data structures or classes they are associated with. ### Fields - **e** : br_rsa_public_key - **ec** : br_x509_pkey - **elen** : br_rsa_public_key - **encrypt** : br_block_ctrcbc_class , br_sslrec_out_class - **end_cert** : br_x509_class - **end_chain** : br_x509_class - **end_name** : br_ssl_client_certificate_class - **end_name_list** : br_ssl_client_certificate_class - **eng** : br_ssl_client_context , br_ssl_server_context ``` -------------------------------- ### br_pem_decoder_name() Source: https://www.bearssl.org/apidoc/bearssl__pem_8h.html Retrieves the name of the current PEM object. This is only valid when a 'start of object' event has been raised. ```APIDOC ## ◆ br_pem_decoder_name() | static const char* br_pem_decoder_name | ( | br_pem_decoder_context * | _ctx_| ) | --- inlinestatic Get the name of the encountered object. The encountered object name is defined only when the "start of object" event is raised. That name is normalised to uppercase (for ASCII letters only) and does not include trailing dashes. Parameters ctx| decoder context. --- Returns the current object name. ``` -------------------------------- ### Minimal X.509 Engine Initialization and Configuration Source: https://www.bearssl.org/apidoc/bearssl__x509_8h.html Functions for initializing and configuring the 'minimal' X.509 engine, including setting hash functions, signature verifiers, time, and key length. ```APIDOC ## br_x509_minimal_init ### Description Initialise a "minimal" X.509 engine. ### Signature `void br_x509_minimal_init (br_x509_minimal_context *ctx, const br_hash_class *dn_hash_impl, const br_x509_trust_anchor *trust_anchors, size_t trust_anchors_num)` ## br_x509_minimal_set_hash ### Description Set a supported hash function in an X.509 "minimal" engine. ### Signature `static void br_x509_minimal_set_hash (br_x509_minimal_context *ctx, int id, const br_hash_class *impl)` ## br_x509_minimal_set_rsa ### Description Set a RSA signature verification implementation in the X.509 "minimal" engine. ### Signature `static void br_x509_minimal_set_rsa (br_x509_minimal_context *ctx, br_rsa_pkcs1_vrfy irsa)` ## br_x509_minimal_set_ecdsa ### Description Set a ECDSA signature verification implementation in the X.509 "minimal" engine. ### Signature `static void br_x509_minimal_set_ecdsa (br_x509_minimal_context *ctx, const br_ec_impl *iec, br_ecdsa_vrfy iecdsa)` ## br_x509_minimal_init_full ### Description Initialise a "minimal" X.509 engine with default algorithms. ### Signature `void br_x509_minimal_init_full (br_x509_minimal_context *ctx, const br_x509_trust_anchor *trust_anchors, size_t trust_anchors_num)` ## br_x509_minimal_set_time ### Description Set the validation time for the X.509 "minimal" engine. ### Signature `static void br_x509_minimal_set_time (br_x509_minimal_context *ctx, uint32_t days, uint32_t seconds)` ## br_x509_minimal_set_minrsa ### Description Set the minimal acceptable length for RSA keys (X.509 "minimal" engine). ### Signature `static void br_x509_minimal_set_minrsa (br_x509_minimal_context *ctx, int byte_length)` ## br_x509_minimal_set_name_elements ### Description Set the name elements to gather. ### Signature `static void br_x509_minimal_set_name_elements (br_x509_minimal_context *ctx, br_name_element *elts, size_t num_elts)` ``` -------------------------------- ### br_hmac_init() Source: https://www.bearssl.org/apidoc/globals_h.html Initializes an HMAC context with a key. ```APIDOC ## br_hmac_init() ### Description Initializes an HMAC context with a secret key. This function prepares the HMAC computation with the provided key material. ### File bearssl_hmac.h ``` -------------------------------- ### ECDHE Curve Information Source: https://www.bearssl.org/apidoc/bearssl__ssl_8h.html Function to get the identifier for the curve used for ECDHE key exchange. ```APIDOC ## br_ssl_engine_get_ecdhe_curve ### Description Gets the identifier for the elliptic curve used for Diffie-Hellman Ephemeral (ECDHE) key exchange. ### Signature ```c static int br_ssl_engine_get_ecdhe_curve(br_ssl_engine_context *cc) ``` ``` -------------------------------- ### br_x509_knownkey_init_ec Source: https://www.bearssl.org/apidoc/bearssl__x509_8h.html Initializes a 'known key' X.509 engine with a provided EC public key and its allowed usages. ```APIDOC ## br_x509_knownkey_init_ec() ### Description Initialize a "known key" X.509 engine with a known EC public key. The `usages` parameter indicates the allowed key usages for that key (`BR_KEYTYPE_KEYX` and/or `BR_KEYTYPE_SIGN`). The provided pointers are linked in, not copied, so they must remain valid while the public key may be in usage. ### Parameters - **ctx** (br_x509_knownkey_context *) - context to initialise. - **pk** (const br_ec_public_key *) - known public key. - **usages** (unsigned) - allowed key usages. ``` -------------------------------- ### br_rsa_pkcs1_vrfy_get_default Source: https://www.bearssl.org/apidoc/bearssl__rsa_8h_source.html Gets the "default" RSA implementation for PKCS#1 signature verification. ```APIDOC ## br_rsa_pkcs1_vrfy_get_default ### Description Gets the "default" RSA implementation for PKCS#1 signature verification. ### Parameters - None ### Return Value * `br_rsa_pkcs1_vrfy` - the default PKCS#1 signature verification function pointer. ``` -------------------------------- ### br_rsa_pkcs1_sign_get_default Source: https://www.bearssl.org/apidoc/bearssl__rsa_8h_source.html Gets the "default" RSA implementation for PKCS#1 signature generation. ```APIDOC ## br_rsa_pkcs1_sign_get_default ### Description Gets the "default" RSA implementation for PKCS#1 signature generation. ### Parameters - None ### Return Value * `br_rsa_pkcs1_sign` - the default PKCS#1 signature generation function pointer. ```