ch.othello.openscep.internal
Class RSAMD5Digest

java.lang.Object
  |
  +--ch.othello.openscep.internal.RSAMD5Digest

public class RSAMD5Digest
extends Object

 $Id: RSAMD5Digest.java,v 1.9 2002/02/22 10:35:31 urut Exp $
 $Log: RSAMD5Digest.java,v $
 Revision 1.9  2002/02/22 10:35:31  urut
 first v2 working release (pkcs#10 only)
 major mods,in particular:
 - md5 hash calculation for proxyIdentifier
 - requestPayload, Attributes is tagged object

 Revision 1.8  2002/02/22 03:18:07  urut
 adjusted scep library to openscep 0.4.0:
 -proxyIdentification Envelope Removed
 -calculation of hash for requestPayload changed
 -messageTyp in v2 is different

 Revision 1.7  2002/02/12 19:33:23  urut
 replaced all println statements

 Revision 1.6  2002/02/07 12:40:56  urut
 moved util-stuff to Utils.java
 CA get implemented

 Revision 1.5  2002/01/23 19:10:24  urut
 fixed computation of MD5 fingerprint

 Revision 1.4  2002/01/17 19:44:39  urut
 added seperate digest/encrypt methods. digest-Methods use DigestInfo, the encrypt methods don't.

 Revision 1.3  2002/01/10 14:19:43  alani
 improved certRequest

 Revision 1.2  2002/01/08 21:00:29  urut
 added javadoc header with cvs tags to every file

 

Since:
$Date: 2002/02/22 10:35:31 $
Version:
$Revision: 1.9 $
Author:
urut

Constructor Summary
RSAMD5Digest()
           
 
Method Summary
static void decryptMD5(byte[] encrypted, org.bouncycastle.asn1.x509.RSAPublicKeyStructure publicKey)
          md5 digest (including DigestInfo Structure), rsa encrypted.
static byte[] digestMD5(Collection data)
           
static byte[] digestMD5(org.bouncycastle.asn1.DEREncodable data)
           
private static byte[] digestMD5RSA(org.bouncycastle.asn1.DEREncodable data, org.bouncycastle.crypto.params.RSAPrivateCrtKeyParameters privateKey)
           
static byte[] digestMD5RSA(org.bouncycastle.asn1.DEREncodable data, org.bouncycastle.asn1.pkcs.RSAPrivateKeyStructure pk)
          computes a RSA encrypted MD5 digest, including the DigestInfo structure
private static byte[] signMD5RSA(org.bouncycastle.asn1.DEREncodable data, org.bouncycastle.crypto.params.RSAPrivateCrtKeyParameters privateKey)
           
static byte[] signMD5RSA(org.bouncycastle.asn1.DEREncodable data, org.bouncycastle.asn1.pkcs.RSAPrivateKeyStructure pk)
          md5 signature, encrypted with the supplied private key
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RSAMD5Digest

public RSAMD5Digest()
Method Detail

digestMD5RSA

private static byte[] digestMD5RSA(org.bouncycastle.asn1.DEREncodable data,
                                   org.bouncycastle.crypto.params.RSAPrivateCrtKeyParameters privateKey)

digestMD5

public static byte[] digestMD5(org.bouncycastle.asn1.DEREncodable data)

digestMD5

public static byte[] digestMD5(Collection data)

signMD5RSA

private static byte[] signMD5RSA(org.bouncycastle.asn1.DEREncodable data,
                                 org.bouncycastle.crypto.params.RSAPrivateCrtKeyParameters privateKey)

decryptMD5

public static void decryptMD5(byte[] encrypted,
                              org.bouncycastle.asn1.x509.RSAPublicKeyStructure publicKey)
md5 digest (including DigestInfo Structure), rsa encrypted. This one is differnt from signMD5RSA: additionally to signMD5RSA, this function adds DigestInfo to the Data

Parameters:
encrypted -
publicKey -

signMD5RSA

public static byte[] signMD5RSA(org.bouncycastle.asn1.DEREncodable data,
                                org.bouncycastle.asn1.pkcs.RSAPrivateKeyStructure pk)
md5 signature, encrypted with the supplied private key

Parameters:
data - Data to sign
pk - private key
Returns:

digestMD5RSA

public static byte[] digestMD5RSA(org.bouncycastle.asn1.DEREncodable data,
                                  org.bouncycastle.asn1.pkcs.RSAPrivateKeyStructure pk)
computes a RSA encrypted MD5 digest, including the DigestInfo structure

Parameters:
data -
pk -
Returns:


ScepClient is copyright by Ueli Rutishauser + Alain Schaefer