microsoft / PQCrypto-LWEKE
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 118 units with 2,403 lines of code in units (52.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (100 lines of code)
    • 24 simple units (669 lines of code)
    • 92 very simple units (1,634 lines of code)
0% | 0% | 4% | 27% | 67%
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% | 0% | 5% | 24% | 70%
py0% | 0% | 0% | 40% | 59%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 0% | 18% | 11% | 69%
src/sha3/keccak4x0% | 0% | 0% | 54% | 45%
python30% | 0% | 0% | 40% | 59%
src/sha30% | 0% | 0% | 16% | 84%
src/random0% | 0% | 0% | 87% | 12%
src/aes0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
int frodo_mul_add_as_plus_e()
in src/frodo_macrify_reference.c
50 11 4
int frodo_mul_add_sa_plus_e()
in src/frodo_macrify_reference.c
50 11 4
def genAES128()
in python3/frodokem.py
11 10 2
def encode()
in python3/frodokem.py
11 9 2
def decode()
in python3/frodokem.py
12 9 2
def pack()
in python3/frodokem.py
14 9 2
def unpack()
in python3/frodokem.py
8 9 4
def __init__()
in python3/frodokem.py
25 8 2
def __print_intermediate_value()
in python3/frodokem.py
17 8 3
def genSHAKE128()
in python3/frodokem.py
11 8 2
int randombytes()
in src/random/random.c
29 8 2
void KeccakP1600times4_ExtractAndAddBytes()
in src/sha3/keccak4x/KeccakP-1600-times4-SIMD256.c
35 8 6
def sample_matrix()
in python3/frodokem.py
6 7 4
def __matrix_mul()
in python3/frodokem.py
13 6 3
def kem_decaps()
in python3/frodokem.py
67 6 3
static void keccak_absorb()
in src/sha3/fips202.c
21 6 5
static void keccak_absorb4x()
in src/sha3/fips202x4.c
55 6 8
void KeccakP1600times4_AddBytes()
in src/sha3/keccak4x/KeccakP-1600-times4-SIMD256.c
31 6 5
void KeccakP1600times4_AddLanesAll()
in src/sha3/keccak4x/KeccakP-1600-times4-SIMD256.c
41 6 4
void KeccakP1600times4_OverwriteBytes()
in src/sha3/keccak4x/KeccakP-1600-times4-SIMD256.c
27 6 5