more consistent versions of sig encoding function
more complete conversion to reopseckey type