LCOV - code coverage report
Current view: top level - tls - s2n_crypto_constants.h (source / functions) Hit Total Coverage
Test: unit_test_coverage.info Lines: 15 15 100.0 %
Date: 2025-08-15 07:28:39 Functions: 0 0 -
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /*
       2                 :            :  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
       3                 :            :  *
       4                 :            :  * Licensed under the Apache License, Version 2.0 (the "License").
       5                 :            :  * You may not use this file except in compliance with the License.
       6                 :            :  * A copy of the License is located at
       7                 :            :  *
       8                 :            :  *  http://aws.amazon.com/apache2.0
       9                 :            :  *
      10                 :            :  * or in the "license" file accompanying this file. This file is distributed
      11                 :            :  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
      12                 :            :  * express or implied. See the License for the specific language governing
      13                 :            :  * permissions and limitations under the License.
      14                 :            :  */
      15                 :            : 
      16                 :            : #pragma once
      17                 :            : 
      18                 :       1887 : #define S2N_TLS_SECRET_LEN         48
      19                 :       8936 : #define S2N_TLS_RANDOM_DATA_LEN    32
      20                 :   59310366 : #define S2N_TLS_SEQUENCE_NUM_LEN   8
      21                 :     747521 : #define S2N_TLS_CIPHER_SUITE_LEN   2
      22                 :          6 : #define S2N_SSLv2_CIPHER_SUITE_LEN 3
      23                 :       5878 : #define S2N_TLS_FINISHED_LEN       12
      24                 :            : #define S2N_SSL_FINISHED_LEN       36
      25                 :            : #define S2N_TLS_MAX_IV_LEN         16
      26                 :            : 
      27                 :            : /* From RFC 5246 6.2.3.3 */
      28                 :     271537 : #define S2N_TLS12_AAD_LEN           13
      29                 :            : #define S2N_TLS_MAX_AAD_LEN         S2N_TLS12_AAD_LEN
      30                 :    4313075 : #define S2N_TLS_GCM_FIXED_IV_LEN    4
      31                 :    4313075 : #define S2N_TLS_GCM_EXPLICIT_IV_LEN 8
      32                 :    4313075 : #define S2N_TLS_GCM_IV_LEN          (S2N_TLS_GCM_FIXED_IV_LEN + S2N_TLS_GCM_EXPLICIT_IV_LEN)
      33                 :    9251669 : #define S2N_TLS_GCM_TAG_LEN         16
      34                 :            : #define S2N_TLS_AES_128_GCM_KEY_LEN 16
      35                 :            : #define S2N_TLS_AES_256_GCM_KEY_LEN 32
      36                 :            : 
      37                 :            : /* TLS 1.3 uses only implicit IVs - RFC 8446 5.3 */
      38                 :            : #define S2N_TLS13_AAD_LEN       5
      39                 :            : #define S2N_TLS13_RECORD_IV_LEN 0
      40                 :      27809 : #define S2N_TLS13_FIXED_IV_LEN  12
      41                 :            : 
      42                 :            : /* From RFC 7905 */
      43                 :            : #define S2N_TLS_CHACHA20_POLY1305_FIXED_IV_LEN    12
      44                 :            : #define S2N_TLS_CHACHA20_POLY1305_EXPLICIT_IV_LEN 0
      45                 :    2115937 : #define S2N_TLS_CHACHA20_POLY1305_IV_LEN          12
      46                 :            : #define S2N_TLS_CHACHA20_POLY1305_KEY_LEN         32
      47                 :    4231644 : #define S2N_TLS_CHACHA20_POLY1305_TAG_LEN         16
      48                 :            : 
      49                 :            : /* RFC 5246 7.4.1.2 */
      50                 :       7068 : #define S2N_TLS_SESSION_ID_MAX_LEN 32

Generated by: LCOV version 1.14