• 0

creating an encryption


Question

Hey everyone, 

before I start I will say yes I know its never recommended to do your own encryption...stick with what is tried and tested...BUT I want to better understand how it works and rather then pulling apart a method I would rather create one... 

with this I need some where to start reading/looking, yes google is my friend, but there is so many ways I can phrase a question and so many sites I thought I would just see if anyone can point me in the right direction...

obvisouly I wish to start quite low and just work with creating a basic 128bit but while I know how to manipulate bytes I am not quite sure on the formula for this (does not have to programming language specific, as obviously it just the theory and logic I wish to see)

 

thanks guys :) 

Link to comment
Share on other sites

10 answers to this question

Recommended Posts

  • 0

This is a nice flash animation that will show how AES works: [link]. It's pretty easy to understand, but it does nothing to explain why it's secure. That's something which would require years of study to fully understand.

 

Just for fun, I designed my own block cipher once. I got a small kick out of it when it actually worked (successfully encrypted and decrypted a string). It's an interesting topic to explore but one I never expect to have an ounce of expertise in.

Link to comment
Share on other sites

  • 0

Google encryption theory, try to find a university course or a serious book, it's very math-heavy and you won't find this in any easy tutorial. It's very easy to make something that looks secure, it's very hard to prove that it is. I had a course on security in university and while we studied encryption methods, we didn't get into any formal proofs of their robustness. That's kind of dark magic as far as I'm aware.

Link to comment
Share on other sites

  • 0

Think of a simple example a=1 b=2 etc and amplify that by whatever your own mind can come up with to make it your own. You could combine 2 existing encyption methods (or more) and add your own twist to make it harder to calculate (although this would take long enough to make it viable anyway). The sky really is the limit!

Link to comment
Share on other sites

  • 0

some encryption method that are easy to made were usually:
- Single key meaning it use the same key for encoding & decoding process.
- Symmetrical process encoding & decoding process are virtually the same, the only difference is the input, plaintexts for encryption, chippertexts for decryption process.
- Encryption process for current block, are not influenced by result of previous blocks.


And here an example to using 128-bits hashing as key processor.

Key: Text or a File, in arbitrary length
PlainText: Stream of bytes, or a file that will be encrypted.
In this example the Plaintext are chunked into series of 128 bits.

P1 = the first 128 bits of PlainText
P2 = the second 128 bits of PlainText
P3 = the third 128 bits of PlainText
P4 = the fourth 128 bits of PlainText
...
Pn-1 = the (n-1)th 128 bits of PlainText
Pn = the remaining 128 or less bits of PlainText

So, the whole PlainText can represented something like:
P1+P2+P3+P4+...+Pn-1+Pn

Process:

Step-1
K1 = MD5(Key) which will be 128-bits digest
C1 = P1 XOR K1

if Exist P2:
Step-2
K2 = MD5(Key+K1)
C2 = P2 XOR K2

if Exist P3:
Step-2
K3 = MD5(Key+K2)
C3 = P3 XOR K3

if Exist P4:
Step-3
K4 = MD5(Key+K3)
C4 = P4 XOR K4

...
Step-n
Kn = MD5(Key+Kn-1); Kn size are to be truncated to match the length of Pn
Cn = Pn XOR Kn


The output will be:
C1+C2+C3+C4+..+Cn

And as always: no matter how complicated the encryption process,
if the method AND the key is known, its will be worthless.
security.png

  • Like 2
Link to comment
Share on other sites

  • 0

It's very complicated. Leave bits aside for a moment. Start with Caesar cipher, proceed with Vigenere.

 

 

Dammit, look at the clock!

Hi thanks for replying xD yea I have already done these before and quiet good at deciphering... but im more trying to look at higher standards... I mean sure shifts, enigmas all that great and simple ...but I understand cryptogrophy ... im just more looking at the bits side of things now what to do with them in order to make it decodable later keeping the information viable and so s#forth 

Link to comment
Share on other sites

  • 0

This is a nice flash animation that will show how AES works: [link]. It's pretty easy to understand, but it does nothing to explain why it's secure. That's something which would require years of study to fully understand.

 

Just for fun, I designed my own block cipher once. I got a small kick out of it when it actually worked (successfully encrypted and decrypted a string). It's an interesting topic to explore but one I never expect to have an ounce of expertise in.

I will watch this video :) you may have to explain to me your method ;D once the ball gets rolling I should be able to develope better techiniques intime I just always have trouble starting something

Link to comment
Share on other sites

  • 0

Google encryption theory, try to find a university course or a serious book, it's very math-heavy and you won't find this in any easy tutorial. It's very easy to make something that looks secure, it's very hard to prove that it is. I had a course on security in university and while we studied encryption methods, we didn't get into any formal proofs of their robustness. That's kind of dark magic as far as I'm aware.

I do study computer science and am working towards my CCNS as well as writing a large research paper towards secure communication + developing the means for a secure communication method to standards used in the MOD/DOD (depending where you are from).... but sadly I wont be able to use my own methods in it (encryption methods) as obviously it would take a long time to sort out a decent method test it and so on...I am very good at maths in the terms of calculations, logic, complexity and theory but like i said this is just for fun I don't expect an easy ride..but at the same time I am trying to avoid reading a book untill I get pass the basic of creating an encryption algorithm .##(if you catch my drift) I cant learn through reading E-books and affording the real ones for a hobby? ehh 

I have my lift time to learn more for the length of time it will take is very little importance :) (I love learning <3 and am always studying personal interests )

Link to comment
Share on other sites

  • 0

Think of a simple example a=1 b=2 etc and amplify that by whatever your own mind can come up with to make it your own. You could combine 2 existing encyption methods (or more) and add your own twist to make it harder to calculate (although this would take long enough to make it viable anyway). The sky really is the limit!

ye I have though alot about the mathematics (normally while i am having a poo....thought i would share this) and the maths is easy and i have tons of theories...but at the moment I dont really understand the whole bit manipulation process I guess is where i need to start

Link to comment
Share on other sites

  • 0

some encryption method that are easy to made were usually:

- Single key meaning it use the same key for encoding & decoding process.

- Symmetrical process encoding & decoding process are virtually the same, the only difference is the input, plaintexts for encryption, chippertexts for decryption process.

- Encryption process for current block, are not influenced by result of previous blocks.

And here an example to using 128-bits hashing as key processor.

Key: Text or a File, in arbitrary length

PlainText: Stream of bytes, or a file that will be encrypted.

In this example the Plaintext are chunked into series of 128 bits.

P1 = the first 128 bits of PlainText

P2 = the second 128 bits of PlainText

P3 = the third 128 bits of PlainText

P4 = the fourth 128 bits of PlainText

...

Pn-1 = the (n-1)th 128 bits of PlainText

Pn = the remaining 128 or less bits of PlainText

So, the whole PlainText can represented something like:

P1+P2+P3+P4+...+Pn-1+Pn

Process:

Step-1

K1 = MD5(Key) which will be 128-bits digest

C1 = P1 XOR K1

if Exist P2:

Step-2

K2 = MD5(Key+K1)

C2 = P2 XOR K2

if Exist P3:

Step-2

K3 = MD5(Key+K2)

C3 = P3 XOR K3

if Exist P4:

Step-3

K4 = MD5(Key+K3)

C4 = P4 XOR K4

...

Step-n

Kn = MD5(Key+Kn-1); Kn size are to be truncated to match the length of Pn

Cn = Pn XOR Kn

The output will be:

C1+C2+C3+C4+..+Cn

And as always: no matter how complicated the encryption process,

if the method AND the key is known, its will be worthless.

security.png

the algebra seems simple enough but i will have to google some of the big words (I have terrible english)

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.