diff options
Diffstat (limited to 'base/util/src/netscape/security/provider')
11 files changed, 102 insertions, 102 deletions
diff --git a/base/util/src/netscape/security/provider/DSA.java b/base/util/src/netscape/security/provider/DSA.java index 262095576..c9dc6c546 100644 --- a/base/util/src/netscape/security/provider/DSA.java +++ b/base/util/src/netscape/security/provider/DSA.java @@ -40,11 +40,11 @@ import netscape.security.util.DerValue; * The Digital Signature Standard (using the Digital Signature * Algorithm), as described in fips186 of the National Instute of * Standards and Technology (NIST), using fips180-1 (SHA-1). - * + * * @author Benjamin Renaud - * + * * @version 1.86, 97/09/17 - * + * * @see DSAPublicKey * @see DSAPrivateKey */ @@ -95,9 +95,9 @@ public final class DSA extends Signature { /** * Initialize the DSA object with a DSA private key. - * + * * @param privateKey the DSA private key - * + * * @exception InvalidKeyException if the key is not a valid DSA private * key. */ @@ -116,9 +116,9 @@ public final class DSA extends Signature { /** * Initialize the DSA object with a DSA public key. - * + * * @param publicKey the DSA public key. - * + * * @exception InvalidKeyException if the key is not a valid DSA public * key. */ @@ -143,13 +143,13 @@ public final class DSA extends Signature { * Sign all the data thus far updated. The signature is formatted * according to the Canonical Encoding Rules, returned as a DER * sequence of Integer, r and s. - * + * * @return a signature block formatted according to the Canonical * Encoding Rules. - * + * * @exception SignatureException if the signature object was not * properly initialized, or if another exception occurs. - * + * * @see netscape.security.provider.DSA#engineUpdate * @see netscape.security.provider.DSA#engineVerify */ @@ -178,13 +178,13 @@ public final class DSA extends Signature { /** * Verify all the data thus far updated. - * + * * @param signature the alledged signature, encoded using the * Canonical Encoding Rules, as a sequence of integers, r and s. - * + * * @exception SignatureException if the signature object was not * properly initialized, or if another exception occurs. - * + * * @see netscape.security.provider.DSA#engineUpdate * @see netscape.security.provider.DSA#engineSign */ @@ -327,11 +327,11 @@ public final class DSA extends Signature { /** * Compute k for a DSA signature. - * + * * @param seed the seed for generating k. This seed should be * secure. This is what is refered to as the KSEED in the DSA * specification. - * + * * @param g the g parameter from the DSA key pair. */ BigInteger generateK(int[] seed, BigInteger q) { @@ -427,13 +427,13 @@ public final class DSA extends Signature { /** * This implementation recognizes the following parameter: * <dl> - * + * * <dt><tt>Kseed</tt> - * + * * <dd>a byte array. - * + * * </dl> - * + * * @deprecated */ protected void engineSetParameter(String key, Object param) { @@ -458,17 +458,17 @@ public final class DSA extends Signature { /** * Return the value of the requested parameter. Recognized * parameters are: - * + * * <dl> - * + * * <dt><tt>Kseed</tt> - * + * * <dd>a byte array. - * + * * </dl> - * + * * @return the value of the requested parameter. - * + * * @deprecated */ protected Object engineGetParameter(String key) { @@ -491,7 +491,7 @@ public final class DSA extends Signature { /** * Update a byte to be signed or verified. - * + * * @param b the byte to updated. */ protected void engineUpdate(byte b) { @@ -500,7 +500,7 @@ public final class DSA extends Signature { /** * Update an array of bytes to be signed or verified. - * + * * @param data the bytes to be updated. */ protected void engineUpdate(byte[] data, int off, int len) { diff --git a/base/util/src/netscape/security/provider/DSAKeyFactory.java b/base/util/src/netscape/security/provider/DSAKeyFactory.java index 41f0081f2..ada152921 100755 --- a/base/util/src/netscape/security/provider/DSAKeyFactory.java +++ b/base/util/src/netscape/security/provider/DSAKeyFactory.java @@ -32,11 +32,11 @@ import java.security.spec.X509EncodedKeySpec; /** * This class implements the DSA key factory of the Sun provider. - * + * * @author Jan Luehe - * + * * @version 1.8, 97/12/10 - * + * * @since JDK1.2 */ @@ -45,11 +45,11 @@ public class DSAKeyFactory extends KeyFactorySpi { /** * Generates a public key object from the provided key specification * (key material). - * + * * @param keySpec the specification (key material) of the public key - * + * * @return the public key - * + * * @exception InvalidKeySpecException if the given key specification * is inappropriate for this key factory to produce a public key. */ @@ -77,11 +77,11 @@ public class DSAKeyFactory extends KeyFactorySpi { /** * Generates a private key object from the provided key specification * (key material). - * + * * @param keySpec the specification (key material) of the private key - * + * * @return the private key - * + * * @exception InvalidKeySpecException if the given key specification * is inappropriate for this key factory to produce a private key. */ @@ -109,15 +109,15 @@ public class DSAKeyFactory extends KeyFactorySpi { /** * Returns a specification (key material) of the given key object * in the requested format. - * + * * @param key the key - * + * * @param keySpec the requested format in which the key material shall be * returned - * + * * @return the underlying key specification (key material) in the * requested format - * + * * @exception InvalidKeySpecException if the requested key specification is * inappropriate for the given key, or the given key cannot be processed * (e.g., the given key has an unrecognized algorithm or format). @@ -188,11 +188,11 @@ public class DSAKeyFactory extends KeyFactorySpi { /** * Translates a key object, whose provider may be unknown or potentially * untrusted, into a corresponding key object of this key factory. - * + * * @param key the key whose provider is unknown or untrusted - * + * * @return the translated key - * + * * @exception InvalidKeyException if the given key cannot be processed by * this key factory. */ diff --git a/base/util/src/netscape/security/provider/DSAKeyPairGenerator.java b/base/util/src/netscape/security/provider/DSAKeyPairGenerator.java index 3e04792bf..c0fc274a9 100644 --- a/base/util/src/netscape/security/provider/DSAKeyPairGenerator.java +++ b/base/util/src/netscape/security/provider/DSAKeyPairGenerator.java @@ -40,9 +40,9 @@ import netscape.security.x509.AlgIdDSA; * This class generates DSA key parameters and public/private key * pairs according to the DSS standard NIST FIPS 186. It uses the * updated version of SHA, SHA-1 as described in FIPS 180-1. - * + * * @author Benjamin Renaud - * + * * @version 1.23, 97/12/10 */ @@ -60,7 +60,7 @@ public class DSAKeyPairGenerator extends KeyPairGenerator from the DSA specification, FIPS 186, and the FIPS 186 Change No 1, which updates the test vector using SHA-1 instead of SHA (for both the G function and the message - hash. + hash. */ precomputedParams = new Hashtable<Integer, AlgIdDSA>(); @@ -206,7 +206,7 @@ public class DSAKeyPairGenerator extends KeyPairGenerator /** * Initializes the DSA object using a DSA parameter object. - * + * * @param params a fully initialized DSA parameter object. */ public void initialize(DSAParams params, SecureRandom random) @@ -217,11 +217,11 @@ public class DSAKeyPairGenerator extends KeyPairGenerator /** * Initializes the DSA object using a parameter object. - * + * * @param params the parameter set to be used to generate * the keys. * @param random the source of randomness for this generator. - * + * * @exception InvalidAlgorithmParameterException if the given parameters * are inappropriate for this key pair generator */ @@ -238,11 +238,11 @@ public class DSAKeyPairGenerator extends KeyPairGenerator /** * Generates a pair of keys usable by any JavaSecurity compliant * DSA implementation. - * + * * @param rnd the source of random bits from which the random key * generation parameters are drawn. In particular, this includes * the XSEED parameter. - * + * * @exception InvalidParameterException if the modulus is not * between 512 and 1024. */ @@ -339,13 +339,13 @@ public class DSAKeyPairGenerator extends KeyPairGenerator * Given a seed, generate the private key component of the key * pair. In the terminology used in the DSA specification * (FIPS-186) seed is the XSEED quantity. - * + * * @param seed the seed to use to generate the private key. */ BigInteger generateX(int[] seed, BigInteger q) { - /* Test vector - int[] tseed = { 0xbd029bbe, 0x7f51960b, 0xcf9edb2b, + /* Test vector + int[] tseed = { 0xbd029bbe, 0x7f51960b, 0xcf9edb2b, 0x61f06f0f, 0xeb5a38b6 }; seed = tseed; */ @@ -368,9 +368,9 @@ public class DSAKeyPairGenerator extends KeyPairGenerator /** * Generate the public key component y of the key pair. - * + * * @param x the private key component. - * + * * @param p the base parameter. */ BigInteger generateY(BigInteger x, BigInteger p, BigInteger g) { diff --git a/base/util/src/netscape/security/provider/DSAParameterGenerator.java b/base/util/src/netscape/security/provider/DSAParameterGenerator.java index cd7b8de33..3a316cac5 100755 --- a/base/util/src/netscape/security/provider/DSAParameterGenerator.java +++ b/base/util/src/netscape/security/provider/DSAParameterGenerator.java @@ -68,7 +68,7 @@ public class DSAParameterGenerator extends AlgorithmParameterGeneratorSpi { /** * Initializes this parameter generator for a certain strength * and source of randomness. - * + * * @param strength the strength (size of prime) in bits * @param random the source of randomness */ @@ -91,10 +91,10 @@ public class DSAParameterGenerator extends AlgorithmParameterGeneratorSpi { /** * Initializes this parameter generator with a set of * algorithm-specific parameter generation values. - * + * * @param params the set of algorithm-specific parameter generation values * @param random the source of randomness - * + * * @exception InvalidAlgorithmParameterException if the given parameter * generation values are inappropriate for this parameter generator */ @@ -106,7 +106,7 @@ public class DSAParameterGenerator extends AlgorithmParameterGeneratorSpi { /** * Generates the parameters. - * + * * @return the new AlgorithmParameters object */ protected AlgorithmParameters engineGenerateParameters() { @@ -148,7 +148,7 @@ public class DSAParameterGenerator extends AlgorithmParameterGeneratorSpi { * * @param random the source of randomness to generate the * seed - * @param L the size of <code>p</code>, in bits. + * @param L the size of <code>p</code>, in bits. * * @return an array of BigInteger, with <code>p</code> at index 0 and * <code>q</code> at index 1. @@ -178,7 +178,7 @@ public class DSAParameterGenerator extends AlgorithmParameterGeneratorSpi { * * @return an array of BigInteger, with <code>p</code> at index 0, * <code>q</code> at index 1, the seed at index 2, and the counter value - * at index 3, or null if the seed does not yield suitable numbers. + * at index 3, or null if the seed does not yield suitable numbers. */ BigInteger[] generatePandQ(byte[] seed, int L) { diff --git a/base/util/src/netscape/security/provider/DSAParameters.java b/base/util/src/netscape/security/provider/DSAParameters.java index e2a5dd128..d22ab10fc 100755 --- a/base/util/src/netscape/security/provider/DSAParameters.java +++ b/base/util/src/netscape/security/provider/DSAParameters.java @@ -32,11 +32,11 @@ import netscape.security.util.DerValue; * This class implements the parameter set used by the * Digital Signature Algorithm as specified in the FIPS 186 * standard. - * + * * @author Jan Luehe - * + * * @version 1.8, 97/12/10 - * + * * @since JDK1.2 */ diff --git a/base/util/src/netscape/security/provider/DSAPrivateKey.java b/base/util/src/netscape/security/provider/DSAPrivateKey.java index 0cfc5e5ea..d18206c1e 100644 --- a/base/util/src/netscape/security/provider/DSAPrivateKey.java +++ b/base/util/src/netscape/security/provider/DSAPrivateKey.java @@ -33,11 +33,11 @@ import netscape.security.x509.AlgIdDSA; /** * A PKCS#8 private key for the Digital Signature Algorithm. - * + * * @author Benjamin Renaud - * + * * @version 1.47, 97/12/10 - * + * * @see DSAPublicKey * @see AlgIdDSA * @see DSA @@ -110,7 +110,7 @@ public final class DSAPrivateKey extends PKCS8Key /** * Get the raw private key, x, without the parameters. - * + * */ public BigInteger getX() { return x; diff --git a/base/util/src/netscape/security/provider/DSAPublicKey.java b/base/util/src/netscape/security/provider/DSAPublicKey.java index 89262809b..699a28261 100644 --- a/base/util/src/netscape/security/provider/DSAPublicKey.java +++ b/base/util/src/netscape/security/provider/DSAPublicKey.java @@ -34,11 +34,11 @@ import netscape.security.x509.X509Key; /** * An X.509 public key for the Digital Signature Algorithm. - * + * * @author Benjamin Renaud - * + * * @version 1.52, 97/12/10 - * + * * @see DSAPrivateKey * @see AlgIdDSA * @see DSA @@ -54,7 +54,7 @@ public final class DSAPublicKey extends X509Key private BigInteger y; /* - * Keep this constructor for backwards compatibility with JDK1.1. + * Keep this constructor for backwards compatibility with JDK1.1. */ public DSAPublicKey() { } @@ -110,7 +110,7 @@ public final class DSAPublicKey extends X509Key /** * Get the raw public value, y, without the parameters. - * + * */ public BigInteger getY() { return y; diff --git a/base/util/src/netscape/security/provider/MD5.java b/base/util/src/netscape/security/provider/MD5.java index d7aeacaee..00d3a4c29 100644 --- a/base/util/src/netscape/security/provider/MD5.java +++ b/base/util/src/netscape/security/provider/MD5.java @@ -24,7 +24,7 @@ import java.security.MessageDigestSpi; * The MD5 class is used to compute an MD5 message digest over a given * buffer of bytes. It is an implementation of the RSA Data Security Inc * MD5 algorithim as described in internet RFC 1321. - * + * * @version 1.24 97/12/10 * @author Chuck McManis * @author Benjamin Renaud diff --git a/base/util/src/netscape/security/provider/RSAPublicKey.java b/base/util/src/netscape/security/provider/RSAPublicKey.java index 4c65b4fa0..a70d1aeee 100644 --- a/base/util/src/netscape/security/provider/RSAPublicKey.java +++ b/base/util/src/netscape/security/provider/RSAPublicKey.java @@ -31,19 +31,19 @@ import netscape.security.x509.X509Key; /** * An X.509 public key for the RSA Algorithm. - * + * * @author galperin - * + * * @version $Revision$, $Date$ - * + * */ public final class RSAPublicKey extends X509Key implements Serializable { /* XXX This currently understands only PKCS#1 RSA Encryption OID and parameter format - Later we may consider adding X509v3 OID for RSA keys. Besides - different OID it also has a parameter equal to modulus size + Later we may consider adding X509v3 OID for RSA keys. Besides + different OID it also has a parameter equal to modulus size in bits (redundant!) */ @@ -59,7 +59,7 @@ public final class RSAPublicKey extends X509Key implements Serializable { private BigInt publicExponent; /* - * Keep this constructor for backwards compatibility with JDK1.1. + * Keep this constructor for backwards compatibility with JDK1.1. */ public RSAPublicKey() { } @@ -97,7 +97,7 @@ public final class RSAPublicKey extends X509Key implements Serializable { /** * Get key size as number of bits in modulus * (Always rounded up to a multiple of 8) - * + * */ public int getKeySize() { return this.modulus.byteLength() * 8; @@ -105,7 +105,7 @@ public final class RSAPublicKey extends X509Key implements Serializable { /** * Get the raw public exponent - * + * */ public BigInt getPublicExponent() { return this.publicExponent; @@ -113,7 +113,7 @@ public final class RSAPublicKey extends X509Key implements Serializable { /** * Get the raw modulus - * + * */ public BigInt getModulus() { return this.modulus; diff --git a/base/util/src/netscape/security/provider/SHA.java b/base/util/src/netscape/security/provider/SHA.java index 42a6b8b90..c19992309 100644 --- a/base/util/src/netscape/security/provider/SHA.java +++ b/base/util/src/netscape/security/provider/SHA.java @@ -25,11 +25,11 @@ import java.security.MessageDigestSpi; * the National Institute of Standards and Technology along with the * National Security Agency. This is the updated version of SHA * fip-180 as superseded by fip-180-1. - * + * * <p> * It implement JavaSecurity MessageDigest, and can be used by in the Java Security framework, as a pluggable * implementation, as a filter for the digest stream classes. - * + * * @version 1.30 97/12/10 * @author Roger Riggs * @author Benjamin Renaud @@ -38,7 +38,7 @@ import java.security.MessageDigestSpi; public class SHA extends MessageDigestSpi implements Cloneable { /* This private hookm controlled by the appropriate constructor, - causes this class to implement the first version of SHA, + causes this class to implement the first version of SHA, as defined in FIPS 180, as opposed to FIPS 180-1. This was useful for DSA testing. */ private int version = 1; @@ -81,7 +81,7 @@ public class SHA extends MessageDigestSpi implements Cloneable { /** * Update a byte. - * + * * @param b the byte */ private void engineUpdate(int b) { @@ -105,7 +105,7 @@ public class SHA extends MessageDigestSpi implements Cloneable { /** * Update a buffer. - * + * * @param b the data to be updated. * @param off the start offset in the data * @param len the number of bytes to be updated. @@ -256,11 +256,11 @@ public class SHA extends MessageDigestSpi implements Cloneable { /** * Compute a the hash for the current block. - * + * * This is in the same vein as Peter Gutmann's algorithm listed in * the back of Applied Cryptography, Compact implementation of * "old" NIST Secure Hash Algorithm. - * + * */ private void computeBlock() { int temp, a, b, c, d, e; diff --git a/base/util/src/netscape/security/provider/Sun.java b/base/util/src/netscape/security/provider/Sun.java index df384aeab..e056b7bb1 100644 --- a/base/util/src/netscape/security/provider/Sun.java +++ b/base/util/src/netscape/security/provider/Sun.java @@ -22,32 +22,32 @@ import java.security.Provider; /** * The SUN Security Provider. * - * @author Benjamin Renaud + * @author Benjamin Renaud * * @version 1.24, 97/12/10 */ /** * Defines the SUN provider. - * + * * Algorithm supported, and their names: - * + * * - SHA-1 is the message digest scheme decribed FIPS 180-1. * Aliases for SHA-1 are SHA. - * + * * - DSA is the signature scheme described in FIPS 186. (SHA used in * DSA is SHA-1: FIPS 186 with Change No 1.) Aliases for DSA are * SHA/DSA, SHA-1/DSA, SHA1/DSA, DSS and the object identifier * strings "OID.1.3.14.3.2.13", "OID.1.3.14.3.2.27" and * "OID.1.2.840.10040.4.3". - * + * * - DSA is the key generation scheme as described in FIPS 186. * Aliases for DSA include the OID strings "OID.1.3.14.3.2.12" * and "OID.1.2.840.10040.4.1". - * + * * - MD5 is the message digest scheme described in RFC 1321. * There are no aliases for MD5. - * + * * Notes: The name of algorithm described in FIPS-180 is SHA-0, and is * not supported by the SUN provider.) */ @@ -69,7 +69,7 @@ public final class Sun extends Provider { // AccessController.beginPrivileged(); /* - * Signature engines + * Signature engines */ put("Signature.DSA", "netscape.security.provider.DSA"); @@ -89,7 +89,7 @@ public final class Sun extends Provider { put("Alg.Alias.Signature.SHA1withDSA", "DSA"); /* - * Key Pair Generator engines + * Key Pair Generator engines */ put("KeyPairGenerator.DSA", "netscape.security.provider.DSAKeyPairGenerator"); @@ -101,8 +101,8 @@ public final class Sun extends Provider { put("Alg.Alias.KeyPairGenerator.1.3.14.3.2.12", "DSA"); put("Alg.Alias.KeyPairGenerator.1.2.840.10040.4.1", "DSA"); - /* - * Digest engines + /* + * Digest engines */ put("MessageDigest.MD5", "netscape.security.provider.MD5"); put("MessageDigest.SHA-1", "netscape.security.provider.SHA"); |