Tuesday 3 September 2013

Encryption program test

By the will of Cybersmith!
I have created an encryption program and I seek to ascertain it's integrity. Here is the un-encrypted text:
HAMLET: To be, or not to be--that is the question:
Whether 'tis nobler in the mind to suffer
The slings and arrows of outrageous fortune
Or to take arms against a sea of troubles
And by opposing end them. To die, to sleep--
No more--and by a sleep to say we end
The heartache, and the thousand natural shocks
That flesh is heir to. 'Tis a consummation
Devoutly to be wished. To die, to sleep--
To sleep--perchance to dream: ay, there's the rub,
For in that sleep of death what dreams may come
When we have shuffled off this mortal coil,
Must give us pause. There's the respect
That makes calamity of so long life.
For who would bear the whips and scorns of time,
Th' oppressor's wrong, the proud man's contumely
The pangs of despised love, the law's delay,
The insolence of office, and the spurns
That patient merit of th' unworthy takes,
When he himself might his quietus make
With a bare bodkin? Who would fardels bear,
To grunt and sweat under a weary life,
But that the dread of something after death,
The undiscovered country, from whose bourn
No traveller returns, puzzles the will,
And makes us rather bear those ills we have
Than fly to others that we know not of?
Thus conscience does make cowards of us all,
And thus the native hue of resolution
Is sicklied o'er with the pale cast of thought,
And enterprise of great pitch and moment
With this regard their currents turn awry
And lose the name of action. -- Soft you now,
The fair Ophelia! -- Nymph, in thy orisons
Be all my sins remembered.
And here is the result:
~s‹> fzw2{€…~w€uw2x2xx{uw>2s€v2†zw2…‚‡„€… fzs†2‚s†{w€†2w„{†2x2†z92‡€‰„†z‹2†s}w…> izw€2zw2z{…w~x2{yz†2z{…2ƒ‡{w†‡…2s}w i{†z2s2ts„w2tv}{€Q2iz2‰‡~v2xs„vw~…2tws„> f2y„‡€†2s€v2…‰ws†2‡€vw„2s2‰ws„‹2~{xw> T‡†2†zs†2†zw2v„wsv2x2…w†z{€y2sx†w„2vws†z> fzw2‡€v{…uˆw„wv2u‡€†„‹>2x„2‰z…w2t‡„€ `2†„sˆw~~w„2„w†‡„€…>2‚‡ŒŒ~w…2†zw2‰{~~> S€v2s}w…2‡…2„s†zw„2tws„2†z…w2{~~…2‰w2zsˆw fzs€2x~‹2†2†zw„…2†zs†2‰w2}€‰2€†2xQ fz‡…2u€…u{w€uw2vw…2s}w2u‰s„v…2x2‡…2s~~> S€v2†z‡…2†zw2€s†{ˆw2z‡w2x2„w…~‡†{€ […2…{u}~{wv29w„2‰{†z2†zw2‚s~w2us…†2x2†z‡yz†> S€v2w€†w„‚„{…w2x2y„ws†2‚{†uz2s€v2w€† i{†z2†z{…2„wys„v2†zw{„2u‡„„w€†…2†‡„€2s‰„‹ S€v2~…w2†zw2€sw2x2su†{€@2??2ex†2‹‡2€‰> fzw2xs{„2a‚zw~{s32??2`‹‚z>2{€2†z‹2„{…€… Tw2s~~2‹2…{€…2„wwtw„wv@TMYXQ`F,`{,nq8,{~,z{€,€{,nq99€tm€,u,€tq,}q€u{zF ctq€tq~,3€u,z{nxq~,uz,€tq,yuzp,€{,rrq~ `tq,xuzs,mzp,m~~{ƒ,{r,{€~msq{,r{~€zq [~,€{,€mwq,m~y,msmuz€,m,qm,{r,€~{nxq Mzp,n…,{||{uzs,qzp,€tqy:,`{,puq8,€{,xqq|99 Z{,y{~q99mzp,n…,m,xqq|,€{,m…,ƒq,qzp `tq,tqm~€motq8,mzp,€tq,€t{mzp,zm€~mx,t{ow `tm€,rxqt,u,tqu~,€{:,3`u,m,o{zyym€u{z Pq‚{€x…,€{,nq,ƒutqp:,`{,puq8,€{,xqq|99 `{,xqq|99|q~otmzoq,€{,p~qmyF,m…8,€tq~q3,€tq,~n8 R{~,uz,€tm€,xqq|,{r,pqm€t,ƒtm€,p~qmy,ym…,o{yq ctqz,ƒq,tm‚q,trrxqp,{rr,€tu,y{~€mx,o{ux8 Y€,su‚q,,|mq:,`tq~q3,€tq,~q|qo€ `tm€,ymwq,omxmyu€…,{r,{,x{zs,xurq: R{~,ƒt{,ƒ{xp,nqm~,€tq,ƒtu|,mzp,o{~z,{r,€uyq8 `t3,{||~q{~3,ƒ~{zs8,€tq,|~{p,ymz3,o{z€yqx… `tq,|mzs,{r,pq|uqp,x{‚q8,€tq,xmƒ3,pq
And another example:
Thus do I ever make my fool my purse;
For I mine own gained knowledge should profane,
If I would time expend with such a snipe
But for my sport and profit. I hate the Moor,
And it is thought abroad that 'twixt my sheets
H'as done my office. I know not if't be true,
But I, for mere suspicion in that kind,
Will do, as if for surety. He holds me well;
The better shall my purpose work on him.
Cassio's a proper man. Let me see now:
To get his place, and to plume up my will
In double knavery. How? How? Let's see.
After some time, to abuse Othello's ears
That he is too familiar with his wife.
He hath a person and a smooth dispose
To be suspected--framed to make women false.
The Moor is of a free and open nature
That thinks men honest that but seem to be so;
And will as tenderly be led by th' nose
As asses are.
I have't! It is engendered! Hell and night
Must bring this monstrous birth to the world's light. 
And it's encrypted form
~‡w2‡‚2‹2‰{~~ [€2v‡t~w2}€sˆw„‹@2Z‰Q2Z‰Q2^w†9…2…ww@ Sx†w„2…w2†{w>2†2st‡…w2a†zw~~9…2ws„… fzs†2zw2{…2†2xs{~{s„2‰{†z2z{…2‰{xw@ Zw2zs†z2s2‚w„…€2s€v2s2…†z2v{…‚…w f2tw2…‡…‚wu†wv??x„swv2†2s}w2‰w€2xs~…w@ fzw2_„2{…2x2s2x„ww2s€v2‚w€2€s†‡„w fzs†2†z{€}…2w€2z€w…†2†zs†2t‡†2…ww2†2tw2…M S€v2‰{~~2s…2†w€vw„~‹2tw2~wv2t‹2†z92€…w S…2s……w…2s„w@ [2zsˆw9†32[†2{…2w€yw€vw„wv32Zw~~2s€v2€{yz† _‡…†2t„{€y2†z{…2€…†„‡…2t{„†z2†2†zw2‰„~v9…2~{yz†@`t,p{,U,q‚q~,ymwq,y…,r{{x,y…,|~qG R{~,U,yuzq,{ƒz,smuzqp,wz{ƒxqpsq,t{xp,|~{rmzq8 Ur,U,ƒ{xp,€uyq,q„|qzp,ƒu€t,ot,m,zu|q N€,r{~,y…,|{~€,mzp,|~{ru€:,U,tm€q,€tq,Y{{~8 Mzp,u€,u,€t{st€,mn~{mp,€tm€,3€ƒu„€,y…,tqq€ T3m,p{zq,y…,{rruoq:,U,wz{ƒ,z{€,ur3€,nq,€~q8 N€,U8,r{~,yq~q,|uou{z,uz,€tm€,wuzp8 cuxx,p{8,m,ur,r{~,~q€…:,Tq,t{xp,yq,ƒqxxG `tq,nq€€q~,tmxx,y…,|~|{q,ƒ{~w,{z,tuy: Omu{3,m,|~{|q~,ymz:,Xq€,yq,qq,z{ƒF `{,sq€,tu,|xmoq8,mzp,€{,
Here is an encrypted message:
€†~w2t„ws†z2x2‹‡„…2‹2…s{~… _‡…†2x{~~>2„2w~…w2‹2‚„|wu†2xs{~…> iz{uz2‰s…2†2‚~ws…w@2`‰2[2‰s€† e‚{„{†…2†2w€x„uw>2s„†2†2w€uzs€†> S€v2‹2w€v{€y2{…2vw…‚s{„> g€~w……2[2tw2„w~{wˆwv2t‹2‚„s‹w„> iz{uz2‚{w„uw…2…2†zs†2{†2s……s‡~†… _w„u‹2{†…w~x2s€v2x„ww…2s~~2xs‡~†…@ S…2‹‡2x„2u„{w…2‰‡~v2‚s„v€wv2tw> ^w†2‹‡„2{€v‡~yw€uw2…w†2w2x„ww@Z{ƒ,y…,otm~y,m~q,mxx,{3q~€t~{ƒz8 Mzp,ƒtm€,€~qzs€t,U,tm‚q‥,yuzq,{ƒz8 ctuot,u,y{€,rmuz€:,Z{ƒ8,‥€u,€~q8 U,y€,nq,tq~q,o{zruzqp,n…,…{8 [~,qz€,€{,Zm|xq:,Xq€,yq,z{€8 _uzoq,U,tm‚q,y…,pwqp{y,s{€ Mzp,|m~p{zqp,€tq,pqoqu‚q~8,pƒqxx Uz,€tu,nm~q,uxmzp,n…,…{~,|qxx8 N€,~qxqmq,yq,r~{y,y…,nmzp cu€t,€tq,tqx|,{r,…{~,s{{p,tmzp: Sq
I used the same encryption key each time, so can anyone tell me what the original message was?
All hail Cybersmith!