Skip to content

Commit

Permalink
Mark dispatcher functions as inline
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastinas committed Nov 17, 2024
1 parent a2917e9 commit 86d2835
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/parameter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,13 +260,15 @@ impl OWFParameters for OWF128 {
);
}

#[inline]
fn extendwitness(
owf_key: &GenericArray<u8, Self::LAMBDABYTES>,
owf_input: &GenericArray<u8, Self::InputSize>,
) -> Option<Box<GenericArray<u8, Self::LBYTES>>> {
aes_extendedwitness::<Self>(owf_key, owf_input)
}

#[inline]
fn prove(
w: &GenericArray<u8, Self::LBYTES>,
u: &GenericArray<u8, Self::LAMBDALBYTES>,
Expand All @@ -277,6 +279,7 @@ impl OWFParameters for OWF128 {
aes_prove::<Self>(w, u, gv, pk, chall)
}

#[inline]
fn verify<Tau>(
d: &GenericArray<u8, Self::LBYTES>,
gq: Box<GenericArray<GenericArray<u8, Self::LAMBDALBYTES>, Self::LAMBDA>>,
Expand Down Expand Up @@ -336,13 +339,15 @@ impl OWFParameters for OWF192 {
);
}

#[inline]
fn extendwitness(
owf_key: &GenericArray<u8, Self::LAMBDABYTES>,
owf_input: &GenericArray<u8, Self::InputSize>,
) -> Option<Box<GenericArray<u8, Self::LBYTES>>> {
aes_extendedwitness::<Self>(owf_key, owf_input)
}

#[inline]
fn prove(
w: &GenericArray<u8, Self::LBYTES>,
u: &GenericArray<u8, Self::LAMBDALBYTES>,
Expand All @@ -353,6 +358,7 @@ impl OWFParameters for OWF192 {
aes_prove::<Self>(w, u, gv, pk, chall)
}

#[inline]
fn verify<Tau>(
d: &GenericArray<u8, Self::LBYTES>,
gq: Box<GenericArray<GenericArray<u8, Self::LAMBDALBYTES>, Self::LAMBDA>>,
Expand Down Expand Up @@ -412,13 +418,15 @@ impl OWFParameters for OWF256 {
);
}

#[inline]
fn extendwitness(
owf_key: &GenericArray<u8, Self::LAMBDABYTES>,
owf_input: &GenericArray<u8, Self::InputSize>,
) -> Option<Box<GenericArray<u8, Self::LBYTES>>> {
aes_extendedwitness::<Self>(owf_key, owf_input)
}

#[inline]
fn prove(
w: &GenericArray<u8, Self::LBYTES>,
u: &GenericArray<u8, Self::LAMBDALBYTES>,
Expand All @@ -429,6 +437,7 @@ impl OWFParameters for OWF256 {
aes_prove::<Self>(w, u, gv, pk, chall)
}

#[inline]
fn verify<Tau>(
d: &GenericArray<u8, Self::LBYTES>,
gq: Box<GenericArray<GenericArray<u8, Self::LAMBDALBYTES>, Self::LAMBDA>>,
Expand Down Expand Up @@ -487,13 +496,15 @@ impl OWFParameters for OWF128EM {
}
}

#[inline]
fn extendwitness(
owf_key: &GenericArray<u8, Self::LAMBDABYTES>,
owf_input: &GenericArray<u8, Self::InputSize>,
) -> Option<Box<GenericArray<u8, Self::LBYTES>>> {
em_extendedwitness::<Self>(owf_key, owf_input)
}

#[inline]
fn prove(
w: &GenericArray<u8, Self::LBYTES>,
u: &GenericArray<u8, Self::LAMBDALBYTES>,
Expand All @@ -504,6 +515,7 @@ impl OWFParameters for OWF128EM {
em_prove::<Self>(w, u, gv, pk, chall)
}

#[inline]
fn verify<Tau>(
d: &GenericArray<u8, Self::LBYTES>,
gq: Box<GenericArray<GenericArray<u8, Self::LAMBDALBYTES>, Self::LAMBDA>>,
Expand Down Expand Up @@ -562,13 +574,15 @@ impl OWFParameters for OWF192EM {
}
}

#[inline]
fn extendwitness(
owf_key: &GenericArray<u8, Self::LAMBDABYTES>,
owf_input: &GenericArray<u8, Self::InputSize>,
) -> Option<Box<GenericArray<u8, Self::LBYTES>>> {
em_extendedwitness::<Self>(owf_key, owf_input)
}

#[inline]
fn prove(
w: &GenericArray<u8, Self::LBYTES>,
u: &GenericArray<u8, Self::LAMBDALBYTES>,
Expand All @@ -579,6 +593,7 @@ impl OWFParameters for OWF192EM {
em_prove::<Self>(w, u, gv, pk, chall)
}

#[inline]
fn verify<Tau>(
d: &GenericArray<u8, Self::LBYTES>,
gq: Box<GenericArray<GenericArray<u8, Self::LAMBDALBYTES>, Self::LAMBDA>>,
Expand Down Expand Up @@ -637,13 +652,15 @@ impl OWFParameters for OWF256EM {
}
}

#[inline]
fn extendwitness(
owf_key: &GenericArray<u8, Self::LAMBDABYTES>,
owf_input: &GenericArray<u8, Self::InputSize>,
) -> Option<Box<GenericArray<u8, Self::LBYTES>>> {
em_extendedwitness::<Self>(owf_key, owf_input)
}

#[inline]
fn prove(
w: &GenericArray<u8, Self::LBYTES>,
u: &GenericArray<u8, Self::LAMBDALBYTES>,
Expand All @@ -654,6 +671,7 @@ impl OWFParameters for OWF256EM {
em_prove::<Self>(w, u, gv, pk, chall)
}

#[inline]
fn verify<Tau>(
d: &GenericArray<u8, Self::LBYTES>,
gq: Box<GenericArray<GenericArray<u8, Self::LAMBDALBYTES>, Self::LAMBDA>>,
Expand Down

0 comments on commit 86d2835

Please sign in to comment.