Decrypting Encrypting FAQS index Links TRNG

TUTORIALS  AND  EXAMPLES  ON  ENCRYPTING

 Encrypt menu

 

 

 How to provide or hunt text files ?

Safety checks in encryption relating to the sizes of files

Tutorials and examples of encryption (General Definition)

Tutorials for message 70005

 Tutorials for message 70001

How to simple encrypt any file ?

What is an interior security number (ISN) ?

 How to choose a proper ISN ?

Double Encrypting

Cross Encrypting

Encrypting files other than text  (media files)

 


HOW TO PROVIDE OR HUNT  TEXT FILES ?

 

This program works with text files for encrypting, you have to do one of the following in order to obtain these files;

 

         1_Write some text files yourself  like; stories, scientific papers, nonsense poems etc. 

        This is the most difficult method, unless you are a prolific author/writer

         2_Use some text  files found in your office or home. 

        May be feasible, but it  is quite difficult to find text files anytime you want.

         3_Scan some specific pages of certain books at two terminals and then read them by OCR software.

        This seems quite a good idea, provided that you have extra high quality scanning equipment and OCR software, to be able to convert a book page to a text file, without any error. Hasn't been tried in here since we are lacking such superb tools. This may be worth trying in some well equipped embassies, ministries and  IA's. where some libraries also exist. In such a situation, the tables you see down below will constitute; the names of the books, publishers, page numbers, publishing dates etc.   

         4_Use someone else's prepared text files in the net.

        Seems the easiest and best way to provide text files. Sometimes decryption may fail by this method, because one of the sites in the keyset  is  updated or deleted by the site owner while you are uninformed, anyhow the probability of  such a condition  may  not be so high;  there are some text files in internet which are older than five years. 

 

To scan for someone else's prepared text files from

 internet, open  google advanced search  and fill in the

 table exactly  as following, then click Google Search.

 

 

       If you do this operation,  you'll find  millions of  files suitable for your purposes,  select four of  them as a keyset.   


WHAT IS  AN  INTERIOR  SECURITY  NUMBER (ISN) ?

 

Eight digit ISN  may be thought as a password  which provides the following utilities:

        A-Prevents trial attacks on  internet addresses, the probability for each keyset  tried  to be correct  is about;  1/108

        B-It forces the internet addresses to be entered in correct order,  e.g; if you enter key3  instead of  key1,  it wont work. You should enter the keys, just in correct order -->  key1,  key2,  key3,  key4. This provides an additional security against  "trial and error"  makers, since they have to make their trials in correct order. 

        C-It provides a central organization to send private messages to its particular members. Other members, who are not involved in a special operation and hence don't know the ISN cannot read the messages. 

        D-For each unique ISN and  four address keyset, there corresponds a single OTP.  The ISN is not concealed in the encrypted  file,  instead  it  is created by modular  arithmetic and  is  completely  safe  from  being  detected. 

 

 

 

 

 

 

 

 


HOW TO CHOOSE  A  PROPER ISN ?

 

       ISN is like an eight digit telephone number and  is distributed by a central authority to its members, such as the head of  ministry of foreign affairs.  Memorize your ISN and never tell it  to anyone.  If you are involved in some transfer of  messages to someone else, then you have to learn their ISN by official permission and encrypt a  message accordingly. 

        

Some   DO NOT 's  while  choosing  a  Proper ISN

        1- DO NOT use  all-same-digit  numbers like (44444444, 77777777 etc); The program works well, but this will breach the security condition  stated above  in term B 

        2-DO NOT use palindromic-numbers.  ( The numbers which read the same, when taken from reverse direction like   12344321, 73211237 ). The program works well, but this will also breach the security condition stated above  in term B 

        3- DO NOT use first eight digits of some mathematical constants like (31415926), Your adversaries may guess.

        4- DO NOT use some numbers that carries relation to (date of birth, social security number etc.), Your adversaries may guess.  

 

 

 

 

  


SAFETY  CHECKS  IN  ENCRYPTION  RELATING  TO  THE  SIZES  OF  FILES

 

        There is a simple formula for the shortest size of  a  key   in  a  keyset,  which is given by the following; 

        S    stands for a safety factor which takes care of  unforeseen  effects in encryption. We'll take;  S=1.40   for our text files. Factor   Sf   changes considerably  from file to file,  therefore don't bound to this value so much. 

 

Shortest  Size of  Key = SSK

Message Size (Size of Message file to be encrypted) = MS

SSK  >  ( 8  .  MS )  .  S 

 

ATTENTION:  The sizes of other keys in  the  keyset  are  NOT important, since the program aligns itself to the size of  the Shortest Size of Key (SSK)  in the keyset

 

 

 

 

 


TUTORIALS  AND  EXAMPLES  OF  ENCRYPTION (GENERAL DEFINITION)

         The browser used  in all these computations  is  IE 6.0. If you use other browsers OR or a different version of the same browser,  it won't work.  The Operating System used,  is not so important as far as the program can be executed, 

To provide additional  synchronization, all of  the contributing partners should perform  the following checks and alignments on their  browsers:       

 

        A -Control:  Help > About Internet Explorer > read the version number. If  it  is  NOT 6.0, then don't commence.

        B -Align:     Tools > Internet Options > Advanced > Restore Defaults > Apply > OK. 

        C -Align:    View > Encoding > check "Western European (ISO)".    ("Auto Select" option should be UNchecked)

 

Use the "Western European (ISO)" option during all the savings, and state this condition on all of the tables.      

 

 

 

 

 

 

 


TUTORIAL FOR MESSAGE 70005

 

Download  Message 70005  to   C:\windows\desktop  to be used as a subject in this tutorial.
Save all the keys  into the directory  (C:\windows\desktop\keys 70005)    

 internal security number ISN:  19453208

name of file for saving

file web address

  (click to open )

Viewing and Encoding during saving

Saving type of file

key1(70005).txt site1

Western European (ISO)

Text File (*.txt)

key2(70005).txt site2 Western European (ISO) Text File (*.txt)
key3(70005).txt site3 Western European (ISO) Text File (*.txt)
key4(70005).txt site4 Western European (ISO) Text File (*.txt)

        How to save keys:  Click to site1 or site2 or site3 or site4;  then from file menu at top left, choose save as;  complete the Save Web Page prompt as shown  in the tables, to the directories stated at the first cell of their tables.       

        The usage of keys and encrypted files for decryption are described  at the end of this section.

 

Check for  Shortest  Size of  Key (SSK);

Message Size = MS = 7955  byte,     S=1.40

8*MS*S   =  89096  byte

shortest  key (SSK)  is  key2  in this case, which  is equal  to  90946  byte 

therefore     SSK  >  ( 8  .  MS )  .  Sf           OK


TUTORIAL FOR MESSAGE 70001

 

Download  Message 70001  to   C:\windows\desktop   to be used as a subject in this tutorial.
Save all the keys  into the directory  (C:\windows\desktop\keys 70001)   

 internal security number ISN:  19453208

name of file for saving

file web address

  (click to open )

Viewing and Encoding during saving

Saving type of file

key1(70001).txt site1

Western European (ISO)

Text File (*.txt)

key2(70001).txt site2 Western European (ISO) Text File (*.txt)
key3(70001).txt site3 Western European (ISO) Text File (*.txt)
key4(70001).txt site4 Western European (ISO) Text File (*.txt)

        How to save keys:  Click to site1 or site2 or site3 or site4;  then from file menu at top left, choose save as;  complete the Save Web Page prompt as shown  in the tables, to the directories stated at the first cell of their tables.        

        The usage of keys and encrypted files for decryption are described  at the end of this section.

 

Check for  Shortest  Size of  Key  (SSK);

Message Size = MS = 4828   bytes,     S=1.40

8*MS*S   =  54073  bytes

shortest  key (SSK)  is  key2  in this case, which  is equal  to  54718  bytes 

therefore     SSK  >  ( 8  .  MS )  .  Sf           OK


HOW  TO  SIMPLE  ENCRYPT ANY  FILE ?

 

        Suppose you have  a  "C:\windows\desktop\keys 70005"  directory.  In this directory, according to the definitions and procedures told in previous article there should be the following files.  

 

key1(70005).txt

key2(70005).txt

key3(70005).txt

key4(70005).txt

 

and on your desktop     C:\windows\desktop      you'll have the file ;   

message(70005).txt          (the official text file to be encrypted)

 

Do the following  step by step for simple Encryption;

 

Open the  PracticalOTP  program by double clicking its icon on the desktop.

1_   Click Encrypt menu. 

2_   Enter the eight digit Internal security number.

 

3_   Click key1.txt,  pass to ,C:\windows\desktop\keys 70005 double click  key1(70005).txt  to enter the related first key.

4_   Click key2.txt,  double click  key2(70005).txt  to enter the related second key.

5_   Click key3.txt,  double click  key3(70005).txt  to enter the related third key.

6_   Click key4.txt,  double click  key4(70005).txt  to enter the related fourth key.

 

7_   Click  compute main key  button,

Some time will pass for computing the main key,  the  working time will depend on the size of the key1.txtkey2.txt, key3.txt key4.txt. After performing  this operation,  You'll see a cursor is blinking at the top left of  the message space, which indicates that the text message is ready to be entered. 

8_  Open  message(70005).txt  file on your desktop (the text  file which has to be encrypted). Click: Select All  >  Copy,  from edit menu,  come into Practical(OTP)'s  message section and  do  right click > Paste operation  from your mouse. The copied text, will be pasted into the blank area. At this stage you don't have to make any additional operation, such as correcting the text section and trying to justifying the text. Just leave the text as it is and do nothing to change the appearance

        Sometimes the following condition occurs; The text in the message section falls short, that is some of the text is not pasted into the blank area and you see that a sentence is not completed at the end. This means that you have chosen the shortest key too small.  Safety check is breached. Under this condition immediately exit the program and return to choosing the keyset, this time choose a smallest key which is  about  thirty percent greater than its former value and  commence the cycle from beginning.   

9_  Click  compute Encrypt.enc  button,

Some time will pass for computing the Encrypt.enc  file,  the working time will depend on the size of  the contributing files.

 

10_  encrypt.enc  file will always  be saved into the C:\windows\desktop\keys 70005 directory, automatically.  

11_  Click  Exit  and exit the  practicalOTP  program.

12_  Immediately  go  to  the  C:\windows\desktop\keys 70005  directory  and  by renaming  function of  windows,  change the name of  encrypt.enc  to a  new name;  encrypt(70005).enc.

        

        At this stage, you may zip  encrypt(70005).enc  by WinZip program. Send this zipped file to the receiver from open channels. Make a similar table like the ones shown above and  inform your partner by some method  which has been prearranged by the agreement of two sides in advance.  This method of informing the other side about the keyset,  is left to your own  imagination, but should be a secret method  anyhow. 


DOUBLE  ENCRYPTING

        Suppose Bob wants to send a message to Alice (by double encrypting);

While browsing,  he selects a  four text file set;  key_small _1.txt,  key_small _2.txt,  key_small _3.txt,  key_small _4.txt  (as recommended from different language of  texts),  from  their corresponding web addresses;  encrypt  top_secret.txt  (plain text) by using  the official ISN of  his partner (Alice). Now he has top_secret_small.enc, as the first encryption file.  

        Then  he  selects  another  four text file set  key_big _1.txt,  key_big _2.txt,  key_big _3.txt,  key_big _4.txt  (as recommended from different language of  texts),  from  their corresponding web addresses;  encrypt  top_secret_small.enc by using the official ISN of  himself (Bob) this time.  Now he  has top_secret_big.enc  as a second encryption fileHe has double encrypted a message by using the official ISN's of  his  partner (Alice)  and  himself (Bob)

        Bob sends  top_secret_big.enc   file to his partner  by open channels and  transfers  all  of  the related txt addresses by some predetermined internet links  (since they know each others ISN,  the transfer is only realized on keysets);  so that  Alice can be able to perform just the reverse of the operations he had  made  to  decrypt the message.

        The application of this method will greatly reduce the "pattern generating tendencies",  causing  from the utilization of  "linguistic  type of documents"  in the processes. 

       

 

 


CROSS ENCRYPTING

 

        Suppose Bob wants to send a message to Alice (by cross encrypting);

1_ While browsing, he selects  four Internet sites, which contain text (txt) files; file_GR11.txt,  file_GR12.txt,  file_GR13.txt,  file_GR14.txt

        He passes (crosses) them  from  TRNG  menu to  get;   crossed1.rnd       

2_ While browsing, he selects four Internet sites, which contain text (txt) files; file_GR21.txt,  file_GR22.txt,  file_GR23.txt,  file_GR24.txt

        He passes (crosses) them  from  TRNG  menu to  get;   crossed2.rnd

3_ While browsing, he selects four Internet sites, which contain text (txt) files; file_GR31.txt,  file_GR32.txt,  file_GR33.txt,  file_GR34.txt

        He passes (crosses) them  from  TRNG  menu to  get;   crossed3.rnd

4_ While browsing, he selects four Internet sites, which contain text (txt) files; file_GR41.txt,  file_GR42.txt,  file_GR43.txt,  file_GR44.txt

        He passes (crosses) them from  TRNG  menu to  get;   crossed4.rnd

 

        Bob renames the crossed files from DOS prompt, as following;

                        crossed1.rnd  ---> key1.txt 

                        crossed2.rnd  ---> key2.txt 

                        crossed3.rnd  ---> key3.txt 

                        crossed4.rnd  ---> key4.txt 

 

Then,  Bob Passes to Encrypt menu:        

        He  uses these crossed files to encrypt the plaintext;  top_secret.txt, to obtain  top_secret.enc .  By doing this operation, he is getting rid of pattern carrying linguistic type of  text  files used as keyfiles  and utilizes  somewhat more entropy containing crossed files  (random  keyfiles consisting from hexadecimal characters)  in encrypting operation.

        Bob sends  top_secret.enc  file to his partner Alice,  by open channels and  transfers  all  of  the related txt addresses by some predetermined internet links,  so that  Alice can be able to perform just the reverse of the operations he had  made  to  decrypt the message. 

 


ENCRYPTING FILES OTHER THAN TEXT  (Media Files)

 

        We are trying to extend this system to a  general global communication transmission in encrypted forms. The method is very easy to apply.

        This system can be used to encrypt or decrypt files other than text files  (such as bmp, wav, gif, mp3  etc.). All you have to do is to to find a set of many text based internet sites in four number groups, then click "tru ran num gen" menu, transform the set of   list  to a single  random  file  mainkey.rnd  (as an example),  then open Prof Marsaglia's   asc2bin.exe   which may be found in his diehard battery set, using the tool  asc2bin.exe convert the mainkey.rnd to mainkey.32  (the binary form of mainkey.rnd).

        Now you have a  binary form of random file,  mainkey.32  which may be used to  XOR  any  non-text file (bmp, wav, gif,  mp3). The XOR'ing  is done by the tool of Prof Marsaglia's  diehard battery, The meld.exe  (using the "X" choice during the process).  After the encyption by  XOR  function using the meld.exe; there is the encrypted file encrypt.32 which you can send by open channels.  The Decryption will be just the opposite;  this time  meld  encrypt.32  file with  mainkey.32  file.  Give the name of the output file as (decrypt.bmp,  decrypt.wav,  decrypt.gif  or decrypt. mp3)

        The encrypted file  encrypt.32 cannot be listened or edited by any sound or graphic editor. The webaddress list of set which is used to obtain the mainkey.rnd and hence  mainkey.32,  may be sent to your partners by secret channels, so that they perform just the same procedures to retrieve the original sound or graphic file.

        We have tried these operations on (bmp, wav, gif, mp3) type of  files and success was 100%,  however if you do encounter  some difficulty in applying the method, you can drop an email  to us from the address practicalOTP@hotmail.com

 

        

name of the mediakey  to download.

(Name of the first file in the meld.exe tool, while executing)*

Name of the general keyfile The keyfile that opens all of  the mediakeys.

(Name of the second file in the meld.exe tool while executing)*

Name of the tool to XOR  the mediakeys and keyfile.

(May be found in Diehard battery set)

(Name of the output file in the meld.exe tool while executing)*

You will give the name

Size of the final Decrypted  file (Kb)

Download from internet site

Download from internet site

meld.exe

dec_bmp.bmp

464

Download from internet site Download from internet site meld.exe

dec_gif.gif

160

Download from internet site Download from internet site meld.exe

dec_jpg.jpg

112

Download from internet site Download from internet site meld.exe

dec_mp3.mp3

624

Download from internet site Download from internet site meld.exe

dec_wav.wav

624

 While executing the meld.exe, there will be some prompts that you should fill in the tool,  these are the first file, the second file and the name of the output file respectively. Always choose the "X" choice for melding, when asked in the tool.*      

      

How to obtain the general  mediakey.32  file;  

        First obtain the mediakey.rnd  file by the methods told in the section "tru ran num gen / How to create a TRNG  file" . Then use the tool,  asc2bin.exe  (which may be found in the Diehard battery set) to convert the asci  file to a binary  file,  mediakey.32

 

How to obtain the encrypted files  enc_XXX.32  which are seen in the first column  of  the above table;

        XOR  any media file  (bmp,  gif,  jpg,  mp3,  wav extension),  with mediakey.32  keyfile;  by using the meld.exe tool  of  Diehard battery set (Just the opposite operation you  had  performed,  when you were working with the tableset at above).

        The  mediakey.32  keyfile  should be a little longer than the  media file  which has to be encrypted,  or else it will encrypt as long as it can do and the rest of the  media file  will be left  un-encrypted.  In such a case  the final decrypted media file dec_XXX.32  will be shorter than the original one.  That's all you have to think about the lengths of  the  keyfiles and encrypted  files.