Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/arnaucube/cryptofun
/ functions
Functions
71 in github.com/arnaucube/cryptofun
⨍
Functions
71
◇
Types & classes
15
↓ 54 callers
Method
Mul
Mul multiplies a point n times on the elliptic curve
ecc/ecc.go:115
↓ 46 callers
Method
Equal
Equal compares the X and Y coord of a Point and returns true if are the same
ecc/point.go:21
↓ 21 callers
Method
Add
Add adds two points p1 and p2 and gets q, returns the negate of q
ecc/ecc.go:53
↓ 18 callers
Method
String
String returns the components of the point in a string
ecc/point.go:32
↓ 17 callers
Function
NewEC
NewEC (y^2 = x^3 + ax + b) mod q, where q is a prime number
ecc/ecc.go:17
↓ 8 callers
Method
Order
Order returns smallest n where nG = O (point at zero)
ecc/ecc.go:137
↓ 4 callers
Method
At
At gets a point x in the curve
ecc/ecc.go:25
↓ 4 callers
Function
Encrypt
Encrypt encrypts a message m with given PublicKey
rsa/rsa.go:65
↓ 3 callers
Function
Decrypt
Decrypt deencrypts a ciphertext c with given PrivateKey
rsa/rsa.go:71
↓ 3 callers
Function
Encrypt
Encrypt encrypts a message m with given PublicKey
paillier/paillier.go:94
↓ 3 callers
Function
GenerateKeyPair
GenerateKeyPair generates a random private and public key
rsa/rsa.go:34
↓ 3 callers
Function
Hash
Hash calculates a hash concatenating a given message bytes with a given EC Point. H(M||R)
schnorr/schnorr.go:37
↓ 3 callers
Method
Hash
Hash hashes a message m
bls/bls.go:50
↓ 3 callers
Function
NewEG
NewEG defines a new EG data structure
elgamal/elgamal.go:17
↓ 3 callers
Method
NewKeys
NewKeys generate new Private Key and Public Key
bls/bls.go:36
↓ 3 callers
Method
PubK
PubK returns the public key Point calculated from the private key over the elliptic curve
elgamal/elgamal.go:27
↓ 3 callers
Function
RandInt
RandInt returns a random integer between two values
prime/prime.go:13
↓ 3 callers
Method
Sign
Sign performs the BLS signature of a message m
bls/bls.go:61
↓ 2 callers
Function
Decrypt
Decrypt deencrypts a ciphertext c with given PublicKey and PrivateKey
paillier/paillier.go:105
↓ 2 callers
Method
Encrypt
Encrypt encrypts a point m with the public key point, returns two points
elgamal/elgamal.go:35
↓ 2 callers
Function
Gen
Gen generates the Schnorr scheme
schnorr/schnorr.go:52
↓ 2 callers
Method
Neg
TODO add valid checker point function Valid() Neg returns the inverse of the P point on the elliptic curve
ecc/ecc.go:47
↓ 2 callers
Function
NewDSA
NewDSA defines a new DSA data structure
ecdsa/ecdsa.go:19
↓ 2 callers
Method
PubK
PubK returns the public key Point calculated from the private key over the elliptic curve
ecdsa/ecdsa.go:29
↓ 2 callers
Method
Sign
Sign performs the signature of the message m with the given private key
schnorr/schnorr.go:85
↓ 2 callers
Function
Verify
Verify checks if the given public key matches with the given signature of the message m, in the given EC
schnorr/schnorr.go:114
↓ 2 callers
Method
Verify
Verify checks the signature of a message m with the given Public Key
bls/bls.go:69
↓ 2 callers
Function
l
(u *big.Int, n *big.Int)
paillier/paillier.go:87
↓ 1 callers
Method
AggregateSignatures
AggregateSignatures s = s0 + s1 + s2 ...
bls/bls.go:85
↓ 1 callers
Function
Blind
Blind blinds a message
rsa/rsa.go:77
↓ 1 callers
Function
BlindSign
BlindSign blind signs a message without knowing the content
rsa/rsa.go:85
↓ 1 callers
Method
Decrypt
Decrypt decrypts c (two points) with the private key, returns the point decrypted
elgamal/elgamal.go:55
↓ 1 callers
Function
Gcd
Gcd returns the greatest common divisor
prime/prime.go:41
↓ 1 callers
Function
GenerateKeyPair
GenerateKeyPair generates a random private and public key
paillier/paillier.go:35
↓ 1 callers
Function
HomomorphicAddition
HomomorphicAddition calculates the addition of tow encrypted values given a PublicKey
paillier/paillier.go:116
↓ 1 callers
Function
HomomorphicMul
HomomorphicMul calculates the multiplication of tow encrypted values given a PublicKey
rsa/rsa.go:107
↓ 1 callers
Function
NewBLS
NewBLS generates a new BLS scheme
bls/bls.go:25
↓ 1 callers
Function
SieveOfEratosthenes
SieveOfEratosthenes returns a list of primes less than N
prime/prime.go:26
↓ 1 callers
Method
Sign
Sign performs the ECDSA signature
ecdsa/ecdsa.go:37
↓ 1 callers
Function
Unblind
Unblind unblinds the Blinded Signature
rsa/rsa.go:91
↓ 1 callers
Function
Verify
Verify verifies the signature of a message given the PublicKey of the signer
rsa/rsa.go:99
↓ 1 callers
Method
Verify
Verify validates the ECDSA signature
ecdsa/ecdsa.go:57
↓ 1 callers
Method
VerifyAggregatedSignatures
VerifyAggregatedSignatures ê(G,S) == ê(P, H(m)) ê(G, s0+s1+s2...) == ê(p0+p1+p2..., H(m))
bls/bls.go:96
↓ 1 callers
Function
lcm
(a, b float64)
paillier/paillier.go:82
Function
BytesToHex
BytesToHex converts from an array of bytes to a hex encoded string
utils/utils.go:6
Function
HexToBytes
HexToBytes converts from a hex string into an array of bytes
utils/utils.go:14
Function
RandPrime
RandPrime returns a random prime number between two values
prime/prime.go:19
Function
TestAdd
(t *testing.T)
ecc/ecc_test.go:34
Function
TestAddSamePoint
(t *testing.T)
ecc/ecc_test.go:55
Function
TestBlindSignature
(t *testing.T)
rsa/rsa_test.go:24
Function
TestBls
(t *testing.T)
bls/bls_test.go:11
Function
TestDiffieHellman
(t *testing.T)
dh/dh_test.go:15
Function
TestECC
(t *testing.T)
ecc/ecc_test.go:10
Function
TestECDSASignAndVerify
(t *testing.T)
ecdsa/ecdsa_test.go:26
Function
TestEGDecrypt
(t *testing.T)
elgamal/elgamal_test.go:48
Function
TestEGEncrypt
(t *testing.T)
elgamal/elgamal_test.go:25
Function
TestEncryptDecrypt
(t *testing.T)
paillier/paillier_test.go:12
Function
TestEncryptDecrypt
(t *testing.T)
rsa/rsa_test.go:11
Function
TestHash
(t *testing.T)
schnorr/schnorr_test.go:11
Function
TestHomomorphicAddition
(t *testing.T)
paillier/paillier_test.go:26
Function
TestHomomorphicMultiplication
(t *testing.T)
rsa/rsa_test.go:46
Function
TestMulEqualSelfAdd
(t *testing.T)
ecc/ecc_test.go:151
Function
TestMulPoint1
(t *testing.T)
ecc/ecc_test.go:76
Function
TestMulPoint2
(t *testing.T)
ecc/ecc_test.go:109
Function
TestMulPoint3
(t *testing.T)
ecc/ecc_test.go:133
Function
TestNeg
(t *testing.T)
ecc/ecc_test.go:22
Function
TestNewECDSA
(t *testing.T)
ecdsa/ecdsa_test.go:11
Function
TestNewEG
(t *testing.T)
elgamal/elgamal_test.go:11
Function
TestOrder
(t *testing.T)
ecc/ecc_test.go:187
Function
TestSign
(t *testing.T)
schnorr/schnorr_test.go:17
Function
TestSign2
(t *testing.T)
schnorr/schnorr_test.go:35