|
>>4503 esam >>4504 は無視してください。 > http://tomorrows-wind.at.webry.info/200507/article_21.html の plaintxt = malloc(sizeof(char)*7); strcpy(plaintxt, "abcdefg"); というのがおかしいですね。ここを直せばうまく動いた気がします。 |
|
>>4503 esam たびたびすみません。 if((enclen = RSA_public_encrypt(strlen(plaintxt), ... を if((enclen = RSA_public_encrypt(strlen(plaintxt) + 1, ... とし、 if((declen = RSA_private_decrypt(strlen(enctxt), ... を if((declen = RSA_private_decrypt(RSA_size(rsapub), ... としなければいけません。 |