|
From: <ls...@us...> - 2007-11-17 20:07:06
|
Revision: 3592
http://jnode.svn.sourceforge.net/jnode/?rev=3592&view=rev
Author: lsantha
Date: 2007-11-17 12:07:01 -0800 (Sat, 17 Nov 2007)
Log Message:
-----------
OpenJDK integration.
Added Paths:
-----------
trunk/core/src/openjdk/java/java/security/interfaces/DSAKey.java
trunk/core/src/openjdk/java/java/security/interfaces/DSAKeyPairGenerator.java
trunk/core/src/openjdk/java/java/security/interfaces/DSAParams.java
trunk/core/src/openjdk/java/java/security/interfaces/DSAPrivateKey.java
trunk/core/src/openjdk/java/java/security/interfaces/DSAPublicKey.java
trunk/core/src/openjdk/java/java/security/interfaces/RSAKey.java
trunk/core/src/openjdk/java/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java
trunk/core/src/openjdk/java/java/security/interfaces/RSAPrivateCrtKey.java
trunk/core/src/openjdk/java/java/security/interfaces/RSAPrivateKey.java
trunk/core/src/openjdk/java/java/security/interfaces/RSAPublicKey.java
trunk/core/src/openjdk/java/java/security/interfaces/package.html
Removed Paths:
-------------
trunk/core/src/classpath/java/java/security/interfaces/
Added: trunk/core/src/openjdk/java/java/security/interfaces/DSAKey.java
===================================================================
--- trunk/core/src/openjdk/java/java/security/interfaces/DSAKey.java (rev 0)
+++ trunk/core/src/openjdk/java/java/security/interfaces/DSAKey.java 2007-11-17 20:07:01 UTC (rev 3592)
@@ -0,0 +1,51 @@
+/*
+ * Copyright 1996-1998 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.security.interfaces;
+
+/**
+ * The interface to a DSA public or private key. DSA (Digital Signature
+ * Algorithm) is defined in NIST's FIPS-186.
+ *
+ * @see DSAParams
+ * @see java.security.Key
+ * @see java.security.Signature
+ *
+ * @version 1.24 07/05/05
+ * @author Benjamin Renaud
+ * @author Josh Bloch
+ */
+public interface DSAKey {
+
+ /**
+ * Returns the DSA-specific key parameters. These parameters are
+ * never secret.
+ *
+ * @return the DSA-specific key parameters.
+ *
+ * @see DSAParams
+ */
+ public DSAParams getParams();
+}
Added: trunk/core/src/openjdk/java/java/security/interfaces/DSAKeyPairGenerator.java
===================================================================
--- trunk/core/src/openjdk/java/java/security/interfaces/DSAKeyPairGenerator.java (rev 0)
+++ trunk/core/src/openjdk/java/java/security/interfaces/DSAKeyPairGenerator.java 2007-11-17 20:07:01 UTC (rev 3592)
@@ -0,0 +1,115 @@
+/*
+ * Copyright 1997-2005 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.security.interfaces;
+
+import java.security.*;
+
+/**
+ * An interface to an object capable of generating DSA key pairs.
+ *
+ * <p>The <code>initialize</code> methods may each be called any number
+ * of times. If no <code>initialize</code> method is called on a
+ * DSAKeyPairGenerator, the default is to generate 1024-bit keys, using
+ * precomputed p, q and g parameters and an instance of SecureRandom as
+ * the random bit source.
+ *
+ * <p>Users wishing to indicate DSA-specific parameters, and to generate a key
+ * pair suitable for use with the DSA algorithm typically
+ *
+ * <ol>
+ *
+ * <li>Get a key pair generator for the DSA algorithm by calling the
+ * KeyPairGenerator <code>getInstance</code> method with "DSA"
+ * as its argument.<p>
+ *
+ * <li>Initialize the generator by casting the result to a DSAKeyPairGenerator
+ * and calling one of the
+ * <code>initialize</code> methods from this DSAKeyPairGenerator interface.<p>
+ *
+ * <li>Generate a key pair by calling the <code>generateKeyPair</code>
+ * method from the KeyPairGenerator class.
+ *
+ * </ol>
+ *
+ * <p>Note: it is not always necessary to do do algorithm-specific
+ * initialization for a DSA key pair generator. That is, it is not always
+ * necessary to call an <code>initialize</code> method in this interface.
+ * Algorithm-independent initialization using the <code>initialize</code> method
+ * in the KeyPairGenerator
+ * interface is all that is needed when you accept defaults for algorithm-specific
+ * parameters.
+ *
+ * @see java.security.KeyPairGenerator
+ */
+public interface DSAKeyPairGenerator {
+
+ /**
+ * Initializes the key pair generator using the DSA family parameters
+ * (p,q and g) and an optional SecureRandom bit source. If a
+ * SecureRandom bit source is needed but not supplied, i.e. null, a
+ * default SecureRandom instance will be used.
+ *
+ * @param params the parameters to use to generate the keys.
+ *
+ * @param random the random bit source to use to generate key bits;
+ * can be null.
+ *
+ * @exception InvalidParameterException if the <code>params</code>
+ * value is invalid or null.
+ */
+ public void initialize(DSAParams params, SecureRandom random)
+ throws InvalidParameterException;
+
+ /**
+ * Initializes the key pair generator for a given modulus length
+ * (instead of parameters), and an optional SecureRandom bit source.
+ * If a SecureRandom bit source is needed but not supplied, i.e.
+ * null, a default SecureRandom instance will be used.
+ *
+ * <p>If <code>genParams</code> is true, this method generates new
+ * p, q and g parameters. If it is false, the method uses precomputed
+ * parameters for the modulus length requested. If there are no
+ * precomputed parameters for that modulus length, an exception will be
+ * thrown. It is guaranteed that there will always be
+ * default parameters for modulus lengths of 512 and 1024 bits.
+ *
+ * @param modlen the modulus length in bits. Valid values are any
+ * multiple of 8 between 512 and 1024, inclusive.
+ *
+ * @param random the random bit source to use to generate key bits;
+ * can be null.
+ *
+ * @param genParams whether or not to generate new parameters for
+ * the modulus length requested.
+ *
+ * @exception InvalidParameterException if <code>modlen</code> is not
+ * between 512 and 1024, or if <code>genParams</code> is false and
+ * there are no precomputed parameters for the requested modulus
+ * length.
+ */
+ public void initialize(int modlen, boolean genParams, SecureRandom random)
+ throws InvalidParameterException;
+}
Added: trunk/core/src/openjdk/java/java/security/interfaces/DSAParams.java
===================================================================
--- trunk/core/src/openjdk/java/java/security/interfaces/DSAParams.java (rev 0)
+++ trunk/core/src/openjdk/java/java/security/interfaces/DSAParams.java 2007-11-17 20:07:01 UTC (rev 3592)
@@ -0,0 +1,65 @@
+/*
+ * Copyright 1996-1998 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.security.interfaces;
+
+import java.math.BigInteger;
+
+/**
+ * Interface to a DSA-specific set of key parameters, which defines a
+ * DSA <em>key family</em>. DSA (Digital Signature Algorithm) is defined
+ * in NIST's FIPS-186.
+ *
+ * @see DSAKey
+ * @see java.security.Key
+ * @see java.security.Signature
+ *
+ * @version 1.27 07/05/05
+ * @author Benjamin Renaud
+ * @author Josh Bloch
+ */
+public interface DSAParams {
+
+ /**
+ * Returns the prime, <code>p</code>.
+ *
+ * @return the prime, <code>p</code>.
+ */
+ public BigInteger getP();
+
+ /**
+ * Returns the subprime, <code>q</code>.
+ *
+ * @return the subprime, <code>q</code>.
+ */
+ public BigInteger getQ();
+
+ /**
+ * Returns the base, <code>g</code>.
+ *
+ * @return the base, <code>g</code>.
+ */
+ public BigInteger getG();
+}
Added: trunk/core/src/openjdk/java/java/security/interfaces/DSAPrivateKey.java
===================================================================
--- trunk/core/src/openjdk/java/java/security/interfaces/DSAPrivateKey.java (rev 0)
+++ trunk/core/src/openjdk/java/java/security/interfaces/DSAPrivateKey.java 2007-11-17 20:07:01 UTC (rev 3592)
@@ -0,0 +1,61 @@
+/*
+ * Copyright 1997-1999 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.security.interfaces;
+
+import java.math.BigInteger;
+
+/**
+ * The standard interface to a DSA private key. DSA (Digital Signature
+ * Algorithm) is defined in NIST's FIPS-186.
+ *
+ * @see java.security.Key
+ * @see java.security.Signature
+ * @see DSAKey
+ * @see DSAPublicKey
+ *
+ * @version 1.26 07/05/05
+ * @author Benjamin Renaud
+ */
+public interface DSAPrivateKey extends DSAKey, java.security.PrivateKey {
+
+ // Declare serialVersionUID to be compatible with JDK1.1
+
+ /**
+ * The class fingerprint that is set to indicate
+ * serialization compatibility with a previous
+ * version of the class.
+ */
+ static final long serialVersionUID = 7776497482533790279L;
+
+ /**
+ * Returns the value of the private key, <code>x</code>.
+ *
+ * @return the value of the private key, <code>x</code>.
+ */
+ public BigInteger getX();
+}
+
+
Added: trunk/core/src/openjdk/java/java/security/interfaces/DSAPublicKey.java
===================================================================
--- trunk/core/src/openjdk/java/java/security/interfaces/DSAPublicKey.java (rev 0)
+++ trunk/core/src/openjdk/java/java/security/interfaces/DSAPublicKey.java 2007-11-17 20:07:01 UTC (rev 3592)
@@ -0,0 +1,61 @@
+/*
+ * Copyright 1996-1999 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.security.interfaces;
+
+import java.math.BigInteger;
+
+/**
+ * The interface to a DSA public key. DSA (Digital Signature Algorithm)
+ * is defined in NIST's FIPS-186.
+ *
+ * @see java.security.Key
+ * @see java.security.Signature
+ * @see DSAKey
+ * @see DSAPrivateKey
+ *
+ * @version 1.28 07/05/05
+ * @author Benjamin Renaud
+ */
+public interface DSAPublicKey extends DSAKey, java.security.PublicKey {
+
+ // Declare serialVersionUID to be compatible with JDK1.1
+
+ /**
+ * The class fingerprint that is set to indicate
+ * serialization compatibility with a previous
+ * version of the class.
+ */
+ static final long serialVersionUID = 1234526332779022332L;
+
+ /**
+ * Returns the value of the public key, <code>y</code>.
+ *
+ * @return the value of the public key, <code>y</code>.
+ */
+ public BigInteger getY();
+}
+
+
Added: trunk/core/src/openjdk/java/java/security/interfaces/RSAKey.java
===================================================================
--- trunk/core/src/openjdk/java/java/security/interfaces/RSAKey.java (rev 0)
+++ trunk/core/src/openjdk/java/java/security/interfaces/RSAKey.java 2007-11-17 20:07:01 UTC (rev 3592)
@@ -0,0 +1,50 @@
+/*
+ * Copyright 1999 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.security.interfaces;
+
+import java.math.BigInteger;
+
+/**
+ * The interface to an RSA public or private key.
+ *
+ * @author Jan Luehe
+ * @version 1.13 05/05/07
+ *
+ * @see RSAPublicKey
+ * @see RSAPrivateKey
+ *
+ * @since 1.3
+ */
+
+public interface RSAKey {
+
+ /**
+ * Returns the modulus.
+ *
+ * @return the modulus
+ */
+ public BigInteger getModulus();
+}
Added: trunk/core/src/openjdk/java/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java
===================================================================
--- trunk/core/src/openjdk/java/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java (rev 0)
+++ trunk/core/src/openjdk/java/java/security/interfaces/RSAMultiPrimePrivateCrtKey.java 2007-11-17 20:07:01 UTC (rev 3592)
@@ -0,0 +1,101 @@
+/*
+ * Copyright 2001-2003 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.security.interfaces;
+
+import java.math.BigInteger;
+import java.security.spec.RSAOtherPrimeInfo;
+
+/**
+ * The interface to an RSA multi-prime private key, as defined in the
+ * PKCS#1 v2.1, using the <i>Chinese Remainder Theorem</i>
+ * (CRT) information values.
+ *
+ * @author Valerie Peng
+ *
+ * @version 1.13 07/05/05
+ *
+ * @see java.security.spec.RSAPrivateKeySpec
+ * @see java.security.spec.RSAMultiPrimePrivateCrtKeySpec
+ * @see RSAPrivateKey
+ * @see RSAPrivateCrtKey
+ *
+ * @since 1.4
+ */
+
+public interface RSAMultiPrimePrivateCrtKey extends RSAPrivateKey {
+
+ static final long serialVersionUID = 618058533534628008L;
+
+ /**
+ * Returns the public exponent.
+ *
+ * @return the public exponent.
+ */
+ public BigInteger getPublicExponent();
+
+ /**
+ * Returns the primeP.
+ *
+ * @return the primeP.
+ */
+ public BigInteger getPrimeP();
+
+ /**
+ * Returns the primeQ.
+ *
+ * @return the primeQ.
+ */
+ public BigInteger getPrimeQ();
+
+ /**
+ * Returns the primeExponentP.
+ *
+ * @return the primeExponentP.
+ */
+ public BigInteger getPrimeExponentP();
+
+ /**
+ * Returns the primeExponentQ.
+ *
+ * @return the primeExponentQ.
+ */
+ public BigInteger getPrimeExponentQ();
+
+ /**
+ * Returns the crtCoefficient.
+ *
+ * @return the crtCoefficient.
+ */
+ public BigInteger getCrtCoefficient();
+
+ /**
+ * Returns the otherPrimeInfo or null if there are only
+ * two prime factors (p and q).
+ *
+ * @return the otherPrimeInfo.
+ */
+ public RSAOtherPrimeInfo[] getOtherPrimeInfo();
+}
Added: trunk/core/src/openjdk/java/java/security/interfaces/RSAPrivateCrtKey.java
===================================================================
--- trunk/core/src/openjdk/java/java/security/interfaces/RSAPrivateCrtKey.java (rev 0)
+++ trunk/core/src/openjdk/java/java/security/interfaces/RSAPrivateCrtKey.java 2007-11-17 20:07:01 UTC (rev 3592)
@@ -0,0 +1,86 @@
+/*
+ * Copyright 1998-2003 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.security.interfaces;
+
+import java.math.BigInteger;
+
+/**
+ * The interface to an RSA private key, as defined in the PKCS#1 standard,
+ * using the <i>Chinese Remainder Theorem</i> (CRT) information values.
+ *
+ * @author Jan Luehe
+ *
+ * @version 1.19 07/05/05
+ *
+ * @see RSAPrivateKey
+ */
+
+public interface RSAPrivateCrtKey extends RSAPrivateKey {
+
+ static final long serialVersionUID = -5682214253527700368L;
+
+ /**
+ * Returns the public exponent.
+ *
+ * @return the public exponent
+ */
+ public BigInteger getPublicExponent();
+
+ /**
+ * Returns the primeP.
+
+ * @return the primeP
+ */
+ public BigInteger getPrimeP();
+
+ /**
+ * Returns the primeQ.
+ *
+ * @return the primeQ
+ */
+ public BigInteger getPrimeQ();
+
+ /**
+ * Returns the primeExponentP.
+ *
+ * @return the primeExponentP
+ */
+ public BigInteger getPrimeExponentP();
+
+ /**
+ * Returns the primeExponentQ.
+ *
+ * @return the primeExponentQ
+ */
+ public BigInteger getPrimeExponentQ();
+
+ /**
+ * Returns the crtCoefficient.
+ *
+ * @return the crtCoefficient
+ */
+ public BigInteger getCrtCoefficient();
+}
Added: trunk/core/src/openjdk/java/java/security/interfaces/RSAPrivateKey.java
===================================================================
--- trunk/core/src/openjdk/java/java/security/interfaces/RSAPrivateKey.java (rev 0)
+++ trunk/core/src/openjdk/java/java/security/interfaces/RSAPrivateKey.java 2007-11-17 20:07:01 UTC (rev 3592)
@@ -0,0 +1,51 @@
+/*
+ * Copyright 1998-2003 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.security.interfaces;
+
+import java.math.BigInteger;
+
+/**
+ * The interface to an RSA private key.
+ *
+ * @author Jan Luehe
+ *
+ * @version 1.18 07/05/05
+ *
+ * @see RSAPrivateCrtKey
+ */
+
+public interface RSAPrivateKey extends java.security.PrivateKey, RSAKey
+{
+
+ static final long serialVersionUID = 5187144804936595022L;
+
+ /**
+ * Returns the private exponent.
+ *
+ * @return the private exponent
+ */
+ public BigInteger getPrivateExponent();
+}
Added: trunk/core/src/openjdk/java/java/security/interfaces/RSAPublicKey.java
===================================================================
--- trunk/core/src/openjdk/java/java/security/interfaces/RSAPublicKey.java (rev 0)
+++ trunk/core/src/openjdk/java/java/security/interfaces/RSAPublicKey.java 2007-11-17 20:07:01 UTC (rev 3592)
@@ -0,0 +1,48 @@
+/*
+ * Copyright 1998-2003 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package java.security.interfaces;
+
+import java.math.BigInteger;
+
+/**
+ * The interface to an RSA public key.
+ *
+ * @author Jan Luehe
+ *
+ * @version 1.17 07/05/05
+ */
+
+public interface RSAPublicKey extends java.security.PublicKey, RSAKey
+{
+ static final long serialVersionUID = -8727434096241101194L;
+
+ /**
+ * Returns the public exponent.
+ *
+ * @return the public exponent
+ */
+ public BigInteger getPublicExponent();
+}
Added: trunk/core/src/openjdk/java/java/security/interfaces/package.html
===================================================================
--- trunk/core/src/openjdk/java/java/security/interfaces/package.html (rev 0)
+++ trunk/core/src/openjdk/java/java/security/interfaces/package.html 2007-11-17 20:07:01 UTC (rev 3592)
@@ -0,0 +1,77 @@
+<!--
+ Copyright 1998-2006 Sun Microsystems, Inc. All Rights Reserved.
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+
+ This code is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License version 2 only, as
+ published by the Free Software Foundation. Sun designates this
+ particular file as subject to the "Classpath" exception as provided
+ by Sun in the LICENSE file that accompanied this code.
+
+ This code is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ version 2 for more details (a copy is included in the LICENSE file that
+ accompanied this code).
+
+ You should have received a copy of the GNU General Public License version
+ 2 along with this work; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ CA 95054 USA or visit www.sun.com if you need additional information or
+ have any questions.
+-->
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<body bgcolor="white">
+
+Provides interfaces for generating RSA (Rivest, Shamir and
+Adleman AsymmetricCipher algorithm)
+keys as defined in the RSA Laboratory Technical Note
+PKCS#1, and DSA (Digital Signature
+Algorithm) keys as defined in NIST's FIPS-186.
+<P>
+Note that these interfaces are intended only for key
+implementations whose key material is accessible and
+available. These interfaces are not intended for key
+implementations whose key material resides in
+inaccessible, protected storage (such as in a
+hardware device).
+<P>
+For more developer information on how to use these
+interfaces, including information on how to design
+<code>Key</code> classes for hardware devices, please refer
+to these cryptographic provider developer guides:
+<ul>
+ <li><a href=
+ "{@docRoot}/../technotes/guides/security/crypto/HowToImplAProvider.html">
+ <b>How to Implement a Provider for the
+ Java<FONT SIZE=-2><SUP>TM</SUP></FONT> Cryptography Architecture
+ </b></a></li>
+</ul>
+
+<h2>Package Specification</h2>
+
+<ul>
+ <li>PKCS #1: RSA Encryption Standard, Version 1.5, November 1993 </li>
+ <li>Federal Information Processing Standards Publication (FIPS PUB) 186:
+ Digital Signature Standard (DSS) </li>
+</ul>
+
+<h2>Related Documentation</h2>
+
+For further documentation, please see:
+<ul>
+ <li>
+ <a href=
+ "{@docRoot}/../technotes/guides/security/crypto/CryptoSpec.html">
+ <b>Java<FONT SIZE=-2><SUP>TM</SUP></FONT>
+ Cryptography Architecture API Specification and Reference
+ </b></a></li>
+</ul>
+
+@since JDK1.1
+</body>
+</html>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|