Over 10 Million Study Resources Now at Your Fingertips

Download as :
Rating : ⭐⭐⭐⭐⭐
Price : $10.99
Pages: 2

Publickeypublic interface dhprivatekey extends dhkey

Chapter 9. Keys and Certificates 141

public interface PrivateKey extends Key

public interface DSAParams {
public BigInteger getP( );
public BigInteger getQ( );
public BigInteger getG( );

Keys that are generated by DSA will typically implement the DSAKey interface (java.security.interfaces.DSAKey):

public void printKey(Key k) {
if (k instanceof DSAKey) {
System.out.println("key is DSA");
System.out.println("P value is " +
((DSAKey) k).getParams().getP( )); }
else System.out.println("key is not DSA");

The idea of a DSA key is extended even further by these two interfaces (both of which are in the java.security.interfaces package):

DSA keys are often used in the Java world (and elsewhere in cryptography), and if you know you're dealing with DSA keys, these interfaces can be very useful. In particular, if you're writing a security provider that provides an implementation of DSA keys, you should ensure that you implement all of these interfaces correctly. RSA keys

These interfaces allow you to retrieve the parameters used to create the RSA key. In particular, the RSA public key interface has methods to return its modulus and public exponent while the private key has methods to return its modulus and private exponent. The RSAPrivateKeyCrt interface defines additional methods to return its prime values (known as P and Q) and their exponents. Diffie−Hellman keys

Diffie−Hellman parameters are encoded into the javax.crypto.spec.DHParameterSpec class, which includes the Diffie−Hellman parameters G, L, and P. The Diffie−Hellman public key interface includes the parameter Y, and the Diffie−Hellman private key interface includes the parameter X. The KeyPair class

How It Works
Login account
Login Your Account
Add to cart
Add to Cart
Make payment
Document download
Download File
PageId: ELI00C0B68
Uploaded by :
Page 1 Preview
publickeypublic interface dhprivatekey extends dhk
Sell Your Old Documents & Earn Wallet Balance