SCT signature verification, encode/decode and accessor functions

General comment on all of the below: I think _set0_/_get0_ is used for pointer arguments to indicate that refcount isn't upped. I don't think you need it for value arguments. But we should ask Steve.