gsasl  2.2.1
Macros | Functions
digesthmac.c File Reference
#include <config.h>
#include "digesthmac.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <gc.h>

Go to the source code of this file.

Macros

#define HEXCHAR(c)   ((c & 0x0F) > 9 ? 'a' + (c & 0x0F) - 10 : '0' + (c & 0x0F))
 
#define QOP_AUTH   "auth"
 
#define QOP_AUTH_INT   "auth-int"
 
#define QOP_AUTH_CONF   "auth-conf"
 
#define A2_PRE   "AUTHENTICATE:"
 
#define A2_POST   ":00000000000000000000000000000000"
 
#define COLON   ":"
 
#define MD5LEN   16
 
#define DERIVE_CLIENT_INTEGRITY_KEY_STRING    "Digest session key to client-to-server signing key magic constant"
 
#define DERIVE_CLIENT_INTEGRITY_KEY_STRING_LEN   65
 
#define DERIVE_SERVER_INTEGRITY_KEY_STRING    "Digest session key to server-to-client signing key magic constant"
 
#define DERIVE_SERVER_INTEGRITY_KEY_STRING_LEN   65
 
#define DERIVE_CLIENT_CONFIDENTIALITY_KEY_STRING    "Digest H(A1) to client-to-server sealing key magic constant"
 
#define DERIVE_CLIENT_CONFIDENTIALITY_KEY_STRING_LEN   59
 
#define DERIVE_SERVER_CONFIDENTIALITY_KEY_STRING    "Digest H(A1) to server-to-client sealing key magic constant"
 
#define DERIVE_SERVER_CONFIDENTIALITY_KEY_STRING_LEN   59
 

Functions

int digest_md5_hmac (char *output, char secret[MD5LEN], const char *nonce, unsigned long nc, const char *cnonce, digest_md5_qop qop, const char *authzid, const char *digesturi, int rspauth, digest_md5_cipher cipher, char *kic, char *kis, char *kcc, char *kcs)
 

Macro Definition Documentation

◆ A2_POST

#define A2_POST   ":00000000000000000000000000000000"

Definition at line 47 of file digesthmac.c.

◆ A2_PRE

#define A2_PRE   "AUTHENTICATE:"

Definition at line 46 of file digesthmac.c.

◆ COLON

#define COLON   ":"

Definition at line 48 of file digesthmac.c.

◆ DERIVE_CLIENT_CONFIDENTIALITY_KEY_STRING

#define DERIVE_CLIENT_CONFIDENTIALITY_KEY_STRING    "Digest H(A1) to client-to-server sealing key magic constant"

Definition at line 56 of file digesthmac.c.

◆ DERIVE_CLIENT_CONFIDENTIALITY_KEY_STRING_LEN

#define DERIVE_CLIENT_CONFIDENTIALITY_KEY_STRING_LEN   59

Definition at line 58 of file digesthmac.c.

◆ DERIVE_CLIENT_INTEGRITY_KEY_STRING

#define DERIVE_CLIENT_INTEGRITY_KEY_STRING    "Digest session key to client-to-server signing key magic constant"

Definition at line 50 of file digesthmac.c.

◆ DERIVE_CLIENT_INTEGRITY_KEY_STRING_LEN

#define DERIVE_CLIENT_INTEGRITY_KEY_STRING_LEN   65

Definition at line 52 of file digesthmac.c.

◆ DERIVE_SERVER_CONFIDENTIALITY_KEY_STRING

#define DERIVE_SERVER_CONFIDENTIALITY_KEY_STRING    "Digest H(A1) to server-to-client sealing key magic constant"

Definition at line 59 of file digesthmac.c.

◆ DERIVE_SERVER_CONFIDENTIALITY_KEY_STRING_LEN

#define DERIVE_SERVER_CONFIDENTIALITY_KEY_STRING_LEN   59

Definition at line 61 of file digesthmac.c.

◆ DERIVE_SERVER_INTEGRITY_KEY_STRING

#define DERIVE_SERVER_INTEGRITY_KEY_STRING    "Digest session key to server-to-client signing key magic constant"

Definition at line 53 of file digesthmac.c.

◆ DERIVE_SERVER_INTEGRITY_KEY_STRING_LEN

#define DERIVE_SERVER_INTEGRITY_KEY_STRING_LEN   65

Definition at line 55 of file digesthmac.c.

◆ HEXCHAR

#define HEXCHAR (   c)    ((c & 0x0F) > 9 ? 'a' + (c & 0x0F) - 10 : '0' + (c & 0x0F))

Definition at line 40 of file digesthmac.c.

◆ MD5LEN

#define MD5LEN   16

Definition at line 49 of file digesthmac.c.

◆ QOP_AUTH

#define QOP_AUTH   "auth"

Definition at line 42 of file digesthmac.c.

◆ QOP_AUTH_CONF

#define QOP_AUTH_CONF   "auth-conf"

Definition at line 44 of file digesthmac.c.

◆ QOP_AUTH_INT

#define QOP_AUTH_INT   "auth-int"

Definition at line 43 of file digesthmac.c.

Function Documentation

◆ digest_md5_hmac()

int digest_md5_hmac ( char *  output,
char  secret[MD5LEN],
const char *  nonce,
unsigned long  nc,
const char *  cnonce,
digest_md5_qop  qop,
const char *  authzid,
const char *  digesturi,
int  rspauth,
digest_md5_cipher  cipher,
char *  kic,
char *  kis,
char *  kcc,
char *  kcs 
)

Definition at line 77 of file digesthmac.c.