# Presentation: 346384

## Part II:  VVSG Computer Security Basics

- October 15-17, 2007
- Nelson Hastings
- National Institute of Standards and Technology
- _[nelson.hastings@nist.gov](mailto:nelson.hastings@nist.gov)_

## Cryptography Basics

- Cryptography is derived from Greek
- kryptos - hidden
- graphein -  to write
- Uses of cryptography
- Confidentiality - limits access
- Integrity - modification detection
- Authentication - source verification

## Secret (Symmetric) Key 

- Encryption

- PlainText

- Cipher Text

- Decryption

**Notes:**
This figure describes, at a high level, how secret key cryptography is performed formed.
There is a message to be encrypted which is called the plaintext message.
There is an encryption operation that receives as input the plaintext message 
as well as  a key.
The resulting output from the encryption operation is unrecognizable text which is called Ciphertext.
To retrieve the original message, a decryption operation has to be performed. 
The decryption operation receives as input the ciphertext as well as a key.
The resulting output from the decryption operation is original plaintext message.
This key is the same key that was used to encrypt the message is used to decrypt
the message. 
Anyone that knows the key can decrypt the message, so in order for the message
to remain secret the key must only be know by people who  should have access
to the message. 
Hence, the name secret key cryptography.

## Public (Asymmetric) Key

- CipherText

- PlainText

- Encryption

- PlainText

- Cipher Text

- Decryption

**Notes:**
This figure describes at a high level how public key cryptography is performed.
Basically, it works the same a secret key cryptography except that there are two
mathematically related keys.
One key is used to perform the encryption operation and the other key is used to
Perform the decryption operation.
If the same key is used for both the encryption and decryption operations, 
the plaintext will not be recovered.
One of the keys is kept secret, called the private key, while the other key, called
the public key can be know by anyone.
This results in some interesting properties where:
1 When the private key is used to encrypt information, the source of the information
can be verified using the public key.
2 When the public key is used to encrypt information, the information can only be
recovered by using the private key,
Note: Due to performance of public key cryptography it is not used for bulk 
encryption of information.

## Digital Signature

- Uses public key cryptography (and hashes)
- Provides information authentication and integrity
- Basic operations
- Digital Signature Generation
- Digital Signature Verification

## Digital Signature Generation

**Notes:**
This figure describes at a high level how a digital signature is generated.
There is a document for which a digital signature needs be be generated.
The plaintext document is inputted to a hash function take the document and 
creates a fixed length value or fingerprint, called a hash value, that is nearly
unique to the document.
This hash valued is inputted into the encryption operation with a private key and
the resulting output is called the digital signature for the document.   

## Digital Signature Verification

**Notes:**
This figure describes at a high level how a digital signature is verified.
There is a document has an associated a digital signature.
Similar to digital signature generation, the document not including the digital
signature is inputted to a hash function.
The digital signature is inputted to the decryption operation with a public key.
The output of the hash function and decryption operation is compared:
1 if they match one know that the private key associated with the public key 
used in the decryption operation created the digital signature.
2. If they do not match one knows the document has been altered or that the 
the wrong public key was used the decryption operation.  

## Digital Signature Verification:Q and A

- _Compare_

**Notes:**
This figure describes at a high level how a digital signature is verified.
There is a document has an associated a digital signature.
Similar to digital signature generation, the document not including the digital
signature is inputted to a hash function.
The digital signature is inputted to the decryption operation with a public key.
The output of the hash function and decryption operation is compared:
1 if they match one know that the private key associated with the public key 
used in the decryption operation created the digital signature.
2. If they do not match one knows the document has been altered or that the 
the wrong public key was used the decryption operation.  

## Key Management

- Critical in achieving the expected security properties of cryptography
- Stages of a cryptographic key’s life
- Generation
- Distribution
- Storage
- Usage
- Destruction

## Public Key Distribution

- Security properties of public key cryptography depend on
- Private keys remaining private/secret
- Integrity and validity of the public key
- Digital certificates provide integrity
- Validity information is provided by Certificate Revocation List (CRLs) or Certificate Status Severs

## Digital Certificate

- Generate by Certificate Authorities (CAs)

**Notes:**
This figure illustrates the concept of a digital certificate.
A digital certificate is a data object that is represented here as a scroll.
A digital certificate contains the public key (represented by a blue key) associated
with a subject (user) and a digital signature (represented by a ribbon) created by  
an entity called a certificate authority. 
A certificate authority (CA) generates digital certificates based on information
provided by subjects (users) and a verification process.
Note: other information may be contained in a digital certificate such as subject 
name, certificate serial number, cryptographic algorithm identifiers, certificate 
lifetime, etc.   

## Slide 12

**Notes:**
In this figure, an example of a digital certificate is presented.
Using a web browser at the Amazon.com account login page, notice the 
closed lock in the bottom right hand corner.
When the lock is clicked on,  a window titled “Page Info” appears with a button
titled “View” about halfway down the window.
When the “View” button is clicked, another window appears with a tab titled 
“General” and “Detailed” where the “General” tab is highlighted by default.
On the “General” tab, some general attributes about the Amazon.com digital 
certificate is presented: 
Issued to: Amazon.com Inc.
Issued by: RSA Data Security Inc.
Issued on: 11/26/2006
Expires on:  11/27/2007
On the “Details” tab, the viewer is split into three areas: (1) “Certificate hierarchy”,
(2) “Certificate Fields”, and (3) “Field Value”. For now, the focus will be on the
“Certificate fields” and “Field Value” area. The “Certificate hierarchy” area will be 
discussed later in this presentation.
In the “Certificate fields” area,  the “Certificate Signature Value” is highlighted and 
the signature value (63 bc 59 fd c4 f0 ...) is displayed in the “Field Value” area.
Next, “Certificate Signature Algorithm” is highlighted and the “Field Value” area
shows that the digital certificate was digitally signed using RSA with SHA-1.
Next, “Subject’s Public Key” is highlighted and the public key value 
(30 81 89 09 81 81 ...) is displayed in the “Field Value” area.

## Certificate Status Server

- Certificate
- Status
- Sever

**Notes:**
A digital certificate may need to be cancelled or revoked before it’s expiration date.
This figure describes one technique to check to the revocation status of a digital
certificate called a Certificate Status Server. 
Given a certificate, one may query a certificate status server to ask the question:
“Is this certificate valid?”
The certificate status server replies with a YES or NO. 
Note: a certificate status server could be implemented to provide more information
about a certificate’s status such as why and when the certificate was revoked.   

## Building a Path of Assurance 

- This is a signed document from subject Z...

- Signature:

- Building a Path of Assurance

**Notes:**
In this figure, a description of how assurance can be built using digital certificates.
Let us say there is a document to be signed by subject Z. Subject Z would use 
their private key (represented by a red key) to generate a digital signature that 
would be associated with the document.
To verify the digital signature, one could receive Subject Z’s public key 
(represented by the blue key) in a digital certificate signed by CA-B.
However, let us assume that the verifier does not trust CA-B. What can be done?
Move to the next slide.   

## Building a Path of Assurance

- Check Trusted Certificate
- Status Server

- Check Trusted Certificate
- Status Server

**Notes:**
The verifier could take use the digital certificate containing Subject Z’s public key
(represented by the blue key) and the public key (represented by the gold key) 
of a certificate authority the verifier trusts and build a path of assurance.
The verifier would find a digital certificate issued by the trusted certificate authority
containing CA-B’s public key (represented by the green key).
Using the CA-B’s public key (represented by the green key), the verifier would
validate the digital signature on the digital certificate issued by CA-B that contains
Subject Z’s public key (represented by the blue key).
In addition to validating the digital signature on the digital certificate, the verifier
would confirm that the digital certificate contain Subject Z’s public key (represented 
by the blue key) the has not been revoked by checking with a trusted certificate status server.
Then, the verifier would validate the digital signature on the digital certificate
containing the CA-B’s public key (represented by the green key).
In addition, the verifier would confirm that the digital certificate contain CA-B’s 
public key (represented by the green key) the has not been revoked by checking 
with a trusted certificate status server.
If all the digital certificates and signatures validated and were not revoked, the 
verifier can be assured that the digital signature on the document is from Subject
Z.

## Building a Path of Assurance: Q and A

- Check Trusted Certificate
- Status Server

- Check Trusted Certificate
- Status Server

**Notes:**
The verifier could take use the digital certificate containing Subject Z’s public key
(represented by the blue key) and the public key (represented by the gold key) 
of a certificate authority the verifier trusts and build a path of assurance.
The verifier would find a digital certificate issued by the trusted certificate authority
containing CA-B’s public key (represented by the green key).
Using the CA-B’s public key (represented by the green key), the verifier would
validate the digital signature on the digital certificate issued by CA-B that contains
Subject Z’s public key (represented by the blue key).
In addition to validating the digital signature on the digital certificate, the verifier
would confirm that the digital certificate contain Subject Z’s public key (represented 
by the blue key) the has not been revoked by checking with a trusted certificate status server.
Then, the verifier would validate the digital signature on the digital certificate
containing the CA-B’s public key (represented by the green key).
In addition, the verifier would confirm that the digital certificate contain CA-B’s 
public key (represented by the green key) the has not been revoked by checking 
with a trusted certificate status server.
If all the digital certificates and signatures validated and were not revoked, the 
verifier can be assured that the digital signature on the document is from Subject
Z.

## Slide 17

**Notes:**
This figure illustrates how a path of assurance is built.
Going back to the example of a web browser at the Amazon.com 
account login page with the “Details” tab highlighted.
Notice in the “Certificate hierarchy” area above the www.amazon.com, there is 
A line containing   Builtin Object Token:Verisign/RSA Secure Server CA.
The “Builtin Object Token” means that the web browser trusts digital certificates
Issued by the Verisign/RSA Secure Server CA.
By highlighting the Verisign/RSA Secure Sever CA line and clicking the “General”
tab some general attributes about the Amazon.com digital 
certificate is presented: 
Issued to: RSA Data Security Inc.
Issued by: RSA Data Security Inc.
Issued on: 11/8/1994
Expires on:  1/7/2010
Note that the values of the “Issued to” and “Issued by” are the same. This type of
certificate is called a self signed certificate and is used to start a path of assurance.
Now we go back to the “Details” tab. 
In the “Certificate fields” area,  the “Certificate Signature Value” is highlighted and 
the signature value (65 dd 7e e1 b2 ec ...) is displayed in the “Field Value” area.
Next, “Certificate Signature Algorithm” is highlighted and the “Field Value” area
shows that the digital certificate was digitally signed using RSA with MD2.
Next, “Subject’s Public Key” is highlighted and the public key value 
(30 81 85 02 7e 00 ...) is displayed in the “Field Value” area.

## Audit Trail Basics

- Audit trail information generation
- Auditing
- Use of generate audit trail information
- Procedural
- VVSG focuses on generation of audit information to support auditing procedures

## Uses of Audit Trail Information

- Accountability
- Who performed a given action
- Reconstruction of events
- What events lead up to a given condition
- Detection of intrusions
- Abnormal or unexpected information
- Problem analysis

## Securing Audit Trail Information

- Prevent and/or detect audit trail information tampering
- Creation
- Modification
- Deletion
- Techniques for securing
- Cryptography
- Write once media

## Conclusion

- Computer Security Basics