awslabs / bike-kem
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 130 units with 2,233 lines of code in units (63.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 7 simple units (259 lines of code)
    • 123 very simple units (1,974 lines of code)
0% | 0% | 0% | 11% | 88%
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% | 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
src/random0% | 0% | 0% | 34% | 65%
src/common0% | 0% | 0% | 30% | 69%
src/decode0% | 0% | 0% | 12% | 87%
src/third_party_src0% | 0% | 0% | 7% | 92%
src/gf2x0% | 0% | 0% | 0% | 100%
include/internal0% | 0% | 0% | 0% | 100%
src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
_INLINE_ uint8_t print_last_block()
in src/common/utilities.c
37 10 3
ret_t sha()
in src/random/sha.c
34 7 3
void secure_set_bits_avx512()
in src/random/sampling_avx512.c
36 7 4
void secure_set_bits_avx2()
in src/random/sampling_avx2.c
36 7 4
static void keccak_absorb()
in src/third_party_src/fips202.c
24 6 5
_INLINE_ void find_err1()
in src/decode/decode.c
34 6 7
_INLINE_ ret_t sha_update()
in src/random/sha.c
58 6 3
_INLINE_ void generate_map()
in src/gf2x/gf2x_ksqr_avx512.c
21 5 2
void gf2x_mod_inv()
in src/gf2x/gf2x_inv.c
33 5 2
_INLINE_ void generate_map()
in src/gf2x/gf2x_ksqr_avx2.c
22 5 2
_INLINE_ void gf2x_ctx_init()
in include/internal/gf2x_internal.h
41 5 1
_INLINE_ void find_err2()
in src/decode/decode.c
24 4 6
ret_t decode()
in src/decode/decode.c
46 4 3
void secure_set_bits_port()
in src/random/sampling_portable.c
25 4 4
int is_new_avx512()
in src/random/sampling_avx512.c
14 4 2
void get_seeds()
in src/random/sampling.c
15 4 1
int is_new_avx2()
in src/random/sampling_avx2.c
17 4 2
static void keccak_squeezeblocks()
in src/third_party_src/fips202.c
14 3 4
void shake256()
in src/third_party_src/fips202.c
16 3 4
static uint32_t get_cpuid_count()
in src/common/cpu_features.c
14 3 6