title: Simulating one time pad by agreed parties
labels:
github:
gitlab:
codeberg:

Preface

Conditions:

Method

Result form

Example

Just random 0 and 1

If that is message prepared before pgp
encryption

010010010101001001010011111100
001010100101000101001010100101
h o w a r e u
0101010010100101010001001010

Advisary will be able to see c of E(m,k)

if we assume open pgp used (which not the case)

Questions:

-Repeat for multiple message

Because the advisary knows which algorohtim is used, be
it Xor or which is used in RFC 9580

They could in theory xor it with " ", because
we know space occuars with non 0 in Englsih setenace
and typically it exsts between words.

And if we xored " " with " " then it shall be
that the end resulkt; c xor m is k. say we got
the k of all then, if we xor k, with " ", for the
total length message, we would get c back at indexs
of which probably had " ".

Compared the frequncy of " ", with what would appear
in Egnlish stentece and would get where the it started
(i.e.: the padding no longer relevant).

This because if we assumed fair distrubtion on randomness
of ASCI, then the chance of " "as being a random ASCI is
1/256

1/5 >>> big than equal distrubitoin random

if distrubtion if altered can then a human distugish
it from other normal text.

Alter distrubtion

Assuming the 0 were already in binary format
then for advisary they will be able to see is

To assume equal distrubtion, if advesary is using " ",
and similary e, 'T', '.'.

T: Generate random ascii text of 100 word, respecting the
English langauge frequency

it will protect aginst the previous attack?

Not if the random didn't take into considration the
indexs of the repeated 0s. we know in a setneace we
could get around 4 to 5 " ". not to be expected in
spesfic form.

If we generate text of

linq3 34poj 34jaer 09pqm pioqi

010010010101001001010011111100
001010100101000101001010100101
110111011110100011001110110010
000101010010100101010001001010

Which then could decode to ASCI
IRSð
*QJ\x94
ÝèÎÈ

3.2 random ASCI @ english level

Assume both parties speak English, and advesary knows that
if

010101001001010011111100001010100101000101001010100101 h o w a r e u01100101010010100101010001001010

message between random 0,1

Even if radom zeros one, advesary could compare the distrubution of every 4
bit and convert to ASCII

which would then result somehting like
aseknerq---q-qwwww0--wwwwwww--akfa

11110101001010010101111100101011
0100101010101010101010100111110010101
1010010100000111100101010101110101011
1101010010100111110010101010111100110