doronb
asked on
Identify the Killers (Decoding Question)
Ok people, here's the newest encoded text-blocks. The first one is the same as the first image I've posted in this question https://www.experts-exchange.com/questions/21314301/Who's-attacking-you-and-what-with.html:
qg{jqsg%{qO\_e{|Pft{qt***_ {#qt5{q__k z8{a{q^+99 W#Y4WWW00+ 3y+W6RR*4E 47)e*E%e*t t~{b
q@lq~xq!'q^q^;zb>q`lMMMq5V xq`:/VXxq2 :qkqzq8a{q 6===6R*$^^ &{<q`qWnj3 2j<{qOn_W+ 8{"{
q^`&-{"{qt736Et-k{g%{q80^^ R)j6j-j8j^ R7=$Y9W)=3 Rk{g%q8g8{ qet7-55r0= 44uu88-{Q{ qR7=
^utQw`~{\q#q7h8q3?wq%<gzgZ gWq)/Ig6qv q0fqzqJq@? ()g"{q$t_9 =7y2{v.Bml "mVq!Xq2Lo STJ[
F]|Fua[Jokt$)1e^+7*+@9^e$E ~{gSL]XF"G J']KGxaC]H r8pwy6r&it 0O8e=E0o@{ qBg~qxg$qM g@q,
q>g2qxq?q,g4qvg%{qx.dpksGi ;IkA\kIFs; P"IdsXtw-^ Ej9j*j6j_6 r&w4y(r0_# sXt{gp{q3^ r*+$
$E0W4uu8-%{6{q8-%Etw4`~ew{ GhqW35qrM< gzq4q%ugdg _g6qvq=X;S q|qu()qnq3 q^:Bq|,{qH 9=7y
!{V?bNq@Zn:MCYK}DRAyhs}Ki\ yAp2r&_`(! w0&r#8!(%{ g|'Gl[x]'F S"|kFXSc[0 E&O=TwE6&R wp(W
&r_{qCg2q,g`qZg4qxg2qMqBg@ qCq/qMg$qB g5{qZ]fo'a HSfUoGS"[d oF|kZ8y5R8 +WEt_{/{qt ;Yuo
{gZ^cqlq?g8q^gHBq.3q0gTEgz gTCqOqzwq* vgRg:7_giq zTqUq]g;&g Qg[qha*g"q >qO]Xq$g8q 5cqK
gZgz-q^fZn'q0q-gJz9Xg)gfq} .qLgJqTgGq fqpgLq|X|g rqDgflgEqA q4gUqbq1q1 g^qCqb-qQ\ {gd6
rX{}gP_gTgrgJVg#wqOq$PgJg' gQPq.qoqvg 6(q9gKq<XG gcgpq>6oqC gPq_qVg5qu qKg-gQmq?g FMg=
qWgZq[fg=gog0~q^geg7gHqeOl kgspoquq`" qZgIqVquqp Cg]g\q<7qv g}qoR<gyq\ "gkXgT?qwq ]gEq
.gE]q3qu_kq$q(qwgSgigs\qr{ gC\:ua{qLg #gRq[,qU"g rzg1[g^q8q -gLsgcqcqh qGgF>gXqKq iDg|
q3AqxSg"qaq0gtgXgaqfqBoq7Z }qzgaqfq]5 qig`)[gaqf ;:g!gUg2st q)g@PzvK]g _idg:g;Wq- q1&5
g2@gFqCgu,glG4qeD[uqz&g'qp &3-q$AgQq) 6oqbqlq\g^ r{g8@1l{^P q!g1qH$qLq 5;q"qmq))m qdgL
qYqaVgLq3(qF6qzTgWqC'qcg}q XYDq=Dg60g #q_gHq5q~g *qWq@g4g-O Uq0g(go|q| }q(>g%gDmg Sbq3
gug(w{q8W^RmQ{5Sg*cgEg[q"d gcgkqBg+q` HugsPg~'ql q]q2g0gZvI g;g1qHWqHg 'g$q;qJgk{ qUO8
z{5Y/$@g1g~g!qKq5G\g]bq#iS qhA{g\}#l= {0g#qXV0Yi q}gRqp]q;0 {qpNIktI{g (g0gPqHlC% 9g7R
g[!q^q@{gYRHz{qVq|uq3qug'k URFGgkqVqK lgL5g(qR=t gLudDgPoqU gcvg:TgS:q %<LqWgUq5q ?cgC
g*g\aghgCO}q%q6qWg!gonqM+q Nhgoqf.gdg ugZ:tq'%gK <;qWq*qIg4 qBq0q3gLgH B/qHqa]qK< gP/[
NRqX\qYg)qJHgaqQgsg^TqIqN( [qTq#q'Vgi -@)ZgXgLsb g]q?g[gosq +q@g'g&qT- {ge^*J{:g" qkqx
This one however, is a bit longer and is a different image:
aiexea:>KJ#re}Jo}ea%rrr#e$ a%=a#a#aHi 5aETea&(YY 6)3-66633( =(y7q88%T8 =6_%twt%tQ Qe'a
1Bb'a`Vcararn.KXZnea!!!R@e /,a!ca!z.v MaHi5aETea 7999q8%yQQ r~e:a5Keax 32x~Kei2ea #E(E
e<a&:ata3Cea%R-76&3HzEY&&5 yx6x3x8x&5 R4(3Y6#9=8 HzEeiRear% R388^T499# #EE3e0ea5R 4&#&
5te:XRa)awO`a0z$aQa~i\idi6 a#"Giwaba- pa.aklC!Qi sea_*u=3E+ eKa2"lvm<a 1MB?na@hu[ ykOR
}PdHs}g\kQ@6!r$`&%)w(&+8re iz|F}Cd[hD JXHGLjZ]&- ^O(q+W_IT= RPE6YreaVi #aCamaXi%e aB"<
n/ei$a.a,i1a>i4eaZU|[LpdoD ]OG\F;DSHf Lo:M%^3&6x 9xrx6x#7^t %9$u&3)+:M %ei+ea-&^r $((6
T69##E3*e9eaE3*6&%9e:Xa^at YOa640a*;a ~i\a-aQPiK iuiwaba9a~ mhaha(!Qi` a=aWVNak:e aJ=3
E+e;a@XKBV>a2a!la~ptjI]{|P G|{fJjth5~ W#7^*%q*^_ EW~QeifAZ\ h]HS};flZk h'HCU7+6p9 ^=Er
UW+ypO^IeaNavi4eac<Z.bXei! aNi~i4a?a< i@a.i%eaKo sU:[IAFgKf sj:;IlHei% eaE(85E$E6 &#e.
a%aja@ba;i&saka\aS0iPiL&aQ a`abi9oisa "&a*?a=ica Ba&i;acaoa fW:ata}2aU iAa\EicSiD diGH
i#ltpNaM]1iFi@G`o?waIkiDi5 ]eaDYh2oce zah^eiHk^` eMidaUaZi: |LaK9u'hy[ irirea91u% e2aN
aG&mi}$agi5iHl}*i]a6#iza]a LQKIa9a=iI ipaji4i;aK aEi8dp&i7a .gaCIiYi@d 7aQi;iUiga 9_iY
ij.araMiIeaChL?eda;Qoi;saC 'iCdi&iy/i ;oa+1Pi*Oi Ei^i!a@yab iXaQFOki") Ra]>iqa{<F a1]l
aAata(,eaX~BGreiZ1QigKaEa- aS|k.ikiPa '6hqi(a.a? i+i=ZigaEa Oa8i@eapmJ JueioaAiAB i%i)
i8a1a]/fdi$aEiGi#a#a#4ikiY i[5igda6fi `a6iq?iS/i 9awaba'vas aZi!iR3ioi #amw_vi`aC \zil
$a_LawijWa8?ea,5$0eQ4M1i9a yPiFa1Ai+i yLipi9eacG `v|e\LaQCi @a0iQa/i2U i#ahan7iWi saEa
)aZi%i`acPiuacW$i]lif?a7a- a7@iU*eaE3 "Ae[aIaJi7 iX&i(ziQiQ aDziSvagiW {alihaj;r! +a%a
rirR?qiwa[N<rYeat\?]i*9yze ;<%alaLitn a8i[aYYa&~ i'aHisi3iP zi=eah<ZH% q]@eilYiGa 5i$h
ri#aJiRitiPasa\RZ'i:i=iCa0 iQa#4a*abI Ia`ji1Czam aDqiW&i-i0 R}$$wiKi-a U$wafOYRio aLEi
Oa~iEi!Da8itasCioiL.iTiYHi kaRiE6iwX1 Ka6ila4a&@ iAd;aIaham +w=i&9>i5a g5=Esei-*@ Ieab
_iril[aIak)Fa\DEa<va}7ik[T {)saX*i]i# a}i[ijavVi QaoiXaSa1a @i]ifa@a&i Xi@a4sa%ak i2ya
c=5,9oBauihti$ciIi:ilgayar Tli0li(i:a *li(i:a*a} afisi|a?a* i'aOa4aE(I iEa>iRB2i0 aliT
i:'ida%E}iYa$6fiZea+B7"Vet i@Zi$i2RaE -iXSja#ayS ja#-aKaz
If you can show some source-code that would decode both of these text-blocks back into their correct images, you'd get the points :)
qg{jqsg%{qO\_e{|Pft{qt***_
q@lq~xq!'q^q^;zb>q`lMMMq5V
q^`&-{"{qt736Et-k{g%{q80^^
^utQw`~{\q#q7h8q3?wq%<gzgZ
F]|Fua[Jokt$)1e^+7*+@9^e$E
q>g2qxq?q,g4qvg%{qx.dpksGi
$E0W4uu8-%{6{q8-%Etw4`~ew{
!{V?bNq@Zn:MCYK}DRAyhs}Ki\
&r_{qCg2q,g`qZg4qxg2qMqBg@
{gZ^cqlq?g8q^gHBq.3q0gTEgz
gZgz-q^fZn'q0q-gJz9Xg)gfq}
rX{}gP_gTgrgJVg#wqOq$PgJg'
qWgZq[fg=gog0~q^geg7gHqeOl
.gE]q3qu_kq$q(qwgSgigs\qr{
q3AqxSg"qaq0gtgXgaqfqBoq7Z
g2@gFqCgu,glG4qeD[uqz&g'qp
qYqaVgLq3(qF6qzTgWqC'qcg}q
gug(w{q8W^RmQ{5Sg*cgEg[q"d
z{5Y/$@g1g~g!qKq5G\g]bq#iS
g[!q^q@{gYRHz{qVq|uq3qug'k
g*g\aghgCO}q%q6qWg!gonqM+q
NRqX\qYg)qJHgaqQgsg^TqIqN(
This one however, is a bit longer and is a different image:
aiexea:>KJ#re}Jo}ea%rrr#e$
1Bb'a`Vcararn.KXZnea!!!R@e
e<a&:ata3Cea%R-76&3HzEY&&5
5te:XRa)awO`a0z$aQa~i\idi6
}PdHs}g\kQ@6!r$`&%)w(&+8re
n/ei$a.a,i1a>i4eaZU|[LpdoD
T69##E3*e9eaE3*6&%9e:Xa^at
E+e;a@XKBV>a2a!la~ptjI]{|P
UW+ypO^IeaNavi4eac<Z.bXei!
a%aja@ba;i&saka\aS0iPiL&aQ
i#ltpNaM]1iFi@G`o?waIkiDi5
aG&mi}$agi5iHl}*i]a6#iza]a
ij.araMiIeaChL?eda;Qoi;saC
aAata(,eaX~BGreiZ1QigKaEa-
i8a1a]/fdi$aEiGi#a#a#4ikiY
$a_LawijWa8?ea,5$0eQ4M1i9a
)aZi%i`acPiuacW$i]lif?a7a-
rirR?qiwa[N<rYeat\?]i*9yze
ri#aJiRitiPasa\RZ'i:i=iCa0
Oa~iEi!Da8itasCioiL.iTiYHi
_iril[aIak)Fa\DEa<va}7ik[T
c=5,9oBauihti$ciIi:ilgayar
i:'ida%E}iYa$6fiZea+B7"Vet
If you can show some source-code that would decode both of these text-blocks back into their correct images, you'd get the points :)
ASKER
Ok qwaletee, lehitraot, ve'be'hatz'la'kha ;)
Actually, to give a hint, synque's code is missing just one small part really :)
Actually, to give a hint, synque's code is missing just one small part really :)
Shouldn't that be u'be'hatz... or maybe u've'hatz... well, I'll try reisntalling the encoder for the dikduk algorithm. ;)
ASKER
LOL :)
Where are you now anyway, in Israel?
Where are you now anyway, in Israel?
New York. You?
ASKER
North Bay, Ontario. Ani Po Biglal Ishti, remember that play? ;)
Ken, mai'vin.
Now, how would that decoder change for an Israeli keyboard? Answer: I don't thin you could, not enough non-Roman charcaters.
Now, how would that decoder change for an Israeli keyboard? Answer: I don't thin you could, not enough non-Roman charcaters.
ASKER
Actually, the decoder doesn't care about Hebrew or English or any other language since if there was a message to encode which would go beyond the English characters, I'd simply encode it as a byte-stream.
The idea behind this encoder is to be able to take any byte-stream -- basically, any value between 0 and 255 -- and encode it as printable characters in the normal ASCII/Keyboard range.
I know encoders like that exist, Base64 for instance, however, I wanted to:
1) Write one myself.
2) Write one that produced more compact results.
3) Write one that produced different results each time you encoded the same data.
I think I got all three "wants", the question of who needs this, now that's a different issue ;)
The idea behind this encoder is to be able to take any byte-stream -- basically, any value between 0 and 255 -- and encode it as printable characters in the normal ASCII/Keyboard range.
I know encoders like that exist, Base64 for instance, however, I wanted to:
1) Write one myself.
2) Write one that produced more compact results.
3) Write one that produced different results each time you encoded the same data.
I think I got all three "wants", the question of who needs this, now that's a different issue ;)
Understood... you just have an index of 256 characters that "happens" to be somewhat aligned with a standard keyboard (NA English). If it was a Hebrew keyboard, your algorithm does not change, and you MIGHT have used a different set of characters and ordering in your table. Put another way, if your table now begins ~1!, nothing prevents you from deciding that the order should be !1~ instead, or dropping the one in favor of some other chavater you don't currently use. That's all I'm saying.
ASKER
Yes, however, the idea was to encode a binary byte-stream as an all-ascii text-block, so I had to stick to conventional English characters...
Okay lemme try to decrypt it this weekend. It looks somewhat more random now. What I know so far is that you still use the same header and the repetitions are handled the same way. Groups of identical characters are also identical in the cipher text, and every plain text character seems to have at most 4 different encodings in the cipher text. My first guess would be that you stopped using the header characters only as a marker and began using their values as well. There's something about a factor of 4 as well ... dunno.
ASKER
/me keeps his mouth shut this time!!!! >;)
Then you might have to wait more than 3 months this time, cause I have no idea at this moment (no one else seems to be interested). There are a lot of funny symmetries in the encrypted text. For example, if I look at every plain text characters and its encoding I get this:
(plain text character: positions of the encoded characters in your qwerty charset)
0: 13 16 23 33
1: 12 17 22 32
2: 11 14 25 31
3: 10 15 24 30
4: 9 20 27 37
5: 8 21 26 36
6: 7 18 29 35
...
Weird, weird. Btw, you should think of it as a riddle. If you just want to encrypt data in a way _I_ couldn't decrypt anymore just XOR it by the output of a pseudo random number generator and store the seed somewhere in the encrypted text. If you keep posting small encoded blocks and hide the encoder on your harddisk no one here would get it, I think.
(plain text character: positions of the encoded characters in your qwerty charset)
0: 13 16 23 33
1: 12 17 22 32
2: 11 14 25 31
3: 10 15 24 30
4: 9 20 27 37
5: 8 21 26 36
6: 7 18 29 35
...
Weird, weird. Btw, you should think of it as a riddle. If you just want to encrypt data in a way _I_ couldn't decrypt anymore just XOR it by the output of a pseudo random number generator and store the seed somewhere in the encrypted text. If you keep posting small encoded blocks and hide the encoder on your harddisk no one here would get it, I think.
ASKER
Waiting more than 3 months is fine by me >;)
The idea after all IS to make this encoding a little more than a simple substitute-algo...
The idea after all IS to make this encoding a little more than a simple substitute-algo...
I still think it's not enough data. Maybe you should at least post another encrypted version of the "old" jpeg.
ASKER
Ok, here it is, the same JPEG image as the first one:
{`|m{O`@|{ost_|DpAU|{T(((t |~{T7|{tt' v0|F|{#Q99 T^r6TTT88Q 7eQ=4__(6u &-&_4u$_4T T!|x
<z{!b>;{#{#'CxB{2X,,,{5XL{ 2:{3zVb?x{ '{v{0F|{4w ww4_(%##5| N{2{={~m32 mN|{oMt=Q0 |b|{
#2)R|L|{T-*4uTR'|`@|{0%##y &m6mRm8m#y -E%r9T&w7_ '|`@{0`Q|{ _T-R55Y8E6 6EE00R|e|{ y-E#
ETY+2!|G{^{-HQ{7{@W{-N`x`Z `U{&{3}`_{ z{8k{B{D/{ @q(`X|{%=W 9w$R|?c{!Z <zb<X{~;?" ]kuG
OsoDJ}dOGygU&r3Q%05_E8-%Q2 q#|`Gca"Dk dLcSKdzF:a ;u8Y)o0R*e EwuQT=t&U% |{,`6{c`#{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x {7`r
`^W|{0T#ynY|7A`&K`t`A{JH`' `l{,`0{2hT `]p{/;{D{d ?`w`jc}`j` ${fw{f`J`# {l{D`:|{[o 0B|7
y{32!{>{/`5{:{5jG`ax{^[A{F S|`G\$k(|0 `${Xz0yR{o `r{Io{H0|{ IN]'Tp|`q` w`s{fXC^-` )i`A
@{0/|`pr"x|{"{A}{7{E`cStiJ \`l{"{:X`J 7`^{_rU`J} a\`sy{[`'c `xu`G:{-N" {=`W{5`~v` l`&`
}d`a`:[I|{-4=.|`y>{BE{zH`U {h{!`g`O`Z xU{k^`'N'{ ={4{p`4{,{ %{7`J`;'{3 {f{aY{:N`s NO.i
{bf{r`Q{;h`[{q`]`(u{p{z)O{ t{9{kX`IW! (K`;`Jsx|` S~AU|J{Q/` c`-{t9|`T= &L|:`k{'{c
And another text-block, again, same image:
aj_h_a'/z{#R_){IP_a@&&&#_5 a@4_a##GO7 _Ta8>_a006 9`3666$$_> a4a(aYm_a5 886_zaRa+a %Caw
atawL_awtWWu_vBVaucVX::l.: aq/na2a2a2 lB/>a^a`a! 'a9a1MaGaO a7Ta*...a5 a8a6Za%a%a r/aY
aQlh32h/_azb#t_>a7<_a8Y*3_ x_a@8-*1r3 GL7Y882(h6 h3h8h82840 `064_._a48 GL7_jR_aR@ 83&&
!94))~~773_=_a2848~r5EY_?R a9vF`a(ayq aw/jOj"j6a 4aTOjWaNcg _a.lt~_!+j oa#a*aTx_a -E-R
_bz;aW;<a@a&a@?Ma%pu]q]oy) GSK$KFA@%@ &F&$!Sw)ro rq(u_jD\Gu GS]tzkc-c; k9k&)Zq(q: ^=Yf
IRIsWYWa:NC<K<BXG_j3a/j5a} j5j1_a/P/U {_j4a|aOa| j2_aU{U,lf 'n'Hfvf',@ e381h9h&h6 h#*!
*%)_?a)a&a$<_a$',@_jo_a-8! &$00196)~~ 737_I_a737 1r%)Y_?a^a EEFa6%{at: /jOa3awIjQ j)jW
aN.Cmfa<ay!+asa4aeba*a]'aL x_a-E-r_BX :aw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1r#_
ORadapjE^jOjfa>}~jlaGaPk'Z
eaij[a5jWa:a)jcanvvj+aian3
KjZa?WYaij{_a#nly]_j(jdnaX
kjSa\6j1jgaVT"jUa,Zj{'jka~
vRj\a7a3j'8jxj`aka.jGZjHj$
~j-j~8yauj`4'a1|5j)DGjrjl6
Rj`afj;etarj`aP2j%a6mafa{a
(a6makj0gpcj*jqHa<[aya`aLj
apaRj-jDL6jlavaLfagjsa.j2a
!q`uaKjuaZPa|q_aZBfG@U_jyj
8)@j:SG(j{FaAjUbjA]jqLaw/a
3$j]/_a6QtSkNY(_jejka@<a/a
'8v_jk5*p_YaYatjzjra=|_jre
ASKER
Also, just to have some fun, here's the text "QwertyEncoding is better than Base64 any day!!", without the "" of course, repeated 10 times:
mfp$H9-.qrSX&5)v!~BvE"(lqq !12q&9XvY9 >4B:2^4525 #5@@
`cma\)$0)QI82^5$&@v$0L8@)) #rK)6^8kt^ (3<?K17)K@ !)kk
lxe'h&`<=~RX&_~b1r:br/#K== W_#=82XvF2 ,$bN#^-w#4 +w33
k`vug=04rqAw$8(W34.W+K)*rr 3@<r$=wcT= #&.L<%&8<8 18,,
ynawo+2@^_u+q~@E_$lE5V!9^^ %(>^3`+?[` 2W/<>=`=>e &=..
pgtqT8*!2Ear(48=E`,=!Z-022 13N2&)rnU) 1)NlN*$^N0 3^nn
sfaxt*25#Ey-8$@*W~l*`"!W## !(/#7`-My` %-n</94=/_ #=??
exv"A&(n*~aC3_9c%r.c-/0'** W21*8_C;F_ N`bK12-&1~ +&!!
rv`eu13=#8i69q@^W9K^1.!~## 0('#R16mS1 _=K,'0+q'_ =q::
qor"t=_n@-fv9`-CR4mC1B8Z@@ 5`1@#(vN]( N0?z18~%1) 7%!!
Each line is its own text block.
mfp$H9-.qrSX&5)v!~BvE"(lqq
`cma\)$0)QI82^5$&@v$0L8@))
lxe'h&`<=~RX&_~b1r:br/#K==
k`vug=04rqAw$8(W34.W+K)*rr
ynawo+2@^_u+q~@E_$lE5V!9^^
pgtqT8*!2Ear(48=E`,=!Z-022
sfaxt*25#Ey-8$@*W~l*`"!W##
exv"A&(n*~aC3_9c%r.c-/0'**
rv`eu13=#8i69q@^W9K^1.!~##
qor"t=_n@-fv9`-CR4mC1B8Z@@
Each line is its own text block.
Doron, is this an intellectual exercise? Or does this have some real-world purpose?
ASKER
Bit of both really.
That is the answer of a cipher.
ASKER
LOL :)
ASKER
So... any progress, or should I just close this question?
Well, I still want to work on it, but right now I can't.
ASKER
Whenever you can is alright, just help me keep the question open :)
ASKER
I would actually like to keep the question open so that synque or qwaletee can decrypt the text-blocks.
Yep, I'm still here as well. I think I'll try it again this weekend. Just didn't want to do the second challenge right after spending a couple of hours on the 'old' question. Can't promise a solution though :P
ASKER
That's alright.. I just thought I'd stop "nagging" ;)
Keep it open I'll have a go over the next few days !
Mark
Mark
ASKER
Basically, any comment posted will keep the question open until an answer's given :)
ASKER
By the way, elvin66/Mark, I suggest you read through the previous question at [ https://www.experts-exchange.com/questions/21314301/Who's-attacking-you-and-what-with.html ] to catch up on what's been going on... :)
>>Basically, any comment posted will keep the question open until an answer's given :)
Not exactly.. if there is no new information for a while and just "Keep it open", the Cleanup Admin takes an action and just start the closings. This way ensuring that noone is just trying to keep a question too long and thus missusing the point ssystem.
Not exactly.. if there is no new information for a while and just "Keep it open", the Cleanup Admin takes an action and just start the closings. This way ensuring that noone is just trying to keep a question too long and thus missusing the point ssystem.
ASKER
I trust you understand, Venabili, that I'm not keeping this question open to spite anyone, or missuse the point system.
Noone said anything on this question - I was explaining practices :)
ASKER
Ah... :o :)
ASKER
So... have we lost all hope?
I just want confirmation for something ... I can decode the three versions of the first image, and the 10 versions of the text string, but when i decode the second image, i get a partly corrupted image : the top 1/3 of the image is fine, but after that, the colors get weird ... can you confirm this, or should i look for a bug in my decoder ?
My mistake ... it decodes fine :) Was a copy-paste problem lol
So, here's my code that breaks your encoding :) It's not very clean code, as it's the result of a lot of tweaking and changing along the way, and i can't be bothered to clean it up atm lol.
---- code block start ----
#include "stdio.h"
char enc[2048] = { 0 };
unsigned char dec[2048] = { 0 };
char alphabet[94 + 1] = "`~1!2@3#4$5%6^7&8*9(0)-_= +qQwWeErRt TyYuUiIoOp P[{]}\\|aA sSdDfFgGhH jJkKlL;:\' \"zZxXcCvV bBnNmM,<.> /?";
char alf[90 + 1];
int find_in_alf(char c) {
int i;
for (i = 0; i < 90; i++) {
if (alf[i] == c)
return i;
}
return -1;
}
int decode(int length) {
int i = 0, j = 0, k = 0;
char prev = '\0';
int prev_base = 0;
int base = 0;
unsigned char block = 0;
j = 0;
for (i = 0; i < 94; i++) {
if ((alphabet[i] != enc[0])&&(alphabet[i] != enc[1])&&(alphabet[i] != enc[2])&&(alphabet[i] != enc[3])) {
alf[j++] = alphabet[i];
}
}
alf[i] = '\0';
j = 0;
k = 0;
prev = '\0';
prev_base = 0;
base = 0;
block = 0;
for (i = 4; i < length; i++) {
if (enc[i] == enc[0]) {
base = 90;
}
else if (enc[i] == enc[1]) {
base = 180;
}
else if (enc[i] == enc[2]) {
base = 0;
block ^= 1;
prev = '\0';
}
else if (enc[i] == enc[3]) {
char number[16];
int count;
int l = 0;
while (enc[++i] != enc[3])
number[l++] = enc[i];
number[l] = '\0';
sscanf(number, "%x", &count);
dec[k++] = (unsigned char) ((unsigned char) find_in_alf(enc[++i]) + base)^((unsigned char) enc[j]);
j = (j + 1) % 4;
prev = enc[i];
//prev_base = base;
for (; count > 1; count--, k++) {
dec[k] = dec[k - 1];
}
if (!block) {
base = 0;
}
}
else {
if ((enc[i] == prev) && (base == prev_base)) {
dec[k] = dec[k - 1];
}
else {
dec[k] = (unsigned char) ((unsigned char) find_in_alf(enc[i]) + base)^((unsigned char) enc[j]);
j = (j + 1) % 4;
prev = enc[i];
prev_base = base;
}
if (!block) {
base = 0;
}
k++;
}
}
return k;
}
int main(int argc, char **argv) {
FILE *in;
FILE *out;
int length = 0;
if (argc != 3) {
fprintf(stdout, "provide input and output files :\n %s <inputfile> <outputfile>\n", argv[0]);
return 1;
}
in = fopen(argv[1], "rb");
length = fread(enc, 1, 2047, in);
if (length <= 0) {
fprintf(stderr, "ERROR : could not read from file\n");
return 1;
}
fclose(in);
length = decode(length);
fprintf(stdout, "decoded %d bytes !\n", length);
out = fopen(argv[2], "wb");
if (fwrite(dec, 1, length, out) <= 0) {
fprintf(stderr, "ERROR : could not write to file\n");
return 1;
}
fclose(out);
return 0;
}
---- code block end ----
It took me a few hours to break ... but that was largely because the original image (of the first text block) was available. That way i could easily work my way back to reverse-engineer your encryption scheme.
Anyway : if you have any further questions, just let me know :)
---- code block start ----
#include "stdio.h"
char enc[2048] = { 0 };
unsigned char dec[2048] = { 0 };
char alphabet[94 + 1] = "`~1!2@3#4$5%6^7&8*9(0)-_=
char alf[90 + 1];
int find_in_alf(char c) {
int i;
for (i = 0; i < 90; i++) {
if (alf[i] == c)
return i;
}
return -1;
}
int decode(int length) {
int i = 0, j = 0, k = 0;
char prev = '\0';
int prev_base = 0;
int base = 0;
unsigned char block = 0;
j = 0;
for (i = 0; i < 94; i++) {
if ((alphabet[i] != enc[0])&&(alphabet[i] != enc[1])&&(alphabet[i] != enc[2])&&(alphabet[i] != enc[3])) {
alf[j++] = alphabet[i];
}
}
alf[i] = '\0';
j = 0;
k = 0;
prev = '\0';
prev_base = 0;
base = 0;
block = 0;
for (i = 4; i < length; i++) {
if (enc[i] == enc[0]) {
base = 90;
}
else if (enc[i] == enc[1]) {
base = 180;
}
else if (enc[i] == enc[2]) {
base = 0;
block ^= 1;
prev = '\0';
}
else if (enc[i] == enc[3]) {
char number[16];
int count;
int l = 0;
while (enc[++i] != enc[3])
number[l++] = enc[i];
number[l] = '\0';
sscanf(number, "%x", &count);
dec[k++] = (unsigned char) ((unsigned char) find_in_alf(enc[++i]) + base)^((unsigned char) enc[j]);
j = (j + 1) % 4;
prev = enc[i];
//prev_base = base;
for (; count > 1; count--, k++) {
dec[k] = dec[k - 1];
}
if (!block) {
base = 0;
}
}
else {
if ((enc[i] == prev) && (base == prev_base)) {
dec[k] = dec[k - 1];
}
else {
dec[k] = (unsigned char) ((unsigned char) find_in_alf(enc[i]) + base)^((unsigned char) enc[j]);
j = (j + 1) % 4;
prev = enc[i];
prev_base = base;
}
if (!block) {
base = 0;
}
k++;
}
}
return k;
}
int main(int argc, char **argv) {
FILE *in;
FILE *out;
int length = 0;
if (argc != 3) {
fprintf(stdout, "provide input and output files :\n %s <inputfile> <outputfile>\n", argv[0]);
return 1;
}
in = fopen(argv[1], "rb");
length = fread(enc, 1, 2047, in);
if (length <= 0) {
fprintf(stderr, "ERROR : could not read from file\n");
return 1;
}
fclose(in);
length = decode(length);
fprintf(stdout, "decoded %d bytes !\n", length);
out = fopen(argv[2], "wb");
if (fwrite(dec, 1, length, out) <= 0) {
fprintf(stderr, "ERROR : could not write to file\n");
return 1;
}
fclose(out);
return 0;
}
---- code block end ----
It took me a few hours to break ... but that was largely because the original image (of the first text block) was available. That way i could easily work my way back to reverse-engineer your encryption scheme.
Anyway : if you have any further questions, just let me know :)
ASKER
I wonder how long it'd've taken you if you had to start from scratch. Anyway... I'm gonna close this question soon, after I ask someone to check your C code (I don't even have a C compiler on my machine.. sorry).
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The image is the right one... but I can only get back to this after the 16th of August as I'm currently away from my computer and codebase and other dev-tools.
Take your time :)
ASKER
I'm back in Canada now and will try to find the time to split the points fairly. :)
ASKER
Thanks to everyone who participated and helped. I gave full points to Infinity08 since the riddle was completely solved.
Qwaletee and Synque, sorry about not giving you guys anything this time.
Qwaletee and Synque, sorry about not giving you guys anything this time.
Well, I suppose I could use Synque's code as a starting point, assimilate the info you gave on why you change dthings, and have a crack at it. But the kids are crying and the migration project is behind, so...
Lehitraot