Thread: How did you all become so good at encryption!

  1. #1
    Registered User Nutshell's Avatar
    Join Date
    Jan 2002

    How did you all become so good at encryption!


    I looked through some source code of encryption programs written for the contest. I was sad that i found difficulty in understanding them. I just want to ask to those all who participated, or anyone really, what books have you got or read, or any courses you undertook, that taught u about encryption....etc


  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    I just read a few web pages... there are plenty of them dedicated to encryption.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Its not rocket science vasanth's Avatar
    Join Date
    Jan 2002
    Well the encryption you saw.. That were submited by the contestants including me are not complex.. None of us have written an advanced algorithm likes DES, Bowl Fish etc etc. We have just written XOR, vigenere and other simple encryption algorithm which is very easy to code if you understand it...

  4. #4
    Registered User Zeeshan's Avatar
    Join Date
    Oct 2001
    London, United Kingdom
    "Encryption" does not necessarily imply the use of complex algorithms to decode one's data.

    It could be something as simple as, say, replacing all the 256 characters by others in a file... e.g.

    replace all

    a -> j
    g -> k
    e -> p

    so that no one can understand the contents of that particular file....

    if you're willing to learn encrytion, start with a similar program.


    1. Read a file character by character.
    2. Replace each character by it's equivalent in a pre-defined table.
    3. Write the equivalent of each character of the original file into the output file.

    Similarly, you can proceed onto more complex algorithms, for example

    1. get the current time
    2. if the time is "odd" use one table, if it is "even" use another
    3. write a character 'o' or 'e' into the output file, to indicate the correct table to be used by the decryption program.
    4. follow the pattern of the first algorithm...

  5. #5
    Im back! shaik786's Avatar
    Join Date
    Jun 2002
    Bangalore, India
    Encryption is one of the most fascinating subjects to me (and probably to many more). And with a little knowledge of bit operations, you can come out with your own bits based encryption algorithm. One of the simplest way of doing this is as Zeeshan said (though not bits manipulation). There are many more simple ones like, reverse every bit of a byte on a file stream.

    Ex: 10 when reversed becomes 245
    00001010 --> 11110101

  6. #6
    Registered User Nutshell's Avatar
    Join Date
    Jan 2002
    I suppose simply reversing every bit is too easy to crack? Well i am not 'entirely' new to encryption i've written a small basic xor encryption program. But i am just not sure where to go on from here.

  7. #7
    Its not rocket science vasanth's Avatar
    Join Date
    Jan 2002
    For encryption based on a key you can do this

    Take the first char of the key and xor it with the first char of the message... And after the key is exhausted again start from the first char of the key.. A better idea would be to create a array table eg

    int array[5][5]
    a b c d e f
    b c d e f a
    c d e f a b
    d e f a b c
    e f a b c d
    f a b c d e

    You will have to make this aray till Z if you want to be able to encrypt all the englich alphabets in English..

    Now consider that the message to be encrypted is

    "fbcf abc dfe"

    If the user gives a key as "dcaf"

    now to encrypt this write an algorith
    eg since the first key char is "d" go to the row that has the begin letter as "d" and since the message to be encrypted has the first char "f" go to the column that has the begining lletter as "f". Now see which char intersects between the row and the column .. It is "c".. So continue this.. Encrypt the 2nd char with 2nd char of the key as aboe.. And the result will be

    "cdce ddccce"

    To decrypt this.. You will have to follow the same procedure..
    And you get back the original message.. here the resultant encrypted text is based on the key given.. You can further strengthen it by encrypting it twice with the same password and other simple tricks.. THis is how my encryption program which i submited for the contest works.. TO generate the table i used a for loop and generated the ASCII values and used this to encrypt and decrypt text and symbols..

  8. #8
    Registered User Nutshell's Avatar
    Join Date
    Jan 2002
    Yep thnx i understand your algorithm now. I guess it's really up to your imagination...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Folder encryption
    By EvBladeRunnervE in forum Tech Board
    Replies: 7
    Last Post: 12-11-2004, 10:03 PM
  2. Simple message encryption
    By Vicious in forum C++ Programming
    Replies: 10
    Last Post: 11-07-2004, 11:48 PM
  3. Good C++ books for a begginer
    By Rare177 in forum C++ Programming
    Replies: 13
    Last Post: 06-22-2004, 04:30 PM
  4. Good sound storage method
    By VirtualAce in forum Game Programming
    Replies: 1
    Last Post: 10-14-2003, 05:18 AM
  5. What's wrong with my Stream Cipher Encryption?
    By Davros in forum C++ Programming
    Replies: 3
    Last Post: 04-18-2002, 09:51 PM