I was doodling as one does. And thought of an encryption method which could be hard to crack.
To simplify it....
the first block would be A to Z in alphabetical order, and underneath would be the same letters but scrambled. So to encode the word DADDY, you look along the topline for the letter D and then look directly beneath to get the encoded letter.
To encode the next letter 'A' you would not use the same block but go to the next block of A-Z and get that encoded letter, which would be a different scramble and so on until you get to the end of the word. All three 'D''s would have different encoded letters because they came from different scrambled blocks ie...
A-Z A-Z A-Z A-Z A-Z
??? ??? ??? ??? ???
The next word would start at block one again. You would need as many A-Z blocks as there are letters in the longest word.
I wonder if this encyption has a name? I am sure it must have been thought of already.
I was going to write a program in PB just for fun.
Anybody have any comments?
Alan
encryption thoughts
encryption thoughts
PB v3.94 PVXP v2.13 JaPBe v2.5.4.22
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
I came up with something similar years ago, where I made tables that you could choose a substitute for each character from, and it would be a different choice most of the time. It seemed strong, but in reality is much weaker than modern methods. It is vulnerable to "smart guesses" that would increase the probablilty of a given table entry being assigned to a specific character with the size of the sample. So a large sample of data would be relatively easy to crack. With modern public / private key methods, more data to work with doesn't help.
Last edited by netmaestro on Wed Feb 22, 2006 6:12 am, edited 2 times in total.
BERESHEIT
- NoahPhense
- Addict
- Posts: 1999
- Joined: Thu Oct 16, 2003 8:30 pm
- Location: North Florida
-
- Enthusiast
- Posts: 767
- Joined: Sat Jan 24, 2004 6:56 pm
I use industry standard encryption, among others those provided by the PB library. What I do different though, is 'preprocessing' a file / data set before I use those standard encryption modules.
One possible preprocessing step I use is to compress text data before encrypting it. The purpose of this is to map essentially 7 bit information into 8 bit data streams, so that the data that gets encrypted is more like 'white noise' already. 'White noise' in this context meaning that the set bits are more evenly distributed over the data stream, ie. the 0 and 1 bits are appr. equal in number and evenly distributed.
One possible preprocessing step I use is to compress text data before encrypting it. The purpose of this is to map essentially 7 bit information into 8 bit data streams, so that the data that gets encrypted is more like 'white noise' already. 'White noise' in this context meaning that the set bits are more evenly distributed over the data stream, ie. the 0 and 1 bits are appr. equal in number and evenly distributed.
- NoahPhense
- Addict
- Posts: 1999
- Joined: Thu Oct 16, 2003 8:30 pm
- Location: North Florida
Yeah, before I even begin those kind of processes, I add in (in a particular)
order random (ABCDE...abcde...01234...) inside the strings, the AaBb012
are all chosen randomly, but their placement is based again, on a figure
from somewhere within the system. So it too varies between each
computer.
Then I might flip it, and run a pattern again, based on another system
figure. Then flip it once more back.. (shrug, depends on my mood)
This is all before I even run the algo on it..
- np
order random (ABCDE...abcde...01234...) inside the strings, the AaBb012
are all chosen randomly, but their placement is based again, on a figure
from somewhere within the system. So it too varies between each
computer.
Then I might flip it, and run a pattern again, based on another system
figure. Then flip it once more back.. (shrug, depends on my mood)

This is all before I even run the algo on it..
- np