Cryptography Flashcards
A developer wants to send a system administrator a message and wants to use a cipher that reorders the plaintext characters to create the ciphertext. Which cipher meets this requirement?
Transposition cipher is a method of encryption in which the location of the characters in the plaintext is rearranged throughout the ciphertext while the characters themselves are left unchanged.
A developer wants to encrypt a data stream using a symmetric key and wants to encrypt the data in such a way that the cipher method encrypts the individual bits. Which cipher method can the developer use to meet this requirement?
Stream cipher is an encryption algorithm that breaks a plaintext message down into single bits and encrypts 1 bit of plaintext at a time.
the science of keeping information secret and safe by transforming it into a form that unintended recipients cannot understand using an algorithm (a series of mathematical operations)
cryptography
the art of breaking or “cracking” the protection provided through cryptography algorithms
cryptanalysis
the study and practice of both cryptography and cryptanalysis
cryptology
a human-readable unencrypted message used as an input to a cipher (encryption algorithm) before encryption or after decryption
plaintext
unreadable encrypted message output after an encryption algorithm has been used on the plaintext
ciphertext
the process (or algorithm) used to encrypt and decrypt a message
cipher
what could you use to encrypt individual files?
Aescrypt
What would you use to encrypt full disks?
Bitlocker
where a single mapping from our alphabet to a cipher alphabet is created. Many early
cryptosystems used this
Mono-alphabetic
refers to the mapping of our alphabet to a number of cipher alphabets. This approach
added a bit of complexity to early cryptosystems
Polyalphabetic
considered to be unbreakable since it only uses its cipher code once
One-time pad
repeats the random numbers after a given time (periodic). They are
fast and are also deterministic and are useful in producing a repeatable set of random numbers
Pseudo-Random Number Generators (PRNGs)
This method generates a true random number and uses some form of random
process. One approach is to monitor the movements of a mouse pointer on a screen or from the pauses between keystrokes. Overall, the method is generally slow, especially if it involves human interaction, but is non-deterministic and aperiodic
True Random Number Generators
s cipher cracking methodology that involves identifying patterns and variations in the probability of codes.
i.e. a three-letter ciphered text combination spotted at the beginning of a string too often could tip us off that those three
letters correlate the letters THE in the English alphabet.
Frequency Analysis
measures the amount of unpredictability; in encryption relates to the degree of uncertainty of the encryption process.
Entropy
Two common binary to characters encoding methods are
ASCII and UTF-16
encoding method (8-bit values, up to 256 characters)
ASCII
Encoding method:16- bit values, up to 65,536 characters
UTF-16
which is more efficient? hardware or software encryption?
Hardware encryption is more efficient than software encryption.
tamper-evident and an intrusion-resistant physical device that safeguards and manages cryptographic keys and provides cryptographic processing
hardware security module (HSM)
a dedicated processor that handles hardware-level encryption. allows the use of full-disk encryption on a hard drive in a manner that minimizes the impact on system performance. contains encryption keys.
trusted platform module (TPM)
Simply divide the first number by the second and return the remainder. Annotated using the (mod) or (%). Example:
5 mod 2 = 1 [2 goes into 5 a max of twice (4), 5-4 = the remainder which is 1]
Modulus Operator Math
not concerned with the order
combinations
all options considered inlcuding sequence
permutations
determining the likelihood of an event happening
probability
single secret key for both encryption and decryption
secret key encryption (symmetric Cryptography)
challenges in secret key cryptography
finding a secure way to share or transport the key between encrypting and decrypting
widely used key exchange algorithm; used to exchange the secret key in symmetric cryptography
diffie-helman
two types of symmetric encryption
block and stream
stream encryption is ______ than block and be applied in real time applications
faster
In symmetric encryption; what is padding used for?
to fill blocks to operating size when the data does not fit properly
ECB, CBC, CFB, OFB, AND CTR
block cipher modes
CFB, OFB AND CTR essentially allow the block cipher to operate like a
stream cipher
secret key ciphers make use of ___________ to perform substitution as part of the encryption process
S-Boxes (substitution boxes)
take a given input and leverage look-up tables to produce a given output
S-Boxes
measure of the security of a code is __________
work factor
amount of time it would take to break the code based on computational power available.
work factor
process of adding an initialization vector to the ciphering process to change it’s operation and ensure that the ciphertext does not give the original plaintext when played back.
salting
involves the same key being applied to the encrypted data, in order that the original data is recovered. Methods: DES, 3-DES,RC2, AND AES.
symmetric key-based encryption
using a different key to decrypt the encrypted data, in order that the original data is recovered. Methods: RSA, DSA, and ElGamal
Asymmetric key-based encryption
with _______ it should not be mathematically possible to reverse the derived cipher back to the original data.
one way hash
how are one-way hashes broken?
by knowing the mapping of the data to the hashvalue, or by brute-force analysis on stored hash.
method of knowing the mapping between the hashed values and the original data
rainbow table attack
brute force analysis is also known as
dictionary-type attack
Major advantage secret key encryption has over public key
must faster to decrypt. can be used in real time encryption
stream cipher examples
RC4 and ChaCha
examples of block encryption
RC2, RC5, IDEA, DES, 3-DES, AES, Blowfish and Twofish
RC2 key size
40 bits
RC5 block size
variable
RC5 block sizes
32, 64 or 128
AES Key size
128, 192, or 256
AES block size
128 bits
DES key size
56 bits
DES Block size
64 bit
3-DES Key size
112 bit
3-DES Block size
64 bit
Blowfish block size
64-bits
This pads with the same value as the number of padding bytes. Defined in RFC 5652, PKCS#5, PKCS#7 and RFC 1423 PEM
CMS ( Cryptographic Message Syntax)
improvement over ECB; uses the IV for the first block, and then results from the previous block to encrypt the current block. the IV value must be sent w/ the ciphertext, in order to be deciphered.
Cipher Block Chaining
similar to CBC, but it makes the block cipher into a self-synchronising stream cipher
Cipher Feedback (CFB)
The first stage takes the data blocks and X-OR’s with the encrypted version of the IV value. The output of the first stage encryption is then feed into the next stage, and encrypted, with the output being X-OR’ed with the second block
Output Feedback
converts the block cipher into a stream cipher. With this it generates a counter value and a nonce, and encrypts this, in order to EX-OR with the plain text block
Counter mode
each column is taken one at a time and each byte within the column is transformed to a new value based on all four bytes in the column
Mix Column Transformation
In DES, The secret key has only __ useful bits, as eight of its bits are used for parity (which gives 256 or 1017 possible keys)
56
Uses a pseudo random number generator, and where the output of the generator is XOR’ed with the plaintext. It is a fast algorithm and can use a wide range of key length
RC4
IDEA key size
128
IDEA block size
64
secret key encryption algorithm, designed by the NSA, and was used with the Clipper chip
Skipjack
Skipjack key size
80
Skipjack block size
64 bit
a general-purpose private key encryption algorithm, using either a 128-, 192- or a 256-bit encryption key. Unlikely many other encryption methods, it was unpatented, and could be freely used by anyone.
Blowfish
as a general-purpose private key encryption algorithm, using either a 128-, 192- or a 256-bit encryption key.
Twofish
block cipher created by Mitsubishi and NTT.
Camellia
XTEA (eXtended TEA) is a block cipher which uses a __-bit block size and a ___-bit key
64 and 128
diffie helman weaknesses?
easy to precompute on values for two popular parameters.
involves forcing the key negotiation process to default to 512-bit prime numbers. For this
the client only offers DHE_EXPORT for the key negotiation, and the server, if it is setup for this, will accept it. The
precomputation of 512-bit keys with g values of 2 and 5 (which are common) are within a reasonable time limits.
DHE_EXPORT Downgrade attack
three groups (bases): Group 1, Group 3 or Group 5, which vary in the size of the prime number used
diffie helman
What kind of attacks does diffie-helman suffer from?
man-in-the-middle attacks
the strength of the diffie-helman method relates to the ______ _____ _____ ______ _____- which are used in the public key exchange.
size of the prime number bases
involves first grouping data to be encrypted (typically your plaintext) into blocks of a specific size and then encrypting those blocks.
symmetric block encryption
Block cipher modes merely outline __ __ ___ ___ ___ ___depending on the implementation selected (i.e., which mode is used). Implementation selection can be based on anything just as type of cipher can. Factors can include security needs or not, processing capacity, organization preference and so on.
how the blocks will be handled
minor step up from ECB; incorporation of an IV
(CBC) Cipher Block Chaining
Converts the block cipher into a self-synchronizing stream
cipher. Current block takes the output of the XOR.
Cipher Feedback
difference between CFB(cipher block chaining) and OFB(Output feedback)
current block takes output of XOR vs from cipher stage of the previous block
Converts the block cipher into a stream cipher.
➢ Generates a counter value and a nonce, and encrypts this, in
order to EX-OR with the plain text block
Counter Mode (CTR) = block cipher mode
advantage of CTR Mode
each block is processed independent of the others; ability to conduct parallel processing of blocks. (feedback from other stages to feed into the current one is not required.
_____ _____encryption makes use of a key pair (one public, one private) to perform encryption and
decryption. If a given key in a key pair is used for encryption, only the opposite key in that key pair can perform the reverse decryption.
Public Key
Public-key encryption is an excellent method of keeping data secure, but it is often_____ _____ for real-time communications
too slow
Two main applications of public key encryption are
identity checking and key protection
____ leverages the fact that products of large prime numbers are difficult to factorize as basis of its encryption
RSA
With ______ -________, we can perform mathematical operations on ciphered values i.e., before decryption.
homomorphic encryption
RSA has a ____ _____ on processor loading
heavy overhead