hotstuff icon indicating copy to clipboard operation
hotstuff copied to clipboard

Sign hash instead of block

Open leandernikolaus opened this issue 2 years ago • 1 comments

In quorum certificates, we sign the block (encoded). Why do we not just sign the hash of the block? By just signing the hash, we could verify certificates without having to retrieve the block. This makes it easier to parallelize such verifications.

func (c crypto) CreatePartialCert(block *hotstuff.Block) (cert hotstuff.PartialCert, err error) {
	sig, err := c.Sign(block.ToBytes())
	if err != nil {
		return hotstuff.PartialCert{}, err
	}
	return hotstuff.NewPartialCert(sig, block.Hash()), nil
}

From here: https://github.com/relab/hotstuff/blob/5196107d449a52e240ab4eddf7ded7cf96a755e3/crypto/crypto.go#L36

leandernikolaus avatar Dec 14 '22 10:12 leandernikolaus

Add a benchmark and tests (if not already sufficiently tested) and try it.

meling avatar Mar 09 '24 22:03 meling