Scraped gmp_sign functions for sign()