finishing the proveKnowledge and encryptAnswer and solving const, reference and virtual bugs