Package freenet.crypt

Examples of freenet.crypt.ECDSA


      pubKeyHash = SHA256.digest(pubKey.asBytes());
      pubKeyHashHash = SHA256.digest(pubKeyHash);
     
      ecdsaSFS = fs.subset("ecdsa");
      if(ecdsaSFS != null) {
          ecdsaP256 = new ECDSA(ecdsaSFS.subset(ECDSA.Curves.P256.name()), Curves.P256);
        }
    } catch (IllegalBase64Exception e) {
      Logger.error(this, "Caught "+e, e);
      throw new IOException(e.toString());
    } catch (FSParseException e) {
      Logger.error(this, "Caught "+e, e);
      throw new IOException(e.toString());
    } catch (IllegalArgumentException e) {
      // DSAPrivateKey is invalid
      Logger.error(this, "Caught "+e, e);
      throw new IOException(e.toString());
    }
   
    if(ecdsaP256 == null) {
        // We don't have a keypair, generate one.
        Logger.normal(this, "No ecdsa.P256 field found in noderef: let's generate a new key");
        ecdsaP256 = new ECDSA(Curves.P256);
    }
        ecdsaPubKeyHash = SHA256.digest(ecdsaP256.getPublicKey().getEncoded());
   
    InsertableClientSSK ark = null;
View Full Code Here


    pubKeyHashHash = SHA256.digest(pubKeyHash);
    myIdentity = Arrays.copyOf(pubKeyHash, IDENTITY_LENGTH);
    identityHash = md.digest(myIdentity);
    identityHashHash = md.digest(identityHash);
    anonSetupCipher.initialize(identityHash);
    ecdsaP256 = new ECDSA(ECDSA.Curves.P256);
        ecdsaPubKeyHash = SHA256.digest(ecdsaP256.getPublicKey().getEncoded());
  }
View Full Code Here

TOP

Related Classes of freenet.crypt.ECDSA

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.