Jens, can I get a ruling on my methodology of shifting the entire table 2 characters for each character of the input string? Does this offer the required additional complexity which you originally envisioned? Is it acceptable?
Note: the encrypted text does not match that you manually calculated in the test script. For this test only the "Cipher" text in the test script was changed to an empty string as it was in the original test script.
If yes then:
Code:
Function Vigenere($a,$b, optional $c)
Dim $L,$p,$,$s,$z
for $=65 to 90
$s = chr($) + $s + chr($+32)
next
$s = "0123456789" + $s
for $z=1 to len($a)
$L=substr($a,$z,1)
$p=instr($s,$L)
if $p
do
$ = left($b,1)
$b = substr($b,2)+$
$ = instr($s,$)
until $
$=($+2*$z) mod 62 + 1
$=Substr($s,$)+Left($s,$-1)
$L=iif($c,substr($s,instr($,$L),1),substr($,$p,1))
endif
$Vigenere=$Vigenere+$L
next
EndFunction
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 = 11 (100%)
Processing Start = 2004/08/01 22:21:55.034
Processing End = 2004/08/01 22:21:55.154
Duration = 0000/00/00 00:00:00.119
KiXGolf Score = 344
Thank you for participating in KiXtart Golf!
Outputs:
rxE5rzW
KIXGOLF
rxE5rzW 7WlO7UG
KIXGOLF KIXGOLF
rxE5rzW. 9UnM9SE
KIXGOLF. KIXGOLF
rxE5rzW p1rz9bUCS7
KIXGOLF TOURNAMENT
~!#$%^&*()-+?
~!#$%^&*()-+?
rEEEnjA FWQRdlGrZU
KiXgolf Tournament
pBMEqE lb 8pwow2ex SvL 2FNW Mb lo0J EiB zfsji80t ZWA TSPJ7C SYfDLgkUk ne m uZmrx R3 6Nv JUHFGC, dAr tg2Cpq s0 W6W 5QC Z LeqDK.
Blaise de Vigenere was born in 1523 and received the normal education of a noble of his period, ven though he was not a noble.
qdw VojLxABk 3kWI4M 6mF5l XhSi5jsCEkbN iY D wF837t6ZlTB XK i MDCHac IfzC7 V6ZwkUrc NIWM e DDnHkB6
The Vigenere cipher basic construction is a combination of a Caesar shift combined with a keyword
eimquy26Z4
1234567890
eimquy26Z4
abcdefghij
3ECpropc!
Finished!