curve hash definition

curve hash definition
pass 275 tests, all of original tests have passed now.