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
next
Slide 1: Slide
ProgrammingHigher Education (degree)

This lesson contains 11 slide, with text slide.

Items in this lesson

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

Slide 1 - Slide

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 - Slide

  • 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 - Slide

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 - Slide

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 - Slide

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 - Slide

Securing the Bubble Sort Algorithm
Understand the Code 

Slide 7 - Slide

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 - Slide

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 - Slide

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 - Slide

Slide 11 - Slide