aws / s2n-tls
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 2,074 units with 28,483 lines of code in units (54.4% of code).
    • 0 very complex units (0 lines of code)
    • 5 complex units (670 lines of code)
    • 19 medium complex units (1,082 lines of code)
    • 121 simple units (3,910 lines of code)
    • 1,929 very simple units (22,821 lines of code)
0% | 2% | 3% | 13% | 80%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
c0% | 2% | 3% | 13% | 80%
py0% | 0% | 12% | 32% | 54%
rs0% | 0% | 0% | 12% | 87%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tls0% | 2% | 6% | 16% | 74%
pq-crypto0% | 2% | <1% | 10% | 86%
utils0% | 9% | 8% | 6% | 75%
codebuild0% | 0% | 18% | 19% | 61%
stuffer0% | 0% | 5% | 5% | 89%
crypto0% | 0% | 0% | 16% | 83%
scram0% | 0% | 0% | 76% | 23%
bindings0% | 0% | 0% | 12% | 87%
error0% | 0% | 0% | 0% | 100%
scripts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
void fpinv_chain_mont()
in pq-crypto/sike_r1/fpx_r1.c
98 46 1
int s2n_record_writev()
in tls/s2n_record_write.c
169 36 6
static S2N_RESULT process_state()
in utils/s2n_asn1_time.c
145 35 3
static void fpinv_chain_mont()
in pq-crypto/sike_r3/sikep434r3_fpx.c
140 35 1
118 28 4
static int s2n_handshake_read_io()
in tls/s2n_handshake_io.c
82 22 1
int s2n_conn_set_handshake_type()
in tls/s2n_handshake_io.c
54 21 1
67 20 3
def main()
in codebuild/create_project.py
62 19 2
ssize_t s2n_recv_impl()
in tls/s2n_recv.c
69 18 4
static int s2n_set_cipher_as_server()
in tls/s2n_cipher_suites.c
63 18 4
74 17 5
int s2n_post_handshake_recv()
in tls/s2n_post_handshake.c
46 17 1
int s2n_negotiate_impl()
in tls/s2n_handshake_io.c
61 17 2
S2N_RESULT s2n_inet_ntop()
in utils/s2n_rfc5952.c
70 17 3
int s2n_connection_set_config()
in tls/s2n_connection.c
48 15 2
66 14 6
int s2n_stuffer_read_base64()
in stuffer/s2n_stuffer_base64.c
44 13 2
void secure_set_bits_avx512()
in pq-crypto/bike_r3/sampling_avx512.c
41 13 4
int s2n_conn_update_handshake_hashes()
in tls/s2n_handshake_transcript.c
37 12 2