Documentation
¶
Index ¶
- func BinaryToString(bits []byte) (string, error)
- func Decrypt(privKey *PrivateKey, c *big.Int) (message string, err error)
- func Encrypt(pubKey *PublicKey, message string) (c *big.Int, err error)
- func GenerateCoprimes(n *big.Int) (a *big.Int, b *big.Int, err error)
- func GenerateKeyParameters(r []*big.Int, iterations int) (a []*big.Int, b []*big.Int, m []*big.Int, err error)
- func GenerateKeys(byteSize uint, iterations int) (privKey *PrivateKey, pubKey *PublicKey, err error)
- func GenerateSuperIncreasingSequence(n int) (r []*big.Int, err error)
- func MulMod(r []*big.Int, a *big.Int, b *big.Int) (m []*big.Int)
- func StringToBinary(s string) ([]byte, error)
- type PrivateKey
- type PublicKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BinaryToString ¶
func Decrypt ¶
func Decrypt(privKey *PrivateKey, c *big.Int) (message string, err error)
Fonction qui décrypte le message
func GenerateCoprimes ¶
Fonction qui génère deux nombre premier
func GenerateKeyParameters ¶
func GenerateKeyParameters(r []*big.Int, iterations int) (a []*big.Int, b []*big.Int, m []*big.Int, err error)
Fonction qui génère les paramétres des clefs publics et privées
func GenerateKeys ¶
func GenerateKeys(byteSize uint, iterations int) (privKey *PrivateKey, pubKey *PublicKey, err error)
Fonction qui génrer les clefs publics et privées
func GenerateSuperIncreasingSequence ¶
fonction qui génère une suite supercroissante
func StringToBinary ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.