Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement proof of possession check for BEEFY BLS keys #18

Open
drskalman opened this issue Jul 11, 2024 · 1 comment
Open

implement proof of possession check for BEEFY BLS keys #18

drskalman opened this issue Jul 11, 2024 · 1 comment
Assignees

Comments

@drskalman
Copy link
Collaborator

The runtime transaction for session key update receive a blob of opaque key trait where individual keys could be enumerated by the key type id.
https://github.com/paritytech/substrate/blob/2651d5cf410700c8a9bbe1b5df54aa9956926b34/primitives/runtime/src/traits.rs#L1156
As such ownership_proof_is_valid should enumerate the keys, and for any BLS key type, it should call verification of the proof of possession from the BLS library:

@drskalman drskalman self-assigned this Jul 11, 2024
@drskalman
Copy link
Collaborator Author

drskalman commented Nov 12, 2024

Remaining steps:

  • we need a host function for generating pop for bls12-381.
  • Change RuntimeApp/Public traits to have generate_pop and verify_pop.
  • Implement verify_pop (cryptoapp) for all publickey cryptos by calling Pop::verify_pop (you can because it is no-std).
  • implement generate_pop for all cryptos (except) by writing four lines and calling io:sign.
  • implement generate_pop bls381 by calling into io:bls_generate_pop
  • implement generate_pop for ecdsa_bls381 the way you should (don't add new host).
  • Comments/Docs on new fns
  • Add to app_crypto! decl macro in app_crypto_pair_common! decl macro verify_pop
  • Change name non-aggregatable
  • Keep proc-macro crate for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants