Documentation ¶
Index ¶
- func Decrypt(priv *PrivateKey, c *big.Int) *big.Int
- func Encrypt(pub *PublicKey, m *big.Int) *big.Int
- func Generate(filename string, password string) string
- func Hash(message *big.Int) *big.Int
- func KeyGen(k int) (*PublicKey, *PrivateKey, error)
- func Sign(filename string, password string, msg []byte) *big.Int
- func SignOld(privKey *PrivateKey, m *big.Int) (*big.Int, *big.Int)
- func Verify(pub *PublicKey, signature *big.Int, hash *big.Int) bool
- type PrivateKey
- type PublicKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decrypt ¶
func Decrypt(priv *PrivateKey, c *big.Int) *big.Int
Decrypt decrypts the cipher text using the privatekey
func KeyGen ¶
func KeyGen(k int) (*PublicKey, *PrivateKey, error)
KeyGen generates a publickey and a privatekey
Types ¶
type PrivateKey ¶
PrivateKey consists of N and D of type big.int
Click to show internal directories.
Click to hide internal directories.