45#include "../../QSC/QSC/rcs.h"
46#include "../../QSC/QSC/socketclient.h"
#define SKDP_STH_SIZE
The session token hash size (in bytes) for 256-bit security.
Definition skdp.h:347
#define SKDP_KID_SIZE
The SKDP key identity size in bytes.
Definition skdp.h:172
#define SKDP_DDK_SIZE
The device derivation key size (in bytes) for 256-bit security.
Definition skdp.h:293
skdp_errors
The SKDP error values.
Definition skdp.h:630
skdp_flags
The SKDP packet flag values.
Definition skdp.h:658
SKDP_EXPORT_API void skdp_client_initialize(skdp_client_state *ctx, const skdp_device_key *ckey)
Initialize the SKDP client state.
Definition skdpclient.c:508
SKDP_EXPORT_API skdp_errors skdp_client_decrypt_packet(skdp_client_state *ctx, const skdp_network_packet *packetin, uint8_t *message, size_t *msglen)
Decrypt an SKDP packet.
Definition skdpclient.c:588
SKDP_EXPORT_API skdp_errors skdp_client_connect_ipv6(skdp_client_state *ctx, qsc_socket *sock, const qsc_ipinfo_ipv6_address *address, uint16_t port)
Establish an IPv6 connection and perform the SKDP key exchange.
Definition skdpclient.c:541
SKDP_EXPORT_API skdp_errors skdp_client_ratchet_request(skdp_client_state *ctx, skdp_network_packet *packetout)
Send a ratchet request to the server.
SKDP_EXPORT_API void skdp_client_send_error(const qsc_socket *sock, skdp_errors error)
Send an error code to the remote host.
Definition skdpclient.c:487
SKDP_EXPORT_API skdp_errors skdp_client_encrypt_packet(skdp_client_state *ctx, const uint8_t *message, size_t msglen, skdp_network_packet *packetout)
Encrypt a message into an SKDP packet.
Definition skdpclient.c:650
SKDP_EXPORT_API skdp_errors skdp_client_connect_ipv4(skdp_client_state *ctx, qsc_socket *sock, const qsc_ipinfo_ipv4_address *address, uint16_t port)
Establish an IPv4 connection and perform the SKDP key exchange.
Definition skdpclient.c:520
SKDP_EXPORT_API void skdp_client_connection_close(skdp_client_state *ctx, qsc_socket *sock, skdp_errors error)
Close the remote session and dispose of client resources.
Definition skdpclient.c:562
The SKDP client state structure.
Definition skdpclient.h:85
uint64_t txseq
Definition skdpclient.h:94
uint8_t ssh[SKDP_STH_SIZE]
Definition skdpclient.h:91
uint8_t kid[SKDP_KID_SIZE]
Definition skdpclient.h:90
uint64_t expiration
Definition skdpclient.h:92
qsc_rcs_state txcpr
Definition skdpclient.h:87
uint64_t rxseq
Definition skdpclient.h:93
skdp_flags exflag
Definition skdpclient.h:95
uint8_t ddk[SKDP_DDK_SIZE]
Definition skdpclient.h:88
qsc_rcs_state rxcpr
Definition skdpclient.h:86
uint8_t dsh[SKDP_STH_SIZE]
Definition skdpclient.h:89
The SKDP device key structure.
Definition skdp.h:584
The SKDP network packet structure.
Definition skdp.h:614