pub struct BitcoinP2PKHExample { /* private fields */ }Expand description
Example circuit that proves knowledge of a Bitcoin private key corresponding to a P2PKH address.
This demonstrates a post-quantum secure Bitcoin signature scheme that maintains backwards compatibility with existing Bitcoin addresses. The circuit proves knowledge of a private key without revealing it, using the complete Bitcoin P2PKH address derivation:
Private Key → scalar_mul → Public Key → compress → Compressed PubKey → SHA256 → Digest → swap_bytes → LE Format → RIPEMD160 → Address
Trait Implementations§
Source§impl ExampleCircuit for BitcoinP2PKHExample
impl ExampleCircuit for BitcoinP2PKHExample
Source§type Params = Params
type Params = Params
Circuit parameters that affect the structure of the circuit.
These are typically compile-time constants or bounds.
Source§type Instance = Instance
type Instance = Instance
Instance data used to populate the witness.
This represents the actual input values for a specific proof.
Source§fn build(_params: Params, builder: &mut CircuitBuilder) -> Result<Self>
fn build(_params: Params, builder: &mut CircuitBuilder) -> Result<Self>
Build the circuit with the given parameters. Read more
Source§fn populate_witness(
&self,
instance: Instance,
w: &mut WitnessFiller<'_>,
) -> Result<()>
fn populate_witness( &self, instance: Instance, w: &mut WitnessFiller<'_>, ) -> Result<()>
Populate witness values for a specific instance. Read more
Auto Trait Implementations§
impl Freeze for BitcoinP2PKHExample
impl RefUnwindSafe for BitcoinP2PKHExample
impl Send for BitcoinP2PKHExample
impl Sync for BitcoinP2PKHExample
impl Unpin for BitcoinP2PKHExample
impl UnsafeUnpin for BitcoinP2PKHExample
impl UnwindSafe for BitcoinP2PKHExample
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more