This is the "ref" implementation of sha512.
