Initial version, with a nonfunctioning modular multiplicative inverse