move rsa api to cstructs