Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

Creating my own Encryption


ghost's Avatar
0 0

I am going to create my own encryption, and I was wondering if any of you guys have some advice, or maybe one of you guys made your own encryption and you might have some useful tips on what to, and what not to do?

I was thinking of a CBC bases encryption (Cipher Block Chaining). and I am going to code the encryption/decryption program in C++.

any suggestion or advices are gladly appreciated.

EDIT: if you know any good literature / articles / e-books/ whatever, just post them

-CL-

PS. yes I know you don't just create an encryption in a week, I am willing to spend a year or more on it if necessary

EDIT: by the way: I am not doing this alone

EDIT: just noticed that stupid me put this topic in the wrong place… sorry about that…


ghost's Avatar
0 0

good starting point is to translate it into easily algorithmed hex/numbers e.g. to binary.


ghost's Avatar
0 0

How about creating the text you want to decrypt with 12 passwords. All passwords are relative to each other, and when entered all twelve they will produce a message. If someone enters a wrong pass, the text at the end becomes trash. This way nothing of interest can be viewed in the source. Brute forcing 12 passwords (with 12 chars each?) takes a long time. The only problem is writing an algorithm for this..

you get that? :P


ghost's Avatar
0 0

Like mr_noob said it's a good idea that your algorythm start by taking all caracter and coverting them into there ascii value so that ­you can easily use them. After that you can make it like you want. What's also great is that the output of your encryption should always have the same amout of caracter like md5 and sha1.


ghost's Avatar
0 0

spyware wrote: How about creating the text you want to decrypt with 12 passwords. All passwords are relative to each other, and when entered all twelve they will produce a message. If someone enters a wrong pass, the text at the end becomes trash. This way nothing of interest can be viewed in the source. Brute forcing 12 passwords (with 12 chars each?) takes a long time. The only problem is writing an algorithm for this..

you get that? :P

that would be very f*cked up to remember, if you have 3 differently encrypted files you would have to remember 36 passwords…

and i want it to be able to encrypt anything, not just text….

and finally; CBC also gives every block a different encryption, only with only 1 pass + an IV

EDIT: PS. good luck with your exams tomorrow spyware, I'll see you at school :P

@arto :

i want the encryption to be reversible, thats why im going for CBC and if the output always has the same length this is gonna be impossible

@ mister noob

already thought of that, just need to figure out what the best way to code the algorithms etc is


ghost's Avatar
0 0

I think you understand that anything you produce will not likely be the best option available for you. There's plenty of freeware. That being said, I think this is a great opportunity to learn.

This is one of the only places I'd really recommend learning asm, and learning about compiler workings. At some point, you're going to want to know exactly how your c++ translates into bits and bytes, at least if you want it to be fast and secure.

Gathered this from wikipedia: In the cipher-block chaining (CBC) mode, each block of plaintext is XORed with the previous ciphertext block before being encrypted. This way, each ciphertext block is dependent on all plaintext blocks processed up to that point. Also, to make each message unique, an initialization vector must be used in the first block

and this from network sorcery: Some commonly used block cipher algorithms are IDEA, RC2, RC5, CAST and Skipjack.

so pretty much, you divide the plaintext into chunks of say 128b, XOR the first chunk with some randomness(Initialization vector, kinda part of the key), encrypt it with one of the above algorithms (using the rest of the key), and then use the result as the initialization vector in the next round.

As for implementing one of the above algorithms without using the standard library, or for writing your own block cipher, that's way over my head.


ghost's Avatar
0 0

You need to think of a very complex algorithm, give it a long string (2048bit is great ) use a combination of letters, numbers, symbols, nonstandard characters (but are ascii characters) and stuff like the cyrillic language, arabic, japanese, hebrew, and possibly a combination of them all.


ghost's Avatar
0 0

I may be indiscreet but I have to ask you: Why are you not using AES ?

At least, read about AES, see how it works and start your work based on that algorithm. I think that AES is an example of simplicity and could be easily extended.

But, first, define your goals: strength, speed, simplicity and so on.

Or, if you want more, take a look at public key encryption algorithms.


ghost's Avatar
0 0

What is this, colossal bump week? :angry: If the thread is long dead, leave it that way unless you have something MEANINGFUL to add.

For example, asking someone why they don't choose to use AES when they state clearly that they "want to create their own encryption"… is stupid.


ghost's Avatar
0 0

…about thread bumping, today it was listed on the main page in the "Latest Active Forum Threads" section and I did not look at the dates.

…and the question about AES is not stupid if you read the next part: "derive from AES".


ghost's Avatar
0 0

just watch for collisions :happy: