1. Intro to Cryptography

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/28

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

29 Terms

1
New cards

What are the 3 main security goals?

  • Confidentiality: Sensitive information must be protected from disclosure to unauthorized parties.

  • Integrity: Data integrity allows a receiver to verify that data was not altered by an adversary during transmission

  • Availability: Ensuring systems remain operational and accessible to users

<ul><li><p><strong>Confidentiality</strong>: Sensitive information must be protected from <span style="color: yellow">disclosure to unauthorized parties.</span></p><p></p></li><li><p><strong>Integrity</strong>: Data integrity allows a receiver to verify that <span style="color: yellow">data was not altered</span> by an adversary during transmission</p><p></p></li><li><p><strong>Availability</strong>: Ensuring systems remain <span style="color: yellow">operational and accessible</span> to users</p></li></ul><p></p>
2
New cards

What is system security?

Securing the entire system, including

  • the protocol,

  • the implementation of the protocol,

  • the environment/equipment where the protocol is running

3
New cards

What is a security attack?

Any action that compromises the security of information owned by an organization.

4
New cards

What are the 4 main types of security attacks?

  • Interruption (attack on availability).
  • Interception (attack on confidentiality).
  • Modification (attack on integrity).
  • Fabrication (attack on authenticity).
5
New cards

What is the distinction between passive and active attacks?

  • Passive attacks: Eavesdropping and monitoring transmissions without altering them (release of message contents

  • Active attacks: Involving some modification of the data stream (masquerade/impersonation, replay, modification of message contents, denial of service).

6
New cards

What is the Dolev-Yao threat model?

In the Dolev-Yao threat model, the adversary (Eve) has complete control of the entire network and can:

  • Obtain any message passing through the network.

  • Initiate and participate in conversations as a legitimate user.

  • Become the receiver of messages.

  • Send messages to anybody through impersonation.

  • Access any message sent through the network.

<p>In the Dolev-Yao threat model, the <strong>adversary</strong> (Eve) has <strong>complete control of the entire network</strong> and can:</p><ul><li><p>Obtain any message passing through the network.</p></li><li><p>Initiate and participate in conversations as a legitimate user.</p></li><li><p>Become the receiver of messages.</p></li><li><p>Send messages to anybody through impersonation.</p></li><li><p>Access any message sent through the network.</p></li></ul><p></p>
7
New cards

What is Kerckhoffs' principle?

A cryptographic system should be secure even if everything about the system, except the key, is public knowledge. The secrecy of the encoded message should depend entirely on the secrecy of the key, not on the secrecy of the algorithm.

8
New cards

Why is Kerckhoffs' principle important?

  • Algorithms are very hard to change (built into soft-/hardware).

  • Peer review (find faults before attackers can exploit).

9
New cards

What is the basic terminology of ciphers?

  • Plaintext (m): The original message

  • Encryption function (E): The transformation function

  • Key (k): The secret parameter controlling the encryption

  • Ciphertext (c): The produced encrypted message, c = Ek(m)

  • Decryption (D): The reverse process, m = Dk(c)

10
New cards

What is symmetric encryption?

Both the sender and recipient share a common key for encryption and decryption.

-> Also known as private-key encryption

<p>Both the sender and recipient share a <strong>common key</strong> for encryption and decryption.</p><p>-&gt; Also known as private-key encryption</p>
11
New cards

What is a block cipher?

A method that takes two inputs:

  • a k-bit key K

  • an L-bit plaintext M
    => to return an L-bit encryption C = E(K, M)

It is a permutation on L-bit strings, creating a one-to-one mapping that allows for decryption.

<p>A method that takes two inputs:</p><ul><li><p>a k-bit key K</p></li><li><p>an L-bit plaintext M <br>=&gt; to return an L-bit <strong>encryption </strong>C = E(K, M)</p></li></ul><p>It is a permutation on L-bit strings, creating a one-to-one mapping that allows for decryption.</p><p></p>
12
New cards

What is the relationship between key size and security in symmetric encryption

  • Larger keys provide more security against brute force attacks.

  • Key sizes need to increase over time to maintain security levels as computing power increases.

13
New cards

What are the common modes of operation for block ciphers?

  • Electronic Code-Book (ECB)
  • Cipher Block Chaining (CBC)
  • Counter (CTR)
14
New cards

What is a weakness of Electronic Codebook (ECB) mode?

It is deterministic - the same plaintext block always produces the same ciphertext block, which can reveal patterns in the data and compromise security.

<p>It is <strong>deterministic </strong>- the same plaintext block always produces the same ciphertext block, which can <strong>reveal patterns</strong> in the data and compromise security.</p>
15
New cards

How does the Electronic Codebook Book (ECB) work?

The message is broken into blocks which are
encoded independently of the other blocks.

=> Easy to parallelize.

16
New cards

How does Cipher Block Chaining (CBC) mode work?

Each plaintext block is XORed with the previous ciphertext block before encryption.

  • The ciphertext of each block is dependent on all previous blocks.
  • An Initial Value (IV) is used for the first block (random).
<p>Each plaintext block is XORed with the previous ciphertext block before encryption.</p>
<ul>
<li>The ciphertext of each block is dependent on all previous blocks.</li>
<li>An Initial Value (IV) is used for the first block (random).</li>
</ul>
17
New cards

What is an advantage of Counter (CTR) mode?

Counter mode allows for parallel encryption, making it useful for high-speed network encryptions.

18
New cards

How does Counter (CTR) mode work?

  1. IV is combined with a Counter.
  2. IV/Counter is encrypted with a key and XORed to plaintext.
<ol>
<li>IV is combined with a Counter.</li>
<li>IV/Counter is encrypted with a key and XORed to plaintext.</li>
</ol>
19
New cards

What is a hash function?

A hash function is a deterministic, efficient function that maps binary strings of arbitrary length to binary strings of a fixed length (the hash value).

<p>A hash function is a <strong>deterministic</strong>, <strong>efficient</strong> function that maps binary strings of <strong>arbitrary length</strong> to binary strings of a <strong>fixed length</strong> (the hash value).</p>
20
New cards

What are the 2 key properties of cryptographic hash functions?

1. One-Way Property

- It should be difficult to find the input of any particular hash.

2. Weak Collision Resistance

- It should be difficult to find a message with the same hash value as a given message.

3. Strong Collision Resistance

- It should be difficult to find two different messages with the same hash value.

<p>1. <strong>One-Way Property</strong></p><p>- It should be difficult to find the input of any particular hash.</p><p></p><p>2. <strong>Weak Collision Resistance</strong> </p><p>- It should be difficult to find a message with the same hash value as a given message.</p><p></p><p>3. <strong>Strong Collision Resistance</strong></p><p>- It should be difficult to find two different messages with the same hash value.</p>
21
New cards

What is a Message Authentication Code (MAC)?

A hash function with a key, providing both authentication and integrity. It creates a check-value sent with data to verify its integrity.

<p>A <strong>hash function</strong> with a <strong>key</strong>, providing both <strong>authentication</strong> and <strong>integrity</strong>. It creates a check-value sent with data to verify its integrity.</p>
22
New cards

What are the types of forgeries against MAC schemes?

  • Selective forgery: The adversary can produce a new message-MAC pair for a message of their choice.

  • Existential forgery: The adversary can produce a new message-MAC pair but has no control over the message content.

23
New cards

What are the components of a Message Authentication scheme?

- G: A key generation algorithm that returns a key.

- T: A tagging algorithm that takes the key and message to produce a tag.

- V: A verification algorithm that takes the key, message, and tag to verify integrity.

24
New cards

What is public-key (asymmetric) cryptography?

Involves 2 different keys:

- Public key => Known by anyone, used to encrypt and verify signatures.

- Private key => Only known by the recipient, used to decrypt messages and sign signatures.

<p>Involves 2 different keys:</p><p>- <strong>Public key</strong> =&gt; Known by anyone, used to encrypt and verify signatures.</p><p>- <strong>Private key</strong> =&gt; Only known by the recipient, used to decrypt messages and sign signatures.</p>
25
New cards

What are the benefits of public-key cryptography?

  1. Key distribution
  2. Digital signatures
26
New cards

What mathematical "hard problems" are used in public-key cryptography?

  1. Factoring large numbers into primes.
  2. Discrete logarithm problem.
27
New cards

Performance: RSA vs. ECDSA

  • Key Generation => ECDSA is way faster.

  • Signature Generation => RSA is faster for smaller, ECDSA for larger key lengths.

  • Signature Verification => RSA is way faster.

28
New cards

What are 2 requirements derived from the 3 main Security Goals?

  • Authentication => Who is Who?

  • Access Control => Only selective access is authorized.

29
New cards

What is an HMAC?

  • Hash-based Message Authentication Code

  • Includes padding constants (a, b) to prevent Length Extension Attacks.

<ul><li><p>Hash-based Message Authentication Code</p></li><li><p>Includes padding constants (a, b) to <span style="color: yellow">prevent Length Extension Attacks</span>.</p></li></ul><p></p>