Module odoh_rs::protocol[][src]

API for protocol functionality such as creating and parsing ODoH queries and responses.

Structs

ObliviousDoHConfig

Contains version and encryption information. Based on the version specified, the contents can differ.

ObliviousDoHConfigContents

Contains the HPKE suite parameters and the resolver (target’s) public key.

ObliviousDoHConfigs

Supplies config information to the client.

ObliviousDoHKeyPair

ObliviousDoHKeyPair supplies relevant encryption/decryption information required by the target resolver to process DNS queries.

ObliviousDoHMessage

Main structure used to transfer queries and responses.

ObliviousDoHQueryBody

Contains the raw dns query from client and associated padding

ObliviousDoHResponseBody

Contains the raw dns response from resolver and associated padding

ResponseNonce

Enums

ObliviousDoHMessageType

ObliviousDoHMessageType is supplied at the beginning of every ODoH message. It is used to specify whether a message is a query or a response.

Constants

ODOH_HTTP_HEADER

HTTP header required for sending queries and responses

ODOH_VERSION

ODoH version supported by this library

RESPONSE_NONCE_SIZE

This is the maximum of AEAD_KEY_SIZE and AEAD_NONCE_SIZE

Traits

Deserialize

Deserialize from IETF wireformat that is similar to XDR

ObliviousDoHMessagePlaintext

Interface for raw queries and responses

Serialize

Serialize to IETF wireformat that is similar to XDR

Functions

create_query_msg

Create a query to send to the server, and a client secret from exporting the client context.

create_response_msg

This function creates an ObliviousDoHResponseBody from the DNS response resolver_resp sent by the resolver. It then encrypts this response body, creates an ObliviousDoHMessage and serializes it.

get_supported_config

Returns the config supported by the library from a buffer containing odohconfigs.

parse_received_query

Deserializes, validates and decrypts the query sent by the client to generate an ObliviousDoHQueryBody that will be used by the resolver to generate a response.

parse_received_response

Parse bytes into a valid ObliviousDoHResponseBody struct, used by the client when it receives resp_msg from server

Type Definitions

Aead
Kdf
Kem
Kex