fixed sign func and implemented verify (with sha1 digest