w3f / ring-vrf

MIT License
39 stars 17 forks source link

Expose some required things #51

Closed davxy closed 1 year ago

davxy commented 1 year ago

ThinVrfSignature components

I currently require this for a hack I crufted up.

We need to have access to a Vec version of ThinVrfSignature (i.e. without the generic) and methods (i.e. sign_thin_vrf_vec).

If is ok for you I can easily prepare a PR to do that.

In my code I had to re-define the VrfSignature with something like:

struct VrfSignature {
    proof: VrfProof,
    preout: Box<[bandersnatch_vrfs::VrfPreOut]>,
}

Serialization traits

I prefer to not directly include any other dependency. Thus would be nice to expose the serialization traits directly from here.

An alternative, e.g. if we want to give some defaults, we may provide to_bytes and from_bytes methods directly to the types I need to serialize.

burdges commented 1 year ago

We'll move to the type in https://github.com/w3f/ring-vrf/blob/master/dleq_vrf/src/traits.rs#L177 too I think since then you have workable traits for the keystore.