added changes from jsbn 1.2