| 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: |
| Base Translations Ciphers; Using Multiple Bases for Encryption | |
|---|---|
| Tweet Topic Started: Jan 18 2014, 04:53 AM (3,383 Views) | |
| mok-kong shen | Jan 27 2014, 09:17 PM Post #31 |
|
NSA worthy
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
@WTShaw: I have edited my Post#26 such that the context there is clearer. I argued that your scheme (as far as I can understand till this moment) does not involve any base change/translation (of integers). Could you please say something, in case I am mistaken?
Edited by mok-kong shen, Jan 27 2014, 09:18 PM.
|
![]() |
|
| WTShaw | Jan 29 2014, 05:49 AM Post #32 |
|
Advanced Member
![]() ![]() ![]() ![]() ![]()
|
Integers are not necessarily in Base10 but can be in any base of represented by distinct iconic figures. Please remember that the usual Base Translation Algorithm is to go from BaseA to Base10 to BaseB where Base10 is handy as a shortstop rather than going directly from BaseA to BaseB which I have done before, messy, messy. We have lately mainly discussed the first stage of a longer algorithm, BaseA to BaseX in which BaseA is Base27. With different BaseB's and appropriate Pt-Ct Group Lengths, for B>A there are at least several good numbers for B including 82, 81, 62, 53, and 47. As I remember we were using 47 for B. The base change of 27 to 47 is not a good even fit for the two sets. Any Base27 character is represented as parts of two Base47 elements in which the total value is shared with the converted representations of other Base27 elements. In short, there is some diffusion taking place when efficiency is <100%. If BaseB is 81, then this is true BASE CONVERSION with an efficiency of 100% where each B27 element is represented by 3 Base81 elements. In a similar algorithm, the inverse would be true if A was 81 and B was 27 and each Base81 would be represented by 1/3 of a Base27 element, a rather even fit. Base Conversion is a subset of the more inclusive Base Translation. If BaseA is 27, some possible BaseB's, at least ones I like and have implemented, are 17, 16, and 13. In 3-Base Algorithms using 26 as a MetaBase, implemented BaseB's does include Base10 as the 3rd Base but that algorithm, Jagstzell, has a scrambled Base26 set whereas BaseA is 49. A note to include an important detail is that the chosen Pomegranate Stream Cipher uses Base36 in which Base10 uses the first 10 characters of Base36 even if that base is scrambled. If all this is confusing, it's meant to be, at least for someone attempting to crack an encrypted message. Suggestion is to follow through on one complete algorithm as a pattern. In short, there's lots of Base changing going on in the associated cipher collection. The Bases Involved are part of the Key with nice little names for helping to remember them. In decrypting, all steps are to be solved in reverse. True Decoding is found as the last step in recovering the original text Pt from recovered PtBase Characters. Integers can be represented in any Base and that is the neat crux here. |
![]() |
|
| mok-kong shen | Jan 29 2014, 12:39 PM Post #33 |
|
NSA worthy
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
(1) The formula given in my post#26 never implies that anywhere a base 10 is involved. (2) Ability of applying a conversion from base A to base B with B<A would have been very interesting for crypto purposes IMHO. An interesting case would be that one starts with plaintext in alphabet A and goes through a sequence of alphabets of different sizes (larger or smaller) and finally comes back to alphabet A, such that the ciphertext is in the same alphabet as the plaintext. But that's unfortunately not feasible with the common base conversion (for what's needed in crypto contexts!), if I don't err (i.e. with help of the code I posted in http://s13.zetaboards.com/Crypto/topic/7027252/3/). (3) For B>A, a base conversion is IMHO essentially a substitution of plaintext whose characters are constrained in a small alphabet into another alphabet that is larger (e.g. including the smaller one) and one can employ thereby e.g. a poly-alphabetical substitution with mixed alphabets, which is actually not seldom being done in the practice till the present. What do you deem to be the advantages of the common base conversion in comparison to that? (I mean "common" base conversion in distinction to the use of the multiple base (binary) representation of integers I mentioned in a recent thread of mine.) Edited by mok-kong shen, Jan 29 2014, 02:56 PM.
|
![]() |
|
| WTShaw | Jan 30 2014, 02:58 AM Post #34 |
|
Advanced Member
![]() ![]() ![]() ![]() ![]()
|
(1) Base10 is not absolutely necessary in many of the algorithms but is handy to find a REAL VALUES in most for character groups using other than obvious conventional numbers. However Base10 can be like any other in some circumstances and subject to transpositions and substitutions; when it is, it is; when it isn't, it isn't. Having to reinvent math tables for manipulations between strange bases is rather unnecessary and time consuming, but I've done that before and speak from experience. Seeing a few characters may not strongly suggest that any particular base/set is in use but rather be an aside as a complication. (2) Pt and Ct need not be in the same set as that is an over-restrictive old practice. A set can contain any array of characters as long as they are all different. Missing from my site are algorithms that use Compound Sets but I've done more that a few of them. (3) I seldom use a binary base but they can be treated as any other, and for my purposes in base translation binaries can be the least useful when given other options. Again, the old "Rule" of one set of allowed elements in an algorithm is simply illogical and can otherwise serve as a crib. |
![]() |
|
| mok-kong shen | Jan 30 2014, 08:24 PM Post #35 |
|
NSA worthy
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
@WTShaw: I guess there are yet misunderstandings between us to some degree, i.e. your post seems not to be "exactly" countering what I wrote. (1) I meant with my (1) that in base changes base 10 has no particular position among all bases at all (excepting that for printing one has the convenience of using one digit for one symbol). (2) My (2) questions whether changing base A to base B with B<A is feasible (for crypto purposes). My current conjecture is that the answer is no. What's your opinion? (3) I meant with my (3) that the case of B>A is "examplified" by the commonly to be observed cases in substitutions, where the plaintext doesn't fully utilize the space of the entire alphabet, e.g. plaintext is in lower case, while the alphabet of the substitution (mono- or poly-alphabetical) is in lower case plus upper case. Certainly ciphertext may be in entirely different symbols (e.g. in some exotic symbols). For one can at any time use a mono-alphabetical substitution to map any given English text to one in e.g. hieroglyphs. (4) An additional question: You wrote earlier that for B>A there are (for a given A) some B's that are better than the others. How do you determine that, i.e. with what measure/methods do you find out the better B's? |
![]() |
|
| WTShaw | Jan 30 2014, 10:40 PM Post #36 |
|
Advanced Member
![]() ![]() ![]() ![]() ![]()
|
1) It's still a base but as otherwise stated in other words, often Base10 is used as a simplifying step rather than to be strictly counted as a keyed base. I looked at some of my old code a few hours ago and wondered why I did that rather than the now obvious. I have been known however for a Base9 set to substitute 1-9 instead of 0-8 since it's easier to spot that zeros are missing than other digits would be. 2) One base to another is just a mathematical problem allowing even for totally different members of the sets. 3) Now I get it. The goal is to facilitate a bi-symbol code for some characters, perhaps for less used letters and symbols, so that many different items can be crammed into using a smaller set than a sum of total candidates desired to be represented. I started simple but utility spurred some selective "compression," a word that can be used in different and often contradictory meaning so I generally avoid it, i. e., logically a duality like "entrophy." 4) I refer you to a general list and abr. discussion: http://cryptopopcorn.com/Crypto/docs/bases.html |
![]() |
|
| mok-kong shen | Jan 31 2014, 10:15 AM Post #37 |
|
NSA worthy
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I wrote: "(2) My (2) questions whether changing base A to base B with B<A is feasible (for crypto purposes). My current conjecture is that the answer is no. What's your opinion?"You seem not yet to have answered that. Edited by mok-kong shen, Jan 31 2014, 10:17 AM.
|
![]() |
|
| WTShaw | Feb 1 2014, 05:55 AM Post #38 |
|
Advanced Member
![]() ![]() ![]() ![]() ![]()
|
I use the same general function for base translation regardless of base sizes and group sizes best seen in the encrypt and decrypt functions. Encoding and decoding are also within the same functions. The actual code is the shortest explanation. Here is the decrypt function from Salado whereas 100^5<27^7: |
![]() |
|
| WTShaw | Feb 1 2014, 05:56 AM Post #39 |
|
Advanced Member
![]() ![]() ![]() ![]() ![]()
|
I see it did not appear...?? There are also several things, that I removed from the example. I suppose that I will try to post it elsewhere and then redirect. https://groups.google.com/forum/#!topic/cryptojavascript/lo8DB0DvWBw Success in posting source code means that I can bypass a usual paid host if directions are followed to activate an html file in javascript!! Not so happy yet because I remember when Google no longer would let me put active programs there... Edited by WTShaw, Feb 1 2014, 06:11 AM.
|
![]() |
|
| mok-kong shen | Feb 1 2014, 08:07 AM Post #40 |
|
NSA worthy
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Could you then kindly post an example with sufficient details of computations such that the readers could comprehend your algorithm and "fully independently" work out examples of their own, i.e. "without" any use of your software? Thanks in advance. [OT: If you have a regular Internet provider, why do you have to pay for posting any stuffs?] Edited by mok-kong shen, Feb 1 2014, 08:12 AM.
|
![]() |
|
| WTShaw | Feb 2 2014, 04:04 AM Post #41 |
|
Advanced Member
![]() ![]() ![]() ![]() ![]()
|
With usual numbers, the system is BigEndian but I use LittleEndian because the code is easier. Convert a group in a base to a number, then convert that number to a group in another base, but let's stop with true values rather than another base for now. LittleEndian is good because the leading character is added times base power 0, and the next character times base power 1, usw, until the last character in a group is added times base power (groupsize-1). Consider a set of 27 letters where "/" is valued zero, "a" is value of 1, and "z" is value of 26. Any word or group any chosen length can be represented by a number. In a program we have referred to before, FANC27, the numeric values are calculated usually BigEndian. If your reverse the letters in a five character "group" using BigEndian: "grouppuorg" give the result of 4085899 8927827. Let's look at "no" and "on" with group length of 2: "noon" is then 393 419. Let's look at "at" and "ta" with group length of 2: "atta" is then 47 541, (27+20) and ((27*20)+1). Edited by WTShaw, Feb 2 2014, 04:06 AM.
|
![]() |
|
| mok-kong shen | Feb 2 2014, 05:30 PM Post #42 |
|
NSA worthy
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
@WTShaw: I suppose it doesn't matter, as far as the general theory of base changes is concerned, that one adopts the convention of BieEndian (for there is a "unique" mapping between BigEndian and SmallEndian, and they only concern how the bits are actually "stored" in computer cells, i.e. without affecting the underlying math). I had in discussions with you in a thread in General/News given a code that maps the symbols in the given alphabet to integers in [1, length of alphaber]. But I as reported there, my experience is that changing Base A to Base B with B>=A seems to work fine but not with B<A. Later I exprerimented with mapping the symbols in the given alphabet to [0, length of alphabet-1], but my experience with B<A remained bad. [Edited on 06.02.2014:] The last sentence above turned out to be the result of a programming mistake of mine. An implementation that works for both B>=A and B<A is now available at: http://s13.zetaboards.com/Crypto/topic/7155855/1/ Edited by mok-kong shen, Feb 6 2014, 10:08 AM.
|
![]() |
|
| WTShaw | Feb 2 2014, 08:38 PM Post #43 |
|
Advanced Member
![]() ![]() ![]() ![]() ![]()
|
I really don't care how the computer might store bits when I am not using them as such. It's a problem of not seeing the forest because of the trees, bits are not fundamental to any bases except the binary ones. These base translation algorithms would not be easily attacked with simple mapping, a fact which is what makes them awkward. For analytical purposes, awkward is stronger. |
![]() |
|
| Grip2000 | Feb 3 2014, 10:08 PM Post #44 |
|
no member
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
@WTShaw, Can you give a concrete example. With Terminal commands so that anybody can use it? Just as in the following example. $ b36(){ > b36arr=(0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) > for i in $(echo "obase=36; $1"| bc) > do echo -n ${b36arr[${i#0}]} > done > echo > } $ b36 1234567 QGLJ $ |
![]() |
|
| mok-kong shen | Feb 7 2014, 07:38 PM Post #45 |
|
NSA worthy
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
@WTShaw: I have in a recent thread "On base change of interger numbers ......" published a code based on what I believe (to have understood from your posts till now) to be what you have in mind about base change. Please kindly run the code and/or read the comment lines there and tell whether and, if yes, how well my implementation corresponds to your ideas. [In case you are yet new to Python: Store my code in a file named e.g. base.py, download Python 3.x from www.python.org, install it, from its IDLE (GUI) with File-->Open locate the file, click on it, then in the new window (showing my code) with Run-->Run Module run the code.] Edited by mok-kong shen, Feb 7 2014, 09:52 PM.
|
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| Go to Next Page | |
| « Previous Topic · General · Next Topic » |





![]](http://z2.ifrm.com/static/1/pip_r.png)



7:27 PM Jul 11