gsasl  1.10.0
About: GNU SASL is an implementation of the Simple Authentication and Security Layer (SASL). Development version.
  Fossies Dox: gsasl-1.10.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

digesthmac.c File Reference
#include "digesthmac.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <gc.h>
Include dependency graph for digesthmac.c:

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[16], 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 49 of file digesthmac.c.

◆ A2_PRE

#define A2_PRE   "AUTHENTICATE:"

Definition at line 48 of file digesthmac.c.

◆ COLON

#define COLON   ":"

Definition at line 50 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 58 of file digesthmac.c.

◆ DERIVE_CLIENT_CONFIDENTIALITY_KEY_STRING_LEN

#define DERIVE_CLIENT_CONFIDENTIALITY_KEY_STRING_LEN   59

Definition at line 60 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 52 of file digesthmac.c.

◆ DERIVE_CLIENT_INTEGRITY_KEY_STRING_LEN

#define DERIVE_CLIENT_INTEGRITY_KEY_STRING_LEN   65

Definition at line 54 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 61 of file digesthmac.c.

◆ DERIVE_SERVER_CONFIDENTIALITY_KEY_STRING_LEN

#define DERIVE_SERVER_CONFIDENTIALITY_KEY_STRING_LEN   59

Definition at line 63 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 55 of file digesthmac.c.

◆ DERIVE_SERVER_INTEGRITY_KEY_STRING_LEN

#define DERIVE_SERVER_INTEGRITY_KEY_STRING_LEN   65

Definition at line 57 of file digesthmac.c.

◆ HEXCHAR

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

Definition at line 42 of file digesthmac.c.

◆ MD5LEN

#define MD5LEN   16

Definition at line 51 of file digesthmac.c.

◆ QOP_AUTH

#define QOP_AUTH   "auth"

Definition at line 44 of file digesthmac.c.

◆ QOP_AUTH_CONF

#define QOP_AUTH_CONF   "auth-conf"

Definition at line 46 of file digesthmac.c.

◆ QOP_AUTH_INT

#define QOP_AUTH_INT   "auth-int"

Definition at line 45 of file digesthmac.c.

Function Documentation

◆ digest_md5_hmac()