Part 3, Cryptography: The secret of keeping secrets Flashcards
the faking of these is mitigated by using digital certificates instead
how has the faking of
digital signatures
been mitigated
- Both server and browser turn the pre master secret into a master secret by using the time stamp and random data that was produced by the server in previous steps
- Both browser and server use the master secret to create identical symmetric session keys. When the browser has finished creating its key it will notify the server that it is ready to start exchanging confidential data using the agreed symmetric encryption method
in two steps what happens during
the generating a symmetric key
part of an SSL/TLS connection
- Handshake
- Verification
- The pre master secret
- Generating a symmetric key
when a browser wishes to have secure communications with a server using
SSL/TLS
what are the four overview steps
what is
Encryption / encipherment
this is the process of turning plaintext into ciphertext
- this is a ‘one way operation’. meaning it is easy to produce but practically impossible to reverse the operation
- the change of a single bit will produce a wildly different result. meaning the integrity of data can easily be confirmed
name two beneficial characteristics of
hashing
what is the
comparison of key lengths
between symmetric encryption and asymmetric encryption
Symmetric encryption rarely uses key lengths above 256 bits. But in contrast asymmetric key lengths are frequently 1024, 2048, 4096.
The use of a larger key length here does not imply more security over symmetric encryption. The reason lies in the mathematics and so its hard to compare the two relative to each other in this way
describe in 7 steps the process of
salting
- User creates a password ‘hello’
- The computer storing the password then generates a salt ‘7456’
- The salt is added to the front or end of the original password ‘hello7456’
- The salted password is then hashed
- The salt and the hashed password will then be encrypted
- The hashed password will then be saved in a database along with the salt
- When retrieving the password the users password is combined with the decrypted salt and then hashed this is then compared with the hash in the database
- this is fast and can be performed in hardware or software
- It uses smaller keys which means its quicker to generate and use symmetric keys
- It is well suited to encrypt data of any size even if the final size is unknown such as a live video call
name three advantages that
symmetric encryption
has
when was it recommended by the US government to start using
Triple DES (3DES)
the use of this encryption algorithm was recommended in 1999
this will take plaintext and a key as inputs and will output ciphertext
what are the inputs and outputs of an
encryption function
this replaced DES
which encryption algorithm did
Advanced encryption standard (AES)
go on to replace
this is a key which can be shared with anyone you wish to share
encrypted messages with
it is the only key that can decrypt messages that were encrypted by the corresponding private key
what is a
public key
- Issuer information - who issued the certificate
- Date information - in what time line is the certificate valid
- Subject information - who was the certificate issued to and what are their contact details (location, email, website)
-
Public key information
- what asymmetric algorithm produced the public key
- the public key itself
- Acceptable use of the certificate (for digital signatures or encryption)
- Digital signature information
- details of the algorithm used to create the digital signature
- A digital signature belonging to the issuer of the certificate
- Thumbprint / fingerprint - this is a hash of the certificates content
what will you find inside a digital certificate
what is the full name for the hashing algorithm
SHA
what is the accronym used for
secure hash algorithm
when was
Data encryption standard (DES)
populary used and what gave it its popularity
this was used between 1976 and 1999 its popularity came from:
- support from government and industry
- Its strong encryption
- Its ability to encrypt large amounts of data at great speed
this was used between 1976 and 1999 its popularity came from:
- support from government and industry
- Its strong encryption
- Its ability to encrypt large amounts of data at great speed
when was
Data encryption standard (DES)
populary used and what gave it its popularity
what is a
digital signature
A feature of asymmetric cryptography is that it allows you to sign a document before sending it
since only the public key that is registered with the private key can decrypt this it must have come from the sender
name two beneficial characteristics of
hashing
- this is a ‘one way operation’. meaning it is easy to produce but practically impossible to reverse the operation
- the change of a single bit will produce a wildly different result. meaning the integrity of data can easily be confirmed
in four steps what happens during
the handshake
of a SSL/TLS connection
- The browser sends to the server a hello message followed by a timestamp and a random piece of data
- The browser sends a list of asymmetric and symmetric encryption algorithms it knows as well as hashing algorithms
- The server responds with a hello message followed by a timestamp and a random piece of data. It then selects the best asymmetric cipher, symmetric cipher and hashing algorithm from the list it received. The server then lets the browser know its choices
- The handshake is concluded by the server sending the browser its digital certificate
what is a
certificate authority (CA)
this is a trusted third party that issues digital certificates
what is a
cipher
this is the algorithm responsible for turning plaintext into cyphertext and vice versa by using a set of one or more keys
- this was discovered by james ellis in 1973 and kept secret by the british until 1997
in 1976 two groups In the us rediscovered this:
- whitfield diffie and martin hellman published a paper describing it
- Ron rivest, adi shamir, leonard adleman rediscovered the algorithm the british were using
when was
asymmetric encryption
discovered
At the end of the secure session between browser and server both will say goodbye and delete the pre master secret they hold as well as the symmetric key. If any new session is required after this a new handshake and key generation will be needed
what happens at the end of a secure
SSL/TLS session
how has the faking of
digital signatures
been mitigated
the faking of these is mitigated by using digital certificates instead
name three advantages that
session keys
bring in terms of protecting data
- A new key is generated for each session. If the key is discovered the next session will be using a different key making it secure again
- Using different keys mitigates an attacker finding similarities between different ciphertexts and ultimately finding the key
- When keys are deleted they cannot be stolen by hackers
what
key lengths
do modern encryption algorithms use
these will use sizes of
128, 1024, 2048 bits
what happens at the end of a secure
SSL/TLS session
At the end of the secure session between browser and server both will say goodbye and delete the pre master secret they hold as well as the symmetric key. If any new session is required after this a new handshake and key generation will be needed
this is data that has been encrypted
what is
ciphertext
this will be issued to an individual or an organisation by a
certificate authority (CA)
who can issue an individual or an organisation a
digital certificate
these will use sizes of
128, 1024, 2048 bits
what
key lengths
do modern encryption algorithms use
how does asymmetric encryption overcome the
key distribution problem
It overcomes this obstacle by having each party generate their own keys known as the public key and the private key which together form a key pair
why does
SSL/TLS
decide on a hashing algorithm
A hashing algorithm is agreed as every transfer of confidential data will be hashed and checked for integrity. That is it has not been modified or corrupted during transfer
- Remotely - the individual or organisation proves their identity using business registrations or credit records
- In person via a notary - the applicant would have to bring with them proof of identification such as an identity card or passport
note
Notary - is a qualified lawyer
which two ways can an individual or organisation prove there identity to a
certificate authority (CA)
in order to be issued a
digital certificate
- The browser sends to the server a hello message followed by a timestamp and a random piece of data
- The browser sends a list of asymmetric and symmetric encryption algorithms it knows as well as hashing algorithms
- The server responds with a hello message followed by a timestamp and a random piece of data. It then selects the best asymmetric cipher, symmetric cipher and hashing algorithm from the list it received. The server then lets the browser know its choices
- The handshake is concluded by the server sending the browser its digital certificate
in four steps what happens during
the handshake
of a SSL/TLS connection
- is a piece of hardware such as a usb stick
- stores encryption keys
- can encrypt and decrypt data
- keys cannot be exported in a usable manner, meaning that the only way to have access to the keys it holds is to actually posses this piece of hardware
describe four features of a
Hardware security module (HSM)
This became the encryption algorithm to use mainly because of the backing of government and a large organisation. The government agency involved was the national security agency and the organisation IBM. Ibm gave there algorithm to the NSA for review upon review the NSA changed the key length from 64 bits to 56. originally IBM wanted a 128 bit key but at the time building a microprocessor to perform the calculations was not possible
describe the birth of
Data encryption standard (DES)
The end of this came about because of the shortness of its key length.
- a competition organised by RSA security in which the first to break this would be given $10,000. it was then broken in 96 days.
- The following year a computer called deep crack which cost $250,000 and built by electronic frontier foundation broke this in less than 3 days.
- Two years later this could be broken in 22 hours. Clearly it was the end for this encryption algorithm
describe the death of
Data encryption standard (DES)
what is a
key pair
this is the private key and public key that correspond with each other
It overcomes this obstacle by having each party generate their own keys known as the public key and the private key which together form a key pair
how does asymmetric encryption overcome the
key distribution problem
these two hashing algorithms can no longer be considered secure since collissions have been succsefully found
this means two pieces of data could be seen as identical when they are in fact not
why is
message digest algorithm 5 (MD5)
and
secure hash algorithm 1 (SHA-1)
no longer considered secure
this is a string of bits used for encryption and decryption
what is a
key
the hash size in bits of these are
1. 160
2. up to 512
3. up to 512
what is the hash size in bits of
1. secure hash algorithm 1 (SHA-1)
2. secure hash algorithm 2 (SHA-2)
3. secure hash algorithm 3 (SHA-3)
what is a
private key
this is a key that is kept by the owner and should never be shared
it is the only key that can decrypt messages encrypted with the assosiated public key
- The plaintext is broken into 64 bit blocks
- Each block is divided into two
- One half is then scrambled using an algorithm known as the f-function which stretches, mixes and substitutes bits within the original 32 bits
- The two halfs are then recombined swapped and the previous process repeated 16 times until the final cyphertext is produced
- Decryption is performed by reversing the operation using the same key
describe in 5 steps an overview of how
Data encryption standard (DES)
works
what is the hash size in bits of
1. secure hash algorithm 1 (SHA-1)
2. secure hash algorithm 2 (SHA-2)
3. secure hash algorithm 3 (SHA-3)
the hash size in bits of these are
1. 160
2. up to 512
3. up to 512
what are the inputs and outputs of a
decryption function
this will take ciphertext and a key as its inputs and will output plaintext
this works by applying the DES algorithm 3 times and with two or three different keys as follows:
- The first pass uses the first key in the bundle
- The second pass re encrypts the output of the first pass using a second key
- The third pass re encrypts the output of the second pass reusing the first key or a third key from the bundle
how does
Triple DES (3DES)
work
when a browser wishes to have secure communications with a server using
SSL/TLS
what are the four overview steps
- Handshake
- Verification
- The pre master secret
- Generating a symmetric key
give an overview description of the solutions that
Digital certificates (public-key certificates)
bring
Digital certificates are a solution to ensuring that a published public key was indeed published by the person associated with that public key.
This brings a guarantee of authenticity when using a digital certificate when compared to using a public key from a key server which can easily be faked.
what are these two points refering to
- They could meet but if someone knew about the meeting the key could be stolen or copied. This could also be impractical
- You could send the key to whom needs it but it could be stolen or copied in transit
what are two points that make the
key distribution problem
exists
this is any data such as text, pictures or video that is readable by a human
what is
plaintext