0
0
Cybersecurityknowledge~5 mins

Why secure design prevents vulnerabilities in Cybersecurity - Performance Analysis

Choose your learning style9 modes available
Time Complexity: Why secure design prevents vulnerabilities
O(n)
Understanding Time Complexity

We want to understand how the effort to find and fix security problems grows as a system gets bigger or more complex.

How does designing security from the start affect the work needed to keep a system safe?

Scenario Under Consideration

Analyze the time complexity of the following security check process.


function checkInput(inputList) {
  for (let input of inputList) {
    if (!isValid(input)) {
      logError(input);
      alertAdmin(input);
    }
  }
}

function isValid(input) {
  // simple validation rules
  return input.length > 0 && !input.includes("