ressol

Compute the square root of x modulo a prime using the Shanks-Tonnelli algorithm

static if(BOTAN_HAS_PUBLIC_KEY_CRYPTO)
ressol
(
const(BigInt)* a
,
const(BigInt)* p
)

Parameters

a const(BigInt)*

the input x

p const(BigInt)*

the prime p

Return Value

Type: BigInt

y such that (y*y)%p == x, or -1 if no such integer

Meta