phpseclib/phpseclib — pull request #469 by terrafrost (2014-09-06 16:17:13+00:00)
Title: RSA: make XML keys use unsigned integers

Fixes #468

PKCS1 / PKCS8 keys need *signed* integers because of section 8.3.3 at http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf#page=7

idk that I want to do a unit test because I'm not actually 100% sure XML keys are supposed to use unsigned integers and I could see this being reverted. I don't think it's a particularly big issue as even with a preceding null byte I would expect the key to still be read correctly but if someone else comes along with a more compelling reason for using signed ints..