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 ¶
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 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). |
|
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 |
|
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. |
Click to show internal directories.
Click to hide internal directories.