Package org.bouncycastle.crypto.signers

Examples of org.bouncycastle.crypto.signers.ECDSASigner.verifySignature()


            ECPublicKeyParameters pubKey = new ECPublicKeyParameters(
                curve.decodePoint(Hex.decode("0262b12d60690cdcf330babab6e69763b471f994dd702d16a5")), // Q
                params);

            ecdsa.init(false, pubKey);
            if ( ecdsa.verifySignature(message, sig[0], sig[1]) )
            {
                return new SimpleTestResult(true, getName() + ": Okay");
            }
            else
            {
View Full Code Here


            ECPublicKeyParameters pubKey = new ECPublicKeyParameters(
                curve.decodePoint(Hex.decode("025b6dc53bc61a2548ffb0f671472de6c9521a9d2d2534e65abfcbd5fe0c70")), // Q
                params);

            ecdsa.init(false, pubKey);
            if ( ecdsa.verifySignature(message, sig[0], sig[1]) )
            {
                return new SimpleTestResult(true, getName() + ": Okay");
            }
            else
            {
View Full Code Here

            byte[] message = new BigInteger("968236873715988614170569073515315707566766479517").toByteArray();
            BigInteger[] sig = ecdsa.generateSignature(message);

            ecdsa.init(false, pair.getPublic());

            if (ecdsa.verifySignature(message, sig[0], sig[1]))
            {
                return new SimpleTestResult(true, getName() + ": Okay");
            }
            else
            {
View Full Code Here

      signer.init (false, new ECPublicKeyParameters (curve.getCurve ().decodePoint (pub), domain));

      DLSequence seq = (DLSequence) asn1.readObject ();
      BigInteger r = ((ASN1Integer) seq.getObjectAt (0)).getPositiveValue ();
      BigInteger s = ((ASN1Integer) seq.getObjectAt (1)).getPositiveValue ();
      return signer.verifySignature (hash, r, s);
    }
    catch ( Exception e )
    {
      // threat format errors as invalid signatures
      return false;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.