How To Make Your Own Encryption


****UPDATE: DOWNLOAD THE PROJECT FILES****

This video lays out the steps for creating a very simple encryption and decryption program using free tools. The programming language we will be using is VB Script.  See if you can decrypt this text:

wkjlue#vnrro#huxwxi#uxr\

 

The code below is for the encrypting program:

<—–Start copying below this line—–>
‘SIMPLE VB ENCRYPTION PROGRAM
‘Create a dialogue box that asks for the text to encode
set x = WScript.CreateObject(“WScript.Shell”)
mySecret = inputbox(“Enter text to be encoded”)
‘Reverse the submitted text
mySecret = StrReverse(mySecret)
‘Open up an instance of Notepad to print the results after waiting for 1 second
x.Run “%windir%\notepad”
wscript.sleep 1000
x.sendkeys encode(mySecret)’This function encodes the text by advancing each character 3 letters
function encode(s)
For i = 1 To Len(s)
newtxt = Mid(s, i, 1)
newtxt = Chr(Asc(newtxt)+3)
coded = coded & newtxt
Next
encode = coded
End Function
<—-Stop copying above this line——>
<—–Start copying below this line—–>
‘SIMPLE VB DECRYPTION PROGRAM
‘Create a dialogue box that asks for the text to encode
set x = WScript.CreateObject(“WScript.Shell”)
mySecret = inputbox(“Enter text to be encoded”)
‘Reverse the submitted text
mySecret = StrReverse(mySecret)
‘Open up an instance of Notepad to print the results after waiting for 1 second
x.Run “%windir%\notepad”
wscript.sleep 1000
x.sendkeys encode(mySecret)’This function encodes the text by advancing each character 3 letters
function encode(s)
For i = 1 To Len(s)
newtxt = Mid(s, i, 1)
newtxt = Chr(Asc(newtxt)-3)
coded = coded & newtxt
Next
encode = coded
End Function
<—-Stop copying above this line——>
<—–Start copying below this line—–>
–Applescript encryption program
set words_to_encrypt to “I want to encrypt sentences. Not just words!”
set multiplier to 5
set charList to {“a”, “b”, “c”, “d”, “e”, “f”, “g”, “h”, “i”, “j”, “k”, “l”, “m”, “n”, “o”, “p”, “q”, “r”, “s”, “t”, “u”, “v”, “w”, “x”, “y”, “z”,”A”, “B”, “C”, “D”, “E”, “F”, “G”, “H”, “I”, “J”, “K”, “L”, “M”, “N”, “O”, “P”, “Q”, “R”, “S”, “T”, “U”, “V”, “W”, “X”, “Y”, “Z”, “1”, “2”, “3”,”4″, “5”, “6”, “7”, “8”, “9”, “0”, ” “, “~”, “!”, “@”, “#”, “$”, “%”, “^”, “&”, “*”, “(“, “)”, “_”, “+”, “{“, “}”, “|”, “:”, “\””, “<“, “>”, “?”, “`”, “-“,”=”, “[“, “]”, “\\”, “;”, “‘”, “,”, “.”, “/”, “a”}considering case
–get a list of numbers for the words corresponding to the item numbers of the characters in charList
set p_letter_list to text items of words_to_encrypt
set p_num_list to {}
repeat with i from 1 to (count of p_letter_list)
set this_letter to item i of p_letter_list
repeat with j from 1 to count of charList
set this_char to item j of charList
if this_letter is this_char then
set end of p_num_list to j
exit repeat
end if
end repeat
end repeat
–encrypt the numbers
set modulus to count of charList
set c_num_list to {}
repeat with i from 1 to (count of p_num_list)
set p_num to item i of p_num_list
set c_num to ((p_num * multiplier) mod modulus)
set end of c_num_list to c_num
end repeat
–get the characters for the encrypted numbers corresponding to the characters in charList
set c_letter_list to {}
repeat with i from 1 to (count of c_num_list)
set this_item to item i of c_num_list
set end of c_letter_list to (item this_item of charList)
end repeat
–coerce the encrypted characters into a string
set c_string to c_letter_list as string
end considering
<—-Stop copying above this line——>

62 Responses


  • henry // //

    why is this video is private !!!

  • alokkumar // //

    It won’t let me watch the video, it says it’s private 🙁

    • robert // //

      @Alok why don’t you just watch it on youtube instead of on the website

  • pat // //

    Thanks. This helped alot. Works Great

  • Marco // //

    Nice. Thanks for sharing. 🙂

  • kotesh // //

    awesome,, i just found and trying for the same thing for many days,,

    and thanks once again…

  • susanta kumar minz // //

    I cannot do this……
    I followed all the steps but mine is not working………

    • matt // //

      you got to put spaces at the beginning of each line

      • cant do it // //

        diddnt work

        • cant do it // //

          finally got it right
          decoded: Your future looks bright
          from the description

  • WSF // //

    Hey

    i have a mac and what are i going to save the file as?

  • eddie // //

    Hi, Interesting that it can’t handle sentences. Why is that?

    Thanks

    • Ian // //

      Heres is the encrypted part fixed!

      ‘SIMPLE VB ENCRYPTION PROGRAM’
      ‘Create a dialogue box that asks for the text to encode’
      set x = WScript.CreateObject(“WScript.Shell”)
      mySecret = inputbox(“enter text to be encoded”)
      ‘Reverse the submitted text’
      mySecret = StrReverse(mySecret)
      ‘Open up an instance of Notepad to print the results after waiting for 1 second’
      x.Run “%windir%\notepad”
      wscript.sleep 1000
      x.sendkeys encode(mySecret)’this function encodes the text by advancing each character 3 letters’
      function encode(s)
      For i = 1 To Len(s)
      newtxt = Mid(s, i, 1)
      newtxt = Chr(Asc(newtxt)+3)
      coded = coded & newtxt
      Next
      encode = coded
      End Function

      • chrisjudk // //

        it still wouldn’t work for me it gave me an error

    • Ian // //

      And the decryption code

      ‘sIMPLE VB DECRYPTION PROGRAM’
      ‘create a dialogue box that asks for the text to encode
      set x = WScript.CreateObject(“WScript.Shell”)
      mySecret = inputbox(“Enter text to be encoded”)
      ‘Reverse the submitted text’
      mySecret = StrReverse(mySecret)
      ‘Open up an instance of Notepad to print the results after waiting for 1 second
      x.Run “%windir%\notepad”
      wscript.sleep 1000
      x.sendkeys encode(mySecret)
      ‘this function encodes the text by advancing each character 3 letters
      function encode(s)
      For i = 1 To Len(s)
      newtxt = Mid(s, i, 1)
      newtxt = Chr(Asc(newtxt)-3)
      coded = coded & newtxt
      Next
      encode = coded
      End Function

    • Ian // //

      Hey
      even if you copy my code it wont work the reason it wont work is because when you copy it the ” and the ‘ are messed up idk why but they are i have included links to my files that you can use

      http://mediafire.com/?a91694bq36b3g

      it is a folder at mediafire.com just download both files and you have a encryption program!!!!

    • Daniel // //

      Eddie, it’s because when you copy-paste it from here, the quote marks is wrong. You gotta delete the quote marks & make’em your self. It happens to both double & single.

    • Nathan G // //

      I think it’s because he left out the line for a the space bar. I’m not sure what the code for that is though sorry

    • Vineeth // //

      Hi..Eddie
      Try the same logic in vb (not vb script. it is more “STUPID SIMPLE”),if you are familiar with vb.
      With a little work and touch up you can make a good one than this one….(It can handles sentences an d new lines also. )

  • Matthew // //

    i dont understand the apple script. could you send me it complete with a decode version without all the added stuff

  • Ian // //

    ya same a eddie wont work

  • Ian // //

    im working on fixin i found a couple problems

  • Tyler // //

    The first set of code doesnt work 🙂

  • Ian // //

    the reason why the code is not working for a lot of people is because when you copy the ” and the ‘ are messed up idk why but they are i have included links to my files that you can use. Or alternatively you can just find and replace all of those!!!!

    http://mediafire.com/?a91694bq36b3g

    it is a folder at mediafire.com just download both files and you have a encryption program!!!!

  • parsa // //

    it says invalid characters:(

  • pablo // //

    how can i decript the mac version

  • emmet // //

    #include
    #include
    #include
    #include
    #include
    #include
    load();
    load2();
    main()
    {
    randomize();
    char message[80],ch;
    int nlenght,i;
    clrscr();
    load();
    for(;;)
    {
    printf(“Welcome to Encryption Doctor.\n”);
    printf(“\n Enter your message:”);
    gets(message);
    nlenght = strlen(message);
    for (i=0; i>>>>>>The Encrypted Message is: %s “,message);
    printf(“\n\n\n\nPress ‘1’ to Exit.”);
    printf(“\nPress ‘ENTER’ to Continue.\n”);
    ch=getch();
    if (ch==’1′)
    break; /*Program Concept From Copernicus P. Pepito’s Book ‘Introduction to Turbo C’*/
    /*Modified by:Danielle Louise S. Casoco aka. qUikSiLv3r*/
    clrscr(); /*Proudly AMA made Program*/
    }

    clrscr();
    printf(“\n\n\n\n\n\n\n\n\n\n\n\t\tProgram By:Danielle Louise S. Casoco qUiKsiLv3r”);

    return 0; /*GO!!!AMACC CALOOCAN!!*/
    }

    load()
    {
    int i;
    for(i=0;i>>\n”);
    for(x=0;x<=44;x++)
    {
    cprintf("Û");
    delay(100);
    }
    printf("\nDONE!!!!");
    return 0;
    }

  • sam // //

    im having trouble with this on windows xp it keeps giving this error:

    line: 1
    Char: 31
    Error Invalid character
    Code: 800A0408
    Source: Microsoft VBScript compilation error

    any help??

  • Cal // //

    Hi, I’m a complete novice with this kind of thing, when I copy and paste the text, I get the error “Invalid character”. I have played around with removing certain ones but to no avail. I am running Win7 x64. Please help!

  • Anon42 // //

    Since i’m not a fan of Microsoft and Apple, i use Linux…
    Could you show how to write an encryption programm in python? Thanks in advance
    I hope you make a project out of it and make an awsome prog like “keyscrambler” for linux

  • adrian // //

    it wont work on xp

  • mesmith // //

    i have win 7 ultimate 32 bit why doesn’t it work?!
    thanx

  • emmet // //

    #include
    #include
    #include
    #include
    #include
    #include
    load();
    load2();
    main()
    {
    randomize();
    char message[80],ch;
    int nlenght,i;
    clrscr();
    load();
    for(;;)
    {
    printf(“Welcome to Encryption Doctor.\n”);
    printf(“\n Enter your message:”);
    gets(message);
    nlenght = strlen(message);
    for (i=0; i>>>>>>The Encrypted Message is: %s “,message);
    printf(“\n\n\n\nPress ‘1’ to Exit.”);
    printf(“\nPress ‘ENTER’ to Continue.\n”);
    ch=getch();
    if (ch==’1′)
    break; /*Program Concept From Copernicus P. Pepito’s Book ‘Introduction to Turbo C’*/
    /*Modified by:Danielle Louise S. Casoco aka. qUikSiLv3r*/
    clrscr(); /*Proudly AMA made Program*/
    }

    clrscr();
    printf(“\n\n\n\n\n\n\n\n\n\n\n\t\tProgram By:Danielle Louise S. Casoco qUiKsiLv3r”);

    return 0; /*GO!!!AMACC CALOOCAN!!*/
    }

    load()
    {
    int i;
    for(i=0;i>>\n”);
    for(x=0;x<=44;x++)
    {
    cprintf("Û");
    delay(100);
    }
    printf("\nDONE!!!!");
    return 0;
    }

  • Mike // //

    Thanks Ian, your script works excellent in Windows 7 64 bit.

  • Anon // //

    HELP ME HELP ME I WANT TO DO THIS BUT ERRY TIME I COPYPASTA I T DOESNT WORK I NEVER READ ANY COMMENTS LOL BECAUSE IM TO STUPID TOO AND DONT UNDERSTAND BASIC PROBLEM SOLVING I WANT PEOPLE TO DO EVERYTHING FOR ME BUT I WANT TO SHOW MY FRIENDS AND TAKE THE CREDIT.

  • Jake // //

    Anon, no one is gonna help you if you take others credits, unless someone was nice enough like me but I don’t know how I can help.

  • Joemar // //

    If its still not work on notepad and gives error, you need a code editing program like notepad++

    Copy the encrypting code save the type as visual basic file ( *.vb ; *.vbs ) and a save name with a .vbs extension once you save it, it highlighted some word with red or blue

    Delete all sentence with a ‘ before it eg. ‘SIMPLE VB ENCRYPTION PROGRAM ; ’This function encodes the text by advancing each character 3

    Change the character ” to make the sentence or word turned gray
    eg. (“Enter text to be encoded”) to (“Enter the text to be decoded”)

    After all that’s finished save it one more time and viola! it worked!

  • joasiee // //

    I get an error with Windows script host ..

  • Susanta // //

    This is not working for me….
    When ever i tried to open that vbs file i get an error…
    Please help me….

  • Mohit // //

    can you make a tutorial showing how to create the intro of your videos

  • Anthony // //

    If you are having problems your problem might be how you are saving it put the name of your file lets say encryption.vbs then you want to change the save as type to all files, next you will need to go to encoding that is right next to the save button there will be a drop box where the name ANSI will be click the drop box and go down the list til you get you unicode the save the file. I did this and it worked for me.

  • André Filipe // //

    Copy and paste It will work

    ‘SIMPLE VB ENCRYPTION PROGRAM
    ‘Create a dialogue box that asks for the text to encode
    set x = WScript.CreateObject(“WScript.Shell”)
    mySecret = inputbox(“Enter text to be encoded”)
    ‘Reverse the submitted text
    mySecret = StrReverse(mySecret)
    ‘Open up an instance of Notepad to print the results after waiting for 1 second
    x.Run “%windir%\notepad”
    wscript.sleep 1000
    x.sendkeys encode(mySecret)

    ‘This function encodes the text by advancing each character 3 letters
    function encode(s)
    For i = 1 To Len(s)
    newtxt = Mid(s, i, 1)
    newtxt = Chr(Asc(newtxt)+3)
    coded = coded & newtxt
    Next
    encode = coded
    End Function

  • André Filipe // //

    you need to put spaces but if you want its very easy to get teh encryption u just need to scroll up and under the video tehres a blue lien sayign update: Download project files! you just need to download it and you have it 🙂

  • LOL // //

    Try Cracking dis $$$vhoxU#vdhugqD#qdV#DWJ

  • LOL // //

    Crack Dis
    $$$$$$$$$$$$$$$$$$$$$$$$$$$$$ORO#ghnqduS#wrJ#xr\

  • Jay // //

    Hi i tried this and a message popped up saying,

    “Windows Script Host
    Script: C:\Users\Jason\Desktop\Encrypt.vbs
    Line: 1
    Char: 30
    Error: Invalid character
    Code: 800A0408
    Source: Microsoft VBScript compilation error”

    Is there anything I did wrong? or is it something with my version of windows? I used notepad and have Windows Starter Edition.

  • Adam // //

    Worked Like a charm, and I even advanced the characters ahead by 10 points so that the encryption will be more complex instead of just three spaces

  • Alex // //

    The applescript version don’t works! Can someone put a link to download it?

  • Electroalek // //

    Here is all fixed:

    Encrypt:
    set x = WScript.CreateObject(“WScript.Shell”)
    mySecret = inputbox(“Enter text to be encoded”)
    mySecret = StrReverse(mySecret)
    x.Run “%windir%\notepad”
    wscript.sleep 1000
    x.sendkeys encode(mySecret)
    function encode(s)
    For i = 1 To Len(s)
    newtxt = Mid(s, i, 1)
    newtxt = Chr(Asc(newtxt)+3)
    coded = coded & newtxt
    Next
    encode = coded
    End Function
    ‘Electroalek <http://www.electroalek.blogspot.com/

    Decrypt:
    set x = WScript.CreateObject("WScript.Shell")
    mySecret = inputbox("Enter text to be encoded")
    mySecret = StrReverse(mySecret)
    x.Run "%windir%\notepad"
    wscript.sleep 1000
    x.sendkeys encode(mySecret)
    function encode(s)
    For i = 1 To Len(s)
    newtxt = Mid(s, i, 1)
    newtxt = Chr(Asc(newtxt)-3)
    coded = coded & newtxt
    Next
    encode = coded
    End Function
    'Electroalek <http://www.electroalek.blogspot.com/

    Your future looks bright !!!

  • 12345 // //

    I changed mine a little.
    Decript this text and make it say message: ikewwiq

  • sheldor // //

    ty Ian

  • ivan4eto // //

    nice work it totaly works but i was wondering from wher cani find more info about encrypting im really starting to get interested in all these hidden messages and everything that will make my stuff so hidden and behind passwords that it will take years for others to learn but if i ever learn to do this i will help everyone who needs it becouse i believe that knowedge isnt something that you can hide from the world

  • ignacio // //

    If you add an “IF” statement then you can includ “spaces” between words. It’s very simple here i show you the code…

    set x = WScript.CreateObject(“WScript.Shell”)
    mySecret = inputbox(“Enter text to be encoded”)

    mySecret = StrReverse(mySecret)

    x.Run “%windir%\notepad”
    wscript.sleep 1000
    x.sendkeys encode(mySecret)

    function encode(s)
    If Str = ” ” then
    add ” ”
    end if
    For i = 1 To Len(s)
    newtxt = Mid(s, i, 1)
    newtxt = Chr(Asc(newtxt)+3)
    coded = coded & newtxt

    Next
    encode = coded
    End Function

  • Vincenzo // //

    I have 3 questions.

    how do i get the mac version to work?
    what is the decoder for mac?
    what do i name the extension on mac?

    thanks.

  • irfan // //

    hello can any body help me i want to encrypt a file which size is about 500kb by using this method
    then how cAN i encrypt it ……..i think lan u can help me in this problem ……….jon i also request u to help me in this situation

  • Jackson // //

    i need some help from someone with a .vbs or tinkernut brain.
    when i tried to type “z” in the box, i got this error:
    Script: C:\Users\***PRIVATE***\Desktop\encoder.vbs
    Line: 6
    Char: 1
    Error: Invalid procedure call of argument
    Code: 800A005

    im running on windows though. the code in my .vbs might help you.

    set x = WScript.CreateObject(“WScript.Shell”)
    mySecret = inputbox(“Enter text to be encoded”)
    mySecret = StrReverse(mySecret)
    x.Run “%windir%\notepad”
    wscript.sleep 1000
    x.sendkeys encode(mySecret)

    function encode(s)
    For i = 1 To Len(s)
    newtxt = Mid(s, i, 1)
    newtxt = Chr(Asc(newtxt)+3)
    coded = coded & newtxt
    Next
    encode = coded
    End Function

    • Jackson // //

      i have never made a .vbs file, so you might want to explain why i should do the stuff you’ll tell me to do.

      • admin // //

        If you need me to tell you why you need to do it, then I suggest not doing it.

  • Divyang // //

    Sir
    Please teach me
    How can I Secure my software ?
    Also teach me
    How can I create a playback password for all computers.
    PC-Binding, One computer, One password – Each computer needs different open password.
    Users only need to enter password one time for all files that encrypted by same Encryption Key and same Product ID.

    please reply on my mail id : dksir1011@gmail.com

    Thanks
    Divyang

  • Jack Durrant // //

    Is there a JavaScript version of this? I can probably work with AppleScript, but I like JavaScript.

Leave a Reply