-
-
Notifications
You must be signed in to change notification settings - Fork 751
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1034 from ThomasWaldmann/crypto-aead
new crypto code, blackbox, aead internally
- Loading branch information
Showing
13 changed files
with
1,039 additions
and
297 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* some helpers, so our code also works with OpenSSL 1.0.x */ | ||
|
||
#include <string.h> | ||
#include <openssl/opensslv.h> | ||
#include <openssl/hmac.h> | ||
|
||
#if OPENSSL_VERSION_NUMBER < 0x10100000L | ||
|
||
HMAC_CTX *HMAC_CTX_new(void) | ||
{ | ||
HMAC_CTX *ctx = OPENSSL_malloc(sizeof(*ctx)); | ||
if (ctx != NULL) { | ||
memset(ctx, 0, sizeof *ctx); | ||
HMAC_CTX_cleanup(ctx); | ||
} | ||
return ctx; | ||
} | ||
|
||
void HMAC_CTX_free(HMAC_CTX *ctx) | ||
{ | ||
if (ctx != NULL) { | ||
HMAC_CTX_cleanup(ctx); | ||
OPENSSL_free(ctx); | ||
} | ||
} | ||
|
||
const EVP_CIPHER *EVP_aes_256_ocb(void){ /* dummy, so that code compiles */ | ||
return NULL; | ||
} | ||
|
||
const EVP_CIPHER *EVP_chacha20_poly1305(void){ /* dummy, so that code compiles */ | ||
return NULL; | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* some helpers, so our code also works with OpenSSL 1.0.x */ | ||
|
||
#include <openssl/opensslv.h> | ||
#include <openssl/hmac.h> | ||
#include <openssl/evp.h> | ||
|
||
#if OPENSSL_VERSION_NUMBER < 0x10100000L | ||
|
||
HMAC_CTX *HMAC_CTX_new(void); | ||
void HMAC_CTX_free(HMAC_CTX *ctx); | ||
|
||
const EVP_CIPHER *EVP_aes_256_ocb(void); /* dummy, so that code compiles */ | ||
const EVP_CIPHER *EVP_chacha20_poly1305(void); /* dummy, so that code compiles */ | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.