Sealeopard
(KiX Master)
2004-07-24 09:15 PM
KiXgolf: Vigenere Cipher - Private coding

=============
The Challenge
=============


You are to write a UDF that encrypts and decrypts alphanumeric text based on a modified Vigenere Cipher using a cipher table consisting of a group of uppercase alpha letters, lowercase alpha letters, and numbers. The three groups are ordered as follows: 0-9, Z-A, a-z. Thus, the cipher table would consist of the blocks 0-9, Z-A, a-z ordered as "0123456789ZYX ... CBAabc ... xyz" plus the appropriate shifting.

Important rule change!

The modified Vigenere cipher is defined by the following rules:
  • Whitespace, punctuation marks and other non-alphanumeric characters will not be encrypted or decrypted but passed through from the input to the output without alteration. If the cipher key contains such characters, they are to be discarded prior to building the cipher table.
  • By default, a Vigenere cipher is using a simple Caesar shift. The modifed Vigenere cipher will add an offset to the encrypted characters on a per-word basis corresponding to the wordnumber in the sentence. Thus, the first word is using an offset of one, the second word is using an offset of two, and so on. For example encrypted character 'A' with word-offset '1' (first word) results in 'B', and encrypted letter 'b' with word-offset '2' (second word) results in 'C'.
  • The lower-case cipher block will only be used if lower-case characters are present in the plain, crypto, or cipher text. The numeric and upper-case block will always be used.



A download is available at http://people.bu.edu/jenmeyer/kixtart/kixgolf_vigenere.zip


=============
Specification
=============


The Vigenere Cipher -- A Polyalphabetic Cipher

One of the main problems with simple substitution ciphers is that they are so vulnerable to frequency analysis. Given a sufficiently large ciphertext, it can easily be broken by mapping the frequency of its letters to the know frequencies of, say, English text. Therefore, to make ciphers more secure, cryptographers have long been interested in developing enciphering techniques that are immune to frequency analysis. One of the most common approaches is to suppress the normal frequency data by using more than one alphabet to encrypt the message. A polyalphabetic substitution cipher involves the use of two or more cipher alphabets. Instead of there being a one-to-one relationship between each letter and its substitute, there is a one-to-many relationship between each letter and its substitutes.


The Vigenere Tableau

The Vigenere Cipher , proposed by Blaise de Vigenere from the court of Henry III of France in the sixteenth century, is a polyalphabetic substitution based on the following tableau:
Code:
 

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

A 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
B 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 A
C C D E F G H I J K L M N O P Q R S T U V W X Y Z A B
D D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
E E F G H I J K L M N O P Q R S T U V W X Y Z A B C D
F F G H I J K L M N O P Q R S T U V W X Y Z A B C D E
G G H I J K L M N O P Q R S T U V W X Y Z A B C D E F
H H I J K L M N O P Q R S T U V W X Y Z A B C D E F G
I I J K L M N O P Q R S T U V W X Y Z A B C D E F G H
J J K L M N O P Q R S T U V W X Y Z A B C D E F G H I
K K L M N O P Q R S T U V W X Y Z A B C D E F G H I J
L L M N O P Q R S T U V W X Y Z A B C D E F G H I J K
M M N O P Q R S T U V W X Y Z A B C D E F G H I J K L
N N O P Q R S T U V W X Y Z A B C D E F G H I J K L M
O O P Q R S T U V W X Y Z A B C D E F G H I J K L M N
P P Q R S T U V W X Y Z A B C D E F G H I J K L M N O
Q Q R S T U V W X Y Z A B C D E F G H I J K L M N O P
R R S T U V W X Y Z A B C D E F G H I J K L M N O P Q
S S T U V W X Y Z A B C D E F G H I J K L M N O P Q R
T T U V W X Y Z A B C D E F G H I J K L M N O P Q R S
U U V W X Y Z A B C D E F G H I J K L M N O P Q R S T
V V W X Y Z A B C D E F G H I J K L M N O P Q R S T U
W W X Y Z A B C D E F G H I J K L M N O P Q R S T U V
X X Y Z A B C D E F G H I J K L M N O P Q R S T U V W
Y Y Z A B C D E F G H I J K L M N O P Q R S T U V W X
Z Z 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



Note that each row of the table corresponds to a Caesar Cipher. The first row is a shift of 0; the second is a shift of 1; and the last is a shift of 25.
The Vigenere cipher uses this table together with a keyword to encipher a message. For example, suppose we wish to encipher the plaintext message:

TO BE OR NOT TO BE THAT IS THE QUESTION

using the keyword RELATIONS. We begin by writing the keyword, repeated as many times as necessary, above the plaintext message. To derive the ciphertext using the tableau, for each letter in the plaintext, one finds the intersection of the row given by the corresponding keyword letter and the column given by the plaintext letter itself to pick out the ciphertext letter.
Code:

Keyword: RELAT IONSR ELATI ONSRE LATIO NSREL
Plaintext: TOBEO RNOTT OBETH ATIST HEQUE STION
Ciphertext: KSMEH ZBBLK SMEMP OGAJX SEJCS FLZSY



Decipherment of an encrypted message is equally straightforward. One writes the keyword repeatedly above the message:
Code:

Keyword: RELAT IONSR ELATI ONSRE LATIO NSREL
Ciphertext: KSMEH ZBBLK SMEMP OGAJX SEJCS FLZSY
Plaintext: TOBEO RNOTT OBETH ATIST HEQUE STION



This time one uses the keyword letter to pick a column of the table and then traces down the column to the row containing the ciphertext letter. The index of that row is the plaintext letter.
The strength of the Vigenere cipher against frequency analysis can be seen by examining the above ciphertext. Note that there are 7 'T's in the plaintext message and that they have been encrypted by 'H,' 'L,' 'K,' 'M,' 'G,' 'X,' and 'L' respectively. This successfully masks the frequency characteristics of the English 'T.' One way of looking at this is to notice that each letter of our keyword RELATIONS picks out 1 of the 26 possible substitution alphabets given in the Vigenere tableau. Thus, any message encrypted by a Vigenere cipher is a collection of as many simple substitution ciphers as there are letters in the keyword.

Although the Vigenere cipher has all the features of a useful field cipher -- i.e., easily transportable key and tableau, requires no special apparatus, easy to apply, etc. -- it did not catch on in its day. A variation of it, known as the Gronsfeld cipher, did catch on in Germany and was widely used in Central Europe. The Gronsfeld variant used the digits of a keynumber instead of a the letters of keyword, but remained unchanged in all other respects. So in fact the Gronsfeld is a weaker technique than Vigenere since it only uses 10 substitute alphabets (one per digit 0..9) instead of the 26 used by Vigenere.


=============
Inputs & Outputs
=============


The Vigenere UDF accepts two to three parameters. The first parameter is a string containing the text to be encrypted or decrypted. The second parameter contains the cipher key. The optional thirs parameter, if set to true, indicates that the first string is to be decrypted using the provided cipher key.


=======
Scoring
=======


All ten provided samples must be correctly encrypted or decrypted to have a valid Vigenere UDF and to have the KiXgolf score count.


=============
General rules
=============


  • The UDF must be written as one or more lines.
  • The UDF is expected to finish in a reasonable time, e.g. if it gets started when the challenge opens, it's expected to be finished by the time the challenge closes even on a somewhat slow computer. The UDF has to be valid during the period that the challenge runs.
  • You can submit scores as often as you want until the deadline, there's no reason to wait until the last minute for a score submission. In fact, other people want to see the score to beat. So don't be a spoilsport by hoarding your score. Submit early and often.
  • The UDF may only use the KiXtart/KiXforms commands/functions/macros, no other code fragments are allowed. Calls to cOM components that are part part of a standard default Windows installation are allowed.
  • Calls to other executables, as long as they are part of a standard default Windows installation are allowed.
  • The use of the KiXforms DLL is also permitted as the KiXforms DLL can now be considered an integral part of KiXtart scripting.
  • The UDF should be self-contained (except for any I/O mentioned in the challenge). In particular, you may not do things like fetching extra data from a remote site or file.
  • You may assume ASCII as character set.
  • You are not allowed to use additional code that is external to the KiXgolf UDF Collection. All code must be contained within the KiXgolf UDF Collection.
  • You are allowed to only use publicly available versions of KiXtart and KiXforms, private builds or alpha builds are NOT allowed
  • Your submitted score must include the KiXart/KiXforms version used.

When posting KiXtart Golf Scores, please include the KIXGOLF_*.TXT file that is created in the script directory. It contains some basic information about the computer that the script is run on and the resulting scores.

========
Deadlines
========


Private coding starts Saturday, July 24, 3pm EST
Private coding ends Friday, July 30, 8pm EST
Public coding start Friday, July 30, 8pm EST
Public coding ends Sunday, August 8, 9pm EST


============
Test program
============


A test program is provided to help screen entries and to provide the Golf Score.
Any program that passes the test program can be submitted. If you are surprised that your solution passed the test program, please submit it anyway! That will help me identify bugs in the test program.

================================================================
KiXtart GOLF - How To Play
================================================================


Most importantly, anybody can play, no age restrictions, no penalties, no handicap!

The object in "real" golf is to hit the ball in the hole in the fewest strokes. The object in KiXtart Golf is to get from input (tee) to target (hole) in the fewest keystrokes.

Example: How many positive elements are in array $a?

Array $a could be of structure $a=[1, 2 ,-3, 4, -5, -7, 8, 9]

One approach:
[CODE]for $b=0 to ubound($a)
if $a[$b]>0
$c=$c+1
endif
next[/CODE]for a score of 45.

Another solution is:
[CODE]DO
$b=$b+1
if $a[$b]>0
$c=$c+1
endif
UNTIL $b>(UBOUND($a)+1)[/CODE]for a score of 53.

Better approach: Code sample 1

================================================================
KiXtart GOLF - The Rules
================================================================


1) The goal of KiXtart Golf is to score the lowest strokes.

2) Strokes are all characters in a piece of code except whitespace characters, unless the whitespace character is necessary for the line of code to work. Therefore, carriage returns and line feeds do not count or spaces in between the '=' sign when assigning variables, e.g. '$a = $b' scores 5.

3) Code can be constructed any way you like, as long as it is syntactically correct with KiXtart.

4) The final solution MUST pass all test scripts that accompagny the KiXtart golf challenge.

5) The use of '$' as a variable is allowed.

6) In case of questions about a particular way to count the KiXtart Golf Challenge organizer has the last call.

7) During the private coding phase, no code is allowed to be posted. Violations result in disqualification of said player.

8) During the public coding phase, code should be posted, reused, and borrowed from other players.

9) The test script contains the official KiXgolf scoring engine


================================================================
KiXtart GOLF - The Duration of the Competition
================================================================


1) Private coding phase: From date/time of posting the tournament challenge to Friday, July 30, 8pm EST (BBS+6 time)

2) Public coding phase: From Friday, July 30, 8pm EST (BBS+6 time) to Sunday, August 8, 9pm EST (BBS+6 time)

3) Final results: Sunday, August 8, 9pm EST (BBS+6 time)

You will need the complete package from http://people.bu.edu/jenmeyer/kixtart/kixgolf_vigenere.zip.


LonkeroAdministrator
(KiX Master Guru)
2004-07-24 09:56 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Quote:

The modifed Vigenere cipher will use a unique Caesar shift on a per-word basis corresponding to the wordnumber in the sentence




does this mean that we should look for dots?

also:
Quote:

The lower-case cipher block will only be used if lower-case characters are present in the plain, crypto, or cipher text. The numeric and upper-case block will always be used




in english, lower case is only used if lower-case letters are found in input.


Sealeopard
(KiX Master)
2004-07-24 10:06 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Quote:

does this mean that we should look for dots?



I don't know what you look for ;-) However, the rules specify how non-alphanumeric characters in the input streams are to be handled.
Quote:

n english, lower case is only used if lower-case letters are found in input.



Yes, that is correct.


Sealeopard
(KiX Master)
2004-07-24 10:10 PM
Re: KiXgolf: Vigenere Cipher - Private coding

BTW, for those of you who like to analyze the strenghts and weaknesses of the modified Vigenere cipher. The modifications introduce one major flaw which can result in the encrypted text not being decrypted correctly. Special recognition to the person who can name and explain this weakness.

However, this flaw will not affect the examples provided in this challenge and you are not required to code around this flaw.


LonkeroAdministrator
(KiX Master Guru)
2004-07-24 10:37 PM
Re: KiXgolf: Vigenere Cipher - Private coding

I mean, that your rules says "sentence"
does this mean the whole input string, or blocks separated with dots in it.


Sealeopard
(KiX Master)
2004-07-24 10:47 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Generally, a dot '.' is used to separate sentences. However, a dot between two numbers would not indicate a sentence separation but a decimal point.

LonkeroAdministrator
(KiX Master Guru)
2004-07-24 11:11 PM
Re: KiXgolf: Vigenere Cipher - Private coding

so, how do we separate the sentences in input text?
after all, in your rules it says that the sentences word index has a meaning.


Howard Bullock
(KiX Supporter)
2004-07-24 11:12 PM
Re: KiXgolf: Vigenere Cipher - Private coding

I guess that is part of the challenge.

LonkeroAdministrator
(KiX Master Guru)
2004-07-24 11:24 PM
Re: KiXgolf: Vigenere Cipher - Private coding

to understand the rules?
so, we fall back to the old debate should the rules and goals be clear for everyone to understand or should we have some quessing also included to make it little bit harder.


Sealeopard
(KiX Master)
2004-07-24 11:32 PM
Re: KiXgolf: Vigenere Cipher - Private coding

I don't really see the problem. At least in the English language, the full stop (dot, '.'), exclamation mark '!', and question mark '?' indicates the end of a sentence, while a space indicates a separation between words. Therefore, having this text fragment "This is sentence one. And this is sentence 2" it is quiet obvious that the dot after the word "one" indicates a full stop and therefore the end of a sentence.

LonkeroAdministrator
(KiX Master Guru)
2004-07-24 11:44 PM
Re: KiXgolf: Vigenere Cipher - Private coding

damn.
now, this clarified a lot.
and, we need to also not search for those characters, we need to separate them from decimal stuff and so on...

k, thanks.


LonkeroAdministrator
(KiX Master Guru)
2004-07-25 02:30 AM
Re: KiXgolf: Vigenere Cipher - Private coding

next Q.
what does mean "word is using shift"?
in the vigenere characters are shifted.
should we instead shift words (like the rules seems to say)?
or should we apply some compination of the real vig and word shifting?


Sealeopard
(KiX Master)
2004-07-25 02:46 AM
Re: KiXgolf: Vigenere Cipher - Private coding

Where did you find "word is using shift" in the rules?

In the standard Vigenere cipher, you're using the ciphers that are shifted by one character when you go down the cipher tableu. This is illustrated in the rules. One of the required modifications is that this character shift is based on the position of the word to be encrypted inside it's sentence. Thus the first word's cipher tableau starts with
Code:

ABC...
BCD...
CDE...


In case of the second word, the shift would now be two characters, thus
Code:

ABCDEF...
CDEFGH...
EFGHIJ...


In effect each word inside a sentence to be encrypted is using it's own distinct cipher tableau.


LonkeroAdministrator
(KiX Master Guru)
2004-07-25 03:33 AM
Re: KiXgolf: Vigenere Cipher - Private coding

Quote:

Thus, the first word is using a Caesar shift of one, the second word is using a Caesar shift of two, and so on.





that reads word is using shift.
you must remember that my english didn't come from mothers milk.

but, this thing now understood...
going forward.
got the idea already drafted but no full code yet.


Sealeopard
(KiX Master)
2004-07-25 04:09 AM
Re: KiXgolf: Vigenere Cipher - Private coding

Quote:

my english didn't come from mothers milk



I know, I believe it's vodka-infused, right? ;-)

I'm pretty sure, a couple of people spied on you already and are working on code as we speak :-) So, hurry up!


LonkeroAdministrator
(KiX Master Guru)
2004-07-25 04:38 AM
Re: KiXgolf: Vigenere Cipher - Private coding

I know ppl did.
and the code already found on the board is half way there.
problem now is, how to make that word related shifting happen.

the boundaries of my head is again tested.


LonkeroAdministrator
(KiX Master Guru)
2004-07-25 04:41 AM
Re: KiXgolf: Vigenere Cipher - Private coding

hmm... not sure of english but doesn't ":" mean end of sentence?
heh, should read somewhere the meaning of word "sentence"


LonkeroAdministrator
(KiX Master Guru)
2004-07-25 04:43 AM
Re: KiXgolf: Vigenere Cipher - Private coding

also, I wonder why you didn't include any crypted texts to your example.
this way the working would have proved easier.
now I just need to code a script that does encrypt&decrypt the same way.
doesn't still mean it's correct...


LonkeroAdministrator
(KiX Master Guru)
2004-07-25 06:03 AM
Re: KiXgolf: Vigenere Cipher - Private coding

k, I'm 90% sure I got the encryption right although validator says success 0%.
but that's purely because it does not test neither encryption nor decryption correctness.

with encryption only, the size is 591.



LonkeroAdministrator
(KiX Master Guru)
2004-07-25 06:10 AM
Re: KiXgolf: Vigenere Cipher - Private coding

hey, is the flaw the fact that you can end up with no small letters in your output even if the original text had them?
thus, using wrong decryption "character-set"


LonkeroAdministrator
(KiX Master Guru)
2004-07-25 07:16 AM
Re: KiXgolf: Vigenere Cipher - Private coding

k, code working fine until whitespace occurs.
after that, totally messed up. even the length is different.


LonkeroAdministrator
(KiX Master Guru)
2004-07-25 08:10 AM
Re: KiXgolf: Vigenere Cipher - Private coding

totally out there.
anyone had any luck with the multi-word shifting?
getting frustrated. can't even see where it gets screwed up.


Bryce
(KiX Supporter)
2004-07-25 09:21 AM
Re: KiXgolf: Vigenere Cipher - Private coding

ahh cool!! i think i got it working, and only took a few extra lines

But i do have a question.... the multi work shift? I am not 100% clear on that. Or i am seeing some weird results..

what happens if the shift size is greater than the length of the word?



LonkeroAdministrator
(KiX Master Guru)
2004-07-25 10:48 AM
Re: KiXgolf: Vigenere Cipher - Private coding

if someone wants a table for checking the correctness of the data, here is some code for creating the tables for 1st and 2nd word of sentence:
Code:

$l="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
$x=$l+$l+$l+$l+$l+$l+$l+$l+$l+$l+$l+$l+$l+$l+$l+$l+$l+$l+$l+$l+$l

for $=1 to len($l)
substr($l,$,1) " " substr($l,$) left($l,$-1) ?
next
???
for $=1 to len($l)
substr($l,$,1) " " substr($x,$*2-1,len($l)) ?
next

get $



like you can see, the cipher has the clear flaw that with same key char a crypted char may have multiple matches.
that makes this cipher theoretically useless.


MightyR1
(MM club member)
2004-07-25 01:37 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Time to play,

will try to understand the rules and use pen&paper first.


Like Schwarzenegger said: I'll be back.


Sealeopard
(KiX Master)
2004-07-25 02:20 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Yeah, Jooel found the flaw. Under certain circumstances, when the plain text contains a lower-case character and the cipher key does not, the resulting output text might not contain lower-case characters. In that case, the decryption routine would only work with a cipher tableau containing numeric and upper-case alpha charatcers and fail to properly decrypt the text.

Re: word shift. Just think of each word as it's own little encryption/decryption task with it's own cipher tableau. Since whitespace is passed through the en/de-cryption routines, the output will contain the same number of words as the input. Thus, the way the characters shift from the first cipher tableau to the second cipher tableau are maintained as well. The result is if I for example encrypt "the the", the the first "the" would use the cipher tableau starting as
Code:

ABC...
BCD..


and the second cipher tableau would start with
Code:

ABC...
CDE...


Each "the" would end up with it's own decrypted text even though we only used a single cipher key (actually, we did use two, as the definition of the character shift based on the number of words can be considered a second key).

BTW, Richard H.s Vigenere UDF is prepared to handle these different cipher tableaus.

Quote:


what happens if the shift size is greater than the length of the word?




The shift should not have any relations to the length of a single word. Each word is encrypted with it's own cipher tableau that is constructed based on the position of the word inside the sentence.


LonkeroAdministrator
(KiX Master Guru)
2004-07-25 02:51 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Quote:

... the first "the" would use the cipher tableau starting as
Code:

ABC...
BCD..


and the second cipher tableau would start with
Code:

BCD...
CDE...

...




does not sound correct.
the second tableau has no offset defined in the rules so the first row should be identical to the one in the first word.


Sealeopard
(KiX Master)
2004-07-25 02:54 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Yeah, good spot. I'll correct it. Thanks.

krabourn
(Hey THIS is FUN)
2004-07-25 03:46 PM
Re: KiXgolf: Vigenere Cipher - Private coding

This may be obvious, but I want to make sure I understand. Essentially, we are to pass through anything that is not A-Z,a-z,0-9.

LonkeroAdministrator
(KiX Master Guru)
2004-07-25 03:54 PM
Re: KiXgolf: Vigenere Cipher - Private coding

jens, not totally sure but this seems to not work at all.
not my code but the rules.

if you have input string which has in second word "K" and at the same position in the cipher "I", you encrypt it with "M"
when you decrypt it, the first "M" in the tableau is for "2"
I thought I was messing things up but it is really clearly in the tableau.
oh, and this was without lower case with input of:
$iRC=vigenere("KIXGOLF KIXGOLF","KIXGOLF") ?? $iRC ????
vigenere($iRC,"KIXGOLF",1) ?

if my case proves right, I have good code at 649 strokes.
I have been looking at the second word table all night and this is the only conclusion I found why the code fails.
do you have any prove that it can work?


Sealeopard
(KiX Master)
2004-07-25 03:58 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Quote:

Essentially, we are to pass through anything that is not A-Z,a-z,0-9.



Yes, that is correct.


Howard Bullock
(KiX Supporter)
2004-07-25 04:23 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Quote:

The lower-case cipher block will only be used if lower-case characters are present in the plain, crypto, or cipher text.




What is "crypto"? Are you referring to the "Keyword?

Code:

Keyword: RELAT IONSR ELATI ONSRE LATIO NSREL
Plaintext: TOBEO RNOTT OBETH ATIST HEQUE STION
Ciphertext: KSMEH ZBBLK SMEMP OGAJX SEJCS FLZSY



Sealeopard
(KiX Master)
2004-07-25 04:24 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Crypto=keyword

Sealeopard
(KiX Master)
2004-07-25 04:58 PM
Re: KiXgolf: Vigenere Cipher - Private coding

I guess I have to owe you all an apology. Jooel actually found a problem in the underlying rules with regards to the shifting of letters. when applying the shifts, the cypher table is no longer symmetric, thus one would get ambiguous results during the decryption process. Thus, the decryption process breaks for e.g. the second word.

However, here's the remedy. instead of applying the word-number offset to the rows of the cipher table this word-number offset will be applied to the encrypted character, e.g. encrypted character 'A' with word-offset '1' (first word) results in 'B', and encrypted letter 'b' with word-offset '2' (second word) results in 'C'.

I put a demo cipher process below. I will also change toe rules to reflect this.

Cipher tableau for the second word in a two-word sentence.

Code:

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

0 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
1 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 0
2 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 0 1
3 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 0 1 2
4 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 0 1 2 3
5 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 0 1 2 3 4
6 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 0 1 2 3 4 5
7 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 0 1 2 3 4 5 6
8 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 0 1 2 3 4 5 6 7
9 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 0 1 2 3 4 5 6 7 8
A 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 0 1 2 3 4 5 6 7 8 9
B 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 0 1 2 3 4 5 6 7 8 9 A
C C D E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 A B
D D E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 A B C
E E F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 A B C D
F F G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 A B C D E
G G H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 A B C D E F
H H I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 A B C D E F G
I I J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 A B C D E F G H
J J K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I
K K L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J
L L M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K
M M N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L
N N O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M
O O P Q R S T U V W X Y Z 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N
P P Q R S T U V W X Y Z 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
Q Q R S T U V W X Y Z 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
R R S T U V W X Y Z 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
S S T U V W X Y Z 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
T T U V W X Y Z 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
U U V W X Y Z 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
V V W X Y Z 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
W W X Y Z 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
X X Y Z 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
Y Y Z 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
Z Z 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




keyword : KIXTART
plain : KIXTART
ciphertext : 62WOMKO


keyword : KIXTART
ciphertext : 62WOMKO
Ciphertext-Offset : 40UMKIM
plain : KIXTART


Howard Bullock
(KiX Supporter)
2004-07-25 11:38 PM
Re: KiXgolf: Vigenere Cipher - Private coding

[edit] My shifting altered the entire table so that each word was encrypted with a different table. The entire table shifted by the required offset. By shifting the first row, then processing the the balance of the table, this methodology provides a working solution but was not the exact specification Jens had requested.

I therefore am voiding this post as it does not conform to the challenge.
[/edit]

Hmmm. I seem to have gotten it to work with the original rules.

[CODE]

KiXtart
KiXtart Version = 4.22
KiXforms Version =
KiXGolf Script = kixgolf_vigenere.kix

Computer
OS = Windows 2000 Professional
CPU = Intel Pentium III
Speed = 848 MHz
Memory = 512 MB

KiXGolf Scoring Engine
Scoring Engine = 3.0.3

KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 9 (100%)
Processing Start = 2004/07/25 17:24:51.432
Processing End = 2004/07/25 17:25:15.038
Duration = 0000/00/00 00:00:23.605
KiXGolf Score = 853

Thank you for participating in KiXtart Golf!
[/CODE]


Bryce
(KiX Supporter)
2004-07-26 01:35 AM
Re: KiXgolf: Vigenere Cipher - Private coding

are you sure??

i had code that was passing with a 100% and a score of 447. But the errors inharrent in the original cipher table, were causing weird decryption errors, and they were starting to drive me nuts. But i could not figure out what was happeneing




Howard Bullock
(KiX Supporter)
2004-07-26 05:15 AM
Re: KiXgolf: Vigenere Cipher - Private coding

I have output the input string and the decoded string. They all match...

But after having a beer with Jens and discussing this, I do believe that my code did not implement the the shifting properly. I am revisiting the code now.


LonkeroAdministrator
(KiX Master Guru)
2004-07-26 09:49 AM
Re: KiXgolf: Vigenere Cipher - Private coding

lol!

jens, not sure do I understand the new ruling so good but I have all work day to think about it before I get home and back coding...


LonkeroAdministrator
(KiX Master Guru)
2004-07-26 10:13 AM
Re: KiXgolf: Vigenere Cipher - Private coding

ja, lot simpler. just had to read the rules properly.
I have the code for this already at home, just need to get there :@

gladly all you americano's are sleeping


LonkeroAdministrator
(KiX Master Guru)
2004-07-26 05:12 PM
Re: KiXgolf: Vigenere Cipher - Private coding

blaah.
"? $iValidPercent" is totally useless in your kixgolf.kix
removed it.
also added:
Code:
if instr(@scriptexe,"WKIX")

?"press any key to close"
get $sOutput
endif



just before:
Code:
  exit 0


; any modifications below this line will result in immediate disqualification




LonkeroAdministrator
(KiX Master Guru)
2004-07-26 05:35 PM
Re: KiXgolf: Vigenere Cipher - Private coding

I bet the rules are wrong.
instead of:
Quote:

By default, a Vigenere cipher is using a simple Caesar shift. The modifed Vigenere cipher will add an offset to the encrypted characters on a per-word basis corresponding to the wordnumber in the sentence. Thus, the first word is using an offset of one, the second word is using an offset of two, and so on. For example encrypted character 'A' with word-offset '1' (first word) results in 'B', and encrypted letter 'b' with word-offset '2' (second word) results in 'C'.





it should be:
Quote:

By default, a Vigenere cipher is using a simple Caesar shift. The modifed Vigenere cipher will add an offset to the encrypted characters on a per-word basis corresponding to the wordnumber in the sentence. Thus, the first word is using an offset of one, the second word is using an offset of two, and so on. For example encrypted character 'A' with word-offset '1' (first word) results in 'B', and encrypted letter 'b' with word-offset '2' (second word) results in 'd'.






LonkeroAdministrator
(KiX Master Guru)
2004-07-26 06:20 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Code:

KiXtart
KiXtart Version = 4.22
KiXforms Version =
KiXGolf Script = kixgolf_vigenere.kix

Computer
OS = Windows 2000 Professional
CPU = Intel Pentium III Mobile
Speed = 933 MHz
Memory = 256 MB

KiXGolf Scoring Engine
Scoring Engine = 3.0.3

KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (111%)
Processing Start = 2004/07/26 19:09:56.743
Processing End = 2004/07/26 19:09:56.863
Duration = 0000/00/00 00:00:00.119
KiXGolf Score = 659

Thank you for participating in KiXtart Golf!
press any key to close



Bryce
(KiX Supporter)
2004-07-26 06:40 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Code:

KiXtart
KiXtart Version = 4.22
KiXforms Version =
KiXGolf Script = kixgolf_vigenere.kix

Computer
OS = Windows XP Professional
CPU = Intel(R) Pentium(R) 4 CPU 2.66GHz
Speed = 2656 MHz
Memory = 510 MB

KiXGolf Scoring Engine
Scoring Engine = 3.0.3

KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 5 (55%)
Processing Start = 2004/07/26 11:30:18.894
Processing End = 2004/07/26 11:30:18.956
Duration = 0000/00/00 00:00:00.061
KiXGolf Score = 620

Thank you for participating in KiXtart Golf!



as of now, i am going to say that the "Valid Cipher Ops" portion of the code is broken....

here is a sample output
6SOF 6WT U 3FAI7U 5SJS
use "kix golf" to decrypt it.



LonkeroAdministrator
(KiX Master Guru)
2004-07-26 06:55 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Processing Start = 2004/07/26 19:45:18.324
Processing End = 2004/07/26 19:45:18.434
Duration = 0000/00/00 00:00:00.110
KiXGolf Score = 645

KiXGolf Score = 644


Bryce
(KiX Supporter)
2004-07-26 07:04 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Processing Start = 2004/07/26 11:56:32.412
Processing End = 2004/07/26 11:56:32.444
Duration = 0000/00/00 00:00:00.032
KiXGolf Score = 611



LonkeroAdministrator
(KiX Master Guru)
2004-07-26 07:07 PM
Re: KiXgolf: Vigenere Cipher - Private coding

you got all the ten correct already?

LonkeroAdministrator
(KiX Master Guru)
2004-07-26 07:11 PM
Re: KiXgolf: Vigenere Cipher - Private coding

KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (111%)
Processing Start = 2004/07/26 20:01:30.622
Processing End = 2004/07/26 20:01:30.752
Duration = 0000/00/00 00:00:00.129
KiXGolf Score = 610

[edit]
KiXGolf Score = 598
[edit2]
KiXGolf Score = 583
[edit3]
KiXGolf Score = 568


Bryce
(KiX Supporter)
2004-07-26 08:27 PM
Re: KiXgolf: Vigenere Cipher - Private coding

damn, found a bug in my code, and maby even a bug in kix... this will effect my score



LonkeroAdministrator
(KiX Master Guru)
2004-07-26 08:30 PM
Re: KiXgolf: Vigenere Cipher - Private coding

you talking about iif?
me not using it. it actually adds strokes instead of removing them.


LonkeroAdministrator
(KiX Master Guru)
2004-07-26 09:02 PM
Re: KiXgolf: Vigenere Cipher - Private coding

KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (111%)
Processing Start = 2004/07/26 21:52:35.596
Processing End = 2004/07/26 21:52:35.736
Duration = 0000/00/00 00:00:00.139
KiXGolf Score = 564

Thank you for participating in KiXtart Golf!


[edit]
KiXGolf Score = 561
[edit2]
KiXGolf Score = 552
[edit3]
KiXGolf Score = 546
[edit4]
KiXGolf Score = 539

me only one doing this?

[edit5]
KiXGolf Score = 537
[edit6]
KiXGolf Score = 534
[edit7]
KiXGolf Score = 531


Bryce
(KiX Supporter)
2004-07-26 11:06 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Code:

KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 7 (78%)
Processing Start = 2004/07/26 15:48:50.759
Processing End = 2004/07/26 15:48:50.806
Duration = 0000/00/00 00:00:00.046
KiXGolf Score = 606




bug found and fixed... well not the IIF bug.
I am not sure why i am only getting 7 out of 10... but my own testing code is working....

Code:

$iRC=SETOPTION('Explicit','on')
$iRC=SETOPTION('NoVarsInStrings','on')
$iRC=SETOPTION('WrapAtEOL','on')
;$iRC=SETOPTION('CaseSensitivity','on')
dim $test,$,$Pass,$text,$as,$thing,$iTotal,$ivalid
dim $asVigenere[9]
call "kixgolf_vigenere.udf"

$asVigenere[0]='KIXGOLF','','KIXGOLF'
$asVigenere[1]='KIXGOLF TOURNAMENT','','KIXGOLF'
$asVigenere[2]='KIXGOLF TOURNAMENT','','KIXGOLF TOURNAMENT'
$asVigenere[3]='KiXgolf','','KiXgolf'
$asVigenere[4]='KiXgolf Tournament','','KiXgolf v422'
$asVigenere[5]='Blaise de Vigenere was born in 1523 and received the normal education of a noble of his period, even though he was not a noble.','','Vigenere Cipher'
$asVigenere[6]='The Vigenere cipher basic construction is a combination of a Caesar shift combined with a keyword','','CrYptoGraPhy'
$asVigenere[7]='1234567890','','abcdefghijk'
$asVigenere[8]='abcdefghij','','1234567890'
$asVigenere[9]='Finished!','','Did you win'
$iTotal=ubound($asVigenere)
$iValid=0


for each $thing in $asVigenere
$text = $thing[0]
$pass = $thing[2]
if vigenere(vigenere($text,$pass),$pass,1) <> $text
? $text
? vigenere($text,$pass)
? vigenere(vigenere($text,$pass),$pass,1)
? $pass
else
? "PASS"
endif
next



I don't know if i will be able to get below 600....


LonkeroAdministrator
(KiX Master Guru)
2004-07-26 11:12 PM
Re: KiXgolf: Vigenere Cipher - Private coding

well, while you try:
KiXGolf Score = 528

just wonder, if the pasted code is your own, it looks rather the same as the original.

nope, it doesn't.
you have case-sensitivity turned off.

[edit]
KiXGolf Score = 525


Bryce
(KiX Supporter)
2004-07-26 11:21 PM
Re: KiXgolf: Vigenere Cipher - Private coding

I figured since we were not doing the "AaBa01" cipher, case-sensitivity is no longer needed.

and the Kixgolf gods are laughing at me.... KiXGolf Score = 600


LonkeroAdministrator
(KiX Master Guru)
2004-07-26 11:24 PM
Re: KiXgolf: Vigenere Cipher - Private coding

eh, what cipher we are not using?
case-sensitivity is not needed but as it's in the rules, it is must part.

and, you need either lots of "==" or case-sensitivity.
remember, the cipher still has to include uppercase&lowercase&numbers.


Bryce
(KiX Supporter)
2004-07-26 11:25 PM
Re: KiXgolf: Vigenere Cipher - Private coding

yes! below 600!!

KiXGolf Score = 588



LonkeroAdministrator
(KiX Master Guru)
2004-07-26 11:27 PM
Re: KiXgolf: Vigenere Cipher - Private coding

KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (111%)
Processing Start = 2004/07/27 00:16:59.494
Processing End = 2004/07/27 00:16:59.644
Duration = 0000/00/00 00:00:00.149
KiXGolf Score = 517


Bryce
(KiX Supporter)
2004-07-26 11:57 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Ok, i am very confused on the use of lcase words in the cipher table....

if i am understanding this right, we are not using lcase words for the cipher table, but are to carry the case of a letter through to the finished cipher?

Bryce


maciep
(Korg Regular)
2004-07-27 12:09 AM
Re: KiXgolf: Vigenere Cipher - Private coding

I thought we were using lcase letters in the cipher table.

I personally need to go back and revisit the offset issue. I'm not really using it yet, but i'm still 10 out of 10 correct.


LonkeroAdministrator
(KiX Master Guru)
2004-07-27 12:11 AM
Re: KiXgolf: Vigenere Cipher - Private coding

still finding something...
KiXGolf Score = 514

KiXGolf Score = 510

KiXGolf Score = 507


Bryce
(KiX Supporter)
2004-07-27 12:59 AM
Re: KiXgolf: Vigenere Cipher - Private coding

grrr.... i am going backwards!!

Code:
Tournament       = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (111%)
Processing Start = 2004/07/26 17:50:17.676
Processing End = 2004/07/26 17:50:17.739
Duration = 0000/00/00 00:00:00.063
KiXGolf Score = 664



but i got all bugs out of tables i hope.... :P



LonkeroAdministrator
(KiX Master Guru)
2004-07-27 01:19 AM
Re: KiXgolf: Vigenere Cipher - Private coding

507 was still quite powerfull, straight forward code but this is already doing lot of unneeded job.

saving 2 strokes

KiXGolf Score = 505

[edit]

was too fast there.
after reviewing my code, it had a bug that didn't show up.
fixed and the score is 506


[edit]
KiXGolf Score = 501


LonkeroAdministrator
(KiX Master Guru)
2004-07-27 02:06 AM
Re: KiXgolf: Vigenere Cipher - Private coding

celebrating this new awesome milestone with totally new reply:
Code:

KiXtart
KiXtart Version = 4.22
KiXforms Version =
KiXGolf Script = kixgolf_vigenere.kix

Computer
OS = Windows 2000 Professional
CPU = Intel Pentium III Mobile
Speed = 933 MHz
Memory = 256 MB

KiXGolf Scoring Engine
Scoring Engine = 3.0.3

KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (111%)
Processing Start = 2004/07/27 02:53:55.193
Processing End = 2004/07/27 02:53:55.343
Duration = 0000/00/00 00:00:00.150
KiXGolf Score = 500

Thank you for participating in KiXtart Golf!
press any key to close



maciep
(Korg Regular)
2004-07-27 02:11 AM
Re: KiXgolf: Vigenere Cipher - Private coding

Still not sure if i'm doing this offset thing right (seems a little pointless).

Quote:


KiXtart
KiXtart Version = 4.22
KiXforms Version =
KiXGolf Script = kixgolf_vigenere.kix

Computer
OS = Windows XP Professional
CPU = Intel(R) Xeon(TM) CPU 2.80GHz
Speed = 2790 MHz
Memory = 1024 MB

KiXGolf Scoring Engine
Scoring Engine = 3.0.3

KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (111%)
Processing Start = 2004/07/26 19:57:45.737
Processing End = 2004/07/26 19:57:45.769
Duration = 0000/00/00 00:00:00.032
KiXGolf Score = 399





LonkeroAdministrator
(KiX Master Guru)
2004-07-27 02:15 AM
Re: KiXgolf: Vigenere Cipher - Private coding

why don't you tell how you do it and I can say do you do it wrong

btw, I'm having a code with KiXGolf Score = 498


maciep
(Korg Regular)
2004-07-27 02:24 AM
Re: KiXgolf: Vigenere Cipher - Private coding

encrypting - substract offest from final char pos
decrypting - add offset to final char pos

and the offset is based on the word in the 'sentence'. Anyway, i haven't even started condensing my code yet, which makes me think i'm missing something.

If sounds like i'm doing correctly, what's your encrypted word for the first test? Should be the same as mine right?

-Eric


LonkeroAdministrator
(KiX Master Guru)
2004-07-27 02:39 AM
Re: KiXgolf: Vigenere Cipher - Private coding

well, when encrypting, I add the offset and decrypting=remove it.

can't say for the first one but:
The Vigenere cipher basic construction is a combination of a Caesar shift combined with a keyword

comes out as:
gZD QYyXP5ae WJhdVA F3dks FillEnZ6fl5j dr x KLbh2mGqjkB XD i EJewZI eIbpH NqscBrRF 88yT i Globl55


NTDOCAdministrator
(KiX Master)
2004-07-27 02:55 AM
Re: KiXgolf: Vigenere Cipher - Private coding

Just curious, what kind of scoring engine is it if it does not tell if done correctly? Should the test code confirm the validity of everyones code?

LonkeroAdministrator
(KiX Master Guru)
2004-07-27 03:03 AM
Re: KiXgolf: Vigenere Cipher - Private coding

the scoring engine has had it's limitations in all tournaments.
in this one, I bet jens lacked the time to create a full tester.
as if he would have, the bugs found in the rules probably would have not been there.


LonkeroAdministrator
(KiX Master Guru)
2004-07-27 02:13 PM
Re: KiXgolf: Vigenere Cipher - Private coding

removed two more strokes and got 100% but checked against the above line and didn't match...

LonkeroAdministrator
(KiX Master Guru)
2004-07-27 02:26 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Im really sad that I don't see hoby nor richie here
now it seems like I'm doing my own competition in removing each stroke as slow as possible.

KiXGolf Score = 497

KiXGolf Score = 494

btw, those who want better testing, you can calculate 1 or 2 of the sentences and add them in the encrypted part of the jens' array (which is empty now)
I didn't do that, I had my own tests (like "manual" table matching). but to do like I did, you would already need to have some ready code


Howard Bullock
(KiX Supporter)
2004-07-27 02:38 PM
Re: KiXgolf: Vigenere Cipher - Private coding

http://www.kixtart.org/ubbthreads/showthreaded.php?&Number=122793

LonkeroAdministrator
(KiX Master Guru)
2004-07-27 02:53 PM
Re: KiXgolf: Vigenere Cipher - Private coding

and maciep...
please could you tell if you get some information is your code working correctly or not?
the above score of yours is more than way ahead of me, so some info would be awesome.


maciep
(Korg Regular)
2004-07-27 02:53 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Well i'm not getting the same results as your post above, but i don't think it's the offset. It might be

Quote:

The lower-case cipher block will only be used if lower-case characters are present in the plain, crypto, or cipher text. The numeric and upper-case block will always be used.





Haven't take this into cosideration yet. Anyway, won't be able to play with this until after work tonight.





LonkeroAdministrator
(KiX Master Guru)
2004-07-27 03:07 PM
Re: KiXgolf: Vigenere Cipher - Private coding

back to the special chars.
so, sentence separators:
. ! ?
and word separators:
space, tab, ...

?
I have included some but then thought, are they really needed.
after all, not all whitespace is word-separator, right?

removed tab as a word separator:
KiXGolf Score = 490
KiXGolf Score = 488
KiXGolf Score = 481
KiXGolf Score = 478
KiXGolf Score = 468


LonkeroAdministrator
(KiX Master Guru)
2004-07-27 04:43 PM
Re: KiXgolf: Vigenere Cipher - Private coding

my eyes start to hurt...
btw, I improved my vigenere checker as instructed above and added a check (if cipher, check that both encryption and decryption match the manually entered values).
I got many versions that would have passed the original but failed my check.

anyways:
KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (111%)
Processing Start = 2004/07/27 17:29:09.184
Processing End = 2004/07/27 17:29:09.325
Duration = 0000/00/00 00:00:00.140
KiXGolf Score = 467

Thank you for participating in KiXtart Golf!

KiXGolf Score = 465


LonkeroAdministrator
(KiX Master Guru)
2004-07-27 05:11 PM
Re: KiXgolf: Vigenere Cipher - Private coding

hehee...
ppl will have hard time trying to improve this cryptic crypter

KiXGolf Score = 454

KiXGolf Score = 449


maciep
(Korg Regular)
2004-07-27 05:16 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Well i think my golf score will be going up when i get a chance to get back to this. I definitely need to re-evaluate my white space approach. As of right now, two spaces in a row will increase the offset. Luckily it's only tuesday.





Bryce
(KiX Supporter)
2004-07-27 07:12 PM
Re: KiXgolf: Vigenere Cipher - Private coding

damn it, i keep finding more bugs in kixtart....

Howard Bullock
(KiX Supporter)
2004-07-27 07:24 PM
Re: KiXgolf: Vigenere Cipher - Private coding

That is one of the benefits of KixGolf. If you find a bug we should document and discuss it then pass it along to Ruud. We have found several kixtart nuances in prior Golf outings.

LonkeroAdministrator
(KiX Master Guru)
2004-07-27 09:31 PM
Re: KiXgolf: Vigenere Cipher - Private coding

maciep, I don't think we need to differentiate between multiple whitespaces.
the rules don't say anything about that and in formal language, there is no such thing as double space.
I wish jens would come back and tell what whitespace we need to take care off.
currently, only one that increases the word offset imho is space.


maciep
(Korg Regular)
2004-07-27 10:13 PM
Re: KiXgolf: Vigenere Cipher - Private coding

That works for me. so you have '!.?' as sentence seperators and a space as word seperators, right?

And just so i'm on the same track as you, if there aren't any lower case letters in either of the parameters, we're not supposed to use the lcase alpha-block in our table, right? Anyway, here's the last run.

Code:

KiXtart
KiXtart Version = 4.22
KiXforms Version =
KiXGolf Script = kixgolf_vigenere.kix

Computer
OS = Windows XP Professional
CPU = Intel(R) Xeon(TM) CPU 2.80GHz
Speed = 2790 MHz
Memory = 1024 MB

KiXGolf Scoring Engine
Scoring Engine = 3.0.3

KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (111%)
Processing Start = 2004/07/27 15:59:41.371
Processing End = 2004/07/27 15:59:41.402
Duration = 0000/00/00 00:00:00.031
KiXGolf Score = 435



LonkeroAdministrator
(KiX Master Guru)
2004-07-27 10:31 PM
Re: KiXgolf: Vigenere Cipher - Private coding

damn you!
me at 448 and have no idea where to cut more

yep, same rules.


LonkeroAdministrator
(KiX Master Guru)
2004-07-27 10:54 PM
Re: KiXgolf: Vigenere Cipher - Private coding

yippee!
KiXGolf Score = 432

weird think...
removing all the fine kixgolf code and using stupid syntax seems to give lot better results on this golf.

[&#8364;dit]
KiXGolf Score = 430
KiXGolf Score = 427
KiXGolf Score = 424
KiXGolf Score = 423


maciep
(Korg Regular)
2004-07-28 12:05 AM
Re: KiXgolf: Vigenere Cipher - Private coding

Quote:


KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (111%)
Processing Start = 2004/07/27 17:52:56.453
Processing End = 2004/07/27 17:52:56.484
Duration = 0000/00/00 00:00:00.030
KiXGolf Score = 420





LonkeroAdministrator
(KiX Master Guru)
2004-07-28 12:14 AM
Re: KiXgolf: Vigenere Cipher - Private coding


I got already 2 lot different codes which both come to 423.
running soon out of beer and still no idea what the heck to do to beat you.


maciep
(Korg Regular)
2004-07-28 12:26 AM
Re: KiXgolf: Vigenere Cipher - Private coding

Don't worry about me, i just realized that i missed this

Quote:


If the cipher key contains such characters, they are to be discarded prior to building the cipher table.





So my golf score will be going up i'm sure.


Bryce
(KiX Supporter)
2004-07-28 12:32 AM
Re: KiXgolf: Vigenere Cipher - Private coding

bah i give up.
With the weird upercase/lcase rules, this is no longer a straight shift cipher.

but i did code this

Code:

0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz
123456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz0
23456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz01
3456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz012
456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz0123
56789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz01234
6789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz012345
789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz0123456
89ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz01234567
9ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz012345678
ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz0123456789
YXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz0123456789Z
XWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz0123456789ZY
WVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz0123456789ZYX
VUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz0123456789ZYXW
UTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz0123456789ZYXWV
TSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz0123456789ZYXWVU
SRQPONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz0123456789ZYXWVUT
RQPONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz0123456789ZYXWVUTS
QPONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz0123456789ZYXWVUTSR
PONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz0123456789ZYXWVUTSRQ
ONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz0123456789ZYXWVUTSRQP
NMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz0123456789ZYXWVUTSRQPO
MLKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz0123456789ZYXWVUTSRQPON
LKJIHGFEDCBAabcdefghijklmnopqrstuvwxyz0123456789ZYXWVUTSRQPONM
KJIHGFEDCBAabcdefghijklmnopqrstuvwxyz0123456789ZYXWVUTSRQPONML
JIHGFEDCBAabcdefghijklmnopqrstuvwxyz0123456789ZYXWVUTSRQPONMLK
IHGFEDCBAabcdefghijklmnopqrstuvwxyz0123456789ZYXWVUTSRQPONMLKJ
HGFEDCBAabcdefghijklmnopqrstuvwxyz0123456789ZYXWVUTSRQPONMLKJI
GFEDCBAabcdefghijklmnopqrstuvwxyz0123456789ZYXWVUTSRQPONMLKJIH
FEDCBAabcdefghijklmnopqrstuvwxyz0123456789ZYXWVUTSRQPONMLKJIHG
EDCBAabcdefghijklmnopqrstuvwxyz0123456789ZYXWVUTSRQPONMLKJIHGF
DCBAabcdefghijklmnopqrstuvwxyz0123456789ZYXWVUTSRQPONMLKJIHGFE
CBAabcdefghijklmnopqrstuvwxyz0123456789ZYXWVUTSRQPONMLKJIHGFED
BAabcdefghijklmnopqrstuvwxyz0123456789ZYXWVUTSRQPONMLKJIHGFEDC
Aabcdefghijklmnopqrstuvwxyz0123456789ZYXWVUTSRQPONMLKJIHGFEDCB
abcdefghijklmnopqrstuvwxyz0123456789ZYXWVUTSRQPONMLKJIHGFEDCBA
bcdefghijklmnopqrstuvwxyz0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAa
cdefghijklmnopqrstuvwxyz0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAab
defghijklmnopqrstuvwxyz0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAabc
efghijklmnopqrstuvwxyz0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcd
fghijklmnopqrstuvwxyz0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcde
ghijklmnopqrstuvwxyz0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdef
hijklmnopqrstuvwxyz0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefg
ijklmnopqrstuvwxyz0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefgh
jklmnopqrstuvwxyz0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghi
klmnopqrstuvwxyz0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghij
lmnopqrstuvwxyz0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijk
mnopqrstuvwxyz0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijkl
nopqrstuvwxyz0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklm
opqrstuvwxyz0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmn
pqrstuvwxyz0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmno
qrstuvwxyz0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnop
rstuvwxyz0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopq
stuvwxyz0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqr
tuvwxyz0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrs
uvwxyz0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrst
vwxyz0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrstu
wxyz0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrstuv
xyz0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrstuvw
yz0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwx
z0123456789ZYXWVUTSRQPONMLKJIHGFEDCBAabcdefghijklmnopqrstuvwxy



just watch it for a while and it starts to move!!!!


LonkeroAdministrator
(KiX Master Guru)
2004-07-28 01:09 AM
Re: KiXgolf: Vigenere Cipher - Private coding

you giving up?
hey, not so soon.

thanks maciep, now I can go to sleep.
been watching the code for hours and been searching for kixtart bug that you must have found...
and then you say this.

anyway, was nice having you at this level. got some strokes out of my code, thanks to you


Sealeopard
(KiX Master)
2004-07-28 04:41 AM
Re: KiXgolf: Vigenere Cipher - Private coding

Bryce : Yeah, that thing does start moving:

Howard: We ended up at "Stock's on 2nd" (definitely recommended) :-) and at the airport for 2 hours today (delayed plane from Philly) :-( I'd also recomend the brewpub, good choice.

Jooel: Yes, I was in a hurry to get this KiXgolf started.

Howard and I discussed the current KiXgolf over a couple of beers and what my original intentions were with regards to the whole offset business. Unfortunately, Jooel found a bug in the original version, and told me only about 20 minutes before I had to catch a plane, thus the quick fix requiring the shifting of the encrypted letter.

I hope, that by now everybody has fiured out what exactly the shifting of the letters is about, essentially within the first word, all letters are shifted by +1 after encryption, e.g. '1' to '2' and '2' to '3', whereas for the decryption it would be -1, thus '2' back to '1'. For the second word, it would be '1' to '3' and so on, and the last characters would circle back to the first, e.g. 'z'+1='0' and 'z'+2='1'.

Let me know if you need further clarifications.


Howard Bullock
(KiX Supporter)
2004-07-28 06:31 AM
Re: KiXgolf: Vigenere Cipher - Private coding

KiXtart
KiXtart Version = 4.22
KiXforms Version =
KiXGolf Script = kixgolf_vigenere.kix

Computer
OS = Windows 2000 Professional
CPU = Intel Pentium III
Speed = 848 MHz
Memory = 512 MB

KiXGolf Scoring Engine
Scoring Engine = 3.0.3

KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (111%)
Processing Start = 2004/07/28 00:12:40.774
Processing End = 2004/07/28 00:12:43.408
Duration = 0000/00/00 00:00:02.634
KiXGolf Score = 472

Thank you for participating in KiXtart Golf!

KiXGolf Score = 465
KiXGolf Score = 460
KiXGolf Score = 445
KiXGolf Score = 441
KiXGolf Score = 431


MightyR1
(MM club member)
2004-07-28 04:59 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Really fast you guys.

Me got it working on paper... Now to code it.

Jens, got a question about the 'sentence' rule. A sentence could also end with a ! or a ?. Must we count for this in this game?



LonkeroAdministrator
(KiX Master Guru)
2004-07-28 05:39 PM
Re: KiXgolf: Vigenere Cipher - Private coding

if you read above, he answered to my question which seems very well.
taken his answer, yes, we have !, . and ? as sentence separators.

beware, in the tester there is not a single multi-sentence tasks so it may give 111% even though that part ain't working.

[frustration note]
my laptops touchpad broke down. damn...
need a reboot...


Howard Bullock
(KiX Supporter)
2004-07-28 06:02 PM
Re: KiXgolf: Vigenere Cipher - Private coding


Lonkero, I just might be able to catch you... Keep checking your review mirror.


LonkeroAdministrator
(KiX Master Guru)
2004-07-28 06:12 PM
Re: KiXgolf: Vigenere Cipher - Private coding

this is really weird.
I just tried to fall back to some kix 2.32 syntax and got it shorter!

Code:


KiXtart
KiXtart Version = 4.22
KiXforms Version =
KiXGolf Script = kixgolf_vigenere.kix

Computer
OS = Windows 2000 Professional
CPU = Intel Pentium III Mobile
Speed = 933 MHz
Memory = 256 MB

KiXGolf Scoring Engine
Scoring Engine = 3.0.3

KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (111%)
Processing Start = 2004/07/28 18:59:16.937
Processing End = 2004/07/28 18:59:17.018
Duration = 0000/00/00 00:00:00.080
KiXGolf Score = 418

Thank you for participating in KiXtart Golf!



Howard Bullock
(KiX Supporter)
2004-07-28 07:10 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Ugh!

maciep
(Korg Regular)
2004-07-28 07:34 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Crawling back

KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (111%)
Processing Start = 2004/07/28 13:22:37.949
Processing End = 2004/07/28 13:22:37.980
Duration = 0000/00/00 00:00:00.031
KiXGolf Score = 448
KiXGolf Score = 420
KiXGolf Score = 409


LonkeroAdministrator
(KiX Master Guru)
2004-07-29 01:03 AM
Re: KiXgolf: Vigenere Cipher - Private coding

maciep, you kidding me?

just came home and was ready to hit the sack, and now this!


maciep
(Korg Regular)
2004-07-29 01:09 AM
Re: KiXgolf: Vigenere Cipher - Private coding

you've got plenty of time.

LonkeroAdministrator
(KiX Master Guru)
2004-07-29 02:02 AM
Re: KiXgolf: Vigenere Cipher - Private coding

Bite me!
went to really wicked code (see the execution time)

KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (111%)
Processing Start = 2004/07/29 02:50:12.597
Processing End = 2004/07/29 02:50:13.058
Duration = 0000/00/00 00:00:00.461
KiXGolf Score = 400


LonkeroAdministrator
(KiX Master Guru)
2004-07-29 02:04 AM
Re: KiXgolf: Vigenere Cipher - Private coding

Hehee!
it's time to rock

KiXGolf Score = 398


maciep
(Korg Regular)
2004-07-29 02:06 AM
Re: KiXgolf: Vigenere Cipher - Private coding

Now this is fun

LonkeroAdministrator
(KiX Master Guru)
2004-07-29 02:17 AM
Re: KiXgolf: Vigenere Cipher - Private coding

not really.
already missed 2 working days because of this golf and seems like I will miss third too...


LonkeroAdministrator
(KiX Master Guru)
2004-07-29 02:35 AM
Re: KiXgolf: Vigenere Cipher - Private coding

glad to have some competition though...
wonder where hoby is at... he wasn't that far behind yesterday.


LonkeroAdministrator
(KiX Master Guru)
2004-07-29 03:02 AM
Re: KiXgolf: Vigenere Cipher - Private coding

KiXGolf Score = 397

this is getting weird.
all those nice little holes in kixtart language syntax.
what would we do without them


Howard Bullock
(KiX Supporter)
2004-07-29 03:23 AM
Re: KiXgolf: Vigenere Cipher - Private coding

Still trying...

KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (111%)
Processing Start = 2004/07/28 21:10:38.530
Processing End = 2004/07/28 21:10:40.773
Duration = 0000/00/00 00:00:02.243
KiXGolf Score = 418


LonkeroAdministrator
(KiX Master Guru)
2004-07-29 03:31 AM
Re: KiXgolf: Vigenere Cipher - Private coding

if we calculate the score with the time, you are 7 hours behind me.
and so is your timezone, right?
awesome.


Howard Bullock
(KiX Supporter)
2004-07-29 04:51 AM
Re: KiXgolf: Vigenere Cipher - Private coding

KiXGolf Scoring Engine
Scoring Engine = 3.0.3

KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (111%)
Processing Start = 2004/07/28 22:38:58.651
Processing End = 2004/07/28 22:39:00.574
Duration = 0000/00/00 00:00:01.922
KiXGolf Score = 408
KiXGolf Score = 400
KiXGolf Score = 397

WOO HOO!!

KiXGolf Score = 389
KiXGolf Score = 388


LonkeroAdministrator
(KiX Master Guru)
2004-07-29 10:28 AM
Re: KiXgolf: Vigenere Cipher - Private coding


:sad:


eh, that low and still that fast

I must review my code...


LonkeroAdministrator
(KiX Master Guru)
2004-07-29 11:16 AM
Re: KiXgolf: Vigenere Cipher - Private coding

bang, out of memory after 2G usage.

LonkeroAdministrator
(KiX Master Guru)
2004-07-29 02:48 PM
Re: KiXgolf: Vigenere Cipher - Private coding

can't get it below this:
KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (111%)
Processing Start = 2004/07/29 15:33:55.717
Processing End = 2004/07/29 15:33:56.308
Duration = 0000/00/00 00:00:00.591
KiXGolf Score = 393

got the counter to 390 but none of my machines could ever compute it.
had mem at 5G and still no go, kix crashed with out of mem error


LonkeroAdministrator
(KiX Master Guru)
2004-07-29 03:36 PM
Re: KiXgolf: Vigenere Cipher - Private coding

391...
you still 3 ahead...
will find a way...

[edit]
k, 390

no more than 3 to be in lead...


Howard Bullock
(KiX Supporter)
2004-07-29 03:55 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Lonkero, I know this lead won't last too long. Just needed to give you a few gray hairs. I know you like to have a challenge.

[edit]
OOPS - you have no hair...
[/edit]


LonkeroAdministrator
(KiX Master Guru)
2004-07-29 03:57 PM
Re: KiXgolf: Vigenere Cipher - Private coding

heh.
good morning to you too.
well, I think I can't strip any chars no more but...
so I thought also when I was over 500.


LonkeroAdministrator
(KiX Master Guru)
2004-07-29 04:13 PM
Re: KiXgolf: Vigenere Cipher - Private coding

KiXtart
KiXtart Version = 4.22
KiXforms Version =
KiXGolf Script = kixgolf_vigenere.kix

Computer
OS = Windows 2000 Professional
CPU = Intel Pentium III
Speed = 751 MHz
Memory = 896 MB

KiXGolf Scoring Engine
Scoring Engine = 3.0.3

KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (111%)
Processing Start = 2004/07/29 16:57:11.120
Processing End = 2004/07/29 16:57:11.691
Duration = 0000/00/00 00:00:00.570
KiXGolf Score = 388

Thank you for participating in KiXtart Golf!


maciep
(Korg Regular)
2004-07-29 04:19 PM
Re: KiXgolf: Vigenere Cipher - Private coding

I'm getting there, slow and steady wins the race

Quote:


KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (111%)
Processing Start = 2004/07/29 10:07:11.931
Processing End = 2004/07/29 10:07:11.963
Duration = 0000/00/00 00:00:00.032
KiXGolf Score = 392





maciep
(Korg Regular)
2004-07-29 07:41 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Finally,

KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (111%)
Processing Start = 2004/07/29 13:28:54.644
Processing End = 2004/07/29 13:28:54.675
Duration = 0000/00/00 00:00:00.031
KiXGolf Score = 381
KiXGolf Score = 379


LonkeroAdministrator
(KiX Master Guru)
2004-07-29 09:02 PM
Re: KiXgolf: Vigenere Cipher - Private coding

damn.
I don't understand what magic you boys use.
this is so hard for me and it looks like you just drop the chars like it's nothing


maciep
(Korg Regular)
2004-07-29 10:11 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Magic is running out. I might be done here

KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (111%)
Processing Start = 2004/07/29 15:59:14.236
Processing End = 2004/07/29 15:59:14.267
Duration = 0000/00/00 00:00:00.031
KiXGolf Score = 376


MightyR1
(MM club member)
2004-07-29 11:00 PM
Re: KiXgolf: Vigenere Cipher - Private coding

And I'm not even close:

Code:

KiXtart
KiXtart Version = 4.22
KiXforms Version =
KiXGolf Script = kixgolf_vigenere.kix

Computer
OS = Windows XP Professional
CPU = Intel Pentium II
Speed = 448 MHz
Memory = 384 MB

KiXGolf Scoring Engine
Scoring Engine = 3.0.3

KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (100%)
Processing Start = 2004/07/29 22:35:58.930
Processing End = 2004/07/29 22:35:59.230
Duration = 0000/00/00 00:00:00.300
KiXGolf Score = 695

Thank you for participating in KiXtart Golf!



Code passes testscript but not with sentence thingie / word shift in it...

Jens,

could you check the calculation of the percentage of valid Ops???

Thinking: $iValidPercent=FormatNumber(CDbl($iValid)/$iTotal*100,0)
Should be: $iValidPercent=FormatNumber(CDbl($iValid)/($iTotal+1)*100,0)



MightyR1
(MM club member)
2004-07-29 11:14 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Update:

KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (100%)
Processing Start = 2004/07/29 23:00:50.535
Processing End = 2004/07/29 23:00:50.695
Duration = 0000/00/00 00:00:00.160
KiXGolf Score = 621


Jens,

is there a way to check if we use word shifting?


Howard Bullock
(KiX Supporter)
2004-07-29 11:31 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Arghhh! How am I suppose to get there!? 376!! Great job! I may be done. Will look a little tonight.

Howard Bullock
(KiX Supporter)
2004-07-29 11:33 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Actually, I may be disqualified as I provided a new shifted table for each letter and not each word.

MightyR1
(MM club member)
2004-07-29 11:34 PM
Re: KiXgolf: Vigenere Cipher - Private coding

KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (100%)
Processing Start = 2004/07/29 23:21:34.664
Processing End = 2004/07/29 23:21:34.824
Duration = 0000/00/00 00:00:00.159
KiXGolf Score = 569

Thank you for participating in KiXtart Golf!

Still no word shift. So doesn't count either I guess...


LonkeroAdministrator
(KiX Master Guru)
2004-07-29 11:55 PM
Re: KiXgolf: Vigenere Cipher - Private coding

386, and my andanved tester still approves it.
will check closer as the tweak is a weird one.


LonkeroAdministrator
(KiX Master Guru)
2004-07-30 12:39 AM
Re: KiXgolf: Vigenere Cipher - Private coding

I think the tester script should be improved a little.
talked to mighty-one on msn and it seems that the tester code giving silly false positives is no good.

if someone wants to fill in the blanks, be my quest.
anyhow, this is the tester I use and even though it only has one block with cipher text included, it already does a good job beeping on errenous translations.

; KiXtart Golf
;
;
break on

; standard KiXgolf variables
dim $sGolfScoreUDF, $bGolfScore, $sKiXgolfUDF, $sKiXGolfUDF, $sOutputFile, $bKiXformsRequired
dim $sTitle, $iRC, $sKiXGolfScrEngVer, $sKiXformsVer, $objKiXforms
dim $sStartTimeDate, $sEndTimeDate, $sRunTime
dim $iKiXGolfScore[3], $sOutput, $sResult

; KiXgolf tournament-specific variables
; each Vigenere cipher set consists of the plaintext, the cipher text, and the cipherkey
dim $asVigenere[9], $sPlain, $sCipher, $sKey, $iLoop, $sEncrypted, $sDecrypted
dim $iValid, $iTotal, $sValidCipherOps, $iValidPercent
$asVigenere[0]='KIXGOLF','','KIXGOLF'
$asVigenere[1]='KIXGOLF TOURNAMENT','','KIXGOLF'
$asVigenere[2]='KIXGOLF TOURNAMENT','','KIXGOLF TOURNAMENT'
$asVigenere[3]='KiXgolf','','KiXgolf'
$asVigenere[4]='KiXgolf Tournament','','KiXgolf v4.22'
$asVigenere[5]='Blaise de Vigenere was born in 1523 and received the normal education of a noble of his period, even though he was not a noble.','','Vigenere Cipher'
$asVigenere[6]='The Vigenere cipher basic construction is a combination of a Caesar shift combined with a keyword','gZD QYyXP5ae WJhdVA F3dks FillEnZ6fl5j dr x KLbh2mGqjkB XD i EJewZI eIbpH NqscBrRF 88yT i Globl55','CrYptoGraPhy'
$asVigenere[7]='1234567890','','abcdefghijk'
$asVigenere[8]='abcdefghij','','1234567890'
$asVigenere[9]='Finished!','','Did you win'
$iTotal=ubound($asVigenere)
$iValid=0


; set required options
$sTitle='KiXtart Golf: Vigenere Cipher'
$iRC=SETTITLE($sTitle)
$iRC=SETOPTION('Explicit','on')
$iRC=SETOPTION('NoVarsInStrings','on')
$iRC=SETOPTION('WrapAtEOL','on')
$iRC=SETOPTION('CaseSensitivity','on')

cls

; define whether KiXforms is required
$bKiXformsRequired = 0

if $bKiXformsRequired
$objKiXforms=createobject('KiXtart.form')
if vartype($objKiXforms)=9
$sKiXformsVer=$objKiXforms.version
else
$sKiXformsVer='Cannot find KiXforms DLL. The kiXforms DLL is required to participate in KiXgolf.'
$sKiXformsVer=$sKiXformsVer+' Please download the KiXforms DLL at http://www.kixforms.org.'
$iRC=messagebox($sKiXformsVer,'Cannot find required DLL!',16)
endif
else
$sKiXformsVer=''
endif

$sGolfScoreUDF=@scriptdir+'\'+'kixgolf3.udf'
if exist($sGolfScoreUDF)
call $sGolfScoreUDF
$bGolfScore=1
else
$bGolfScore=0
endif
$sKiXGolfScrEngVer = '3.0.3'

; this is the actual KiXgolf UDF
$sKiXGolfUDF=@scriptdir+'\'+left(@scriptname,-3)+'udf'
if exist($sKiXGolfUDF)
call $sKiXGolfUDF
else
$iRC=messagebox('Cannot find KiXGolf UDF '+$sKiXGolfUDF,'Cannot find file!',16)
exit 2
endif

; initialize official KiXtart Golf Score results file
$sOutputFile=@scriptdir+'\'+left(@scriptname,instrrev(@scriptname,'.'))+'txt'
$iRC=redirectoutput($sOutputFile,1)
? '[code]'
$iRC=redirectoutput('')

; this is the start of the main loop
$sStartTimeDate=@DATE+' '+@TIME+'.'+right('000'+@MSECS,3)

for $iLoop=0 to $iTotal
$sPlain=$asVigenere[$iLoop]
$sCipher=$sPlain[1]
$sKey=$sPlain[2]
$sPlain=$sPlain[0]
if $sPlain
if $sCipher
$sEncrypted=Vigenere($sPlain,$sKey)
$sDecrypted=Vigenere($sCipher,$sKey,1)
if $sEncrypted==$sCipher and $sDecrypted==$sPlain
$iValid=$iValid+1
else
"NON VALID:" ?
"Encrypted: " $sEncrypted ?
"Decrypted: " $sDecrypted ?
"Cipher: " $sCipher ?
"Original: " $sPlain ??
sleep 1
endif
else
$sEncrypted=Vigenere($sPlain,$sKey)
$sDecrypted=Vigenere($sEncrypted, $sKey, not 0)
if $sDecrypted==$sPlain
$iValid=$iValid+1
endif
endif
endif
next

; this is the end of the main loop
$sEndTimeDate=@DATE+' '+@TIME+'.'+right('000'+@MSECS,3)
$sRunTime=datetimediff($sStartTimeDate, $sEndTimeDate)
$iValidPercent=formatnumber(cdbl($iValid)/(1+$iTotal)*100,0)

$sValidCipherOps=''+$iValid+' ('+$iValidPercent+'%)'
; this is the end of main loop


; generate KiXtart Golf Score
if $bGolfScore
$iKiXGolfScore=KiXGolf($sKiXGolfUDF)
else
$iKixGolfScore=''
endif

; generating official KiXGolf Score
$sOutput=$sOutput+@CRLF+'KiXtart'
$sOutput=$sOutput+@CRLF+'KiXtart Version = '+@KIX
$sOutput=$sOutput+@CRLF+'KiXforms Version = '+$sKiXformsVer
$sOutput=$sOutput+@CRLF+'KiXGolf Script = '+@SCRIPTNAME
$sOutput=$sOutput+@CRLF+''
$sOutput=$sOutput+@CRLF+'Computer'
$sOutput=$sOutput+@CRLF+'OS = '+@PRODUCTTYPE
$sOutput=$sOutput+@CRLF+'CPU = '+@CPU
$sOutput=$sOutput+@CRLF+'Speed = '+@MHZ+' MHz'
$sOutput=$sOutput+@CRLF+'Memory = '+(round(cdbl(MEMORYSIZE(0))/2)*2)+' MB'
$sOutput=$sOutput+@CRLF+''
$sOutput=$sOutput+@CRLF+'KiXGolf Scoring Engine'
$sOutput=$sOutput+@CRLF+'Scoring Engine = '+$sKiXGolfScrEngVer
$sOutput=$sOutput+@CRLF+''
$sOutput=$sOutput+@CRLF+'KiXtart Golf Score'
$sOutput=$sOutput+@CRLF+'Tournament = '+$sTitle
$sOutput=$sOutput+@CRLF+'Valid Cipher Ops = '+$sValidCipherOps
$sOutput=$sOutput+@CRLF+'Processing Start = '+$sStartTimeDate
$sOutput=$sOutput+@CRLF+'Processing End = '+$sEndTimeDate
$sOutput=$sOutput+@CRLF+'Duration = '+$sRunTime
$sOutput=$sOutput+@CRLF+'KiXGolf Score = '+$iKiXGolfScore
$sOutput=$sOutput+@CRLF+' '
$sOutput=$sOutput+@CRLF+'Thank you for participating in KiXtart Golf!'

; saving and displaying official KiXtart Golf Score
$iRC=redirectoutput($sOutputFile,0)
? $sOutput+@CRLF+'[/code]'
$iRC=redirectoutput('')
? $sOutput

if instr(@scriptexe,"WKIX")
?"press any key to close"
get $sOutput
endif
exit 0




LonkeroAdministrator
(KiX Master Guru)
2004-07-30 12:47 AM
Re: KiXgolf: Vigenere Cipher - Private coding

k, after talking with pat some more, my code will be disqualified.
my table is not as rules say.
Quote:

The three groups are ordered as follows: 0-9, Z-A, a-z. Thus, the cipher table would consist of the blocks 0-9, Z-A, a-z ordered as "0123456789ZYX ... CBAabc ... xyz" plus the appropriate shifting.




where I read and coded it as:
The three groups are ordered as follows: 0-9, A-Z, a-z. Thus, the cipher table would consist of the blocks 0-9, A-Z, a-z ordered as "0123456789ABC ... XYZabc ... xyz" plus the appropriate shifting.

well, I won't be fixing my code for this thing anymore.
too much wasted energy just to see there was a catch 21.
I surrender. see you boys on public round.


Howard Bullock
(KiX Supporter)
2004-07-30 12:55 AM
Re: KiXgolf: Vigenere Cipher - Private coding

Sorry to hear that Jooel. I have some code you could use to get around that character order issue, but you will have to wait for the public round.


MightyR1
(MM club member)
2004-07-30 12:58 AM
Re: KiXgolf: Vigenere Cipher - Private coding

I'll see if I can get the word shift working...



LonkeroAdministrator
(KiX Master Guru)
2004-07-30 01:23 AM
Re: KiXgolf: Vigenere Cipher - Private coding

k, now I request for proper cipher text.
any will do.

I'm pretty sure I'm over my mess up and the new "KiXGolf Score = 432" code should be right with the rules.


LonkeroAdministrator
(KiX Master Guru)
2004-07-30 01:33 AM
Re: KiXgolf: Vigenere Cipher - Private coding

well, as everyone seems sleeping, I assume I got everything right with the change.

410


maciep
(Korg Regular)
2004-07-30 01:47 AM
Re: KiXgolf: Vigenere Cipher - Private coding

Not sleeping, just taking a break. I too have to re-evaluate some of my code because i was adding the offset when i should have been subtracting it. and visa versa

So i'll take a look at it a little later.


LonkeroAdministrator
(KiX Master Guru)
2004-07-30 01:59 AM
Re: KiXgolf: Vigenere Cipher - Private coding

this is exactly what I cried the tester to be better for.
ARGH!


LonkeroAdministrator
(KiX Master Guru)
2004-07-30 02:03 AM
Re: KiXgolf: Vigenere Cipher - Private coding

btw, dunno about you but in my code the difference between adding and removing is done by the sign


maciep
(Korg Regular)
2004-07-30 02:19 AM
Re: KiXgolf: Vigenere Cipher - Private coding

I wish it were that easy, but too much math has been combined for it to be that easy.

Sealeopard
(KiX Master)
2004-07-30 03:07 AM
Re: KiXgolf: Vigenere Cipher - Private coding

I will improve the test suite and provide encrypted intermediate steps so you can test both the encryption and the decryption.

Jens


LonkeroAdministrator
(KiX Master Guru)
2004-07-30 12:50 PM
Re: KiXgolf: Vigenere Cipher - Private coding

jens, when will you do that?
as far as I know, we are running out of time.
and I thought I would be spending my evening being relaxed and drinking beer/vodka.


Sealeopard
(KiX Master)
2004-07-30 04:56 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Wasn't able to finish yesterday and won't be home until about 11pm today and off-line between 6pm and 11pm.

LonkeroAdministrator
(KiX Master Guru)
2004-07-30 05:55 PM
Re: KiXgolf: Vigenere Cipher - Private coding

so will you extend the private for day or two?

maciep
(Korg Regular)
2004-07-31 12:03 AM
Re: KiXgolf: Vigenere Cipher - Private coding

Alright, i believe i have the offset issue worked out now. Here's the last run.

KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (111%)
Processing Start = 2004/07/30 17:50:18.522
Processing End = 2004/07/30 17:50:18.553
Duration = 0000/00/00 00:00:00.031
KiXGolf Score = 375


Sealeopard
(KiX Master)
2004-07-31 12:20 AM
Re: KiXgolf: Vigenere Cipher - Private coding

Okay, how about extending the private coding to Sunday 9am EST? This will give me time to improve the test suite and everybody else has some more time to shave off a char or two.

LonkeroAdministrator
(KiX Master Guru)
2004-07-31 12:42 AM
Re: KiXgolf: Vigenere Cipher - Private coding

well, the time is ok.
but, the tester is needed BEFORE the end.
it's kinda useless after that.

but thanks for the extra time.
now I can drink friday and saturday and start competing during sunday


maciep
(Korg Regular)
2004-07-31 02:44 AM
Re: KiXgolf: Vigenere Cipher - Private coding

I'm done for the night.

KiXtart Golf Score
Tournament = KiXtart Golf: Vigenere Cipher
Valid Cipher Ops = 10 (111%)
Processing Start = 2004/07/30 20:31:02.039
Processing End = 2004/07/30 20:31:02.070
Duration = 0000/00/00 00:00:00.031
KiXGolf Score = 369


LonkeroAdministrator
(KiX Master Guru)
2004-07-31 03:01 PM
Re: KiXgolf: Vigenere Cipher - Private coding

hmm...
seems like I'm going backwards only from now on.

KiXGolf Score = 422


Sealeopard
(KiX Master)
2004-07-31 05:53 PM
Re: KiXgolf: Vigenere Cipher - Private coding

I've updated the package and now have a couple of encrypted interim steps as well. Download at http://people.bu.edu/jenmeyer/kixtart/kixgolf_vigenere.zip. The package also contains two examples illustrating the encryption and decryption process. I'll be offline until the late evening.

Good luck!


Jack Lothian
(MM club member)
2004-07-31 06:15 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Hi guys,

Missed the game - looks interesting & i would have liked to participate but I was & still am on vacation. Haven't been on the home computer much in the last few weeks.

PS: Jens thanks for the invite. I am looking forward to the next competition! I don't come here as often as I use to because at work my team is cut off from the internet because we are working with confidental information & any access outside the workplace is restricted.


LonkeroAdministrator
(KiX Master Guru)
2004-07-31 10:02 PM
Re: KiXgolf: Vigenere Cipher - Private coding

your script is still screwed up.
it displays some [censored] in the console before showing the report.
and WKIX32 is still not recognized by you.

not first tournament where I cry for this...

and could have included some info what is wrong.
now we have to modify your script if we wanna know.


Howard Bullock
(KiX Supporter)
2004-07-31 10:12 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Can't seem to download the updated package.

LonkeroAdministrator
(KiX Master Guru)
2004-07-31 10:36 PM
Re: KiXgolf: Vigenere Cipher - Private coding

remove the last dot from the link.

LonkeroAdministrator
(KiX Master Guru)
2004-07-31 10:47 PM
Re: KiXgolf: Vigenere Cipher - Private coding

the tester is not valid.
it includes @ in one of the plain texts but does not double it.
still, it expects the outcome to be @.


LonkeroAdministrator
(KiX Master Guru)
2004-08-01 02:41 AM
Re: KiXgolf: Vigenere Cipher - Private coding

nah, all the failing ciphers seem to be wrong...
according to tables anyways.


Sealeopard
(KiX Master)
2004-08-01 03:10 PM
Re: KiXgolf: Vigenere Cipher - Private coding

I did the encoding/decoding manually. Howver, I can redo it and check why it should not be correct.

Sealeopard
(KiX Master)
2004-08-01 03:11 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Also, the first one to post code, please start a new thread, I have to go offline for a while again.

Sealeopard
(KiX Master)
2004-08-01 04:33 PM
Re: KiXgolf: Vigenere Cipher - Private coding

Jooel: I've removed the single '@' sign from the test string, this should no longer cause any problems. I've also manually rechecked the encryption and decryption steps in the two examples I'm providing in the rules. They both check out fine. Please be more specific when you say that something is failing. Finally, I've run the script with WKIX32.EXE as well and cannot see why it shouldn't work. The results text file is being created the same way as with KIX32.EXE. So, what exactly is the problem with using WKIX32?

As far as I can tell, the test suite is working correctly and adheres to the rules. The new version with the '@' sign removed can be downloaded at http://people.bu.edu/jenmeyer/kixtart/kixgolf_vigenere.zip

So, time to post your solutions. I'll start a new thread for this purpose.