#123712 - 2004-07-26 05:35 PM
Re: KiXgolf: Vigenere Cipher - Private coding
|
Lonkero
KiX Master Guru
Registered: 2001-06-05
Posts: 22346
Loc: OK
|
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'.
_________________________
!download KiXnet
|
Top
|
|
|
|
#123714 - 2004-07-26 06:40 PM
Re: KiXgolf: Vigenere Cipher - Private coding
|
Bryce
KiX Supporter
Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
|
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.
|
Top
|
|
|
|
#123719 - 2004-07-26 08:27 PM
Re: KiXgolf: Vigenere Cipher - Private coding
|
Bryce
KiX Supporter
Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
|
damn, found a bug in my code, and maby even a bug in kix... this will effect my score
|
Top
|
|
|
|
#123722 - 2004-07-26 11:06 PM
Re: KiXgolf: Vigenere Cipher - Private coding
|
Bryce
KiX Supporter
Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
|
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....
|
Top
|
|
|
|
#123731 - 2004-07-27 12:59 AM
Re: KiXgolf: Vigenere Cipher - Private coding
|
Bryce
KiX Supporter
Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
|
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
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 504 anonymous users online.
|
|
|