Documentation
¶
Overview ¶
Package math Copyright 2023 Oleg Fomenko. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Package math Copyright 2023 Oleg Fomenko. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Index ¶
- func FindSquareRoot(n *big.Int, p *big.Int) (*big.Int, error)
- func GCD(a, b *big.Int) *big.Int
- func GenRandPrime(size int) (*big.Int, error)
- func Jacobi(a *big.Int, p *big.Int) (r *big.Int, err error)
- func LCM(x ...*big.Int) *big.Int
- func Legendre(a, p *big.Int) (*big.Int, error)
- func Mu(n *big.Int) int
- func Phi(n *big.Int) *big.Int
- func TestPrime(n *big.Int) (bool, error)
- type F2
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindSquareRoot ¶
FindSquareRoot uses Cipolla algorithm to solve x^2 = a (mod P) More information: https://en.wikipedia.org/wiki/Cipolla%27s_algorithm
func Jacobi ¶
Jacobi method calculates Jacobi symbol. About: https://en.wikipedia.org/wiki/Jacobi_symbol Definition: Jacobi(a, p) = Legendre(a,p1)*Legendre(a,p2)...*Legendre(a,pn)
Types ¶
Click to show internal directories.
Click to hide internal directories.