bn_isqrt
return bn_isqrt(NULL, out_perfect, n, ctx);
int bn_isqrt(BIGNUM *out_sqrt, int *out_perfect, const BIGNUM *n, BN_CTX *ctx);