2.8 Cryptographic Concepts Flashcards

1
Q

refers to secure information and communication techniques derived from mathematical concepts and a set of rule-based calculations called algorithms, to transform messages in ways that are hard to decipher.
• Greek: “kryptos”
– Hidden, secret
• Confidentiality
– It’s a secret
• Authentication and access control
– I know it’s you. I REALLY know it’s you.
• Non-repudiation - You said it. You can’t deny it.
• Integrity - Tamper-proof

A

Cryptography

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Cryptography terms
• Plaintext - An unencrypted message (in the clear)
• Ciphertext - An encrypted message
• Cipher - The algorithm used to encrypt and/or decrypt
• Cryptanalysis
– The art of cracking encryption
– Researchers are constantly trying to find
weaknesses in ciphers
– A mathematically flawed cipher is bad for everyone

A

Cryptography terms

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
a variable value that is applied using an algorithm to a string or block of unencrypted text to produce encrypted text or to decrypt encrypted text. The length of the key is a factor in considering how difficult it will be to decrypt the text in a given message.
• Keys
– Add the key to the cypher to encrypt
– Larger keys are generally more secure
• Some encryption methods use one key
– Some use more than one key
– Every method is a bit different
A

Cryptographic keys

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
Give weak keys a workout
• A weak key is a weak key
– By itself, it’s not very secure
• Make a weak key stronger by performing
multiple processes
– Hash a password. Hash the hash of the password.
And continue…
– Key stretching, key strengthening
• Brute force attacks would require reversing each
of those hashes
– The attacker has to spend much more time, even
though the key is small
A

Give weak keys a workout

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

techniques used to make a possibly weak key, typically a password or passphrase, more secure against a brute-force attack by increasing the resources (time and possibly space) it takes to test each possible key.
• Already built for your application
– No additional programming involved
• bcrypt
– Generates hashes from passwords
– An extension to the UNIX crypt library
– Uses Blowfish cipher to perform multiple
rounds of hashing
• Password-Based Key Derivation Function 2 (PBKDF2)
– Part of RSA public key cryptography standards
(PKCS #5, RFC 2898)

A

Key stretching libraries

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

an encryption method that features a small footprint and/or low computational complexity. It is aimed at expanding the applications of cryptography to constrained devices and its related international standardization and guidelines compilation are currently underway.
• Powerful cryptography has traditionally
required strength
– A powerful CPU and lots of time
• Internet of Things (IoT) devices have limited power
– Both watts and CPU

• New standards are being created
– National Institute of Standards and Technology (NIST)
leading the effort
– Provide powerful encryption
– Include integrity features
– Keep costs low
A

Lightweight cryptography

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

the conversion of data into ciphertext that can be analyzed and worked with as if it were still in its original form. Homomorphic encryptions allow complex mathematical operations to be performed on encrypted data without compromising the encryption.
• Encrypted data is difficult to work with
– Decrypt the data
– Perform a function
– Encrypt the answer
• Homomorphic encryption
– Perform calculations of data while it’s encrypted
– Perform the work directly on the encrypted data
– The decrypted data can only be viewed with
the private key
• Many advantages
– Securely store data in the cloud
– Perform research on data without viewing the data

A

Homomorphic encryption (HE)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

a type of encryption where only one key (a secret key) is used to both encrypt and decrypt electronic data. The entities communicating via symmetric encryption must exchange the key so that it can be used in the decryption process.
• A single, shared key
– Encrypt with the key
– Decrypt with the same key
– If it gets out, you’ll need another key
• Secret key algorithm
– A shared secret
• Doesn’t scale very well
– Can be challenging to distribute
• Very fast to use
– Less overhead than asymmetric encryption
– Often combined with asymmetric encryption

A

Symmetric encryption

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
consisting of a public key and a private key, is a set of security credentials that you use to prove your identity when connecting to an Amazon EC2 instance. Amazon EC2 stores the public key on your instance, and you store the private key.
• Asymmetric encryption
– Public Key Cryptography
• Key generation
– Build both the public and private key at the same
time
– Lots of randomization
– Large prime numbers
– Lots and lots of math
• Everyone can have the public key
– Only Alice has the private key
A

The key pair

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

a key-based technique for encrypting data. an alternative technique to RSA, is a powerful cryptography approach. It generates security between key pairs for public key encryption by using the mathematics of elliptic curves.
• Asymmetric encryption
– Need large integers composed of two or more large
prime factors
• Instead of numbers, use curves!
– Uses smaller keys than non-ECC asymmetric
encryption
– Smaller storage and transmission requirements
– Perfect for mobile devices

A

Elliptic curve cryptography (ECC)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

a process that uses a pair of related keys – one public key and one private key – to encrypt and decrypt a message and protect it from unauthorized access or use.
• Public key cryptography
– Two (or more) mathematically related keys
• Private key - Keep this private
• Public key - Anyone can see this key - Give it away
• The private key is the only key that can decrypt data
encrypted with the public key
– You can’t derive the private key from the public key

A

Asymmetric encryption

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

the process of translating a given key into a code. A hash function is used to substitute the information with a newly generated hash code.
• Represent data as a short string of text - A message digest
• One-way trip
– Impossible to recover the original message from the digest
– Used to store passwords / confidentiality
• Verify a downloaded document is the same as the original
– Integrity
• Can be a digital signature
– Authentication, non-repudiation, and integrity
• Will not have a collision (hopefully)
– Different messages will not have the same hash

A

Hashes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

or clash is when two pieces of data in a hash table share the same hash value. The hash value in this case is derived from a hash function which takes a data input and returns a fixed length of bits.
• Hash functions
– Take an input of any size - Create a fixed size string
– Message digest, checksum
• The hash should be unique
– Different inputs should never create the same hash
– If they do, it’s a [this]
• MD5 has a [this] problem
– Found in 1996 - Don’t use MD5

A

Collision

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Practical hashing
• Verify a downloaded file
– Hashes may be provided on the download site
– Compare the downloaded file hash with the
posted hash value

• Password storage
– Instead of storing the password, store a salted hash
– Compare hashes during the authentication process
– Nobody ever knows your actual password

A

Practical hashing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

a technique to protect passwords stored in databases by adding a string of 32 or more characters and then hashing them. [this] prevents hackers who breach an enterprise environment from reverse-engineering passwords and stealing them from the database.
• [this]
– Random data added to a password when hashing
• Every user gets their own random [this]
– The [this] is commonly stored with the password
• Rainbow tables won’t work with [this] hashes
– Additional random value added to the
original password
• This slows things down the brute force process
– It doesn’t completely stop the reverse engineering
• Each user gets a different random hash
– The same password creates a different hash

A

Adding some salt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
a type of electronic signature—is a mathematical algorithm routinely used to validate the authenticity and integrity of a message (e.g., an email, a credit card transaction, or a digital document).
• Prove the message was not changed
– Integrity
• Prove the source of the message
– Authentication
• Make sure the signature isn’t fake
– Non-repudiation
• Sign with the private key
– The message doesn’t need to be encrypted
– Nobody else can sign this (obviously)
• Verify with the public key
– Any change in the message will invalidate the signature
A

Digital signatures

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

a variable value that is applied using an algorithm to a string or block of unencrypted text to produce encrypted text or to decrypt encrypted text. The length of the key is a factor in considering how difficult it will be to decrypt the text in a given message. categorized according to how it will be used and what properties it has. For example, a key might have one of the following properties: Symmetric, Public or Private. Keys may also be grouped into pairs that have one private and one public key, which is referred to as an Asymmetric key pair.
• There’s very little that isn’t known about the
cryptographic process
– The algorithm is usually a known entity
– The only thing you don’t know is the key
• The key determines the output
– Encrypted data
– Hash value
– Digital signature
• Keep your key private!
– It’s the only thing protecting your data

A

Cryptographic Keys

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

the size of the keys used to perform the encryption: in general, longer keys provide stronger encryption. Key length is measured in bits.
• Larger keys tend to be more secure
– Prevent brute-force attacks
– Attackers can try every possible key combination
• Symmetric encryption
– 128-bit or larger symmetric keys are common
– These numbers get larger as time goes on
• Asymmetric encryption
– Complex calculations of prime numbers
– Larger keys than symmetric encryption
– Common to see key lengths of 3,072 bits or larger

A

Key strength

19
Q

a method in cryptography by which cryptographic keys are exchanged between two parties, allowing use of a cryptographic algorithm.
• A logistical challenge
– How do you transfer an encryption key across an
insecure medium without having an encryption key?
• Out-of-band key exchange
– Don’t send the symmetric key over the ‘net
– Telephone, courier, in-person, etc.
• In-band key exchange
– It’s on the network
– Protect the key with additional encryption
– Use asymmetric encryption to deliver
a symmetric key

A

Key exchange

20
Q
• There’s a need for fast security
– Without compromising the security part
• Share a symmetric session key using
asymmetric encryption
– Client encrypts a random (symmetric) key with a
server’s public key
– The server decrypts this shared key and uses it to
encrypt data
– This is the session key
• Implement session keys carefully
– Need to be changed often (ephemeral* keys)
– Need to be unpredictable
A

Real-time encryption/decryption

21
Q

• Use public and private key cryptography to create
a symmetric key
– Math is powerful

A

Symmetric key from asymmetric keys

22
Q

Your web browser creates a session key, encrypts it with the server’s public key and sends the encrypted key to the server. The server uses its private key to decrypt the session key. The client and server use the session key to encrypt all further communications.
• SSL/TLS uses encryption keys to protect web
server communication
– Traditionally, this has been based on the web server’s
RSA key pair
– One key that encrypts all symmetric keys
• This server’s private key can rebuild everything
– If you capture all of the traffic, you can decrypt all of
the data
• One point of failure for all of your web site encryption

A

Traditional web server encryption

23
Q

refers to an encryption system that changes the keys used to encrypt and decrypt information frequently and automatically. This ongoing process ensures that even if the most recent key is hacked, a minimal amount of sensitive data is exposed.
• Change the method of key exchange
– Don’t use the server’s private RSA key
• Elliptic curve or Diffie-Hellman ephemeral
– The session keys aren’t kept around
• Can’t decrypt with the private server key
– Every session uses a different private key for the
exchange
• PFS requires more computing power
– Not all servers choose to use PFS
• The browser must support PFS
– Check your SSL/TLS information for details

A

Perfect Forward Secrecy (PFS)

24
Q

to make something difficult to understand. the transformation of a human-readable string to a string that is difficult for people to understand. In contrast to encryption, [this] includes no cryptographic key and the “secret” here is the operation itself.
• The process of making something unclear
– It’s now much more difficult to understand
• But it’s not impossible to understand
– If you know how to read it
• Make source code difficult to read
– But it doesn’t change the functionality of the code
• Hide information inside of an image
– Steganography

A

Obfuscation

25
Q
the technique of hiding secret data within an ordinary, non-secret, file or message in order to avoid detection; the secret data is then extracted at its destination. The use of [this] can be combined with encryption as an extra step for hiding or protecting data.
• Greek for “concealed writing”
– Security through obscurity
• Message is invisible
– But it’s really there
• The covertext
– The container document or file
A

Steganography

26
Q
Common steganography techniques
• Network based
– Embed messages in TCP packets
• Use an image
– Embed the message in the image itself
• Invisible watermarks
– Yellow dots on printers
A

Common steganography techniques

27
Q

Other steganography types
• Audio steganography
– Modify the digital audio file
– Interlace a secret message within the audio
– Similar technique to image steganography
• Video steganography
– A sequence of images
– Use image steganography on a larger scale
– Manage the signal to noise ratio
– Potentially transfer much more information

A

Other steganography types

28
Q
an area of study focused on the development of computer based technologies centered around the principles of quantum theory. Quantum theory explains the nature and behavior of energy and matter on the quantum (atomic and subatomic) level.
• Computers based on quantum physics
– This is not an upgrade to your existing computer
– This is a new computing technology
• Classical mechanics
– Smallest form of information is a bit
– Bits are zeros and ones
• Quantum mechanics
– Smallest form of information is a qubit
– Bits are zeros, ones, and any combination
in-between, at the same time
– This is called quantum superposition
• Search quickly through large databases
– Index everything at the same time
• Simulate the quantum world
– Medical advances, weather prediction,
astrophysics, and much more
A

Quantum computing

29
Q

the development of cryptographic systems for classical computers that are able to prevent attacks launched by quantum computers. a set of classical cryptographic algorithms that are believed to be “quantum-safe,” meaning that they are expected to remain safe even in the presence of quantum computers.
• Breaks our existing encryption mechanisms
– Quickly factor large prime numbers
• This would cause significant issues
– None of the existing cryptography could be trusted
– No financial transactions would be safe
– No data would be private
• Peter Shor invented Shor’s algorithm in 1994
– Given an integer N, find its prime factors
– Traditional computers would take longer than the
lifetime of the universe
– Shor’s algorithm would theoretically be much,
much faster
• Time for updated cryptography
– Not vulnerable to quantum computer based attacks
• NTRU
– A cryptosystem using lattice theory
– Relies on the “closest-vector” problem
– Instead of finding the prime factorizations of
large numbers
• We will need to consider our options for future
cryptography
– This is a problem that can be easily seen and
addressed

A

Post-quantum cryptography

30
Q

a field of applied quantum physics closely related to quantum information processing and quantum teleportation. Its most interesting application is protecting information channels against eavesdropping by means of quantum cryptography.
• Protect against eavesdropping using quantum
cryptography
– Quantum Key Distribution (QKD)
• Create unbreakable encryption
– Send a random stream of qubits (the key) across a
quantum network channel
• Both sides can verify the key
– If it’s identical, the key was not viewed during
transmission
• An attacker eavesdropping on the communication
would modify the data stream
– The attacker would have to violate quantum physics

A

Quantum communication

31
Q

sets of instructions that enable secure network connections through Transport Layer Security (TLS), often still referred to as Secure Sockets Layer (SSL). Behind the scenes, these cipher suites provide a set of algorithms and protocols required to secure communications between clients and servers.

A

Cipher Suites

32
Q

a method of encrypting text (to produce ciphertext) in which a cryptographic key and algorithm are applied to each binary digit in a data stream, one bit at a time.
It breaks a plaintext message down into single bits, which then are converted individually into ciphertext using key bits.
• Encryption is done one bit or byte at a time
– High speed, low hardware complexity
• Used with symmetric encryption
– Not commonly used with asymmetric encryption
• The starting state should never be the same twice
– Key is often combined with an initialization vector (IV)

A

Stream ciphers

33
Q

a method of encrypting data in blocks to produce ciphertext using a cryptographic key and algorithm. The block cipher processes fixed-size blocks simultaneously, as opposed to a stream cipher, which encrypts data one bit at a time.
breaks down plaintext messages into fixed-size blocks before converting them into ciphertext using a key. Encrypting information bit-by-bit.
• Encrypt fixed-length groups
– Often 64-bit or 128-bit blocks
– Pad added to short blocks
– Each block is encrypted or decrypted independently
• Symmetric encryption
– Similar to stream ciphers
• Block cipher modes of operation
– Avoid patterns in the encryption
– Many different modes to choose from

A

Block ciphers

34
Q

an algorithm that features the use of a symmetric key block cipher algorithm to provide an information service, such as confidentiality or authentication.
• Encrypt one fixed-length group of bits at a time
– A block
• Mode of operation
– Defines the method of encryption
– May provide a method of authentication
• The block size is a fixed size
– Not all data matches the block size perfectly
– Split your plaintext into smaller blocks
– Some modes require padding before encrypting

A

Block cipher mode of operation

35
Q

e first generation of the AES. It is the most basic form of block cipher encryption.
a simple mode of operation with a block cipher that’s mostly used with symmetric key encryption. It is a straightforward way of processing a series of sequentially listed message blocks. The input plaintext is broken into numerous blocks.
• The simplest encryption mode
– Too simple for most use cases
• Each block is encrypted with the same key
– Identical plaintext blocks create identical
ciphertext blocks

A

ECB (Electronic Code Book)

36
Q

an advanced form of block cipher encryption. With [this] mode encryption, each ciphertext block is dependent on all plaintext blocks processed up to that point.
a mode of operation for a block cipher – one in which a sequence of bits are encrypted as a single unit, or block, with a cipher key applied to the entire block. [this] uses what is known as an initialization vector (IV) of a certain length.
• A popular mode of operation - Relatively easy to implement
• Each plaintext block is XORed with the previous
ciphertext block
– Adds additional randomization
– Use an initialization vector for the first block

A

CBC (Cipher Block Chaining)

37
Q

a mode of operation,
a simple counter based block cipher implementation in cryptography. Each or every time a counter initiated value is encrypted and given as input to XOR with plaintext or original text which results in ciphertext block.
• Block cipher mode / acts like a stream cipher
– Encrypts successive values of a “counter”
• Plaintext can be any size, since it’s part of the XOR i.e., 8 bits
at a time (streaming) instead of a 128-bit block

A

CTR (Counter)

38
Q

a mode of operation for symmetric-key cryptographic block ciphers which is widely adopted for its performance. [this] throughput rates for state-of-the-art, high-speed communication channels can be achieved with inexpensive hardware resources.
uses an initialization vector (IV) in its processing. This mode is used for authenticated encryption with associated data. [this] provides confidentiality and authenticity for the encrypted data and authenticity for the additional authenticated data (AAD). The AAD is not encrypted.
• Encryption with authentication
– Authentication is part of the block mode
– Combines Counter Mode with
– Galois authentication
• Minimum latency, minimum operation overhead
– Very efficient encryption and authentication
• Commonly used in packetized data
– Network traffic security (wireless, IPsec)
– SSH, TLS

A

GCM (Galois/Counter Mode)

39
Q
a form of public ledger,
a shared, immutable ledger that facilitates the process of recording transactions and tracking assets in a business network. An asset can be tangible (a house, car, cash, land) or intangible (intellectual property, patents, copyrights, branding).
a record-keeping technology designed to make it impossible to hack the system or forge the data stored on it, thereby making it secure and immutable. It is a type of distributed ledger technology (DLT), a digital system for recording transactions and related data in multiple places at the same time.
• A distributed ledger
– Keep track of transactions
• Everyone on the blockchain network
maintains the ledger
– Records and replicates to anyone
and everyone
• Many practical applications
– Payment processing
– Digital identification
– Supply chain monitoring
– Digital voting
A

Blockchain

40
Q
Cryptography Use Cases - Finding the balance
• Low power devices
– Mobile devices, portable systems
– Smaller symmetric key sizes
– Use elliptic curve cryptography (ECC) for
asymmetric encryption
• Low latency
– Fast computation time
– Symmetric encryption, smaller key sizes
• High resiliency
– Larger key sizes
– Encryption algorithm quality
– Hashing provides data integrity
A

Finding the balance

41
Q
Cryptography Use cases
• Confidentiality
– Secrecy and privacy
– Encryption (file-level, drive-level, email)
• Integrity
– Prevent modification of data
– Validate the contents with hashes
– File downloads, password storage
• Obfuscation
– Modern malware
– Encrypted data hides the active malware code
– Decryption occurs during execution
• Authentication
– Password hashing
– Protect the original password
– Add salt to randomize the stored password hash
• Non-Repudiation
– Confirm the authenticity of data
– Digital signature provides both integrity
and non-repudiation
A

Cryptography Use cases

42
Q

Cryptography Limitations - Finding the balance
• Cryptography isn’t a perfect solution
– It can have significant limitations
• Not all implementations are the same
– Different platforms, different cryptographic options
• Cryptography can’t fix bad technique
– Hashing easily guessed passwords without a salt
• Every situation is different
– Do your homework

A

Cryptography Limitations - Finding the balance

43
Q

Cryptography Limitations
• Speed
– Cryptography adds overhead
– A system needs CPU, CPU needs power
– More involved encryption increases the load
• Size
– Typical block ciphers don’t increase the size of
encrypted data
– AES block size is 128 bits/16 bytes
– Encrypting 8 bytes would potentially double the
storage size
• Weak keys
– Larger keys are generally more difficult to brute force
– The weak IV in RC4 resulted in the WEP security issues
• Time
– Encryption and hashing takes time
– Larger files take longer
– Asymmetric is slower than symmetric
• Longevity
– A specific cryptographic technology can becomes
less secure over time
– Smaller keys are easier to brute force, larger keys
take longer to process
– Key retirement is a good best practice
• Predictability and entropy
– Random numbers are critical for secure cryptography
– Hardware random number generators can
be predictable
– A passphrase needs to be appropriately random
• Key reuse
– Reusing the same key reduces complexity
– Less cost and effort to recertify keys
– Less administrative overhead
– If the key is compromised, everything using that
key is at risk
– IoT devices often have keys embedded in the firmware
• Resource vs. security constraints
– IoT devices have limited CPU, memory, and power
– Real-time applications can’t delay
– Difficult to maintain and update security components

A

Cryptography Limitations