Welcome Guest [Log In] [Register]
Welcome to Crypto. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Base Translations Ciphers; Using Multiple Bases for Encryption
Topic Started: Jan 18 2014, 04:53 AM (3,384 Views)
novice
Super member
[ *  *  *  * ]
When you mention Monte I think of Monte Carlo, you no doubt of Las Vegas. 'The full Monty' in Brit vernacular is 'with all revealed', something we have been trying to get you to do for your cipher methodology for some time now :)

Well since you are so well acquainted with tableaux, how about a Latin Square keyed with a lagged Fibonacci. Just a simple subtraction and addition to do for each encipherment. Would you like a challenge cipher text to cut your teeth on?
Offline Profile Quote Post Goto Top
 
mok-kong shen
NSA worthy
[ *  *  *  *  *  * ]
[2nd revision] I have unfortunately again to revise what I posted at this place. The seemingly very nice result I reported in the earlier version turned out to be a "chance" result, it doesn't hold in general, i.e. not for all arbitrarily chosen alphabets, as I sadly found in further experiments.

So I have to go back to the orignal message addressed to WTSHAW: Please kindly take the example of fiziwig:

alphabet="/abcdefghijklmnopqrstuvwxyz"
groupsize=7
plaintext="mary/had/a/little/lamb"

and show us step by step and in detail how you obtain the numbers in the various stages of base changes, for example, changing the above alphabet to one including also the uppercase characters and back to the original one on encryption and then demonstrating how the decryption is done. For a sequence of similar computations you need to show only the first two members (the rest can be left to the readers). But the exact numerical computation needs to be shown, i.e. not simply referring to pieces of your software, so that the readers will really be able to do the work independently and be convinced that you are indeed right.
Edited by mok-kong shen, Jan 23 2014, 11:17 AM.
Offline Profile Quote Post Goto Top
 
mok-kong shen
NSA worthy
[ *  *  *  *  *  * ]
[Retracted in connection with the previous post.]
Edited by mok-kong shen, Jan 23 2014, 11:18 AM.
Offline Profile Quote Post Goto Top
 
novice
Super member
[ *  *  *  * ]
Mok Kong Shen
 
The seemingly very nice result I reported in the earlier version turned out to be a "chance" result, it doesn't hold in general, i.e. not for all arbitrarily chosen alphabets, as I sadly found in further experiments.


Bad luck! These things happen.

There are (for me) a few interesting things in your Python program. I will respond properly when I've spent more time with it.
Offline Profile Quote Post Goto Top
 
novice
Super member
[ *  *  *  * ]
@Mok Kong Shen

The use of 'assert' in Python is new (and interesting) to me and you have used it twice in your program at Renaissance of Classical algorithms Nr 33:

for c in alphabet:
assert(alphabet.count(c)==1)

for c in textstr:
assert(c in alphabet)

The second one seems to be a way of stopping the program if there is a letter in the text string that is not in the alphabet. But could you please explain the purpose of the first one?
Offline Profile Quote Post Goto Top
 
WTShaw
Advanced Member
[ *  *  * ]
mok-kong shen:So I have to go back to the orignal message addressed to WTSHAW: Please kindly take the example of fiziwig:
alphabet="/abcdefghijklmnopqrstuvwxyz groupsize=7 plaintext="mary/had/a/little/lamb"

and show us step by step and in detail how you obtain the numbers in the various stages of base changes, for example, changing the above alphabet to one including also the uppercase characters and back to the original one on encryption and then demonstrating how the decryption is done. For a sequence of similar computations you need to show only the first two members (the rest can be left to the readers). But the exact numerical computation needs to be shown, i.e. not simply referring to pieces of your software, so that the readers will really be able to do the work independently and be convinced that you are indeed right.


Me: That's a pretty tall order...(idiom refers to pancakes.) It requires breaking the problem down. Let's take on Pt coding first

The difference between simple lower-case only encryption and many possible characters are variations of the same generic problem. To permit many more than 26 letters means that some are represented with two characters instead of one.

In the set (Pt27) `abcdefghiklmnoprstuy/~¢£±© (Pt27), several letters are missing but consider that they are represented by two characters. Here are the internal sets and the coding for Cilibia:

var LCset$ = "`abcdefghiklmnoprstuy/"; //catches good LC characters in Pt27 including the / and `
var UCset$ = "¥ABCDEFGHIKLMNOPRSTUY:"; //for same as above characters with ± as the selector
var MYset$ = "¥QqJjVvWwXxZz',.?+-=;"; //catches rest of lc-uc letters with © as the selector
var URset$ = "¥1234567890!@#$%^&*()"; catches a few more characters with ~ as the selector
¢ is for a nonsequential space.
£ is for each of a maximum of two sequential line feeds.

String of characters that can be encrypted means coding them to a string that only uses the main set.

EXAMPLE: If the Text is "Mary had a Little Lamb."
It would become "±mary¢h ad¢a±li ttle±la mb©p¢¢¢"
first group character positions are 26 13 2 17 21 24 8
first group values are one less 25 12 1 16 20 23 7
for LittleEndian group value = x
x = 25 + 12(26^1) + 1(26^2) + 16(26^3) + 20(26^4) + 23(26^5) + 7(26^6)

Customizing this could mean using deranged subsets, even one more to add more keyboard characters.

Questions on equivalent subset encoding?

Offline Profile Quote Post Goto Top
 
novice
Super member
[ *  *  *  * ]
@WTShaw

This takes us ahead nicely :)

But I suggest there is a slight error in

Quote:
 
x = 25 + 12(26^1) + 1(26^2) + 16(26^3) + 20(26^4) + 23(26^5) + 7(26^6)


where I suggest the +7(26^6) should be +8(26^6) to reflect that /h/ is in the 8th place (zero based) in the LC set.
Offline Profile Quote Post Goto Top
 
WTShaw
Advanced Member
[ *  *  * ]
You are right. that little ` escaped me. I'll look at all the numbers again.

x = 25 + 12(26^1) + 1(26^2) + 16(26^3) + 20(26^4) + 23(26^5) + 8(26^6)

OK?
Edited by WTShaw, Jan 25 2014, 04:50 AM.
Offline Profile Quote Post Goto Top
 
novice
Super member
[ *  *  *  * ]
Yes, fine as far as I'm concerned.

You mentioned "Customizing this could mean using deranged subsets ".

Is the implication here that the existing subsets would be mixed? So that, for example, the LCset might be mixed to 'hmdaitponbfcsulkredycg/

And, I suppose, there's no reason why further mixing shouldn't be made after every encipherment, either in a fixed or in a dynamic way. This would break up repetitions in the ciphertext and would begin to create headaches for the cryptanalyst, even for this simple cipher, I would think.
Offline Profile Quote Post Goto Top
 
mok-kong shen
NSA worthy
[ *  *  *  *  *  * ]
@novice: The purpose of:
for c in alphabet:
assert(alphabet.count(c)==1)
is to check whether the symbols in the alphabet have duplicates. This is a perhaps an over-cautious check for blunders. However, in our context of low-volume processing materials, such checks don't cost much, so I tend to favour them.

Edited by mok-kong shen, Jan 25 2014, 05:31 PM.
Offline Profile Quote Post Goto Top
 
mok-kong shen
NSA worthy
[ *  *  *  *  *  * ]
WTShaw
Jan 24 2014, 07:49 AM
EXAMPLE: If the Text is "Mary had a Little Lamb."
It would become "±mary¢h ad¢a±li ttle±la mb©p¢¢¢"
first group character positions are 26 13 2 17 21 24 8
first group values are one less 25 12 1 16 20 23 7
for LittleEndian group value = x
x = 25 + 12(26^1) + 1(26^2) + 16(26^3) + 20(26^4) + 23(26^5) + 7(26^6)
Customizing this could mean using deranged subsets, even one more to add more keyboard characters.
So you divide a large set of symbols (even larger than yours would be the UTF-8 set) to several subsets and use special symbols to indicate the beginnings of a sequence of symbols that belong to a particular set. This is in principle same as the old 5-channel punch-tape coding, where one special code indicates begin of one group of symbols and another special code indicates begin of another group of symbols (so that more symbols could be transmitted than otherwise is the case). However this is not a "base change" in the commonly understood sense that one and the same interger can be expressed either as a0 + a1*b + a2*b^2 + ..... or as A0 + A1*B + A2*B^2 + ..... with b != B and one switches from a representation [a0, a1, a2, .....] to another [A0, A1, A2, .....]. (See also our (including fiziwig) discussions in the thread "Renaissance of classical algorithms" in the Section General/News.)
Edited by mok-kong shen, Jan 27 2014, 09:11 PM.
Offline Profile Quote Post Goto Top
 
Grip2000
no member
[ *  *  *  *  * ]
Converting Decimal to Hexadecimal ( Base10 to Base16 )

Example:
2014 --> 7DE

Could be do much more fun ;-) Converting decimal numbers (Zero and comma before the number to be converted...)

Further steps such transpositions are then much more effective...

Example:
0,2014 --> 0,338EF34D6A161E4F765FD8ADAB9F559B3D07C84B5DCC63F141205B...

Computation:

Spoiler: click to toggle


Spoiler: click to toggle


http://www.arndt-bruenner.de/mathe/scripts/Zahlensysteme.htm

BR
GRip
Offline Profile Quote Post Goto Top
 
WTShaw
Advanced Member
[ *  *  * ]
Coding a character set is just that, making cipher text longer in order to work within a base less that the character set.

Coding has many possibilities but most used characters can be represented in 00-99, a hundred values, with no absolute hole in the code like ascii has. In several of my programs I use characters that might have different numbers in different fonts. Therefore it might be good for me to use a chr nr to define unusual characters that I might also use as subset flags, worth trying anyway because everything would be compatible subject only to what the different users saw.

The chr numbers need only be used in three subs: encrypt, decrypt, key setups...worth trying anyhow and avoid using chr nrs<127 for those purposes.
Offline Profile Quote Post Goto Top
 
novice
Super member
[ *  *  *  * ]
@WTShaw

In your post nr 21 you mentioned "Customizing this could mean using deranged subsets ".

Is the implication here that the existing subsets would be mixed? So that, for example, the LCset might be mixed to 'hmdaitponbfcsulkredycg/

And, I suppose, there's no reason why further mixing shouldn't be made after every encipherment, either in a fixed or in a dynamic way. This would break up repetitions in the ciphertext and would begin to create headaches for the cryptanalyst, even for this simple cipher, I would think.
Offline Profile Quote Post Goto Top
 
WTShaw
Advanced Member
[ *  *  * ]
Customizing means changing anything just about anything about these programs including what you suggest, further including all ways of rearranging characters and even what subsets they might be in. I see some similarity here with the first televisions that had many adjustments, lots of knobs on the back and/or under a face panel. As you see, changes result in different and perhaps incompatible versions of all examples I suggest.

As we progress through further description of the base translation ciphers, I should mention optional changes in targeting the range of possible numbers from the initial base in base10 relative to the usual range of possible numbers targeted to the receiving next stage with a larger range, a numeric slotted hole that might be realigned somehow, even inverted rather simply. Just a mention, but this is true for all generic suggested examples as custom adjustments could be done with the numbers in the base10 stage.
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
ZetaBoards - Free Forum Hosting
Join the millions that use us for their forum communities. Create your own forum today.
Go to Next Page
« Previous Topic · General · Next Topic »
Add Reply