djbdnscurve6 45
djbdnscurve6
Loading...
Searching...
No Matches
Macros | Functions | Variables
curve.c File Reference
#include <sys/types.h>
#include <string.h>
#include <unistd.h>
#include "uint_t.h"
#include "curve.h"
#include "logmsg.h"
#include "open.h"
#include "taia.h"
#include "byte.h"
#include "fmt.h"
#include "dns.h"
#include "base32.h"
#include "response.h"
Include dependency graph for curve.c:

Go to the source code of this file.

Macros

#define TXT_LABLEN   255
 

Functions

void curve_nonce (uint8 nonce[12])
 
int dns_curve_query (const char *buf, const unsigned int len, const unsigned int pos)
 
int dns_curve_pubkey (uint8 *pubkey, const char *buf, const unsigned int pos)
 
int dns_curve_nonce (uint8 *nonce, const char *buf, const unsigned int pos)
 
int dns_curve_cryptobox (uint8 *cryptobox, const char *buf, const unsigned int len, const unsigned int pos)
 
int dns_curve_txtquery (const char *buf, const unsigned int len, const unsigned int pos)
 
int dns_curve_txtqname (uint8 *base32box, const char *buf, const unsigned int len)
 
int dns_curve_txtpubkey (uint8 *pubkey, const char *buf, const unsigned int pos)
 
int dns_curve_txtnonce (uint8 *nonce, const uint8 *base32box)
 
int response_stream (const uint8 *secret, const uint8 *nonce)
 
int response_alttxt (const uint8 *secret, const uint8 *nonce, const char id[2], const unsigned char *query, const unsigned int len, const int rd)
 

Variables

char curvetxtq [10] = { '\x00','\x00','\x00','\x01','\x00','\x00','\x00','\x00','\x00','\x00' }
 
char curvetxtr [14]
 
char txtheader [10]
 

Macro Definition Documentation

◆ TXT_LABLEN

#define TXT_LABLEN   255

Definition at line 15 of file curve.c.

Function Documentation

◆ curve_nonce()

void curve_nonce ( uint8  nonce[12])

Definition at line 17 of file curve.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dns_curve_cryptobox()

int dns_curve_cryptobox ( uint8 *  cryptobox,
const char *  buf,
const unsigned int  len,
const unsigned int  pos 
)

Definition at line 53 of file curve.c.

◆ dns_curve_nonce()

int dns_curve_nonce ( uint8 *  nonce,
const char *  buf,
const unsigned int  pos 
)

Definition at line 47 of file curve.c.

◆ dns_curve_pubkey()

int dns_curve_pubkey ( uint8 *  pubkey,
const char *  buf,
const unsigned int  pos 
)

Definition at line 41 of file curve.c.

◆ dns_curve_query()

int dns_curve_query ( const char *  buf,
const unsigned int  len,
const unsigned int  pos 
)

Definition at line 33 of file curve.c.

◆ dns_curve_txtnonce()

int dns_curve_txtnonce ( uint8 *  nonce,
const uint8 *  base32box 
)

Definition at line 135 of file curve.c.

◆ dns_curve_txtpubkey()

int dns_curve_txtpubkey ( uint8 *  pubkey,
const char *  buf,
const unsigned int  pos 
)

Definition at line 128 of file curve.c.

Here is the call graph for this function:

◆ dns_curve_txtqname()

int dns_curve_txtqname ( uint8 *  base32box,
const char *  buf,
const unsigned int  len 
)

Definition at line 101 of file curve.c.

Here is the call graph for this function:

◆ dns_curve_txtquery()

int dns_curve_txtquery ( const char *  buf,
const unsigned int  len,
const unsigned int  pos 
)

Definition at line 78 of file curve.c.

◆ response_alttxt()

int response_alttxt ( const uint8 *  secret,
const uint8 *  nonce,
const char  id[2],
const unsigned char *  query,
const unsigned int  len,
const int  rd 
)

Definition at line 195 of file curve.c.

Here is the call graph for this function:

◆ response_stream()

int response_stream ( const uint8 *  secret,
const uint8 *  nonce 
)

Definition at line 152 of file curve.c.

Here is the call graph for this function:

Variable Documentation

◆ curvetxtq

char curvetxtq[10] = { '\x00','\x00','\x00','\x01','\x00','\x00','\x00','\x00','\x00','\x00' }

Definition at line 76 of file curve.c.

◆ curvetxtr

char curvetxtr[14]
Initial value:
= { '\x00','\x10',
'\x00','\x01',
'\xc0','\x0c',
'\x00','\x10',
'\x00','\x01',
'\x00','\x00',
'\x00','\x00' }

Definition at line 170 of file curve.c.

◆ txtheader

char txtheader[10]
Initial value:
= { '\x84','\x00',
'\x00','\x01',
'\x00','\x01',
'\x00','\x00',
'\x00','\x00' }

Definition at line 178 of file curve.c.