PROJECTENGRAM

OS BASICS AND CRYPTOGRAPHY

Tags: #◇Computer Science #◇NSSECU1 #◇Conceptual #◇Operating Systems #◇Cryptography


◇Overview

This module explores the fundamental security mechanisms within Operating Systems (Windows and Linux) and the principles of modern cryptography. Understanding OS internals is critical for both offensive and defensive security. Cryptography forms the mathematical foundation for securing data at rest, in transit, and in use.

◇Key Definitions

  • Kernel: The core component of an operating system that manages system resources and hardware communication.
  • Symmetric Encryption: A cryptographic method where the same key is used for both encryption and decryption.
  • Asymmetric Encryption: A cryptographic method using a public/private key pair.
  • Hash Function: A mathematical algorithm that maps data of arbitrary size to a bit string of a fixed size.

◇Theoretical Framework / Core Concepts

OS Security Concepts

  • Privilege Rings: CPU architectures use rings (e.g., Ring 0 to Ring 3) to enforce privilege separation. The kernel runs in Ring 0 (highest privilege), while user applications run in Ring 3.
  • File Permissions (Linux): Controlled via Read (r), Write (w), and Execute (x) bits for Owner, Group, and Others.
  • Access Control Lists (ACLs): Used heavily in Windows (NTFS) to define fine-grained permissions for users and groups.

Cryptography

  • Symmetric vs. Asymmetric: Symmetric (e.g., AES) is fast and used for bulk data. Asymmetric (e.g., RSA, ECC) is slower but solves the key exchange problem.
  • Public Key Infrastructure (PKI): A set of roles, policies, and procedures needed to create, manage, distribute, use, store, and revoke digital certificates and manage public-key encryption.
  • Digital Signatures: Provides non-repudiation and integrity by encrypting a hash of the message with the sender's private key.

◇Worked Examples / Protocol Walkthroughs / Calculations

Linux File Permissions Calculation

Permissions: rwxr-x---

  • Owner: rwx = 4+2+1=74 + 2 + 1 = 7
  • Group: r-x = 4+0+1=54 + 0 + 1 = 5
  • Others: --- = 0+0+0=00 + 0 + 0 = 0
  • Octal Representation: 750

RSA Key Exchange Concept

  1. Alice generates a key pair: Public_A and Private_A.
  2. Bob wants to send a secret symmetric key K to Alice.
  3. Bob encrypts K using Public_A: C=E(Public_A,K)C = E(Public\_A, K).
  4. Alice receives CC and decrypts it: K=D(Private_A,C)K = D(Private\_A, C).

◇Summary & Key Takeaways

  • Operating systems enforce security boundaries through user privileges and memory protection mechanisms.
  • Cryptography provides confidentiality (encryption), integrity (hashing), and non-repudiation (digital signatures).
  • Modern secure communications (like TLS) use asymmetric cryptography for key exchange and symmetric cryptography for data encryption.

◇References & Navigation

CONFIRMATION // 理解度の確認

ACTIVE RECALL VERIFICATION

Select an answer to verify conceptual comprehension and reveal the technical rationale.

Q1

In standard CPU privilege rings, which ring is typically reserved for the OS Kernel?

Q2

Which encryption algorithm uses the same key for both encryption and decryption?

Q3

What is the octal value for Linux permissions rw-r--r--?

Q4

Which cryptographic function is one-way and cannot be mathematically reversed?

Q5

Digital signatures are created using the sender's:

Q6

What does PKI stand for in cryptography?

Q7

Which of the following is a symmetric block cipher?

Q8

In Windows NTFS, what mechanism allows for fine-grained file permissions?

Q9

The main advantage of asymmetric encryption over symmetric encryption is:

Q10

Non-repudiation guarantees that:

OS Basics and Cryptography | PROJECT ENGRAM