Cybersecurity and Cryptography Lecture Notes

Vehicle Communication Systems

  • Communication Types:

    • Vehicle to Vehicle Communication

    • Internet Communication / PSTN (Public Switched Telephone Network)

  • Key Components of Vehicle Systems:

    • Engine Control Unit (ECU)

    • Transmission Control Unit

    • Body Controller (e.g. locks, lights)

    • Airbag Control Unit

    • Telematics

    • Radio Systems

    • Tire Pressure Monitoring System (TPMS)

    • Keyless Entry System

    • Anti-lock Braking System

    • OBD-II (On-Board Diagnostics)

    • Anti-Theft Systems

    • HVAC (Heating, Ventilation, Air Conditioning)

    • Wireless Communication (Wi-Fi)

Cybersecurity in Vehicle Communication

  • Cryptography Principles:

    • Use Cases: Secure vehicle communication, data integrity, etc.

    • Fundamental Concepts:

    • Confidentiality: Keeping information secret from unauthorized parties.

    • Integrity: Ensuring information is unaltered during transmission.

    • Authentication: Verifying the identity of a sender or device.

    • Nonrepudiation: Preventing denial of previous actions by sending parties.

  • Cryptography Essentials:

    • Crypto Coding and Blockchain Applications

MITRE ATT&CK Framework

  • An extensive collection of knowledge and guide for threat modeling. Reference:

    • Technical alerts on current security issues can be found at https://us-cert.cisa.gov/ncas/alerts.

Cryptosystem Overview

  • Components:

    • Cipher information (plaintext, ciphertext)

    • Example: "plaintext" as a human-readable message, represented in an encrypted format as ciphertext.

    • Message Encoding Examples:

    • Wo!@2A!%G31%@#! as ciphertext of a password.

System Considerations in Cybersecurity

  • Crypto System Considerations:

    • Speed: Rate at which data can be processed and transmitted securely.

    • Strength: Effectiveness of the cryptographic measures employed.

  • Risk Mitigation Strategies:

    • Hashing passwords for better security.

    • Validation of input parameters to ensure system safety.

Cybersecurity Alerts and The CISA Agency

  • CISA (Cybersecurity and Infrastructure Security Agency) is responsible for alerting the public about vulnerabilities and exploits.

  • Notable Alerts Include:

    • AA20-304A: Iranian APT acquired voter registration data.

    • AA20-302A: Ransomware attacks targeting healthcare sectors.

    • AA20-296B: Threat actors targeting election-related systems.

    • A range of other alerts on various vulnerabilities and APT activities.

Cryptography in High-Performance Trading Systems

  • Overview of Systems:

    • High Performance Trading Cluster including algorithmic trading systems, pricing engines, and execution processes.

    • Various data services and applications that support trading environments across networks, enhancing operations like order routing and risk management.

Message Systems in Cryptography

  • Key Components of Message Handling:

    • Message Encryption, Filtering, and Routing.

    • Supporting structures like Message Routers, Brokers, and Endpoints are key in processing communications securely.

    • Concepts like Pipes-and-Filters architecture describe the transformation of messages as they move through the system.

Password Hashing Example

>>> import hashlib
>>> hashlib.sha256(b"my password").hexdigest()
'bb14292d91c6d0920a5536bb41f3a50f66351b7b9d94c804dfce8a96ca1051f2'
  • This hashing approach provides a secure method for storing passwords.

Document Encryption Techniques

  • Various libraries and tools, such as OpenSSL and OpenPGP, are used for encryption.

    • OpenPGP is known for email encryption across platforms.

New Trading Architectures

  • Bitcoin Transaction Lifecycle:

    • Steps involved in a Bitcoin transaction from wallet access to mining confirmation.

    • Process Includes:

    • Initiating a transaction and inclusion in the block by miners, with verification steps ensuring legitimacy.

    • Time it takes for confirmation is approximately 10 seconds.

    • Mining Process: Requires computational effort to calculate hashes and validate transactions leading to the creation of new bitcoins.

Key Cryptographic Terminology

  • Cipher: Algorithm for encryption/decryption.

  • Plaintext: Readable data before encryption.

  • Ciphertext: Encrypted data output from encryption processes.

  • Key Types: Symmetric (private) key ciphers and asymmetric (public) key ciphers.

  • Hashing: Producing a fixed-size output from variable-length input data.

Types of Ciphers

  • Block Ciphers: Process data in fixed-size blocks.

  • Stream Ciphers: Encrypt data as streams.

  • Transposition and Substitution Ciphers: Fundamental methods for constructing cyclic codings.

Hashing and Encryption Mechanisms

  • Data is encrypted using cryptographic keys to protect sensitive information.

SSL Implementation in Python

import ssl
context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
context.load_cert_chain('yourserver.crt', 'yourserver.key')

Standards and Algorithms

  • DES: Data Encryption Standard, 56-bit key used for 64-bit data blocks, low security now.

  • AES (Rijndael): Supports key sizes of 128, 192, and 256 bits with high security.

  • MD5 and SHA-1: Produces fixed-size hashes from variable-length inputs but now considered outdated for many cryptographic applications.

Public Key Infrastructure (PKI)

  • Elements of PKI:

    • Public Key: Used for encrypting messages.

    • Private Key: Used for decrypting messages encrypted by the matching public key.

    • Certificate Authority (CA): Responsible for issuing digital certificates and managing public keys.

Digital Signatures Overview

  • Used to authenticate messages and ensure integrity while maintaining confidentiality.

  • Unique signatures support non-repudiation to prevent denial of actions taken by digital signatures.

Forms of Cryptographic Attacks

  • Ciphertext-only Attack: Analyzing ciphertext without plaintext data.

  • Known-plaintext Attack: Using known data to decode other ciphertexts.

  • Chosen-plaintext Attack: Attackers convert a selected plaintext into ciphertext.

  • Chosen-ciphertext Attack: Attackers manipulate chosen ciphertext to infer information.

Blockchain Characteristics

  • Transaction Structure: Overview of how blockchain records transactions, including entities involved and values transferred.

  • Uses Merkle Trees for efficient transaction verification and storage.

    • Proof of Work (PoW): Mining technique used to validate blocks within blockchain systems.

    • Proof of Stake (PoS): Alternative method of operation where blocks are validated based on the amount of cryptocurrency held.

Smart Contracts Example

  • Solidity for Ethereum transactions: Functions coded to handle conditions of transactions.
    Example:

Function buyGOLD(address _seller, address _buyer, uint256 _amt) returns (bool OK) {
   if (goldBalance[_seller] < _value) throw;
   ...
}
  • Smart contracts facilitate automated execution based on predefined conditions in the blockchain.

Closing Remarks

  • Understanding the intricacies of hashing, encryption, and blockchain technologies is vital for navigating modern cybersecurity and transaction systems effectively.

Next Steps and Coursework

  • Coursework requires creating a network diagram, identifying vulnerabilities, proposing mitigations using the ATT&CK framework, and conducting risk analysis.

  • References for Further Reading:

    • Numerous texts, articles, and CISA resources detailed above.