# Using the OTP and RSA compared to only using the OTP itself

To use the OTP with RSA, I implemented the one-time pad first for only one time, and then I used the RSA algorithm to encrypt the message.

For the RSA algorithm, I pick $$p$$ = 2143 and $$q$$ = 3257, values which do not share any common factors and generate a random value between 1 and $$(p-1)(q-1)$$. Then generate a public key and private key for RSA encryption and decryption.

My question is: Is it more secure than only using the one-time pad to encrypt the message?

• OTP, done right, is 100% secure; how can you have more than 100%? – dandavis Apr 7 '17 at 19:23
• Could you please expand on how you use RSA? When and how do you manage the key(s)? A bit more detail should lead to a more accurate answer. – Paul Uszak Apr 7 '17 at 21:12
• @dandavis : ​ For example, one could have non-malleability. ​ ​ ​ ​ – user991 Apr 8 '17 at 5:48
• So you create cipher text using a OTP, then you encrypt the cipher text again with RSA? So you have two layers of encryption. The question then becomes generically are multiple layers of encryption more secure than a single layer? That's a good question and I don't think that the answer is simple. – Paul Uszak Apr 8 '17 at 12:34
• @PaulUszak: I agree it depends on more than what we know from OP, but i said "done right"... – dandavis Apr 8 '17 at 21:06