SCT signature verification, encode/decode and accessor functions

I see both #define and typedef in the existing codebase, but I would use a typedef.

(Really, what we need is a portable definition of u64 in a central location. I'll see about that.)