rangecheck

package
v0.0.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 1, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package rangecheck implements range checking gadget

This package chooses the most optimal path for performing range checks:

  • if the backend supports native range checking and the frontend exports the variables in the proprietary format by implementing frontend.Rangechecker, then use it directly;
  • if the backend supports creating a commitment of variables by implementing frontend.Committer, then we use the log-derivative variant [Haböck22] of the product argument as in [BCG+18] . r1cs.NewBuilder returns a builder which implements this interface;
  • lacking these, we perform binary decomposition of variable into bits.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecomposeHint

func DecomposeHint(m *big.Int, inputs []*big.Int, outputs []*big.Int) error

DecomposeHint is a hint used for range checking with commitment. It decomposes large variables into chunks which can be individually range-check in the native range.

func GetHints

func GetHints() []solver.Hint

GetHints returns all hints used in this package

func New

New returns a new range checker depending on the frontend capabilities.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL