#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 A2_POST ":00000000000000000000000000000000" |
#define A2_PRE "AUTHENTICATE:" |
#define COLON ":" |
#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_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_CONFIDENTIALITY_KEY_STRING "Digest H(A1) to server-to-client sealing key magic constant" |
#define DERIVE_SERVER_CONFIDENTIALITY_KEY_STRING_LEN 59 |
#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 HEXCHAR | ( | c | ) | ((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" |
#define QOP_AUTH_CONF "auth-conf" |
#define QOP_AUTH_INT "auth-int" |
#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.
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().