Restore key attribute, use a simple libraries to format rsa or dsa keys