libcontrac
A library for contact tracing
Data Structures | Macros | Functions
dtk.c File Reference

Daily Tracing Key functionality. More...

#include <stdlib.h>
#include <string.h>
#include <stddef.h>
#include <stdint.h>
#include <openssl/crypto.h>
#include <openssl/kdf.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include "contrac/contrac.h"
#include "contrac/utils.h"
#include "contrac/log.h"
#include "contrac/dtk.h"
Include dependency graph for dtk.c:

Data Structures

struct  Dtk
 The structure used to represent a Daily Tracing Key. More...
 

Macros

#define DTK_INFO_PREFIX   "CT-DTK"
 

Functions

Dtk * dtk_new ()
 
void dtk_delete (Dtk *data)
 
bool dtk_generate_daily_key (Dtk *data, Contrac const *contrac, uint32_t day_number)
 
unsigned char const * dtk_get_daily_key (Dtk const *data)
 
uint32_t dtk_get_day_number (Dtk const *data)
 
void dtk_assign (Dtk *data, unsigned char const *dtk_bytes, uint32_t day_number)
 

Detailed Description

Daily Tracing Key functionality.

Author
David Llewellyn-Jones david.nosp@m.@fly.nosp@m.pig.c.nosp@m.o.uk
Version
0.01

LICENSE

Copyright David Llewellyn-Jones, 2020 Released under the GPLv2.

DESCRIPTION

This class is used to generate and manage the Daily Tracing Key (DTK). It's largely internal. The functionality from Contrac should generally be used in preference to this.