rsa demo code which copy form openssl