 |
|  |
 |
|  |
 |
|
Vev
|
 |
I am so out of touch
Nov 2000 time: 15:28
|
|
Here is the new encoding files
Pravda new encoding
They are NOT secure. It uses 7bit alphabet, (actually it removes the most significant bit), and is easy to break, (once you know what it does).
Use this code the spread "The Truth".
It is already compiled and run in under command prompt. It takes in 'read.txt' and outputs 'read2.txt'
to decode, it takes in 'read2.txt' and outputs 'read3.txt'.
Source code to compile on other platforms
/*
* for some reason %b isn't supported
*/
#include
#include
int main()
{
FILE *inFile;
FILE *outFile;
char ch;
inFile=fopen("read.txt", "r");
if (inFile==NULL)
{
printf ("error opening file.\n");
exit(0);
}
outFile=fopen("read2.txt", "w");
if (outFile==NULL)
{
printf ("error opening file.\n");
exit(0);
}
fprintf(outFile,"Starting Encrypted Transmission.\n");
while ( (ch=fgetc(inFile)) != EOF)
{
fprintf(outFile,"%i",((ch >> 6)&1));
fprintf(outFile,"%i",((ch >> 5)&1));
fprintf(outFile,"%i",((ch >> 4)&1));
fprintf(outFile,"%i",((ch >> 3)&1));
fprintf(outFile,"%i",((ch >> 2)&1));
fprintf(outFile,"%i",((ch >> 1)&1));
fprintf(outFile,"%i",((ch)&1));
}
fprintf(outFile,"\nTransmission Complete.\n");
return (0);
}
               
/*
* for some reason %b isn't supported
*/
#include
#include
int main()
{
FILE *inFile;
FILE *outFile;
char ch;
char chout;
int counter;
inFile=fopen("read2.txt", "r");
if (inFile==NULL)
{
printf ("error opening file.\n");
exit(0);
}
outFile=fopen("read3.txt", "w");
if (outFile==NULL)
{
printf ("error opening file.\n");
exit(0);
}
while ( (ch=fgetc(inFile)) != '\n') {}
counter=7;
chout=0;
fprintf(outFile,"Decrypting Transmission.\n");
while ( (ch=fgetc(inFile)) != EOF)
{
counter--;
if (ch == '1')
chout += (1 << counter);
if (counter == 0)
{
fprintf(outFile,"%c",chout);
counter=7;
chout=0;
}
}
fprintf(outFile,"\nTransmission Decrypted.\n");
return (0);
}
|
|
|  |
 |
|
Comrade Tassadar
|
|
quote: Originally posted by Vev
well not the code but provide them a paritial plaintext translation
Because the code may be reused for other ciphers |
Please come online.
|
|
|  |
 |
|
Vev
|
 |
I am so out of touch
Nov 2000 time: 15:28
|
|
It is C actually
It removes the most significant bit from a binary message so using only the ascii range 0-127.
They could do frequency analysis and hopefully realise something odd is going on.
Micha's code will be used for the beefed up security.
Last edited by Vev on 26-05-2003 at 11:59
|
|
|  |
All times are GMT. The time now is 05:28. Apolyton Time is 00:28. |
top of page
|
| archivepost |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|