Skip to content
This repository was archived by the owner on Feb 2, 2019. It is now read-only.

Add a verify method that also takes an uncompressed public key#8

Closed
ValarDragon wants to merge 1 commit intotendermint:masterfrom
ValarDragon:dev/cache_pk
Closed

Add a verify method that also takes an uncompressed public key#8
ValarDragon wants to merge 1 commit intotendermint:masterfrom
ValarDragon:dev/cache_pk

Conversation

@ValarDragon
Copy link

Supercedes #7. Commit is (cherry picked from commit 2ab46c5) in #7.

A verification method using the uncompressed pubkey is useful for the proof of stake use case, since we often validate multiple signatures from the same public key. Based off of the numbers in the official Ed25519 paper, the function with the uncompressed pubkey should save about 10% of the computation time.


// VerifyUncompressedKey returns true iff sig is a valid signature of message by publicKey.
// This takes in the uncompressed form of the public key (A) to avoid computing that internally.
func VerifyUncompressedKey(publicKey *[PublicKeySize]byte, A *edwards25519.ExtendedGroupElement, message []byte, sig *[SignatureSize]byte) bool {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replied there too

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, as this interna become public now, it would be good to point to the section in the paper that deals with the compressed/uncompressed key. Such that a user who is expecting a API ala Sign/Verify can learn why this is different here.

@ValarDragon
Copy link
Author

repo abandoned

@ValarDragon ValarDragon closed this Jan 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants