change rsa to cpp