| 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,381 Views) | |
| mok-kong shen | Feb 17 2014, 07:53 PM Post #61 |
|
NSA worthy
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I have in the new version 1.1 of my code specially written lots of comment lines to the function checkplaintext() to explain why for the first alphabet, i.e. the one in which the plaintext is written, the very first character of the alphabet (whatever that is, space or another character) cannot "begin" the plaintext, or else there would be problems of the genre I showed in detail in my Post#57. Also stressed and explained in the said comment lines is the fact that the "other" alphabets used (i.e. the 2nd, 3rd etc.) are not affected by that constraint at all. That is, in these alphabets you can have space or not, and space, if present, can be at the first position or at any other position of the alphabet. As I wrote, at the base of that is the "leading zeros" issue, namely e.g. 0002 is exactly equal to 2 mathematically. Fortunately, in the scheme one has only to take care of the first alphabet and one has full freedom with the other alphabets employed. |
![]() |
|
| mok-kong shen | Feb 18 2014, 11:38 AM Post #62 |
|
NSA worthy
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
@WTShaw: I must say that your writing in general is at least for me (whose native language is not English) often fairly difficult to read, i.e. to capture the "central" ideas of yours. On re-reading your Post#60, it seems to me that you probably highly doubted that in my implementation it could ever be feasible to use the space characters at all in the alphabets other than the first one (which is what the the plaintext is written in) and thus seemingly wanted to challenge me to do something which you surmised would not be doable with my implementation. So let me first of all quote the following comment lines to the function checkplaintext() in my code: # The user-given plaintext string is checked to ensure that it doesn't begin # with the first character of the user-given plaintext alphabet. This is a # requirment for the proper functioning of the scheme but is in practice # evidently simple to be satisfied. For normal plaintexts don't begin with # spaces so that one can easily specify the plaintext alphabet be such that it # begins with the space character, with the other characters of the alphabet in # (preferably) any arbitrary secret scrambled ordering. (In the examples section # we choose to use "/" instead of " " to represent space.) Note that the other # alphabets involved in the use of the present scheme are not required to # satisfy this requirement, see the examples further below, where the other # alphabets happen to even to contain no space character. Have I said clearly to that issue? Now to concretely show that there is no problem at all to use spaces, if one so wants, with my implementation, let me modify my Example 3 as follows:
Note that now alphabetb has the space symbol "/" as its 3rd character and the result of running the above is as follows:
Do you see that now the ciphertext also has that "/" symbol? I suppose I should mention at this opportunity that, while your work, according to what you have hithertofore posted to this forum, appears to be limited to those cases that are analogous to my Example 3 or 2, my implementation not only resolves the "leading zeros" problem of yours but in fact represents a non-trivial further development of the scheme, namely in: (1) Example 1, where a post-processing possibility of the numberically encoded quantities, which can be exploited to enhance the difficulty of analysis, is shown and (2) Example 4 and 5, which demonstrate that one can employ not only 2 secret alphabets, as you have done, but an arbitrary number of them, if desired. A final remark: It would take you only 5 or maximal 10 minutes to install Python on your computer and run my code (http://s13.zetaboards.com/Crypto/topic/7155855/1/). See a recipe that I had given for that at the end of my Post#45. You could then simply modify the plaintexts and the alphabets of my examples there to do whatever you want, i.e. with your own chosen pieces of plaintexts and alphabets. (Should you ever unexpectedly get difficulties with examples of your choice and believe to have discovered weak points in my code, post that small piece of Python code of yours that contains the plaintext and the alphabets involved!!) Edited by mok-kong shen, Feb 18 2014, 12:59 PM.
|
![]() |
|
| WTShaw | Feb 20 2014, 05:35 AM Post #63 |
|
Advanced Member
![]() ![]() ![]() ![]() ![]()
|
I see that you seem to avoid using the Ct47 set I have used in my example, but use 33 alphabetic characters instead. Is it something that python can't do? One problem with python is that there are ways to backdoor it and hide that if compiled. I checked my simplified Pt27-Ct47 algorithm and it either allows a leading space nor multiple spaces. The full algorithm relative to discussion includes a chaser, a stream cipher. Without that even as the character histogram is improved away from the expected normal distribution, there is still a tendency with for some relative frequencies to leak. Several years ago I started to often add a stream cipher and/or other compllcations to improve results. In reviewing many of the algorithms used, I find that some keys may be better than others and certain of the many algorithms routinely are simply better than others. Lots more needs to be done inthose evaluations. I don't profess to know all programming languages and am more familiar in a specialized way with those I use which includes others on older platforms and systems that would not be considered current here. I rather like to maximize what I am doing and encourage you to do what you are doing as well. One more thing, as many would have you input a permutation, I find that that can be a weak idea subject to clerical errors. Instead, I set base permutations and means to scramble them indirectly. Necessary words/strings are easier to remember and reference to memory in any custom manner. I sometimes use several alphabets that I intend to discuss here. Next will be 27->13->26, which is something to think about... @Novice, OK, I'll update the special simple program 27->47 regarding character set,etc., that works for me by posting the source for your consideration. Be patient as it is on other machines at another place. Then, I would appreciate hearing what you find and suggestions for more changes. As they say, "Watch this space!" Cheers as now I go check on a turkey I am cooking, obtained for special low price post-holidays, yummy! Edited by WTShaw, Feb 20 2014, 05:39 AM.
|
![]() |
|
| mok-kong shen | Feb 20 2014, 11:42 AM Post #64 |
|
NSA worthy
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I am greatly surprised by this question of yours! Didn't I tell you to test your own examples by modifying the examples in my code with your own alphabets and plaintexts? Post one of the thus modified examples that you find doesn't work!!! Wouldn't that be the "hardest" evidence to support and prove your doubt that my implementation might be problematic?? Coudn't you kindly find 5 or 10 minutes to install Python on your computer and run my code?? (You could later de-install Python, if storage is short on your computer.) [Added on editing:] I used the two alphabets of your Post#52 but modified the 27 character alphabet such that the "/" is at the front and ran the thus modified Example 3 of my code (NUMCODING):
The result obtained is:
Is the matter now crystal clear?? (BTW on "which" grounds did you "especially" suspect that your 47 character alphabet might not work in Python??) If you run my code, you could in the window that shows the code online edit the examples section so as to arbitrarily use your own plaintexts and alphabets and run them with Run --> Run Module. (If you happen to make syntactic errors, correct and run the code again.) Edited by mok-kong shen, Feb 20 2014, 01:30 PM.
|
![]() |
|
| Grip2000 | Feb 20 2014, 07:45 PM Post #65 |
|
no member
![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
even faster, even without installation only with copy and paste. http://www.compileonline.com/execute_python_online.php |
![]() |
|
| WTShaw | Feb 20 2014, 11:06 PM Post #66 |
|
Advanced Member
![]() ![]() ![]() ![]() ![]()
|
I am interested in seeing a user/programmer of python fairly reproduce my method and results, but the deal is not for me to do in your choice of language what I have already done in mine. The proof of results is exactly that because if I am to work with my strengths, show me yours. If I am still alive tonight, I'll post my source where it can be accessed, I live on the edge so continuing, even surviving, is always a problematic matter. If you cannot handle routine changes of keys and Pt, that speaks volumes alone. Surely you can prove your programs adequate and comparable if they are. I do suggest a suitable GUI as can be done with python, something anybody can use. I have taken note of the above "execute python" URL but pain is currently severe and new attention doubtful. Much of what I have written in javascript has been tested on other machines, even downloaded off of the net as part of the process. If there is 3rd party detraction of these processes, that can be beyond me to solve, but that is no excuse for any of us to not defeat such waywardness. I plan to be back... |
![]() |
|
| WTShaw | Feb 21 2014, 03:38 AM Post #67 |
|
Advanced Member
![]() ![]() ![]() ![]() ![]()
|
@Novice The source for Simple Pt27 to Ct47 is posted at: https://groups.google.com/forum/?fromgroups#!topic/cryptojavascript/jq_roOZnwrc Any suggestions are welcomed except that I have a tendency to use some compound statements (originally to conserve punch card quantity on a Xerox Sigma 7 eons ago). |
![]() |
|
| novice | Feb 21 2014, 08:56 AM Post #68 |
|
Super member
![]() ![]() ![]() ![]() ![]() ![]()
|
Many thanks. novice |
![]() |
|
| mok-kong shen | Feb 21 2014, 07:31 PM Post #69 |
|
NSA worthy
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
To whom were you addressing the above line? To me?? It's really an irony!!! Let me quote from my Post#62: As I worte many times, what you have done hithertofore are of the genre of either my Example 2 or my Example 3 (i.e. B<A or B>A for the sizes of the alphabets). So you can without any problem modify the plaintexts and the alphabets there to correspond to "exactly" those of your own. But note that I have there a call to checkplaintext() that checks that the user-given plaintext doesn't begin with the first character of his given "plaintext alphabet" (i.e. if your alphabet begins with "a", then your plaintext can't begin with "a" -- an example violating that is e.g. "attack ....."), for in such cases (you could try, if you want, in that you delete the line checkplaintext() in my examples) one gets the "erroneous" result of the recovered plaintext lacking the first character(s) of the plaintext alphabet (in the above example "attack ....." would be recovered as "ttack ....."). All these you could try with my code conveniently online to arbitrarily exhaustive extent! (Note that the just mentioned erroneous cases would surely affect "also" your own software, since your computation method of the numbers is the same as in my code, as I have shown with the bottom part of my Post#57.) I feel really sad that I have till now to repeatedly stress these points that I have especially expressed in great details in my code and in my earlier posts but you repeatedly ignored them (and it seems that you for some for me unconceivable reasons don't like till the present to spend 5 or 10 minites to install Python and run my code). To shorten our debates, I think the best seems to be that I now formally "challenge" you to provide a (not to big) number of concrete cases (alphabets plus plaintexts) where you "suspect" that my implementation wouldn't properly work but on the other hand your own software works fine (you have to ensure that beforehand and give your encoding results together with the challenge so that I could check your results). Is that ok for you?? RESUME: I challenge you herewith to give a number of (say up to 10) concrete cases where you suspect that my implementation has problems while on the other hand your software works fine. You can use any alphabets (whether "/" is at the front or not) and any plaintexts but provide your exact and full results similarly to the case earlier given in your Post#52 such that I can check them, if needed, like I had done in my Post#57. If I can't show that my implementation works as well, I'll clearly acknowledge my failure and mistakes. In the other case, you tell me clearly on "which" grounds you have had suspicions of problems on my side that certain particular alphabets and/or plaintexts possibly couldn't be processed by my implementation in the individual cases. Edited by mok-kong shen, Feb 22 2014, 10:03 AM.
|
![]() |
|
| WTShaw | Feb 22 2014, 11:27 PM Post #70 |
|
Advanced Member
![]() ![]() ![]() ![]() ![]()
|
In crypto programming, I have learned a few things including that source is apt to be best interpreted and/or corrected by the person that wrote it. I just had a few minutes to check what is going on here and that time is just about gone for now. You heard of a cattle call, well this one is for real as I have two cows in labor, and noises from the others in sympathy..."I shall return." ...D. MacA |
![]() |
|
| mok-kong shen | Feb 23 2014, 11:28 AM Post #71 |
|
NSA worthy
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
@WTShaw: As a quite long-time programmer in the past, I used to "first" try a few simple (trivial) cases with any foreign programs "before" attemting to examine and understand the details of the programs. For, if these simple cases don't work, then either (1) I haven't properly understood the assumptions under which these programs work, or (2) the programs have veritable bugs/errors. This is evidently a very much more rational stategy than first attempting to read the source codes and then run the test cases. So once again I sincerely recommend you to kindly spend 5-10 Min. time to install Python on your computer now and run the examples in my code to get a "first feeling" of it and straightforwardly try a few simple examples of your own (via entirely simple modifications of my examples online). I am looking forward to your next detailed post soon, eventually containing a bunch of cases that you consider would "crash" my code (or in the other case that everything is clear). Edited by mok-kong shen, Feb 23 2014, 11:32 AM.
|
![]() |
|
| jdege | Feb 24 2014, 04:05 AM Post #72 |
|
NSA worthy
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Personally, when I'm trying to understand someone else's code, I examine the unit tests. If there aren't any unit tests, I assume the code doesn't actually work, and start writing them so that I can find where it's broken. |
| When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl. | |
![]() |
|
| novice | Feb 24 2014, 08:48 AM Post #73 |
|
Super member
![]() ![]() ![]() ![]() ![]() ![]()
|
Thanks again for this. I have run the code in my (Safari) browser and the implementation is perfect. I see no aberrations (and I don't have a blind eye). As an example pt: aachen aachen aachen enciphers to ct: alq6= qalq6 =qalq 6=q which deciphers to pt: aachen aachen aachen I don't know what all the fuss is about. I also much appreciate that your program has a GUI that makes using it easy and immediate. Edited by novice, Feb 24 2014, 08:56 AM.
|
![]() |
|
| novice | Feb 24 2014, 08:59 AM Post #74 |
|
Super member
![]() ![]() ![]() ![]() ![]() ![]()
|
Please explain what you mean by 'examining the unit tests'. |
![]() |
|
| mok-kong shen | Feb 24 2014, 09:38 AM Post #75 |
|
NSA worthy
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
@WTShaw: Could you quickly examine novice's Post#73 and say whether the mentioned result from your software is for big-endian, similar to the case you gave earlier in your Post#52? I think (strongly consider) that, since you -- as some of your earlier posts indicated -- are often computing in little-endian with your software, that that explains the issue. And please then in the case of a "positive" answer give the encoded number obtained so that I can check your result as I had done earlier in my Post57 for the other example. Note that we are arguing for the correctness of my code and so the argument must be based on the "same" computation method employed in that code which is big-endian.
Edited by mok-kong shen, Feb 24 2014, 09:48 AM.
|
![]() |
|
| 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