public PrivateKey(boolean shorter, long stream, long nonceTrialsPerByte, long extraBytes, Pubkey.Feature... features) { byte[] privSK; byte[] pubSK; byte[] privEK; byte[] pubEK; byte[] ripe; do { privSK = cryptography().randomBytes(PRIVATE_KEY_SIZE); privEK = cryptography().randomBytes(PRIVATE_KEY_SIZE); pubSK = cryptography().createPublicKey(privSK); pubEK = cryptography().createPublicKey(privEK); ripe = Pubkey.getRipe(pubSK, pubEK); } while (ripe[0] != 0 || (shorter && ripe[1] != 0)); this.privateSigningKey = privSK; this.privateEncryptionKey = privEK; this.pubkey = cryptography().createPubkey(Pubkey.LATEST_VERSION, stream, privateSigningKey, privateEncryptionKey, nonceTrialsPerByte, extraBytes, features); }