8187443: Forest Consolidation: Move files to unified layout

Reviewed-by: darcy, ihse
This commit is contained in:
Erik Joelsson 2017-09-12 19:03:39 +02:00
parent 270fe13182
commit 3789983e89
56923 changed files with 3 additions and 15727 deletions

View file

@ -0,0 +1,51 @@
/*
* Copyright (c) 1996, 1998, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.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
*
* @author Benjamin Renaud
* @author Josh Bloch
* @since 1.1
*/
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();
}

View file

@ -0,0 +1,118 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.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} methods may each be called any number
* of times. If no {@code initialize} 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} method with "DSA"
* as its argument.
*
* <li>Initialize the generator by casting the result to a DSAKeyPairGenerator
* and calling one of the
* {@code initialize} methods from this DSAKeyPairGenerator interface.
*
* <li>Generate a key pair by calling the {@code generateKeyPair}
* method from the KeyPairGenerator class.
*
* </ol>
*
* <p>Note: it is not always necessary to do algorithm-specific
* initialization for a DSA key pair generator. That is, it is not always
* necessary to call an {@code initialize} method in this interface.
* Algorithm-independent initialization using the {@code initialize} method
* in the KeyPairGenerator
* interface is all that is needed when you accept defaults for algorithm-specific
* parameters.
*
* <p>Note: Some earlier implementations of this interface may not support
* larger sizes of DSA parameters such as 2048 and 3072-bit.
*
* @since 1.1
* @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}
* value is invalid, null, or unsupported.
*/
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} 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 64 between 512 and 1024, inclusive, 2048, and 3072.
*
* @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} is
* invalid, or unsupported, or if {@code genParams} is false and there
* are no precomputed parameters for the requested modulus length.
*/
public void initialize(int modlen, boolean genParams, SecureRandom random)
throws InvalidParameterException;
}

View file

@ -0,0 +1,65 @@
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.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
*
* @author Benjamin Renaud
* @author Josh Bloch
* @since 1.1
*/
public interface DSAParams {
/**
* Returns the prime, {@code p}.
*
* @return the prime, {@code p}.
*/
public BigInteger getP();
/**
* Returns the subprime, {@code q}.
*
* @return the subprime, {@code q}.
*/
public BigInteger getQ();
/**
* Returns the base, {@code g}.
*
* @return the base, {@code g}.
*/
public BigInteger getG();
}

View file

@ -0,0 +1,59 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.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
*
* @author Benjamin Renaud
* @since 1.1
*/
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}.
*
* @return the value of the private key, {@code x}.
*/
public BigInteger getX();
}

View file

@ -0,0 +1,59 @@
/*
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.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
*
* @author Benjamin Renaud
* @since 1.1
*/
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}.
*
* @return the value of the public key, {@code y}.
*/
public BigInteger getY();
}

View file

@ -0,0 +1,45 @@
/*
* Copyright (c) 2003, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package java.security.interfaces;
import java.security.spec.ECParameterSpec;
/**
* The interface to an elliptic curve (EC) key.
*
* @author Valerie Peng
*
* @since 1.5
*/
public interface ECKey {
/**
* Returns the domain parameters associated
* with this key. The domain parameters are
* either explicitly specified or implicitly
* created during key generation.
* @return the associated domain parameters.
*/
ECParameterSpec getParams();
}

View file

@ -0,0 +1,53 @@
/*
* Copyright (c) 2003, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package java.security.interfaces;
import java.math.BigInteger;
import java.security.PrivateKey;
/**
* The interface to an elliptic curve (EC) private key.
*
* @author Valerie Peng
*
*
* @see PrivateKey
* @see ECKey
*
* @since 1.5
*/
public interface ECPrivateKey extends PrivateKey, ECKey {
/**
* The class fingerprint that is set to indicate
* serialization compatibility.
*/
static final long serialVersionUID = -7896394956925609184L;
/**
* Returns the private value S.
* @return the private value S.
*/
BigInteger getS();
}

View file

@ -0,0 +1,55 @@
/*
* Copyright (c) 2003, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package java.security.interfaces;
import java.security.PublicKey;
import java.security.spec.ECPoint;
/**
* The interface to an elliptic curve (EC) public key.
*
* @author Valerie Peng
*
*
* @see PublicKey
* @see ECKey
* @see java.security.spec.ECPoint
*
* @since 1.5
*/
public interface ECPublicKey extends PublicKey, ECKey {
/**
* The class fingerprint that is set to indicate
* serialization compatibility.
*/
static final long serialVersionUID = -3314988629879632826L;
/**
* Returns the public point W.
* @return the public point W.
*/
ECPoint getW();
}

View file

@ -0,0 +1,49 @@
/*
* Copyright (c) 1999, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.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
*
* @see RSAPublicKey
* @see RSAPrivateKey
*
* @since 1.3
*/
public interface RSAKey {
/**
* Returns the modulus.
*
* @return the modulus
*/
public BigInteger getModulus();
}

View file

@ -0,0 +1,105 @@
/*
* Copyright (c) 2001, 2013, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.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
*
*
* @see java.security.spec.RSAPrivateKeySpec
* @see java.security.spec.RSAMultiPrimePrivateCrtKeySpec
* @see RSAPrivateKey
* @see RSAPrivateCrtKey
*
* @since 1.4
*/
public interface RSAMultiPrimePrivateCrtKey extends RSAPrivateKey {
/**
* The type fingerprint that is set to indicate
* serialization compatibility with a previous
* version of the type.
*/
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();
}

View file

@ -0,0 +1,91 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.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
* @since 1.2
*
*
* @see RSAPrivateKey
*/
public interface RSAPrivateCrtKey extends RSAPrivateKey {
/**
* The type fingerprint that is set to indicate
* serialization compatibility with a previous
* version of the type.
*/
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();
}

View file

@ -0,0 +1,56 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.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
* @since 1.2
*
*
* @see RSAPrivateCrtKey
*/
public interface RSAPrivateKey extends java.security.PrivateKey, RSAKey
{
/**
* The type fingerprint that is set to indicate
* serialization compatibility with a previous
* version of the type.
*/
static final long serialVersionUID = 5187144804936595022L;
/**
* Returns the private exponent.
*
* @return the private exponent
*/
public BigInteger getPrivateExponent();
}

View file

@ -0,0 +1,53 @@
/*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.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
* @since 1.2
*
*/
public interface RSAPublicKey extends java.security.PublicKey, RSAKey
{
/**
* The type fingerprint that is set to indicate
* serialization compatibility with a previous
* version of the type.
*/
static final long serialVersionUID = -8727434096241101194L;
/**
* Returns the public exponent.
*
* @return the public exponent
*/
public BigInteger getPublicExponent();
}

View file

@ -0,0 +1,69 @@
/*
* Copyright (c) 1998, 2017, Oracle and/or its affiliates. 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. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle 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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* 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} classes for hardware devices, please refer
* to these cryptographic provider developer guides:
* <ul>
* <li>
* {@extLink security_guide_impl_provider
* How to Implement a Provider in the Java Cryptography Architecture}
* </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> {extLink security_guide_jca
* Java Cryptography Architecture Reference Guide}</li>
* </ul>
*
* @since 1.1
*/
package java.security.interfaces;