Page 7 of 8 « First<45678>
Topic Options
#123792 - 2004-07-29 11:31 PM Re: KiXgolf: Vigenere Cipher - Private coding
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Arghhh! How am I suppose to get there!? 376!! Great job! I may be done. Will look a little tonight.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#123793 - 2004-07-29 11:33 PM Re: KiXgolf: Vigenere Cipher - Private coding
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Actually, I may be disqualified as I provided a new shifted table for each letter and not each word.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#123794 - 2004-07-29 11:34 PM Re: KiXgolf: Vigenere Cipher - Private coding
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
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...
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#123795 - 2004-07-29 11:55 PM Re: KiXgolf: Vigenere Cipher - Private coding
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
386, and my andanved tester still approves it.
will check closer as the tweak is a weird one.
_________________________
!

download KiXnet

Top
#123796 - 2004-07-30 12:39 AM Re: KiXgolf: Vigenere Cipher - Private coding
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
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


_________________________
!

download KiXnet

Top
#123797 - 2004-07-30 12:47 AM Re: KiXgolf: Vigenere Cipher - Private coding
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
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.
_________________________
!

download KiXnet

Top
#123798 - 2004-07-30 12:55 AM Re: KiXgolf: Vigenere Cipher - Private coding
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
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.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#123799 - 2004-07-30 12:58 AM Re: KiXgolf: Vigenere Cipher - Private coding
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
I'll see if I can get the word shift working...

_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#123800 - 2004-07-30 01:23 AM Re: KiXgolf: Vigenere Cipher - Private coding
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
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.
_________________________
!

download KiXnet

Top
#123801 - 2004-07-30 01:33 AM Re: KiXgolf: Vigenere Cipher - Private coding
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, as everyone seems sleeping, I assume I got everything right with the change.

410
_________________________
!

download KiXnet

Top
#123802 - 2004-07-30 01:47 AM Re: KiXgolf: Vigenere Cipher - Private coding
maciep Offline
Korg Regular
*****

Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
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.
_________________________
Eric

Top
#123803 - 2004-07-30 01:59 AM Re: KiXgolf: Vigenere Cipher - Private coding
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
this is exactly what I cried the tester to be better for.
ARGH!
_________________________
!

download KiXnet

Top
#123804 - 2004-07-30 02:03 AM Re: KiXgolf: Vigenere Cipher - Private coding
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
btw, dunno about you but in my code the difference between adding and removing is done by the sign
_________________________
!

download KiXnet

Top
#123805 - 2004-07-30 02:19 AM Re: KiXgolf: Vigenere Cipher - Private coding
maciep Offline
Korg Regular
*****

Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
I wish it were that easy, but too much math has been combined for it to be that easy.
_________________________
Eric

Top
#123806 - 2004-07-30 03:07 AM Re: KiXgolf: Vigenere Cipher - Private coding
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
I will improve the test suite and provide encrypted intermediate steps so you can test both the encryption and the decryption.

Jens
_________________________
There are two types of vessels, submarines and targets.

Top
#123807 - 2004-07-30 12:50 PM Re: KiXgolf: Vigenere Cipher - Private coding
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
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.
_________________________
!

download KiXnet

Top
#123808 - 2004-07-30 04:56 PM Re: KiXgolf: Vigenere Cipher - Private coding
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Wasn't able to finish yesterday and won't be home until about 11pm today and off-line between 6pm and 11pm.
_________________________
There are two types of vessels, submarines and targets.

Top
#123809 - 2004-07-30 05:55 PM Re: KiXgolf: Vigenere Cipher - Private coding
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so will you extend the private for day or two?
_________________________
!

download KiXnet

Top
#123810 - 2004-07-31 12:03 AM Re: KiXgolf: Vigenere Cipher - Private coding
maciep Offline
Korg Regular
*****

Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
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
_________________________
Eric

Top
#123811 - 2004-07-31 12:20 AM Re: KiXgolf: Vigenere Cipher - Private coding
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
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.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 7 of 8 « First<45678>


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 489 anonymous users online.
Newest Members
Timothy, Jojo67, MaikSimon, kvn317, kixtarts2025
17874 Registered Users

Generated in 0.075 seconds in which 0.026 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org