Package org.bouncycastle.crypto.engines

Examples of org.bouncycastle.crypto.engines.RSAEngine


    static public class SHA1WithRSAEncryption
        extends JDKDigestSignature
    {
        public SHA1WithRSAEncryption()
        {
            super("SHA1withRSA", id_SHA1, new SHA1Digest(), new PKCS1Encoding(new RSAEngine()));
        }
View Full Code Here


    static public class MD2WithRSAEncryption
        extends JDKDigestSignature
    {
        public MD2WithRSAEncryption()
        {
            super("MD2withRSA", md2, new MD2Digest(), new PKCS1Encoding(new RSAEngine()));
        }
View Full Code Here

    static public class MD5WithRSAEncryption
        extends JDKDigestSignature
    {
        public MD5WithRSAEncryption()
        {
            super("MD5withRSA", md5, new MD5Digest(), new PKCS1Encoding(new RSAEngine()));
        }
View Full Code Here

    static public class RIPEMD160WithRSAEncryption
        extends JDKDigestSignature
    {
        public RIPEMD160WithRSAEncryption()
        {
            super("RIPEMD160withRSA", TeleTrusTObjectIdentifiers.ripemd160, new RIPEMD160Digest(), new PKCS1Encoding(new RSAEngine()));
        }
View Full Code Here

  static public class RIPEMD128WithRSAEncryption
    extends JDKDigestSignature
  {
    public RIPEMD128WithRSAEncryption()
    {
      super("RIPEMD128withRSA", TeleTrusTObjectIdentifiers.ripemd128, new RIPEMD128Digest(), new PKCS1Encoding(new RSAEngine()));
    }
View Full Code Here

  static public class RIPEMD256WithRSAEncryption
    extends JDKDigestSignature
  {
    public RIPEMD256WithRSAEncryption()
    {
      super("RIPEMD256withRSA", TeleTrusTObjectIdentifiers.ripemd256, new RIPEMD256Digest(), new PKCS1Encoding(new RSAEngine()));
    }
View Full Code Here

       
      }catch( Throwable e ){
       
          // fallback to the BC implementation for jdk1.4.2 as JCE RSA not available
       
        RSAEngine  eng = new RSAEngine();
       
        PKCS1Encoding  padded_eng = new PKCS1Encoding( eng );
       
              CipherParameters param = RSAUtil.generatePublicKeyParameter(public_key);
             
View Full Code Here

    return this.mod;
  }

  private String generate() throws Exception{
    RSAKeyParameters pubParameters = new RSAKeyParameters(false, mod, exp);
    AsymmetricBlockCipher eng = new PKCS1Encoding(new RSAEngine());
    eng.init(true, pubParameters);
    byte[] data = Base16.fromHexString(this.sessionKey);
    data = eng.processBlock(data, 0, data.length);
    return Base16.toHexString(data);
  }
View Full Code Here

                                                        privStruct.getPrime2(),
                                                        privStruct.getExponent1(),
                                                        privStruct.getExponent2(),
                                                        privStruct.getCoefficient());
   
            AsymmetricBlockCipher   cipher = new OAEPEncoding(new RSAEngine());
   
            cipher.init(true, new ParametersWithRandom(pubParameters, new Rand()));
   
            byte[]  out;
            byte[]  input = new byte[]
View Full Code Here

    private TestResult doTest1()
    {
        RSAKeyParameters    pubParameters = new RSAKeyParameters(false, mod1, pub1);
        RSAKeyParameters    privParameters = new RSAKeyParameters(true, mod1, pri1);
        RSAEngine           rsa = new RSAEngine();
        byte[]              data;

        //
        // ISO 9796-1 - public encrypt, private decrypt
        //
View Full Code Here

TOP

Related Classes of org.bouncycastle.crypto.engines.RSAEngine

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.