c - Encrypt a long text string using RSA encryption only -


i using rsa encryption code given on this link encrypting strings such following 128 byte public keys:

[7998725336653383203658644639673805448553730986337128386926545744008381384348409264866333582258561179132241508936069720871865895053632019929236743348039021, 1993938860438750843589842757968313427718259534664174282914852335272086243792497573680387148722647412680490224484736059954284097163105446004304579443902885] 

since string long rsa_public_encrypt function returns -1 , null string. know rsa should used small sized texts, there way around same ?

i used err_error_string() check error codes , returned me following error code string: error:0406d06e:lib(4):func(109):reason(110).

now since question has been marked possible duplicate please let me explain need using rsa because aes-rsa combination make whole system design of chrome extension writing, more complex already. want keep simplified possible.

building sort of rsa-chunking scheme going far more complex , potentially insecure, imho, decrypting symmetric key , performing simple aes decryption using key.

as far efficiency, rsa going orders of magnitudes slower aes, trade-off make give simplicity (i.e. give simplicity of using aes, in favor of rsa "chunking") in return poor performance (you slower performance of rsa.)

i take well-worn path of hybrid aes-rsa approach, rather experimenting rsa-only scheme.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -