microsoft / ms-tpm-20-ref
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 21 units with 492 lines of code in units (0.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (247 lines of code)
    • 0 simple units (0 lines of code)
    • 19 very simple units (245 lines of code)
0% | 0% | 50% | 0% | 49%
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% | 50% | 0% | 49%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tpm/src/support0% | 0% | 53% | 0% | 46%
tpm/src/crypt0% | 0% | 47% | 0% | 52%
Simulator/src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
int GetCachedRsaKey()
in TPMCmd/tpm/src/crypt/CryptRsa.c
100 25 3
UINT16 Marshal()
in TPMCmd/tpm/src/support/TableDrivenMarshal.c
147 25 4
static UINT32 GetUnmarshaledInteger()
in TPMCmd/tpm/src/support/TableDrivenMarshal.c
18 5 2
static UINT16 MarshalBytes()
in TPMCmd/tpm/src/support/TableDrivenMarshal.c
16 4 4
static TPM_RC ArrayUnmarshal()
in TPMCmd/tpm/src/support/TableDrivenMarshal.c
22 4 5
static UINT16 ArrayMarshal()
in TPMCmd/tpm/src/support/TableDrivenMarshal.c
20 3 5
static void Assert()
in TPMCmd/Simulator/src/TPMCmds.c
7 2 2
void TDES_setup()
in TPMCmd/tpm/src/crypt/ltc/TpmToLtcDesSupport.c
18 2 3
int TDES_setup()
in TPMCmd/tpm/src/crypt/wolf/TpmToWolfDesSupport.c
19 2 4
static TPM_RC UnmarshalBytes()
in TPMCmd/tpm/src/support/TableDrivenMarshal.c
15 2 4
static BOOL Unmarshal32()
in TPMCmd/tpm/src/support/TpmFail.c
12 2 3
static BOOL Unmarshal16()
in TPMCmd/tpm/src/support/TpmFail.c
12 2 3
const BN_STRUCT()
in TPMCmd/tpm/src/crypt/PrimeData.c
14 1 1
uint32_t LtcRand()
in TPMCmd/tpm/src/crypt/ltc/TpmToLtcSupport.c
9 1 2
void TDES_encrypt()
in TPMCmd/tpm/src/crypt/ossl/TpmToOsslDesSupport.c
10 1 3
void TDES_decrypt()
in TPMCmd/tpm/src/crypt/ossl/TpmToOsslDesSupport.c
10 1 3
int TDES_setup_encrypt_key()
in TPMCmd/tpm/src/crypt/wolf/TpmToWolfDesSupport.c
8 1 3
int TDES_setup_decrypt_key()
in TPMCmd/tpm/src/crypt/wolf/TpmToWolfDesSupport.c
8 1 3
void TDES_encrypt()
in TPMCmd/tpm/src/crypt/wolf/TpmToWolfDesSupport.c
8 1 3
void TDES_decrypt()
in TPMCmd/tpm/src/crypt/wolf/TpmToWolfDesSupport.c
8 1 3