IV is not public. The Key and the IV are based on a user password which is minimum of length 16 chars and more (with upper/lower and numeric character constraints).
This password is looped around to make 32 bytes string , and then first 16 bytes are key and next 16 bytes are IV. The IV is updated with each encryption request. This deterministic random keystream (rng) is passed to InvertibleRSAFunction params; params.GenerateRandomWithKeySize( rng, 2048 ); The code is from here - http://www.cryptopp.com/wiki/RSA#RSA_Encryption_Scheme_.28OAEP_using_SHA.29 and output public key from above is stored for encryption and given out publicly. Is this secure ? On Aug 4, 5:41 pm, "Elias Önal" <[email protected]> wrote: > What? Is the IV public? It usually is and making the seed you use for > your RNG public is a _horrible_ idea! You shouldn't use the same IV/Key > twice in any case, especially for streamciphers since an attacker could > recover the keystream for every bit of known plaintext! So just generate > a new truly random KEY/IV pair. > > Vikas patial wrote: > > hmm no replies ... > > > For now im using Sosemanuk as a rng for my RSA key pair generation. I > > pass the seed to the iv and the key of the stream cipher. > > > Is that secure enough ? > > > On Aug 3, 1:24 pm, Vikas patial <[email protected]> wrote: > > >> LC_RNG gives the results i want , but it is not recommended for crypto > >> graphic purposes. > > >> Any way i can pass a long string/seed to have a deterministic output > >> from a RNG. > > >> On Aug 2, 12:59 pm, Vikas patial <[email protected]> wrote: > > >>> No i dont want fixed pairs always. The seed is generated using a > >>> password which user supplies. So that user can regenerated the pair > >>> when required. > > >>> My old code was working fine for RSA/DH , but somehow new version when > >>> compiled its not working for keysize > 127 Bits. > > >>> Also i am of the opinion my old method was not good enough , so am > >>> seeking help. > > >>> On Aug 2, 10:26 am, "Elias �nal" <[email protected]> wrote: > > >>>> If you always want the same keypair, why generate it in the first place? > >>>> Just hardcode it! > >>>> Besides - This code works for me, it is EC and not RSA/DH, but it has > >>>> the around the same safety using 256bit keys. > > >>>>http://pastebin.com/RJF3NAYe > > >>>> Though I guess changing the parameters to the DH/RSA ones schould work > >>>> as well, in general crypto++ is pretty straight forward. > > >>>> Vikas patial wrote: > > >>>>> I need to generate a public private keypair of atleast 2048 bit for > >>>>> some operations in my software. > > >>>>> I was doing this earlier using Fixedrng but it does not seem to work > >>>>> now ( somehow it hangs ), Also using seeded RandPool does not work > >>>>> maybe im doing something wrong. > > >>>>> So if anyone can help me generate a fixed keypair based on a seed it > >>>>> would be great . Basically same keypair is generated everytime for the > >>>>> same seed. > > >>>>> I am using the code formhttp://www.cryptopp.com/wiki/RSAandsaving > >>>>> it to files. > > >>>>> The first person who sorts this out for me i would offer 30 USD > >>>>> ( Paypal ) . > > -- You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to [email protected]. More information about Crypto++ and this group is available at http://www.cryptopp.com.
