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

Random Proximity Identifier functionality. More...

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

Data Structures

struct  Rpi
 The structure used to represent a Rolling Proximity Identifier. More...
 

Macros

#define RPI_INFO_PREFIX   "CT-RPI"
 

Functions

Rpi * rpi_new ()
 
void rpi_delete (Rpi *data)
 
bool rpi_generate_proximity_id (Rpi *data, Dtk const *dtk, uint8_t time_interval_number)
 
unsigned char const * rpi_get_proximity_id (Rpi const *data)
 
uint8_t rpi_get_time_interval_number (Rpi const *data)
 
void rpi_assign (Rpi *data, unsigned char const *rpi_bytes, uint8_t time_interval_number)
 
bool rpi_compare (Rpi const *data, Rpi const *comparitor)
 

Detailed Description

Random Proximity Identifier 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 Random Proximity Identifier (RPI). It's largely internal. The functionality from Contrac should generally be used in preference to this.