crypto

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: May 4, 2026 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

Package crypto provides cryptographic utilities and helper functions for the Vocdoni system. It includes functions for working with finite fields, serialization, and other cryptographic operations.

Index

Constants

View Source
const SignatureCircuitVariableLen = 32 // bytes

SignatureCircuitVariableLen is the standard size in bytes for serialized field elements

Variables

This section is empty.

Functions

func PadToSign

func PadToSign(input []byte) []byte

PadToSign pads the input byte slice to ensure it has a length of SignatureCircuitVariableLen bytes. If the input is shorter, it prepends zeros until the length is equal to SignatureCircuitVariableLen. If the input is longer, it truncates it to the last SignatureCircuitVariableLen bytes.

Types

This section is empty.

Directories

Path Synopsis
Blob‑evaluation proof (EIP‑4844 / Proto‑Danksharding)
Blob‑evaluation proof (EIP‑4844 / Proto‑Danksharding)
csp
csp package provides the basic methods to create and verify certificates of voters eligibility of a Credential Service Providers (CSP).
csp package provides the basic methods to create and verify certificates of voters eligibility of a Credential Service Providers (CSP).
ecc
Package ecc provides an interface and implementations for elliptic curve cryptography operations.
Package ecc provides an interface and implementations for elliptic curve cryptography operations.
bjj_iden3
Package bjj implements the BabyJubJub elliptic curve operations using the iden3 library.
Package bjj implements the BabyJubJub elliptic curve operations using the iden3 library.
bn254
Package bn254 implements the BN254 elliptic curve operations.
Package bn254 implements the BN254 elliptic curve operations.
format
Package format provides helper functions to transform points (x, y) from TwistedEdwards to Reduced TwistedEdwards and vice versa.
Package format provides helper functions to transform points (x, y) from TwistedEdwards to Reduced TwistedEdwards and vice versa.
Chaum-Pedersen NIZK proof of correct ElGamal decryption
Chaum-Pedersen NIZK proof of correct ElGamal decryption
dkg
hash
poseidon
Package poseidon provides cryptographic hash functions based on the Poseidon hash algorithm.
Package poseidon provides cryptographic hash functions based on the Poseidon hash algorithm.
signatures
ethereum
Package ethereum provides cryptographic operations for Ethereum ECDSA signatures.
Package ethereum provides cryptographic operations for Ethereum ECDSA signatures.

Jump to

Keyboard shortcuts

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