| OLD | NEW |
| 1 /* | 1 /* |
| 2 * alloc.h | 2 * aes_gcm_ossl.h |
| 3 * | 3 * |
| 4 * interface to memory allocation and deallocation, with optional debugging | 4 * Header for AES Galois Counter Mode. |
| 5 * | 5 * |
| 6 * David A. McGrew | 6 * John A. Foley |
| 7 * Cisco Systems, Inc. | 7 * Cisco Systems, Inc. |
| 8 * |
| 8 */ | 9 */ |
| 9 /* | 10 /* |
| 10 * | 11 * |
| 11 * Copyright (c) 2001-2006 Cisco Systems, Inc. | 12 * Copyright (c) 2013, Cisco Systems, Inc. |
| 12 * All rights reserved. | 13 * All rights reserved. |
| 13 * | 14 * |
| 14 * Redistribution and use in source and binary forms, with or without | 15 * Redistribution and use in source and binary forms, with or without |
| 15 * modification, are permitted provided that the following conditions | 16 * modification, are permitted provided that the following conditions |
| 16 * are met: | 17 * are met: |
| 17 * | 18 * |
| 18 * Redistributions of source code must retain the above copyright | 19 * Redistributions of source code must retain the above copyright |
| 19 * notice, this list of conditions and the following disclaimer. | 20 * notice, this list of conditions and the following disclaimer. |
| 20 * | 21 * |
| 21 * Redistributions in binary form must reproduce the above | 22 * Redistributions in binary form must reproduce the above |
| (...skipping 13 matching lines...) Expand all Loading... |
| 35 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 36 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 36 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 37 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 37 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 38 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | 39 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
| 39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 40 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 40 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 41 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 41 * OF THE POSSIBILITY OF SUCH DAMAGE. | 42 * OF THE POSSIBILITY OF SUCH DAMAGE. |
| 42 * | 43 * |
| 43 */ | 44 */ |
| 44 | 45 |
| 46 #ifndef AES_GCM_OSSL_H |
| 47 #define AES_GCM_OSSL_H |
| 45 | 48 |
| 46 #ifndef CRYPTO_ALLOC_H | 49 #include "cipher.h" |
| 47 #define CRYPTO_ALLOC_H | 50 #include "srtp.h" |
| 51 #include <openssl/evp.h> |
| 52 #include <openssl/aes.h> |
| 48 | 53 |
| 49 #include "datatypes.h" | 54 typedef struct { |
| 55 v256_t key; |
| 56 int key_size; |
| 57 int tag_len; |
| 58 EVP_CIPHER_CTX ctx; |
| 59 cipher_direction_t dir; |
| 60 } aes_gcm_ctx_t; |
| 50 | 61 |
| 51 void * | 62 #endif /* AES_GCM_OSSL_H */ |
| 52 crypto_alloc(size_t size); | |
| 53 | 63 |
| 54 void | |
| 55 crypto_free(void *ptr); | |
| 56 | |
| 57 #endif /* CRYPTO_ALLOC_H */ | |
| OLD | NEW |