Documentation ¶
Index ¶
- Constants
- func GenerateCropProof(original, cropped [][][]uint8, backend string, ...) ([]byte, []byte, time.Duration, time.Duration, error)
- func New() *cobra.Command
- func VerifyProofByBackend(backend, transformation string, proof, vk []byte, finalImg image.Image) error
- type CropCircuit
- type FlipHorizontalCircuit
- type FlipVerticalCircuit
- type Rotate180Circuit
- type Rotate270Circuit
- type Rotate90Circuit
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.
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.
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.
type FlipVerticalCircuit ¶
type FlipVerticalCircuit struct { Original [][][]frontend.Variable `gnark:",secret"` Flipped [][][]frontend.Variable `gnark:",public"` }
FlipVerticalCircuit represents the arithmetic circuit to prove FlipVertical transformations.
type Rotate180Circuit ¶
type Rotate180Circuit struct { Original [][][]frontend.Variable `gnark:",secret"` Rotated [][][]frontend.Variable `gnark:",public"` }
Rotate180Circuit represents the arithmetic circuit to prove rotate180 transformations.
type Rotate270Circuit ¶
type Rotate270Circuit struct { Original [][][]frontend.Variable `gnark:",secret"` Rotated [][][]frontend.Variable `gnark:",public"` }
Rotate270Circuit represents the arithmetic circuit to prove rotate270 transformations.
Click to show internal directories.
Click to hide internal directories.