Encrypt\Decrypt help... 
Author Message
 Encrypt\Decrypt help...

First I would like to say THANKS!!!  to all the people that have helped in the
past.  This board is very helpful.  Yet, I have another problem.  I need to
make a Pascal program to encrypt\decrypt a file.  Here goes:

I must use Length, ord, and concat.  Optional are copt and str.  No parameters
please...  It reads from a file then adds 13 to the ascii value and saves the
encryption to another file.  Then reads that file and subtracts 13 and saves
the dycrypted file to another file.  Could someone PLEASE just help me start it
out or give the prog to me... Thanks SOO MUCH, once again.

Thanks in advance.



Fri, 28 Mar 2003 03:00:00 GMT  
 Encrypt\Decrypt help...
On 09 Oct 2000 21:15:18 GMT, TPJr11 posted:

Quote:
>First I would like to say THANKS!!!  to all the people that have helped in the
>past.  This board is very helpful.  Yet, I have another problem.  I need to
>make a Pascal program to encrypt\decrypt a file.  Here goes:

>I must use Length, ord, and concat.  Optional are copt and str.  No parameters
>please...  It reads from a file then adds 13 to the ascii value and saves the
>encryption to another file.  Then reads that file and subtracts 13 and saves
>the dycrypted file to another file.  Could someone PLEASE just help me start it
>out or give the prog to me... Thanks SOO MUCH, once again.

>Thanks in advance.

Since I'm SURE you wouldn't ask us to do a homework assigment for you, and
since it'd be very hard to give much more precise instructions than your
teacher ... er..boss has already done, I'll point out that this is a LOUSY
encryption scheme!  Any 8 year old with a statistical calculator can break
that scheme in about 20 minutes!  I even wrote a neural net as an undergrad
which would break the scheme (called a Julius Ceasar cipher after the first
guy known to have thought of it) even if the language of the text wasn't known
(assuming it was English, Frech, German, or Swahili <grin>; probably didn't
even need the net, but it was for my AI class and the goal was to learn how
neural nets work).

At least take a key and vary the amount you add/subtract by values in the
key.  For instance, if the key is, "hello," add the ASCII value (which you
get from the aforementioned ord function) of "h" for the first character,
the ascii value of "e" for the second character, the ascii value of "l" for
the next two, the ascii value of "o" for the 5th, then loop back to the "h"
again.  Even that's not secure by any stretch of the imagination, but at
least it provides SOME obscurity. :)  What I'd do for this excercise is to
take the key, sum its ASCII values, and use that as a seed to the random
number generator, then add the results of the random number generator
(new_ascii_value := old_asvii_value + random()).  Coming back out you seed
the generator with the same value so you get the same stream of random
values (it's not truly random, obviously).  That would still be far from
secure, but would take a bit of sophistication to break -- it would look
statistically random, assuming you had a good rng and the text was
reasonably short.

--




Sat, 29 Mar 2003 10:29:24 GMT  
 Encrypt\Decrypt help...
Ok.  I know its easy to break, but thats what he told us to do.....


Sat, 29 Mar 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Encrypt\Decrypt HELP...

2. Encrypting/Decrypting

3. Encrypt/Decrypt

4. Encrypt/Decrypt Procedure

5. Encrypting and decrypting data

6. Encrypting /Decrypting ...

7. wanted: enc/decrypt programme

8. Encrypting text stored in inidividual database records

9. Using ADO with Encrypted/Password Protected Access databases

10. Encrypting TClientDataSet field values

11. using encrypted access database

12. Encrypting Program with PDOX tables

 

 
Powered by phpBB® Forum Software