Git Product home page Git Product logo

bls_lib's People

Contributors

leishman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bls_lib's Issues

opt_atePairing does not have 4 parameters

opt_atePairing(pairing_prod, pubkeys[0].ec2, hashed_msg_point, !delay_exp);
what is the delay_exp?
I check the opt_atePairing in bn.h, the define is:
void opt_atePairing(Fp12T<Fp6T<Fp2T > >& f, const Fp2T Q[2], const Fp P[2])

bool Bls::verifyAggSig(const std::vector<const char*> &messages, const std::vector<PubKey> &pubkeys, const Sig &sig, bool delay_exp) {
	// check that same number of messages and pubkeys
	if (messages.size() != pubkeys.size()) {
		cerr << "SIZES NOT EQUAL" << endl;
		return false;
	}

	// calculate initial pairing
	Fp12 pairing_prod;
	Ec1 hashed_msg_point = hashMsgWithPubkey(messages[0], pubkeys[0].ec2);
	opt_atePairing(pairing_prod, pubkeys[0].ec2, hashed_msg_point, !delay_exp);

	// Set for checking that all messages are unique
	std::vector<Ec1> hashed_msgs;
	hashed_msgs.push_back(hashed_msg_point);

	for (size_t i = 1; i < messages.size(); i++) {
		Fp12 pairing_i;
		Ec1 hashed_msg_point = hashMsgWithPubkey(messages[i], pubkeys[i].ec2);
		Ec2 pubkey = pubkeys[i].ec2;
		hashed_msgs.push_back(hashed_msg_point);
		opt_atePairing(pairing_i, pubkey, hashed_msg_point, !delay_exp);
		pairing_prod *= pairing_i;
	}

	if (delay_exp) {
		pairing_prod.final_exp();
	}

	// calculate pairing with agg signature
	Fp12 pairing_agg;
	opt_atePairing(pairing_agg, g2, sig.ec1);

	return pairing_agg == pairing_prod;
}

Can I use the Aggregate Signatures to combine multiple messages?

I have many messages (for example, 2^32), can I use your code to aggregate?
For example, I sig the messages one by one, and then I aggregate all the signatures, publish the aggregated signature. So, anyone can check any message of the messages by the aggregated signature.

To production

Hey,

I would like to use your signature aggregation algorithm in the cryptocurrency that I am developing in order to reduce the block size.

What tests and research do I need to put in, in order to make this production ready.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.