cmd

package
v0.0.0-...-fbf450f Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinPixelValue = 0
	MaxPixelValue = 255
)

Variables

This section is empty.

Functions

func GenerateCropProof

func GenerateCropProof(original, cropped [][][]uint8, backend string, widthStartNew, heightStartNew int) ([]byte, []byte, time.Duration, time.Duration, error)

GenerateCropProof returns the proof of crop transformation.

func New

func New() *cobra.Command

New returns a new cobra command that handles maya cli commands and subcommands.

func VerifyProofByBackend

func VerifyProofByBackend(backend, transformation string, proof, vk []byte, finalImg image.Image) error

VerifyProofByBackend verifies the given proof by provided proof system backend.

Types

type CropCircuit

type CropCircuit struct {
	Original       [][][]frontend.Variable `gnark:",secret"`
	Cropped        [][][]frontend.Variable `gnark:",public"`
	WidthStartNew  int
	HeightStartNew int
}

CropCircuit represents the arithmetic circuit to prove crop transformations.

func (*CropCircuit) Define

func (c *CropCircuit) Define(api frontend.API) error

type FlipHorizontalCircuit

type FlipHorizontalCircuit struct {
	Original [][][]frontend.Variable `gnark:",secret"`
	Flipped  [][][]frontend.Variable `gnark:",public"`
}

FlipHorizontalCircuit represents the arithmetic circuit to prove flip horizontal transformations.

func (*FlipHorizontalCircuit) Define

func (c *FlipHorizontalCircuit) Define(api frontend.API) error

type FlipVerticalCircuit

type FlipVerticalCircuit struct {
	Original [][][]frontend.Variable `gnark:",secret"`
	Flipped  [][][]frontend.Variable `gnark:",public"`
}

FlipVerticalCircuit represents the arithmetic circuit to prove FlipVertical transformations.

func (*FlipVerticalCircuit) Define

func (c *FlipVerticalCircuit) Define(api frontend.API) error

type Rotate180Circuit

type Rotate180Circuit struct {
	Original [][][]frontend.Variable `gnark:",secret"`
	Rotated  [][][]frontend.Variable `gnark:",public"`
}

Rotate180Circuit represents the arithmetic circuit to prove rotate180 transformations.

func (*Rotate180Circuit) Define

func (c *Rotate180Circuit) Define(api frontend.API) error

type Rotate270Circuit

type Rotate270Circuit struct {
	Original [][][]frontend.Variable `gnark:",secret"`
	Rotated  [][][]frontend.Variable `gnark:",public"`
}

Rotate270Circuit represents the arithmetic circuit to prove rotate270 transformations.

func (*Rotate270Circuit) Define

func (c *Rotate270Circuit) Define(api frontend.API) error

type Rotate90Circuit

type Rotate90Circuit struct {
	Original [][][]frontend.Variable `gnark:",secret"`
	Rotated  [][][]frontend.Variable `gnark:",public"`
}

Rotate90Circuit represents the arithmetic circuit to prove rotate90 transformations.

func (*Rotate90Circuit) Define

func (c *Rotate90Circuit) Define(api frontend.API) error

Jump to

Keyboard shortcuts

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