News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

[SCT]ModCAE String Crypter

Started by bluedevil, August 04, 2012, 09:18:20 AM

Previous topic - Next topic

bluedevil

Hi all,
This is a small app that rotates strings. The logic comes from the famous Caesar Ciper (ROT13). I have modified and widen the range of characters. This was written beacuse of request. I wanna share the sources. I am working on RadASM so in the rar package, there is a RadASM Project =)

Briefly how the code works:
1. I equate the  Space ve Tilde(~) characters.
2. I divide the other 92 characters to 4
3. [21h : 37h]   [38h : 4Eh]
       \ /
       / \
   [4Fh : 66h]   [67h : 7Dh]

And i equate these 4 parted character groups cross like above.At the
end there occured a different Caesar cipher String crypter.


Any comments and critics are welcome =)

edit: removed download link, added attachment
..Dreams make the future
But the past never lies..
BlueDeviL // SCT
My Code Site:
BlueDeviL Github

hutch--

blue_devil,

I had a look at your site and while it has some good assembler code and references, unfortunately it also has cracking related material on it as well. We cannot allow the link because it can get US into trouble, could you either remove the link OR put the cracking stuff elsewhere so it does not show up on the link from this forum.

Albert_redditt

I sat and thought about Data-Encryption for some time.
Back in 2009 in the U.S. you could write any-type of encryption as long as the source-code was included.

So i thought that the only way to get around the law was to scramble the data-bits and allow the user to select the scramble order.
That makes it private Key though.

And then just to make it harder to crack,
You generate random bits , several times the data-bits , and then let the user scramble their data across the whole spectrum of garbage.

I thoguht it might be like taking a message made of nuts and bolts and throwing them into a pail with a bunch of other nuts and bolts,
and saying "Here pick out the message!"


The Prog below is in BASIC,  FNXBasic an interpreter.   But the Encryption Idea can be ported to any computer or other language.

I was also thinking about using pictures,gifs,mov,mp3 etc.. where you up a pixel color by 1 bit for a 0 and 2 bits for a 1. ????


jj2007

Quote from: Albert_redditt on August 05, 2012, 10:30:29 AM
I was also thinking about using pictures,gifs,mov,mp3 etc.. where you up a pixel color by 1 bit for a 0 and 2 bits for a 1. ????

Hi Albert,

First things first: Welcome to the Forum :icon14:

Your approach works, of course. Manipulating gifs works, too, and would be a good exercise in assembler. Such things work in the sense that you can hide stuff from your friends and colleagues - but not from a professional who is really interested in what you are sending by email... ;-)


   e = len(textin)   
   for counter = 1 to e step 128
      bin = ""
      for b=0 to 127
         if counter+b <=e then
            a = ASC ( mid$(textin,counter+b,1))
            bin = bin + right$("00000000" + bin$(a),8)
         else
            bin = bin + right$("00100000" ,8)
         end if

Albert_redditt


I use FreeBasic alot , by setting the command line to -r it spits out the *.asm file.

OxygenBasic also spits out 32 or 64 *.asm within the IDE.

The

         else
            bin = bin + right$("00100000" ,8)

        it pads the end of the mesage to the block size with spaces ,
        if you remove it it just ends the DeCyphered mesage with garbage.
        and leaves you wondering if theres more to the message.
       
Heres A version I ported to FreeeBasic.

bluedevil

@hutch-- ,thanks for your comment, i have removed the link, added an attachment of file 8)

@Albert_redditt, thanks for your samples.
..Dreams make the future
But the past never lies..
BlueDeviL // SCT
My Code Site:
BlueDeviL Github

hfheatherfox07

@blue_devil   
It would be nice if Cyph1024V2.zip was commented in English.... I always use Google Translate to translate comments in source codes but, It is never ...or almost never what the Author intended to say especially with technical jargon ..... Google Translate is not very God at that!

In chance of an English version in the future?
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

bluedevil

Quote from: hfheatherfox07 on August 18, 2012, 03:08:40 AM
@blue_devil   
It would be nice if Cyph1024V2.zip was commented in English.... I always use Google Translate to translate comments in source codes but, It is never ...or almost never what the Author intended to say especially with technical jargon ..... Google Translate is not very God at that!

In chance of an English version in the future?
@hfheatherfox07, dude Albert_redditt had attached that file not me.

But i checked my file and it is full of Turkish comments. I think you want to mention that. It is all my fault. I am so sorry. I totally attached the wrong one :icon_eek: But dont worry here is the English commented one. Thank you for informing me, beacuse that means someone examines the codes :t

Regards
..Dreams make the future
But the past never lies..
BlueDeviL // SCT
My Code Site:
BlueDeviL Github

hfheatherfox07

Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

Albert_redditt

Quote from: hfheatherfox07 on August 18, 2012, 03:08:40 AM
@blue_devil   
It would be nice if Cyph1024V2.zip was commented in English.... I always use Google Translate to translate comments in source codes but, It is never ...or almost never what the Author intended to say especially with technical jargon ..... Google Translate is not very God at that!

In chance of an English version in the future?

I didn't comment any of it, with Cyph256 , Cyph512 , Cyph1024.  The two latter are just expansions of Cyph256.

All three above and Silly-Cypher are on the FNXBasic forum.  http://www.fnxbasic.com/cgi-bin/yabb2/YaBB.pl?num=1246910618

(Silly-Cypher just takes the message and breaks it into 2 bit chunks and puts a random bit in front of each to make 3 bits and then replaces the 3
bits with one of 8 somethings you type in the 8 edit boxes.)


For the Cyph, 256 , 512 , 1024
The code starts with creating all the controls.

The interpreter doesn't have a Win_Proc or Win_Main , it just loops until a control is clicked and then jumps to the sub you set it to goto.
The subroutines are are pretty self explanatory

Generator()  creates the key
Cypher()      cyphers the message
DeCypher()  decyphers the message
Saver()        saves the key to file

Basically you don't actually need the TabCtrl with 16 pagres and 1024 edits,
I put that in there in case you don't like using randomized numbers.
As random numbers are generated by an algorithim and reproducable.  you could write you own key.

Basically it goes like this:

1)Get user message

2)Turn message into binary

3)Break user message into message_bit_block lengths

4)Generate a garbage_bit_block, greater than the length of the message_bit_block

5)Take the users scramble order , ( any combination of 1 to length of garbage_bit_block. (but of course each must be unique.))

6)Scramble the message_bit_block into the garbage_bit_block.

7)Go back to step 4 until the last message_bit_block is processed.

8) output the scrambled message.

With the above steps it should be easy to put into *.ASM

WRANING!!  The program reuses the same key for each garbage_bit_block.
The key is saved as a *.key file and is just plain ascii text.
(you got to put your own key cypher in it. If i put it in the code then anyone could hack it.)


Albert_redditt

Its probably possible, to use the same garbage bit in the key, for multiple message bits.

Where; instead of each message bit having a unique location in the garbage_bit_block , you might be able to reuse locations.
But i don't know about how you would use the same key for each block.

I was thinking maybe it would be possible to have the output be all 1's or all 0's  or half & half ???