Creating a Challenging Code with Simple Techniques

  • Thread starter dusty8683
  • Start date
  • Tags
    Code
In summary, Pieroot's friend put up a code on his away message and it was easy to figure out just guessing what it would be. Then Pieroot put up a code and gave every letter in the alphabet a number... a=1, b=2, etc and then used 4x^2 + 2x + 7 to make them into different larger numbers. One of Pieroot's smarter friends figured it out. I know all you people are a lot smarter than I am so I was wondering if you'd give me some suggestions on making one up that they wouldn't figure out. Thanks for any suggestions
  • #1
dusty8683
22
0
my friend put up a code on his away message and it was easy to figure out just guessing what it would be. then i put one up and i gave every letter in the alphabet a number... a=1, b=2, etc and then used 4x^2 + 2x + 7 to make them into different larger numbers. one of my smarter friends figured it out. i know all you people are a lot smarter than i am so i was wondering if you'd give me some suggestions on making one up that they wouldn't figure out. thanks for any suggestions
 
Physics news on Phys.org
  • #2
Pieroot(i^cx)

where pie is that weird irrational number which goes something liek 3.14... and so on


i is the square root of -1

c is the speed of light

and x is the number you assigned the letter.


that should keep him up for days
 
  • #3
not really, its simple as replacing letters with numbers, they will just look for the most common letter ( like E) then the second most common, if u want to good code goto www.pgpi.com its a Enciption thingy that the us government can't break
 
  • #4
Gelsamel Epsilon said:
not really, its simple as replacing letters with numbers, they will just look for the most common letter ( like E) then the second most common, if u want to good code goto www.pgpi.com its a Enciption thingy that the us government can't break
I wouldn't say that, that kind of analysis is only worthwhile when you have enough data to work with. You can't use that method to break the code when all you have is "Hi guys, I'll be back in a couple of days". The most common letters there are L, A and I.
 
  • #5
Why not just use RSA but with a relatively small composite number? One that would not take 1,700 computers and 8 months to crack...
 
  • #6
I really don't know a great deal about codes but you could try using to variable rather than one, for example the postion of the letter in the code.
 
  • #7
dusty8683 said:
I was wondering if you'd give me some suggestions on making one up that they wouldn't figure out.
Translate it to Chinese and assign each Chinese character to a LISP function. Compile and run the program and encode the output by using it as a seed to a random number generator. Then subtract one.
 
  • #8
the US government will take over 52 million years to crack Pgp's code fopr 1 person!
 
  • #9
The US government has a quantum computer that is capable of breaking any PGP code in a matter of minutes. Oops, did I say that out loud?
 
  • #10
Riko said:
Pieroot(i^cx)

where pie is that weird irrational number which goes something liek 3.14... and so on


i is the square root of -1

c is the speed of light

and x is the number you assigned the letter.


that should keep him up for days


uuh
Sqrt of -1 = ERROR
and its Pi, not Pie, and if u put i = sqrt of 1, the answer is 1 and therfore

(22/7)x root of 1^((3 x 10^8)x the number)

1 to the power of anything is 1 and the sqrt of 1 is 1 so 22/7 x 1 = 22/7

so every letter will come up as 22/7 so that doesn't work
 
  • #11
Gelsamel Epsilon said:
uuh
Sqrt of -1 = ERROR
and its Pi, not Pie, and if u put i = sqrt of 1, the answer is 1 and therfore

(22/7)x root of 1^((3 x 10^8)x the number)

1 to the power of anything is 1 and the sqrt of 1 is 1 so 22/7 x 1 = 22/7

so every letter will come up as 22/7 so that doesn't work
I do suggest you understand what you're talking about before talking about it. :smile:
 
  • #12
So what's the Sqrt of -1 chen?
 
  • #13
It is i. Do you not believe this just because your calculator says it's an error to the take the square root of -1?
 
  • #14
If you are still interested in cryptography, there are a number of books on the subject.

For starters, try Cryptanalysis by Helen Fouché Gaines, 1939, which describes some of the basics of this field.

Next, try Cryptanalysis for Microcomputers by Caxton C. Foster, 1982. I think computers are here to stay, so you may as well read up on the subject.

And then may I suggest 'Mathematical Cryptology for Computer Scientists and Mathematicians' by Wayne Patterson printed in 1987.

More items for you would be cryptographers:

Desirable characteristics of an encryption system:

The system must not increase the length of the message. If each character is converted to a ten digit number, pretty soon you will run out system capacity. The system must not be vulnerable to the loss or modification of one or more of the characters. If you have noise hits on the line, you may tolerate the loss of one or two characters, but it should not cause the entire message to be lost.

Modern encryption systems must be capable of handling massive amounts of data, so an attractive approach would modify each character by adding a digit from some infinite sequence such as pi or the national debt.

More bibliography:
Infinite Sequences and Series, Konrad Knopp
The Beale Papers, Library of Congress, 1885
Handbook of the Beale Ciphers, Per A. Holst
Fibonacci Numbers, N. N. Vorob'ev
The Decipherment of Linear B, John Chadwick
Cryptography, the science of secret writing, Laurence Dwight Smith
and of course, The Code Book, Simon Singh
 
Last edited:
  • #15
Also the "Code Book" by Simon Singh...a very easy read, being fun and instructive at the same time.
 
  • #16
Here's a simple trick that makes it harder to crack your code, especially for messages that are not huge : assign different numbers to each letter but assign more than one number as possible replacements for some of the less used letters.

Example :
a= 7
b=3,9
c =13, 5
d=11,8,2
e=15
f=1,10
...
...
q=4,6,12,17,19,33,27
and so on

This way, it's much harder to use "frequency analysis" to crack to code.

Also, the act of thinking up some polynomial function to make the numbers large does nothing to increase the difficulty of cracking the code. This is a wasted step.
 
  • #17
Chen said:
It is i. Do you not believe this just because your calculator says it's an error to the take the square root of -1?

So, go and make a message using that code, it won't work because u will have it like this

(22/7) x sqrt of ( i ^ (3 x 10^8) x) will = for any number of the letter the code will end up as if a = 26

(22/7) x sqrt of ( i ^ (3 x 10^8 )26)

that will be what will come up for A!, so why don't you go and write a message using that formula :-/
 
  • #18
Clearly, pre-multiplying by Pi or anything else doesn't help. And there's problems with using i^ cx. Such a function is strictly a "one-way" function (for large c, different x give the same value of i^cx, so knowing c doesn't help) unless c is small compared to the largest number that x can be. But if c is small enough then this adds no difficulty to the decryption.
 
  • #19
Actually, there are lots of sources about cryptography on the net, a search on NEC/IST you sure get lots of abstracts among which there are also many a nice tutorial...
Another downloadable source is from Penn univ (free lib), if that is of your interest...

But about cryptography that works with imaginary number, is that possible ? i haven't heard of this yet though...
 
  • #20
Gokul, you are really kewl again!
 
  • #21
Gelsamel Epsilon said:
So, go and make a message using that code, it won't work because u will have it like this

(22/7) x sqrt of ( i ^ (3 x 10^8) x) will = for any number of the letter the code will end up as if a = 26

(22/7) x sqrt of ( i ^ (3 x 10^8 )26)

that will be what will come up for A!, so why don't you go and write a message using that formula :-/
:rolleyes:

What makes you think that icx is the same for every x? First you go and prove this statement, and then we'll talk about me encrypting a message with the code.
 
  • #22
Chen said:
:rolleyes:

What makes you think that icx is the same for every x? First you go and prove this statement, and then we'll talk about me encrypting a message with the code.

If 'c' is indeed 3*10^8, then cx is a multiple of 4 for all integer values of x.
Let cx = 4k, say. Then icx=i4k=(i4)k=1k=1

QED
 
Last edited:
  • #23
Chen said:
:rolleyes:

What makes you think that icx is the same for every x? First you go and prove this statement, and then we'll talk about me encrypting a message with the code.


solve the problem for X = 20
 
  • #24
Hmm.. no response for a fairly large amount of time. Looks like you can't
 
  • #25
if it were me, i would use a system that had more systematic patterns, something they could figure out, but something harder. its no fun to just go use RSA or something.

what i would do is make a table of two letter combinations. 26*26=676.
so you need 676 unique numbers. you may generate them randomly. its best if they all have the same exact number of digits, don't use 1, 13, ... use all 3 digit numbers. if you want to start the number with a 0, that's ok. use a randomly generated table, but don't reuse any numbers, and for simplicity eliminate 111, 222, 333, 444, 555, 666, 777, 888, 999, and 000.

now that you have a table for all your two letter combinations (you might try writing a basic or c++ program to do these things for you, but its really simple) you can convert your code into a basic number stream. if you want, you can also use a 2 digit stream representing single letters at every x digit...
like, so... you would use a non repeating non rational number like pi or e.
if pi is 3.1415... you would skip the first three letter pairs of your message and then place a single letter with two digits. you would skip then 1 letter pair, then a single. skip 4 more pairs, then a single. then on and on... since pi never repeats, that shouldn't be easy to dicipher.

since the single code table and the triple code table won't have any correlation to each other and the pi pattern would be tough to recognize...
you could also use some sort of summing method on a translation of the original message. say, using the standard values for the letters, 1=a 2=b... sum the entire messages value, take the last number you get, use that as an interger multiple of pi, store that number as your very first number, and better yet, your very last number can be an integer multiple of the entire message...

another one i liked so much... I've been working on the code, but i haven't even put it on a computer yet. if anyone is super quick with c++ and will write one up and send it to me, id giggle like a school girl.

using the pi method again... choosing a random table for a=z with two digit characters... create a stream of digits by using the decimal place of the position of the given 2 digit character in pi. i haven't programmed this one yet, but its on my list.

http://www.cecm.sfu.ca/projects/ISC/dataB/isc/C/pi10000.txt

say you wanted to use 15, the 15 is the 3rd and 4th decimal place, so you would just have 03 for 15 and 15 would be some random letter youve chosen in your letter to table translator. you would want to set your level of digits to start with sort of high. id use 4 digits. if the first or only occurance of a letters two digit code is not 4 digits or more than 4 digits, remove it from the lookup table of letter-number translations. another option is to use a 5 digit stream, with the first digit of each group referring to the interger multiple of pi, and the following 4 say equal n. then 10^(4+n) is the multiple of required make the digits the first 4 from the left of the decimal place. you can use a program to move the decimal by 10^n and remove the whole numbers, then by 10^4 more, and truncate the decimal to get the exact interger value for your lookup table. is that a mind**** or what? your friends won't hack that by looking at it or using any basic predictions for common language patterns.
 
Last edited by a moderator:
  • #26
my code

Now you cooooould use RSA for a virtually unbreakable, but i think i have a truly unbreakable, not quantum crypto. Technically for it to be truly random you would need a radioactive dectector (ya know the things that click looking for radiation, raiation is one of the few things that is truly random but that's a different story) but I am sure you can do without. Now i don't know if you do but most people here probably know about the vigenere chipher (by the way i know this is unbreakable but i doubt that it hasn't been thought of before) i'll include a picture if i can...ok well then ill have to describe it, let's see...well i do have a 3 dimensional but that would take forever
i guess ill talk you through (if you are reading this and already know what a vigenere chipher is, just skip past this paragrapth) so it looks like a big square for starters, then you draw 25 lines from top to botom in the square (equally spaced if possible) and then 25 lines left to right (also equel) then, you extend the lines so that they come out a little on the left and the top, including the outline so that there is a corner in the very top left collor this corner in. Starting from the space right under the collored in corner, write the letter A, then continue down to Z, if you don't have enough room, i either explained wrong or you made a mistake, if so, just make room for it, there should be no extra spaces going down. The next step is to write the letter A to the right of the collored in corner and then continue with the alphabet going from left to right all the way to Z. That was the easy part, now starting with the A on the left side, continue the Alphabet to the right, you already have an A so the space inside the box goes from B to A again (it starts to repeat after Z) then you go down to B and continue the alphabet left to right from C to B starting over once you get to Z, continue this untuil all of the spaces inside the box are filled in and that is a vigenere chipher.

Now you have the vigenere chipher, but how to use it? well the books will tell you (or at least they told me) that it was used with a key, let's say you were going to code the letter H, you would find H on the left and then you would look at your key, the books say that most keys were 3 or 5 letters in length, so let's say the first keyletter was E, you would find E on the top, you would then trace you finger down the line for E and across the line for H untuill they met, that letter, incidently M, would be your codetext or the letter shown in your code. then you would move onto ecoding the letter E and you would use the letter M for a key, your next codetext would be R so sofar your real message is HE your key is EM and your codetext is MR, now to show you my code, i would like to point out that if i were to explain this in full, my plaintext would be Hello My name is Arsonade and my Key would have been Emily, do you see somthing wrong here? well the people who wanted to crack this kind of code did, they say that if, by chance, the same key were to be on the same beginning letter, it would produce the same codetext, after a while, people were able to break there codes in less than an hour. but i think there was a few things missed. Now some other observations one might make would be that Emily is a real word right? it's fairly common and so if only a few of the letters were found, it could probably be figured out, i realized this and thought why not just make a random key? so that's what i did, so now i had a 5 completely random letters for a key, but there was still a hangup. in every code that has ever been cracked, a key factor in it's loss of secrecy was patterns, what happens when the key gets to the fifth letter and the message keeps on going? well it repeats, but repitition can easyly form patterns, so even if the key i used was hard to figure out, it would still repeat and a long enough message would probably give it away. The answer and the true key (no pun intended) to ths code was this next solution, the key would have to be as long or longer than the message to obtain true secrecy, what does this meen? it meens that unless you plan on using the same key over and over again (whitch would eventually give you away) the answer would be to just use random letters as a key, so let's put it this way...

i started out with
HellomynameisArsonade (origional (also known as plaintext))
EmilyEmilyEmilyEmilyE (key)
MRUXNRLWMLJVBMQXBWMCJ (codetext)

Note: if you look closely you can see that many situations repeat such as A coded with L or N coded with I, or E coded with E the number of coincidences like that in just this short message could make this code extremely easy to crack, for example, with just the three coincidences above i know that the key repeats at roughly 5 letters and that three of those letters are E il , after a few guesses, i could make out Emily and then crack the code.

I then moved to rondomising the key so...:
HellomynameisArsonade (Plaintext)
MKNCJMKNCJMKNCJMKNCJM (key)(random 5 letters)
UPZOYZJBDWRTGDCBYO... (codetext) (i think i messed this one up, it takes a long time so i programed my Calc to do it for me, ill show you how afterwords)

Note: Now i know that i messed this one up, but i can assure you that if i had been paying attention :wink: i would have found coincidences such as E with M, N with N, or A with C, this would have given me the keytext of M NC , while in this case i would not be able to find the other letters becasue it is random, i would be able to get most of the Plaintext and guess the rest, it might fool the codebreaker that we started off with, but if they spent a little more time on it, the code would be broken

After all that, i came up with this soulution...;
HellomynameisArsonade (plaintext)
OHHJWURKCXVBNLAEMCIRG (Key) (random letters-no repatition, just random)
WMTVLHQYDKAKGMSXBQJVL (Codetext) (generated along with ky by calc program)

Note: This is it, this code is the last one, there may be coincidences, but the key is as long as the code, even if the code cracker finds the plaintext, he will have no way of knowing wheather that is the real plaintext, the real plaintext could be Armyglassesarentfunny or Monkeyslovetoabdicate or anything with 21 letters in it, there is no way of decrypting without the Key.
(to decrypt, just find the keytext letter on the top, then follow down untuill you come to the codetext letter, then follow that going right untuill you get to the far left, that would be the plaintext, for example, you have the key E and the Code M, so you would find E on the top and follow down untuill you came to M, then you would follow to the right all the way untuill you got to H, whitch is that plaintext.)

So there you have it, the answer is to have a key as long as the message made completely of random letters.

Now for the flaws, if you have tried this whole thing already, you know that it takes a long time to do, you also would notice that if you somehow managed to encrypt a long message, like a book, you would have to carry around that key, assumingly as long as the book, this is a nuicance, luckilly, technology steps in. nowadays, thousonds of different keys could be stored on a computor simply as Word documents and you could just open it for decoding, one of the major reasons this way was dropped was that RSA encryption was almost as unbreakable and only had a relitavly small key, but this code is truly unbreakable, just annoying. if you have a grapthing calculator, chances are you can program it to do this for you, but a lot of people don't and so as soon as i learn how to program a computor, ill make it a program. in the mean time, i wrote this on a TI-83+ calc and it will probably work on all other calcs, here goes;
(find things like Lbl and Output( in the catalog if your calc has it)
0->A
0->B
0->C
Lbl 1
ClrHome
Output(1,1,"Program made to give you a codetext and keytext from a plaintext, letters represented as 1-26"
Pause
ClrHome
Lbl 2
ClrHome
Prompt A
Lbl 3
randInt(1,26)->B
Disp B
Pause
Lbl 4
A+B->C
Lbl 5
If C ::is less than or equal to, looks like a < with a _ under it:: 26
Goto 6
If C>26
Goto 7
Lbl 6
Disp C
Pause
Goto 2
Lbl 7
C-26->C
Disp C
Pause
Goto 2

Notes:-> is what i used for what looks like an arrow pointing left, this program asks you for your plaintext by saying A?, at that, you should type in the number version of your letter (a=1, b=2, c=3, ect.) and be sure to use only one letter/number at a time, after you type in your number and press enter, it will pop up another number, this is your keytext, just convert it to letters (example: if it says 23, the keytext is W, if 14, the Keytext is N, ect.) and write it down. press enter again and it will give you your codetext in the form of a number, again, convert it to letter and write it down. pressing enter again will bring you back to A?, to exit, just get to the A? and press quit (on mine it is the 2nd key and then Mode) and then clear and that's it.

Well that's it, i call it the ultimi cipher as i don't know of any other person who has come up with it. If you think it is any good, use it, if not, try RSA, this is just easyer to learn. (plus who sits around counting prime numbers all day lol)

Best of luck,
Adam

P.S. check out my other post, https://www.physicsforums.com/showthread.php?p=199655#post199655

P.P.S. Well i almost forgot, the reason i was searching forums on codes is that i have a question myself, how would one crack a code in codetext, what i meen is, how would one crack a code where words are replaced by other words, there's no sign of nomenclatcy (combo of code and cipher), just code any idea? there doesn't appear to be much if any repetition, its not that important, just currios

P.P.P.S. any questions/comments, e-mail is AdamChess4@aol.com
 
  • #27
Gokul43201 said:
Also the "Code Book" by Simon Singh...a very easy read, being fun and instructive at the same time.

thats my source!

Also, yeah, i could be used, (i meaning imaginary number) but you would wind up with answers like ihieililio imiy iniaimie iiis iairisioiniaidie assuming that's your codetext, using i really isn't necacary, its just confusing, the speed of light thing? that's a determined number you know, i forget what it is, its just a really big number, you code would have worked without it. the square rot of -1 is the definition of i, its a number that doesn't exist, its used for squareing negitive numbers, like the square root of -81 would wind up being i square root of 81, (lets say ~ is the square root sign) so it would be from ~-81, and since that isn't a real number, it would be i~81, whitch would come out to i9, this doesn't work, i think (no offence) you just put the most complex math theories you know together and tried to work with them, read the code book, it should give you an idea or too.

Adam

P.S. I am only a shophmore and i know wat i is, comon people lol.
 
  • #28
The idea to use 'i^cx' was probably borrowed from the exponential step in rsa type ciphers. This definitely does not work with the base i, because, it is a purely one-way function (as proved above), and encrypted information is lost.

The idea of using long keys for Vigenere ciphers is not a new idea. That this definitely adds security is undoubted. However, if you store the key on your computer, you'd better have a good firewall to prevent snoops from getting at it. That's why people prefer keys that are shorter and meaningful, so they can be memorized.

It's cool what you did to program a Vigenere grid and key into your Calculator. I myself, have only written programs on computers. Didn't know you could do so much on a calculator.

PS : Could you restate your question more clearly, with perhaps some kind of example. And when you say 'codetext' do you mean 'ciphertext' ?

PPS : There's a fun freeware windows game on the web. I think it's called Crypto! or Krypto! It basically gives you monoalphabetic substitution ciphers with spaces between words. It also counts letters for you. So, it's really easy to do, but it's also fun to get good at.
 
  • #29
Gokul43201 said:
The idea to use 'i^cx' was probably borrowed from the exponential step in rsa type ciphers. This definitely does not work with the base i, because, it is a purely one-way function (as proved above), and encrypted information is lost.

The idea of using long keys for Vigenere ciphers is not a new idea. That this definitely adds security is undoubted. However, if you store the key on your computer, you'd better have a good firewall to prevent snoops from getting at it. That's why people prefer keys that are shorter and meaningful, so they can be memorized.

It's cool what you did to program a Vigenere grid and key into your Calculator. I myself, have only written programs on computers. Didn't know you could do so much on a calculator.

PS : Could you restate your question more clearly, with perhaps some kind of example. And when you say 'codetext' do you mean 'ciphertext' ?

PPS : There's a fun freeware windows game on the web. I think it's called Crypto! or Krypto! It basically gives you monoalphabetic substitution ciphers with spaces between words. It also counts letters for you. So, it's really easy to do, but it's also fun to get good at.

I had a fealing it wasn't too origional, but have you ever seen these new USB port mini Memory card,i saw one with 80MB and it was smaller than a floppy, that's what i meant. Yeah you should see what can be programed with these things, go to ticalc.org (theres a better sight, i jus can't renember it now, then even have people programing mario into the calcs lol. as for my question i did meen codetext, a chipher really by definition (pg 30 in the Code Book) works with letters, a code by definition works with whole words, in this case, whole words being replaced by whole words, like i got the message "frog pants leap an sugar king lost" as a title, each word represents a different word.ill check out Krypto later, now, i got to get 2 sleep lol.

Adam
 
  • #30
The problem with a 'code' would have to be the size of the key. I know codes were used in medieval times. Something like a code (actually, just a refined translation) was used by the Navajo Windtalkers in the Pacific Theater during WWII. This is probably talked about in the Code Book - can't remember, it's been a while since I read it.

There is no algorithm for cracking a code where each word is replaced by a specific word (except possibly, for articles, conjunctions, etc - which may be avoided or minimized). There will be repetitions only if a word is repeated. To crack a code like that would possibly need some knowledge of context. Sheer, brte force analysis, won't really work. You'll have to use tricks like the Brits did to crack Enigma...like leaking seed info and looking for it in transmissions.
 
  • #31
Set yourself up a square matrix that has a determinant of 1 (that way, it's inverse will be all integers, as well). A larger matrix is harder to crack but also harder to construct. Code your letters as A=1, B=2, C=3, etc. Cycle them through by a set number each time. (If you're using a 5 x 5 matrix, cycle in 5 letters to make a 5 x1 matrix, for example). Multiply your encoding matrix by the sequence of letters you're encoding. Your message is coded.

To decode, mutliply the inverse of your matrix by the coded letters (5 at a time if you're using 5x5 matrix, 6 if you're using 6x6, etc).

As a simple example, using a 3 x 3 matrix:

[tex]\left(\begin{array}{ccc}3&4&2\\5&3&8\\4&5&3\end{array}\right)[/tex]

Encode A, B, C where A=1, B=2, C=3 by multiplying

[tex]\left(\begin{array}{ccc}3&4&2\\5&3&8\\4&5&3\end{array}\right)\ast\left(\begin{array}{c}1\\2\\3\end{array}\right) = \left(\begin{array}{c}17\\35\\23\end{array}\right)[/tex]

To decode, multiply the inverse of your encoder matrix by the coded text:

[tex]\left(\begin{array}{ccc}-31&-2&26\\17&1&-14\\13&1&-11\end{array}\right)\ast\left(\begin{array}{c}17\\35\\32\end{array}\right) = \left(\begin{array}{c}1\\2\\3\end{array}\right)[/tex]

Obviously, you'd want to use a larger matrix than just a 3x3. With a 3x3 matrix, 1/3 of all your 'the's would be encrypted together, making it pretty easy to spot them. Once a person decrypted the word 'the', they'd have the whole key and could figure out the rest of the message.
 
Last edited:
  • #33
Neat ! Never seen this before. Also, this is the first time that I've seen the i'th ciphertext character be a function of more than just the i'th plaintext character (and elements of a key).
 
  • #34
Gokul43201 said:
The problem with a 'code' would have to be the size of the key. I know codes were used in medieval times. Something like a code (actually, just a refined translation) was used by the Navajo Windtalkers in the Pacific Theater during WWII. This is probably talked about in the Code Book - can't remember, it's been a while since I read it.

There is no algorithm for cracking a code where each word is replaced by a specific word (except possibly, for articles, conjunctions, etc - which may be avoided or minimized). There will be repetitions only if a word is repeated. To crack a code like that would possibly need some knowledge of context. Sheer, brte force analysis, won't really work. You'll have to use tricks like the Brits did to crack Enigma...like leaking seed info and looking for it in transmissions.

Yes it did mention the navajos, i see what you meen, i got them in some spam messages i was reading (not the smartest thing i know lol) so it's not really important that i know or anything, and i don't think i would make a very good spy with a broken leg lol so i guess that's it.

Adam
 
  • #35
After playing with the matrices a little, I decided it's not that easy to construct a good matrix (but I've almost never had to deal with matrices bigger than 3x3). The format the SOS page used gave me an easier idea.

Rather than mess around with bigger matrices, you can vertically encode the text during encryption to get rid of the patterns.

Your text is arranged in frames and superframes. Each frame can be any number of letters long (I used 15 - that seemed long enough). Each superframe is 3 frames long.

The text is entered sequentially in each frame (horizontally), wrapping around to the next frame when the end of one is reached (just like reaching the end of a line). When encrypting, the entire superframe is encrypted vertically (with a 15 character frame, that means characters 1, 16, and 31 are encrypted together; 2, 17, and 32 are encrypted together; 3, 18, and 33 are encrypted together; etc). With a 15 character frame, the entire message winds up being sent in 45 character blocks. That eliminates your patterns, at least good enough for amateur purposes.
 

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
886
  • STEM Academic Advising
Replies
11
Views
1K
  • General Discussion
2
Replies
43
Views
4K
  • Programming and Computer Science
Replies
3
Views
680
  • General Discussion
Replies
6
Views
874
Replies
1
Views
524
  • General Discussion
Replies
1
Views
731
  • Programming and Computer Science
Replies
4
Views
1K
  • Programming and Computer Science
Replies
2
Views
628
Back
Top