dont wrap bit_length
context manager and thread locals wtf
dont pass curve param all the way