An unrelated aside, given this is fairly complex crypto, I suggest writing this library in conjunction with Hyperledger Ursa. https://www.hyperledger.org/projects/ursa
Although I am completely confident in our ability to do a bug-free implementation this EIP, Ursa is very interested in becoming a generic library for everyone (including Ethereum). And given IBM/Hyperledger willingness to put substantial resources behind the Ursa project, it seems pro-social as well as financially sensible to avail ourselves to their generosity.