Skip to content

Commit

Permalink
Remove lifetime from DLCard
Browse files Browse the repository at this point in the history
  • Loading branch information
burdges committed Jan 28, 2025
1 parent b341ea6 commit 4d34503
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type Curve = ark_bls12_377::G1Projective;
type Scalar = ark_bls12_377::Fr;

// Instantiate concrete type for our card protocol
type CardProtocol<'a> = discrete_log_cards::DLCards<'a, Curve>;
type CardProtocol = discrete_log_cards::DLCards<Curve>;

const NUMBER_OF_CARDS: usize = 300;

Expand Down
2 changes: 1 addition & 1 deletion barnett-smart-card-protocol/examples/round.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Curve = starknet_curve::Projective;
type Scalar = starknet_curve::Fr;

// Instantiate concrete type for our card protocol
type CardProtocol<'a> = discrete_log_cards::DLCards<'a, Curve>;
type CardProtocol = discrete_log_cards::DLCards<Curve>;
type CardParameters = discrete_log_cards::Parameters<Curve>;
type PublicKey = discrete_log_cards::PublicKey<Curve>;
type SecretKey = discrete_log_cards::PlayerSecretKey<Curve>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ mod test {
type Scalar = starknet_curve::Fr;

// Instantiate concrete type for our card protocol
type CardProtocol<'a> = discrete_log_cards::DLCards<'a, Curve>;
type CardProtocol = discrete_log_cards::DLCards<Curve>;
type CardParameters = discrete_log_cards::Parameters<Curve>;
type PublicKey = discrete_log_cards::PublicKey<Curve>;
type SecretKey = discrete_log_cards::PlayerSecretKey<Curve>;
Expand Down
6 changes: 3 additions & 3 deletions barnett-smart-card-protocol/src/discrete_log_cards/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ mod remasking;
mod reveal;
mod tests;

pub struct DLCards<'a, C: ProjectiveCurve> {
_group: &'a PhantomData<C>,
pub struct DLCards<C: ProjectiveCurve> {
_group: PhantomData<&'static C>,
}

pub struct Parameters<C: ProjectiveCurve> {
Expand Down Expand Up @@ -83,7 +83,7 @@ const REMASKING_RNG_SEED: &'static [u8] = b"Remasking Proof";
const REVEAL_RNG_SEED: &'static [u8] = b"Reveal Proof";
const SHUFFLE_RNG_SEED: &'static [u8] = b"Shuffle Proof";

impl<'a, C: ProjectiveCurve> BarnettSmartProtocol for DLCards<'a, C> {
impl<C: ProjectiveCurve> BarnettSmartProtocol for DLCards<C> {
type Scalar = C::ScalarField;
type Enc = ElGamal<C>;
type Comm = PedersenCommitment<C>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ mod test {
type Scalar = starknet_curve::Fr;

// Instantiate concrete type for our card protocol
type CardProtocol<'a> = discrete_log_cards::DLCards<'a, Curve>;
type CardProtocol = discrete_log_cards::DLCards<Curve>;
type CardParameters = discrete_log_cards::Parameters<Curve>;
type PublicKey = discrete_log_cards::PublicKey<Curve>;
type SecretKey = discrete_log_cards::PlayerSecretKey<Curve>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ mod test {
type Curve = starknet_curve::Projective;

// Instantiate concrete type for our card protocol
type CardProtocol<'a> = discrete_log_cards::DLCards<'a, Curve>;
type CardProtocol = discrete_log_cards::DLCards<Curve>;

type MaskedCard = discrete_log_cards::MaskedCard<Curve>;
type RevealToken = discrete_log_cards::RevealToken<Curve>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ mod test {
type Scalar = starknet_curve::Fr;

// Instantiate concrete type for our card protocol
type CardProtocol<'a> = discrete_log_cards::DLCards<'a, Curve>;
type CardProtocol = discrete_log_cards::DLCards<Curve>;
type CardParameters = discrete_log_cards::Parameters<Curve>;
type PublicKey = discrete_log_cards::PublicKey<Curve>;
type SecretKey = discrete_log_cards::PlayerSecretKey<Curve>;
Expand Down

0 comments on commit 4d34503

Please sign in to comment.