lib.rs 557 B

12345678910111213141516171819202122232425262728293031323334
  1. #[macro_use]
  2. extern crate nom;
  3. extern crate nalgebra as na;
  4. extern crate pairing;
  5. extern crate rand;
  6. use std::collections::HashMap;
  7. use pairing::{CurveProjective, Engine, Field, PrimeField};
  8. use rand::{Rng, Rand};
  9. pub mod msp;
  10. pub struct Mk<E: Engine> {
  11. alpha: E::Fr,
  12. w: E::Fr,
  13. }
  14. pub struct Pk<E: Engine> {
  15. alpha_t: E::Fqk,
  16. w_1: E::G1,
  17. }
  18. impl<E: Engine> Mk<E> {
  19. fn new(mut rng: &mut Rng, n: u32) -> Self {
  20. Mk {
  21. alpha: E::Fr::rand(&mut rng),
  22. w: E::Fr::rand(&mut rng),
  23. }
  24. }
  25. }