Added patch to allow deriving the public key component from a secret key