Hi, [EMAIL PROTECTED] wrote: > >I want to encrypt large files with RSA. At the moment I can encrypt approx. >200 characters at a time. But when I write the encrypted data to disk, how >do I know how much characters to read in to decrypt ?? I thought about the >extra padding bits, so i have to read in 211 (for PKCS1) bits, but thatエs >not it. When I write a fragment to decrypt with RSA private-key, get "blocksize" from RSA structure. EVP_PKEY* privkey; : int blocksize = RSA_size(privkey->pkey.rsa); And second, decrypts from encrypted data in each block size. Following statement repeats (encrypted-text-size / blocksize) times: rc = RSA_private_decrypt(blocksize, (pointer to encrypted block), (area to store decrypted data) ,privkey->pkey.rsa, RSA_PKCS1_PADDING); rc value shows each decrypted data size (= blocksize - 11?). # Please read openssl command source code for more precise # function usage. -- from fukuoka.japan ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]

Reply via email to