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

BABE implementation #2

Open
5 tasks
kwanCCC opened this issue Jan 12, 2022 · 3 comments
Open
5 tasks

BABE implementation #2

kwanCCC opened this issue Jan 12, 2022 · 3 comments

Comments

@kwanCCC
Copy link
Contributor

kwanCCC commented Jan 12, 2022

First important thing is VRF, We will use the Schnorrkel VRF and sr25519 signatures. But I'm not sure about the BLS because most BLS makes hashing-to-the-curve slow.

  • Digest in Block Header (Primary, Secondary)
  • The API of VRF(epoch_randomness, slot_num)
  • Distribute Clock system
  • block proposing
  • block verification
@keyvank
Copy link
Member

keyvank commented Jan 13, 2022

@kwanCCC Do you want to implement VRFs from scratch? I think a good strategy is to make abstract traits of signatures, VRFs and all other crypto primitives (Like what I did here: https://github.com/zeeka-network/bazuka/blob/master/src/crypto.rs ) and then use prewritten libraries to implement these traits. This way we can make a MVP faster, then if we figured out we don't want to use those VRF libraries, we can just implement those traits again ourselves. I was going to using https://github.com/witnet/vrf-rs library as our VRF backend. It uses secp256k1 curves. Is that ok? Or am I missing something?

@kwanCCC
Copy link
Contributor Author

kwanCCC commented Jan 14, 2022

@keyvank
No,I don't want implement VRFs from scratch. And I found schnorrkel, but only support Ristretto compressed Ed25519 points. The task VRF which one hasn't clear description described above. The goal of VRF is make it as part of KeyStore which works as a module in whole system then we can use KeyStore to sign a value using VRF, verify a proof.

@kwanCCC
Copy link
Contributor Author

kwanCCC commented Jan 14, 2022

pub trait CryptoStore {
  fn generate_new_keypair();
  fn sign_with(msg);
  fn vrf_sign();
  .......
}

The Api of KeyStore maybe like this or some more methods.

@kwanCCC kwanCCC closed this as completed Jan 14, 2022
@kwanCCC kwanCCC reopened this Jan 14, 2022
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