digesthmac.c File Reference

#include "digesthmac.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <gc.h>

Go to the source code of this file.

Defines

#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 RESPONSE_LENGTH   32
#define RSPAUTH_LENGTH   RESPONSE_LENGTH
#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], char *nonce, unsigned long nc, char *cnonce, digest_md5_qop qop, char *authzid, char *digesturi, int rspauth, digest_md5_cipher cipher, char *kic, char *kis, char *kcc, char *kcs)


Define Documentation

#define A2_POST   ":00000000000000000000000000000000"

Definition at line 49 of file digesthmac.c.

Referenced by digest_md5_hmac().

#define A2_PRE   "AUTHENTICATE:"

Definition at line 48 of file digesthmac.c.

Referenced by digest_md5_hmac().

#define COLON   ":"

Definition at line 50 of file digesthmac.c.

Referenced by digest_md5_hmac().

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

Definition at line 60 of file digesthmac.c.

Referenced by digest_md5_hmac().

#define DERIVE_CLIENT_CONFIDENTIALITY_KEY_STRING_LEN   59

Definition at line 62 of file digesthmac.c.

Referenced by digest_md5_hmac().

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

Definition at line 54 of file digesthmac.c.

Referenced by digest_md5_hmac().

#define DERIVE_CLIENT_INTEGRITY_KEY_STRING_LEN   65

Definition at line 56 of file digesthmac.c.

Referenced by digest_md5_hmac().

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

Definition at line 63 of file digesthmac.c.

Referenced by digest_md5_hmac().

#define DERIVE_SERVER_CONFIDENTIALITY_KEY_STRING_LEN   59

Definition at line 65 of file digesthmac.c.

Referenced by digest_md5_hmac().

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

Definition at line 57 of file digesthmac.c.

Referenced by digest_md5_hmac().

#define DERIVE_SERVER_INTEGRITY_KEY_STRING_LEN   65

Definition at line 59 of file digesthmac.c.

Referenced by digest_md5_hmac().

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

Definition at line 42 of file digesthmac.c.

#define MD5LEN   16

Definition at line 51 of file digesthmac.c.

#define QOP_AUTH   "auth"

Definition at line 44 of file digesthmac.c.

Referenced by digest_md5_hmac().

#define QOP_AUTH_CONF   "auth-conf"

Definition at line 46 of file digesthmac.c.

Referenced by digest_md5_hmac().

#define QOP_AUTH_INT   "auth-int"

Definition at line 45 of file digesthmac.c.

Referenced by digest_md5_hmac().

#define RESPONSE_LENGTH   32

Definition at line 52 of file digesthmac.c.

#define RSPAUTH_LENGTH   RESPONSE_LENGTH

Definition at line 53 of file digesthmac.c.


Function Documentation

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

Definition at line 81 of file digesthmac.c.

References A2_POST, A2_PRE, COLON, DERIVE_CLIENT_CONFIDENTIALITY_KEY_STRING, DERIVE_CLIENT_CONFIDENTIALITY_KEY_STRING_LEN, DERIVE_CLIENT_INTEGRITY_KEY_STRING, DERIVE_CLIENT_INTEGRITY_KEY_STRING_LEN, DERIVE_SERVER_CONFIDENTIALITY_KEY_STRING, DERIVE_SERVER_CONFIDENTIALITY_KEY_STRING_LEN, DERIVE_SERVER_INTEGRITY_KEY_STRING, DERIVE_SERVER_INTEGRITY_KEY_STRING_LEN, DIGEST_MD5_CIPHER_RC4_40, DIGEST_MD5_CIPHER_RC4_56, DIGEST_MD5_QOP_AUTH, DIGEST_MD5_QOP_AUTH_CONF, DIGEST_MD5_QOP_AUTH_INT, HEXCHAR, QOP_AUTH, QOP_AUTH_CONF, and QOP_AUTH_INT.

Referenced by _gsasl_digest_md5_client_step(), _gsasl_digest_md5_server_step(), and main().


Generated on Tue Aug 22 12:06:07 2006 for gsasl by  doxygen 1.4.7