ressol

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

static if(BOTAN_HAS_PUBLIC_KEY_CRYPTO)
ressol
()
(
auto const ref BigInt a
,
auto const ref BigInt p
)

Parameters

a BigInt

the input x

p BigInt

the prime p

Return Value

Type: BigInt

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

Meta