Skip to content

C implementation of RC4-HMAC-MD5 authentication used by Kerberos

License

Notifications You must be signed in to change notification settings

rkalz/RC4-HMAC-MD5

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RC4-HMAC-MD5

C implementation of RC4-HMAC-MD5 authentication used by Kerberos

Dependencies

The implementation uses OpenSSL's libcrypto library.

Usage

Adding to Your Project

The implementation is located entirely in RC4_HMAC_MD5/RC4_HMAC_MD5.h.

Remember to compile with -lcrypto if using GCC or Clang.

Encryption

const unsigned char* key = "0123456789ABCDEF";                        // Assumes keys are length 16
const char* data = "data";
const unsigned char* encdata = encrypt(key, 1, data, strlen(data));   // Exclude null terminator if using const char*

Decryption

const int enclen = HMAC_MD5_LENGTH + CONFOUNDER_LENGTH + strlen(data);
int result = decrypt(key, 1, encdata, enclen);

About

C implementation of RC4-HMAC-MD5 authentication used by Kerberos

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages