Trait snarkvm_dpc::traits::encoded::EncodedRecordScheme [−][src]
pub trait EncodedRecordScheme: Sized { type Group: Group + ProjectiveCurve; type InnerField: PrimeField; type OuterField: PrimeField; type Parameters: MontgomeryParameters + TwistedEdwardsParameters; type Record: RecordScheme; type DecodedRecord; const SCALAR_FIELD_BITSIZE: usize; const INNER_FIELD_BITSIZE: usize; const OUTER_FIELD_BITSIZE: usize; const DATA_ELEMENT_BITSIZE: usize; const PAYLOAD_ELEMENT_BITSIZE: usize; fn encode(record: &Self::Record) -> Result<Self, DPCError>; fn decode(&self) -> Result<Self::DecodedRecord, DPCError>; }
Associated Types
type Group: Group + ProjectiveCurve
type Group: Group + ProjectiveCurve
The group is composed of base field elements in Self::InnerField
.
type InnerField: PrimeField
type InnerField: PrimeField
The inner field is equivalent to the base field in Self::Group
.
type OuterField: PrimeField
type OuterField: PrimeField
The outer field is unrelated to Self::Group
and Self::InnerField
.
type Record: RecordScheme
type DecodedRecord
Associated Constants
const SCALAR_FIELD_BITSIZE: usize
const SCALAR_FIELD_BITSIZE: usize
This is the bitsize of the scalar field modulus in Self::Group
.
const INNER_FIELD_BITSIZE: usize
const INNER_FIELD_BITSIZE: usize
This is the bitsize of the base field modulus in Self::Group
and equivalent to Self::InnerField
.
const OUTER_FIELD_BITSIZE: usize
const OUTER_FIELD_BITSIZE: usize
This is the bitsize of the field modulus in Self::OuterField
.
const DATA_ELEMENT_BITSIZE: usize
const DATA_ELEMENT_BITSIZE: usize
This is the bitsize of each data ciphertext element serialized by this struct. Represents a standard unit for packing bits into data elements for storage.
This is the bitsize of each payload ciphertext element serialized by this struct. Represents a standard unit for packing the payload into data elements for storage.
Required methods
fn decode(&self) -> Result<Self::DecodedRecord, DPCError>
Implementors
impl<C: Testnet1Components, P: MontgomeryParameters + TwistedEdwardsParameters, G: Group + ProjectiveCurve> EncodedRecordScheme for snarkvm_dpc::testnet1::record::encoded::EncodedRecord<C, P, G>
impl<C: Testnet2Components, P: MontgomeryParameters + TwistedEdwardsParameters, G: Group + ProjectiveCurve> EncodedRecordScheme for snarkvm_dpc::testnet2::record::encoded::EncodedRecord<C, P, G>