How calculate size of RSA cipher text using key size & clear text length?
问题 I've some clear text which I want to encrypt using RSA_PKCS_V21 (using PolarSSL library). The problem is that I need to know size of cipher text before executing the algorithm (for dynamic memory allocation purpose). I know RSA key size & clear text length. I also want to know the limitation on input clear text length. Any idea? 回答1: Just check the RSA PKCS#1 v2.1 standard, chapter 7.2: RSAES-PKCS1-V1_5-ENCRYPT ((n, e), M) Input: (n, e) recipient's RSA public key (k denotes the length in