Documentation ¶
Index ¶
Constants ¶
View Source
const GEN_LEFT_ALIGNMENT = 16
GenericByteModule encodes the limbs with a left alignment approach
Variables ¶
View Source
var ( // UnspecifiedHashingUsecase is the zero value for the packing use-case and // it should not be used unless for testing that the caller of some function // does not pass it. UnspecifiedHashingUsecase = HashingUsecase{} // MiMCUsecase represents using MiMC with the Miyaguchi-Preneel construction // over a single field. MiMCUsecase = HashingUsecase{ // contains filtered or unexported fields } // KeccakUsecase represents using the Keccak hash function as in Ethereum KeccakUsecase = HashingUsecase{ // contains filtered or unexported fields } // Sha2Usecase represents using the Sha2 hash function. Sha2Usecase = HashingUsecase{ // contains filtered or unexported fields } )
Functions ¶
This section is empty.
Types ¶
type GenDataModule ¶
type GenDataModule struct { HashNum ifaces.Column // identifier for the hash Index ifaces.Column // identifier for the current limb Limb ifaces.Column // the content of the limb to hash NBytes ifaces.Column // indicates the size of the current limb ToHash ifaces.Column }
GenDataModule collects the columns summarizing the information about the data to hash.
func (*GenDataModule) ScanStreams ¶
func (gdm *GenDataModule) ScanStreams(run *wizard.ProverRuntime) [][]byte
ScanStream scans the receiver GenDataModule's assignment and returns the list of the byte stream encoded in the assignment.
type GenInfoModule ¶
type GenInfoModule struct { HashNum ifaces.Column // Identifier for the hash. Allows joining with the data module HashLo ifaces.Column // The Low part of the hash result HashHi ifaces.Column // The Hi part of the hash result IsHashLo ifaces.Column // indicating the location of HashHi IsHashHi ifaces.Column // indicting the location od HashLo }
GenInfoModule collects the columns summarizing information about the result of the hash
type GenericByteModule ¶
type GenericByteModule struct { // Data module summarizing the information about the data to hash. Data GenDataModule // Info module contains the result of the hash. Info GenInfoModule }
Generic byte module as specified by the arithmetization. It contains two set of columns, Data and Info. This module can be used for various concrete arithmetization modules that call the hash module.
type HashingUsecase ¶
type HashingUsecase struct {
// contains filtered or unexported fields
}
func (HashingUsecase) BlockSizeBytes ¶
func (huc HashingUsecase) BlockSizeBytes() int
func (HashingUsecase) LaneSizeBytes ¶
func (h HashingUsecase) LaneSizeBytes() int
func (HashingUsecase) NbOfLanesPerBlock ¶
func (h HashingUsecase) NbOfLanesPerBlock() int
Click to show internal directories.
Click to hide internal directories.