I have a homemade Erlang implementation for key generation, signing, and verifying. It's basically a set of functions without any inheritance. The thing is, for your case, it's written in Erlang.
I would still like to take a look at it if you have the source code available online.