Package org.bouncycastle.crypto.params

Examples of org.bouncycastle.crypto.params.RSAKeyParameters


        return new SimpleTestResult(true, "ISO9796: Okay");
    }

    public TestResult doTest4()
    {
        RSAKeyParameters    pubParameters = new RSAKeyParameters(false, mod3, pub3);
        RSAKeyParameters    privParameters = new RSAKeyParameters(true, mod3, pri3);
        RSAEngine           rsa = new RSAEngine();
        byte[]              data;

        //
        // ISO 9796-2 - Signing
View Full Code Here


        return new SimpleTestResult(true, "ISO9796: Okay");
    }

    public TestResult doTest5()
    {
        RSAKeyParameters    pubParameters = new RSAKeyParameters(false, mod3, pub3);
        RSAKeyParameters    privParameters = new RSAKeyParameters(true, mod3, pri3);
        RSAEngine           rsa = new RSAEngine();
        byte[]              data;

        //
        // ISO 9796-2 - Signing
View Full Code Here

    // against a zero length string
    //
    public TestResult doTest6()
    {
        byte[]                salt = Hex.decode("61DF870C4890FE85D6E3DD87C3DCE3723F91DB49");
        RSAKeyParameters    pubParameters = new RSAKeyParameters(false, mod6, pub6);
        RSAKeyParameters    privParameters = new RSAKeyParameters(true, mod6, pri6);
        ParametersWithSalt    sigParameters = new ParametersWithSalt(privParameters, salt);
        RSAEngine           rsa = new RSAEngine();
        byte[]              data;

        //
View Full Code Here

    }
   
    public TestResult doTest7()
    {
        byte[]                salt = new byte[0];
        RSAKeyParameters    pubParameters = new RSAKeyParameters(false, mod6, pub6);
        RSAKeyParameters    privParameters = new RSAKeyParameters(true, mod6, pri6);
        ParametersWithSalt    sigParameters = new ParametersWithSalt(privParameters, salt);
        RSAEngine           rsa = new RSAEngine();
        byte[]              data;

        //
View Full Code Here

    }
   
    public TestResult doTest8()
    {
        byte[]              salt = Hex.decode("78E293203CBA1B7F92F05F4D171FF8CA3E738FF8");
        RSAKeyParameters    pubParameters = new RSAKeyParameters(false, mod6, pub6);
        RSAKeyParameters    privParameters = new RSAKeyParameters(true, mod6, pri6);
        ParametersWithSalt  sigParameters = new ParametersWithSalt(privParameters, salt);
        RSAEngine           rsa = new RSAEngine();
        byte[]              data;

        //
View Full Code Here

        return new SimpleTestResult(true, "ISO9796: Okay");
    }
   
    public TestResult doTest9()
    {
        RSAKeyParameters    pubParameters = new RSAKeyParameters(false, mod6, pub6);
        RSAKeyParameters    privParameters = new RSAKeyParameters(true, mod6, pri6);
        RSAEngine           rsa = new RSAEngine();
        byte[]              data;

        //
        // ISO 9796-2 - PSS Signing
View Full Code Here

    public TestResult doTest10()
    {
        BigInteger          mod = new BigInteger("B3ABE6D91A4020920F8B3847764ECB34C4EB64151A96FDE7B614DC986C810FF2FD73575BDF8532C06004C8B4C8B64F700A50AEC68C0701ED10E8D211A4EA554D", 16);
        BigInteger          pubExp = new BigInteger("65537", 10);
        BigInteger          priExp = new BigInteger("AEE76AE4716F77C5782838F328327012C097BD67E5E892E75C1356E372CCF8EE1AA2D2CBDFB4DA19F703743F7C0BA42B2D69202BA7338C294D1F8B6A5771FF41", 16);
        RSAKeyParameters    pubParameters = new RSAKeyParameters(false, mod, pubExp);
        RSAKeyParameters    privParameters = new RSAKeyParameters(true, mod, priExp);
        RSAEngine           rsa = new RSAEngine();
        byte[]              data;

        //
        // ISO 9796-2 - PSS Signing
View Full Code Here

        return "RSA";
    }

    public TestResult perform()
    {
        RSAKeyParameters    pubParameters = new RSAKeyParameters(false, mod, pubExp);
        RSAKeyParameters    privParameters = new RSAPrivateCrtKeyParameters(mod, pubExp, privExp, p, q, pExp, qExp, crtCoef);
        byte[]              data = Hex.decode(edgeInput);

        //
        // RAW
        //
View Full Code Here

  public void init() throws Exception{
    digest=new SHA1Digest();
    cipher=new RSAEngine();
  }    
  public void setPubKey(byte[] e, byte[] n) throws Exception{
    RSAKeyParameters pubKey=
      new RSAKeyParameters(false, new BigInteger(n), new BigInteger(e));
    digest.reset();
    cipher.init(false, pubKey);
  }
View Full Code Here

      new RSAKeyParameters(false, new BigInteger(n), new BigInteger(e));
    digest.reset();
    cipher.init(false, pubKey);
  }
  public void setPrvKey(byte[] d, byte[] n) throws Exception{
    RSAKeyParameters prvKey=
      new RSAKeyParameters(true, new BigInteger(n), new BigInteger(d));
    digest.reset();
    cipher.init(true, prvKey);
  }
View Full Code Here

TOP

Related Classes of org.bouncycastle.crypto.params.RSAKeyParameters

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.