rsa half impl