crypto

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateSafePrime

func GenerateSafePrime(bits int, values chan *big.Int, quit chan int) (p *big.Int, err error)

GenerateSafePrime generates a prime number `p`; a prime 'p' such that 2p+1 is also prime.

func RandomNum

func RandomNum(n *big.Int) *big.Int

RandomNum generates a random number r, 1 < r < n. Input n has to be greater than 1, otherwise panic

func RandomPrimeNum

func RandomPrimeNum(n *big.Int) (*big.Int, error)

RandomPrimeNum `r < n` and `gcd(r,n) = 1`

func SHA256Int

func SHA256Int(in ...*big.Int) *big.Int

SHA256Int sha256 []*big.Int

func SHA512Int

func SHA512Int(in ...*big.Int) *big.Int

SHA512Int hmac sha512 []*big.Int

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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