summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2022-08-27 09:10:10 +0000
committerjsing <>2022-08-27 09:10:10 +0000
commit2b58d3e3f3e02023efcf3593785dc098eddb50fd (patch)
treea649aa4a6d6013c8da259c1f69922123aa30650a /src
parent26f09e9deb62f8eab0a3cc7da8917dd632b1c770 (diff)
downloadopenbsd-2b58d3e3f3e02023efcf3593785dc098eddb50fd.tar.gz
openbsd-2b58d3e3f3e02023efcf3593785dc098eddb50fd.tar.bz2
openbsd-2b58d3e3f3e02023efcf3593785dc098eddb50fd.zip
Provide additional defines for EVP AEAD.
While these will not be used by LibreSSL, they are used by some QUIC implementations (such as ngtcp2). ok tb@
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/evp/evp.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h
index 0b7fc08fc8..73d2b16b51 100644
--- a/src/lib/libcrypto/evp/evp.h
+++ b/src/lib/libcrypto/evp/evp.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: evp.h,v 1.104 2022/08/20 19:22:28 jsing Exp $ */ 1/* $OpenBSD: evp.h,v 1.105 2022/08/27 09:10:10 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -282,6 +282,23 @@ extern "C" {
282/* Length of tag for TLS */ 282/* Length of tag for TLS */
283#define EVP_GCM_TLS_TAG_LEN 16 283#define EVP_GCM_TLS_TAG_LEN 16
284 284
285#if defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_INTERNAL)
286/* CCM TLS constants */
287/* Length of fixed part of IV derived from PRF */
288#define EVP_CCM_TLS_FIXED_IV_LEN 4
289/* Length of explicit part of IV part of TLS records */
290#define EVP_CCM_TLS_EXPLICIT_IV_LEN 8
291/* Total length of CCM IV length for TLS */
292#define EVP_CCM_TLS_IV_LEN 12
293/* Length of tag for TLS */
294#define EVP_CCM_TLS_TAG_LEN 16
295/* Length of CCM8 tag for TLS */
296#define EVP_CCM8_TLS_TAG_LEN 8
297
298/* Length of tag for TLS */
299#define EVP_CHACHAPOLY_TLS_TAG_LEN 16
300#endif
301
285typedef struct evp_cipher_info_st { 302typedef struct evp_cipher_info_st {
286 const EVP_CIPHER *cipher; 303 const EVP_CIPHER *cipher;
287 unsigned char iv[EVP_MAX_IV_LENGTH]; 304 unsigned char iv[EVP_MAX_IV_LENGTH];