-2
$\begingroup$

I have read about one-time pads (OTP) on Wikipedia. Is this secure? Can I actually use modular addition as ecryption like it said in Wikipedia?

And the plaintext is as long as the OTP, so when I send (plaintext,OTP), do I first (plaintext+OldOTP) and (NewOTP+OldOTP) and then combine them, or do I do something else?

Edit: One answer pointed out - "You can't transmit a longer OTP using an shorter OTP" But what if you use OTP as a block cipher, devide the longer NewOTP into shorter and cipher individually? You don't get what I mean, the OTP will be used as a block cipher and the blocks will be sent as one message, which will contain a new OTP in one or two of the blocks, which will be used as a block cipher for the reply.

$\endgroup$
3
$\begingroup$

Is this secure?

Yes, One-Time-Pads (OTPs) can be proven information theoretically secure. For a sketch of what this means and how to do this, please refer to this previous answer by me.

Can I actually use modular addition as encryption like it said in Wikipedia?

Yes, any group operation can be used to form a pefectly secret encryption scheme similar to the one time pad, given that the operands are both part of said group, this includes, but is not limited to:

  • Addition in $\mathbb F_2$ (also known as "XOR" or one time pad)
  • Addition in $E_{a,b}(\mathbb F_p)$ (the set of points on the elliptic weierstrass curve formed over $\mathbb F_p$)
  • Addition in $\mathbb F_p$ (also known as modular addition)

This was also acknowledged in Introduction to Modern Cryptography by Katz-Lindell (2nd edition) in Lemma 11.15 and right below (while discussing ElGamal encryption). The idea of the proof there is that you use the fact that the key is uniformly taken from the set of the possible keys and that you "transfer" this randomness into the ciphertext.

And the plaintext is as long as the OTP, so when I send (plaintext,OTP), do I first (plaintext+OldOTP) and (NewOTP+OldOTP) and then combine them, or do I do something else?

  1. Normally, you wouldn't actually send the OTP along with your message (in clear), because in this case the OTP is of no use.
  2. Note that you use "OldOTP" twice, which contradicts it's name one-time-pad (OTP) and is thereby insecure.
  3. Note further that you can't use the OTP to transmit a longer OTP because using an $n$-bit OTP you can only transfer an $n$-bit message and thus only an $n$-bit OTP which didn't help you at all.
  4. The usual usage of the OTP would be to transfer the OTP securely to the recipient and then using it only once with a message, as in (Message + TheOneAndOnlyOTP)
$\endgroup$
  • $\begingroup$ Since it's impossible to chose a key uniformly from an infinite group, I wouldn't list those as possible choices. $\endgroup$ – CodesInChaos May 15 '16 at 8:45
  • $\begingroup$ "You can't transmit a longer OTP using an shorter OTP" - what if you use OTP as a block cipher, devide the longer into shorter and cipher individually? $\endgroup$ – JohnGmdv May 15 '16 at 21:10
  • $\begingroup$ @JohnGmdv If you have an OTP of size $n$ elements and you want to encipher an OTP of size (even) $n+1$ elements, you have to use $n+1$ group operations obviously or otherwise you wouldn't encrypt all. Now you also need $n+1$ secondary "partners" for the group operations, but you only have $n$ (your "old" OTP). Thus you have to re-use at least one element and therefore you lost perfect secrecy. $\endgroup$ – SEJPM May 15 '16 at 21:18
-1
$\begingroup$

If you mean perfectly secure, then YES OTP is indeed perfectly secure. But if you mean practically secure, then NO OTP is not practically secure.

The reason is due to the fact that OTP requires usage of perfectly random numbers used as keys on both sides, however in practice using completely random keys is non-trivial, and usage of Pseudo Random Number Generators to generate keys could bring their weaknesses in the system making it practically insecure. Example Enigma Machine

On the contrary consider RSA for example, it relies on the assumption that calculating factors of product of two extremely large prime numbers is extremely difficult and cannot be performed in the span of the key's validity period. Therefor RSA is practically secure rather than perfectly secure.

$\endgroup$
  • $\begingroup$ First, when the key is not truly random, independently chosen and uniform distributed, it is not OTP. Secondly however, the example with the Enigma is completely unrelated and does not make any sense. Stream ciphers are their own field - and that's completely unrelated to the insecurity of Enigma from the point of view of modern cryptography. $\endgroup$ – tylo Jun 13 '17 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.