WK5: Implementing Secure Algorithms in an IDE (Session 1)

Welcome Week 5
Implementing Secure Algorithms in an IDE
Module Lecturer: Dr Raghav Kovvuri
Email: raghav.kovvuri@ieg.ac.uk

1 / 11
suivant
Slide 1: Diapositive
ProgrammingHigher Education (degree)

Cette leçon contient 11 diapositives, avec diapositives de texte.

Éléments de cette leçon

Welcome Week 5
Implementing Secure Algorithms in an IDE
Module Lecturer: Dr Raghav Kovvuri
Email: raghav.kovvuri@ieg.ac.uk

Slide 1 - Diapositive

Introduction
  • Recap: Algorithms and IDE basics
  • Today's focus: Implementing secure algorithms

Objectives:
  • Implement a sorting algorithm
  • Debug algorithms effectively
  • Understand and apply security considerations in coding

Slide 2 - Diapositive

  • What is Time complexity, Space complexity, and Big O notation?
Implementing a Basic Sorting Algorithm
  • Time complexity: O(n^2)
  • Space complexity: O(1)
Submit to 

Slide 3 - Diapositive

Debugging Algorithms
Key Debugging Features in IDE:

  1. Setting breakpoints
  2. Stepping through code
            -> Step Over (F10)
            -> Step Into (F11)
            -> Step Out (Shift+F11)
 3. Watching variables
 4. Using the Debug Console

Demo: Debugging Bubble Sort

Slide 4 - Diapositive

Introduction to Security Considerations
Why Security Matters:
  • Protect user data
  • Prevent unauthorized access
  • Maintain system integrity
Common Vulnerabilities:
  • Buffer overflows
  • Integer overflows
  • Input validation issues

Slide 5 - Diapositive

Secure Coding Practices for Algorithms:
Input Validation
Practices
Proper Error Handling
Secure Data Handling
  • Use secure data structures
  • Limit exposure of sensitive data

Slide 6 - Diapositive

Securing the Bubble Sort Algorithm
Understand the Code 

Slide 7 - Diapositive

Hands-on Exercise
Secure Search Algorithm: Linear Search
Implement a Linear Search algorithm with the following requirements:
  1. Include input validation
  2. Implement proper error handling
  3. Use IDE debugging tools to verify correctness
  4. Consider potential security issues
Template:


Slide 8 - Diapositive

Code Review Best Practices
  1. Check for input validation
  2. Verify error handling
  3. Look for potential security vulnerabilities
  4. Assess algorithm efficiency
  5. Ensure code readability and documentation 

Slide 9 - Diapositive

Recap and Next Steps
Key Takeaways:
  1. Algorithm implementation in IDE
  2. Debugging techniques for algorithms
  3. Security considerations in coding
  4. Secure coding practices

Next Session Preview:
  • Introduction to Version Control with Git
  • Managing code changes and collaboration

Slide 10 - Diapositive

Slide 11 - Diapositive