#include "system.h"
#include "dhaes.h"
#include "dlsvdp-dh.h"
#include "blockmode.h"
#include "blockpad.h"
#include "debug.h"
Go to the source code of this file.
Functions | |
int | dhaes_pUsable (const dhaes_pParameters *params) |
int | dhaes_pContextInit (dhaes_pContext *ctxt, const dhaes_pParameters *params) |
int | dhaes_pContextInitDecrypt (dhaes_pContext *ctxt, const dhaes_pParameters *params, const mp32number *pri) |
int | dhaes_pContextInitEncrypt (dhaes_pContext *ctxt, const dhaes_pParameters *params, const mp32number *pub) |
int | dhaes_pContextFree (dhaes_pContext *ctxt) |
int | dhaes_pContextSetup (dhaes_pContext *ctxt, const mp32number *privkey, const mp32number *pubkey, const mp32number *message, cipherOperation op) |
memchunk * | dhaes_pContextEncrypt (dhaes_pContext *ctxt, mp32number *ephemeralPublicKey, mp32number *mac, const memchunk *cleartext, randomGeneratorContext *rng) |
NOTE: blockciphers and keyed hash functions take keys with sizes specified in bits and key data passed in 32-bit words. More... | |
memchunk * | dhaes_pContextDecrypt (dhaes_pContext *ctxt, const mp32number *ephemeralPublicKey, const mp32number *mac, const memchunk *ciphertext) |
This code implements the encryption scheme from the paper:
"DHAES: An Encryption Scheme Based on the Diffie-Hellman Problem" Michel Abdalla, Mihir Bellare, Phillip Rogaway September 1998
Good combinations will be:
Definition in file dhaes.c.
|
Definition at line 306 of file dhaes.c. References blockCipherContext::algo, blockDecrypt, blockCipher::blocksize, CBC, dhaes_pContext::cipher, memchunk::data, DECRYPT, dhaes_pContextSetup, keyedHashFunctionContextDigestMatch, keyedHashFunctionContextUpdateMC, dhaes_pContext::mac, blockCipherContext::param, pkcs5Unpad, dhaes_pContext::pri, memchunk::size, and uint32. |
|
NOTE: blockciphers and keyed hash functions take keys with sizes specified in bits and key data passed in 32-bit words. Both blockcipher and keyed hash function have a min and max key size. This function will split the digest of the shared secret in two halves, and pad with zero bits or truncate if necessary to meet algorithm key size requirements. Definition at line 252 of file dhaes.c. References blockCipherContext::algo, blockEncrypt, blockCipher::blocksize, CBC, dhaes_pContext::cipher, memchunk::data, dhaes_pContextSetup, dldp_pPair, ENCRYPT, keyedHashFunctionContextDigest, keyedHashFunctionContextUpdateMC, dhaes_pContext::mac, mp32nfree, mp32nwipe, mp32nzero, blockCipherContext::param, dhaes_pContext::param, pkcs5PadCopy, dhaes_pContext::pub, memchunk::size, and uint32. |
|
Definition at line 165 of file dhaes.c. References blockCipherContextFree, dhaes_pContext::cipher, dldp_pFree, dhaes_pContext::hash, hashFunctionContextFree, keyedHashFunctionContextFree, dhaes_pContext::mac, mp32nfree, dhaes_pContext::param, dhaes_pContext::pri, and dhaes_pContext::pub. |
|
|
Definition at line 145 of file dhaes.c. References dhaes_pContextInit, mp32ncopy, and dhaes_pContext::pri. |
|
Definition at line 155 of file dhaes.c. References dhaes_pContextInit, mp32ncopy, and dhaes_pContext::pub. |
|
Definition at line 188 of file dhaes.c. References blockCipherContextSetup, cipherOperation, mp32number::data, dlsvdp_pDHSecret, hashFunctionContextDigest, hashFunctionContextReset, hashFunctionContextUpdateMP32, keyedHashFunctionContextSetup, mp32nfree, mp32nwipe, mp32nzero, mp32number::size, and uint32. Referenced by dhaes_pContextDecrypt, and dhaes_pContextEncrypt. |
|