Added backend check to rsa primitives