Скачать презентацию GS Chapter 6 Using Java Cryptography for Authentication Скачать презентацию GS Chapter 6 Using Java Cryptography for Authentication

f5f15817e05095ec5ef5098ff2783bd8.ppt

  • Количество слайдов: 15

GS: Chapter 6 Using Java Cryptography for Authentication (Part B) csci 5233 Computer Security GS: Chapter 6 Using Java Cryptography for Authentication (Part B) csci 5233 Computer Security 1

Topics q Message digest (MD) q Password authentication for MD q Message Authentication Code Topics q Message digest (MD) q Password authentication for MD q Message Authentication Code (MAC) q Digital signatures & Identity authentication q Digital certificates, X. 509, certificate chaining q Keystores q Public Key Infrastructure (PKI) csci 5233 Computer Security 2

Digital Certificates q A certificate (also known as a public-key certificate) is a digitally Digital Certificates q A certificate (also known as a public-key certificate) is a digitally signed statement from one entity (the issuer), saying that the public key (and some other information) of another entity (the subject) has some specific value. q When data is digitally signed, the signature can be verified to check the data integrity and the authenticity. (How? ) q a certificate = E (the CA’s private key, Subject’s public key + other identity info. ) q certificate chaining csci 5233 Computer Security 3

Digital Certificates q Sample application: A JAR (Java Archive) file packages class files, images, Digital Certificates q Sample application: A JAR (Java Archive) file packages class files, images, sounds, and/or other digital data in a single file. The jarsigner tool uses information from a keystore to generate or verify digital signatures for JAR files. jarsigner verifies the digital signature of a JAR file, using the certificate that comes with it (it is included in the signature block file of the JAR file), and then checks whether or not the public key of that certificate is "trusted", i. e. , is contained in the specified keystore. More information in Chapter 7. q certificate chaining csci 5233 Computer Security 4

X. 509 Certificates 1. The X. 509 standard defines what information can go into X. 509 Certificates 1. The X. 509 standard defines what information can go into a certificate, and describes how to write it down (the data format). All X. 509 Certificates have the following data, in addition to q the signature. • Version: This identifies which version of the X. 509 standard applies to this certificate (v 1, v 2, v 3). • Serial Number: The entity that created the certificate is responsible for assigning it a serial number to distinguish it from other certificates it issues. csci 5233 Computer Security 5

X. 509 Certificates • Signature Algorithm Identifier: This identifies the algorithm used by the X. 509 Certificates • Signature Algorithm Identifier: This identifies the algorithm used by the CA to sign the certificate. • Issuer Name: The X. 500 Distinguished Name of the entity that signed the certificate. This is normally a CA. Using this certificate implies trusting the entity that signed this certificate. Note that in some cases, such as root or top-level CA certificates, the issuer signs its own certificate. • csci 5233 Computer Security 6

X. 509 Certificates 1. Validity Period: Each certificate is valid only for a limited X. 509 Certificates 1. Validity Period: Each certificate is valid only for a limited amount of time. 2. Subject Name: The name of the entity whose public key the certificate identifies. This name uses the X. 500 standard, so it is intended to be unique across the Internet. 1. Subject Public Key Information: This is the public key of the entity being named, together with an algorithm identifier which specifies which public key crypto system this key belongs to and any associated key parameters. csci 5233 Computer Security 7

Certificates in Java Main classes: q § java. security. cert. Certificate Primary methods: get. Certificates in Java Main classes: q § java. security. cert. Certificate Primary methods: get. Public. Key( ), verify( ) § java. security. cert. X 509 Certificate Provides extra get( ) methods for fetching X. 509 attributes from a certificate § java. security. cert. Certificate. Factory a factory class (that is, use the get. Instance( ) to initiate it) generates a certificate object from an encoding of a certificate csci 5233 Computer Security 8

The Keytool q Keytool - Key and Certificate Management Tool keytool stores the keys The Keytool q Keytool - Key and Certificate Management Tool keytool stores the keys and certificates in a so-called keystore. The default keystore implementation implements the keystore as a file (the default. keystore in the user’s home directory). It protects private keys with a password. It manages a keystore of private keys and their associated X. 509 certificate chains authenticating the corresponding public keys. It also manages certificates from trusted entities. It enables users to administer their own public/private key pairs and associated certificates for use in self-authentication (where the user authenticates himself/herself to other users/services) or data integrity and authentication services, using digital signatures. csci 5233 Computer Security 9

The Keytool q keytool usage: -certreq -delete -export: Exports a certificate from a keystore The Keytool q keytool usage: -certreq -delete -export: Exports a certificate from a keystore into a certificate file. -genkey: Generates a key pari and a self-signed certificate. -help -identitydb -import: Imports a certificate into the keystore. -keyclone -keypasswd -list: Lists all the aliases in the keystore. -printcert: Displays a certificate (stored in a file). -selfcert: Generates a self-signed certificates. -storepasswd csci 5233 Computer Security 10

The Keytool q To generate a key pair and a certificate using the default The Keytool q To generate a key pair and a certificate using the default algorithm, DSA: > keytool -genkey -alias test > keytool –list -v q To generate a key pair and a certificate by using the changing the default algorithm to RSA: > keytool -genkey -alias test 2 –keyalg RSA q To store a certificate into a file (i. e. , export) > keytool -export -alias test -file test. cert csci 5233 Computer Security 11

Certificates in Java q A sample program to print information from an existing certificate: Certificates in Java q A sample program to print information from an existing certificate: Print. Cert. Info. java > java Print. Cert. Info test. cert c. f. , > keytool -v -printcert -file test. cert q To print certificate information directly from a keystore: Print. Cert. From. Key. Store. java >java Print. Cert. From. Key. Store test password csci 5233 Computer Security 12

Certificates in Java q A sample program demonstrating how to build your own CA: Certificates in Java q A sample program demonstrating how to build your own CA: Sign. Certificate. java q Given: 1. a root CA (either self-signed or issued by a trusted CA) > keytool -genkey -v -alias CA -keyalg RSA -keystore 2. a certificate to be certified by the root CA > keytool -genkey -v -alias my. Key -keyalg RSA -keystore Output: q • a new certificate in which the issuer is CA and the subject is my. Key > java Sign. Certificate keystore CA my. Key_signed > keytool -list -v -keystore csci 5233 Computer Security 13

PKI Public Key Infrastructure 1. A system for managing public-key crypto. An attempt to PKI Public Key Infrastructure 1. A system for managing public-key crypto. An attempt to integrate a number of protocols and standards into a more unified system that will provide secure services. See http: //csrc. nist. gov/pki/documents/nissc 98 a. ppt for a snapshot of the PKI standards. See http: //www. ietf. org/html. charters/pkix-charter. html. Required services: q • certificate creation • certificate revocation • certificate validation • certificate distribution csci 5233 Computer Security 14

Next Bishop, Chapter 10: q Key management, digital signatures Relevant links: q • How Next Bishop, Chapter 10: q Key management, digital signatures Relevant links: q • How do I export certificates in Windows 2000? http: //www. jsiinc. com/SUBK/tip 5000/rh 5015. htm csci 5233 Computer Security 15