complete port of cuckoo.h/verify.c to Cuckoo.java