Thread: random encryption thought

  1. #1
    C > C++ duders ggs's Avatar
    Join Date
    Aug 2001
    Posts
    435

    random encryption thought

    1. take a 256 byte key.
    2. pad a file out so it can be perfectly divided into 256 parts.
    3. divide the file into sections, and assign each section to a byte of the key.
    4. sort the key according to some predetermined algorithm, swapping parts of the file as you go.
    5. subdivide with the same key, or perhaps a key generated with md5 or something.
    6. lather, rinse, repeat until the file is very confusing.
    .sect signature

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    1) Make a file full of gibberish
    2) Take the system time as a key
    3) Use the key to hash each byte of the file you wish to encrypt
    4) Used the hashed value as an offset for fseek
    5) Place the hashed value in the gibberish file at that offset with a marker value to find it later
    6) Repeat until confused

    Will it work? Probably not, but who knows?

    -Prelude
    My best code is written with the delete key.

  3. #3
    C > C++ duders ggs's Avatar
    Join Date
    Aug 2001
    Posts
    435
    yes | rm file

    --

    the algorithm is reversable! really! if you ignore the md5 step, that is...

    --

    random gibberish is cool

    --

    edit: it's the march break, there's nothing better to do, so...
    /em whips out kedit - even though nobody cares, I'll post something by tomorrow if I don't suck. *crosses fingers*
    Last edited by ggs; 03-12-2002 at 09:35 PM.
    .sect signature

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. random numbers
    By mesmer in forum C Programming
    Replies: 4
    Last Post: 10-24-2008, 01:22 PM
  2. random to int?
    By psyadam in forum C# Programming
    Replies: 7
    Last Post: 07-22-2008, 08:09 PM
  3. Making a random array of integers
    By Vidak in forum C# Programming
    Replies: 2
    Last Post: 11-09-2007, 06:00 AM
  4. What's wrong with my Stream Cipher Encryption?
    By Davros in forum C++ Programming
    Replies: 3
    Last Post: 04-18-2002, 09:51 PM
  5. Best way to generate a random double?
    By The V. in forum C Programming
    Replies: 3
    Last Post: 10-16-2001, 04:11 PM