math

package
v1.0.1-0...-a77bf53 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DoRSAencrypt

func DoRSAencrypt(block []byte, key *rsa.PublicKey) []byte

DoRSAencrypt encrypts exactly 1 message block of size 255 with the public key. Specific algorithm for mtproto, because the documentation does not indicate is this encryption working by OAEP spec or any else

func MakeGAB

func MakeGAB(g int32, g_a, dh_prime *big.Int) (b, g_b, g_ab *big.Int)

func SplitPQ

func SplitPQ(pq *big.Int) (p1, p2 *big.Int)

SplitPQ splits a number into two primes, while p1 < p2 Part of diffie hellman's algorithm, how it works - no idea

func Xor

func Xor(dst, src []byte)

Types

This section is empty.

Jump to

Keyboard shortcuts

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