General > General Technical Chat

Anyone play with ciphers?

(1/6) > >>

T3sl4co1l:
Like crypto puzzles, and stuff like that.  Have a riddle:


--- Code: ---H]=3g\#t;_c(3,qpy
axu64G):J8Lt7:V;92F61\;!=G28mKw%m6Zt8zq
59B([/TW0=X('.[ <W.z$M:W=5$I/5cf!bL'T\*='x2U-9*#%*uW 1k#FW2U-,9/3nLzw\c 'rX=4[
,WH*>>w7T :*eIg#Z#0=Xd 7e;9b8!85kvo*iU-1Z=mKVG0+e 0O8zg,#bB6
BOwY<=:=>>$#kv<9i(<0%(m$X]6_#4HIu:s0.+P9-'w_#hH2V:P0.+39=l6/[(:[B:PxJ)$/10
o7s*9x=*$b+,3:V(=x-WF5m/V1qW(E1:Px<_(/X!g\k$-9/-;xu+9!1j$Y<(:/B:PxJ)$/12m.Z(y
8xHzXj+(*\:*7\D-9h-pXj+9!1H$-<(Weje0X<6([xZYH++(/1(O=5w%JA25!5H3u25pB#y mC*l
T#uh/1:p0A+(93(,_-X(/1:tTj+:5Iid1x(:! -0J5P9!1H$%h) 5C*$=++E[h(=X3wf5M/v1x(Y
8x:zXj+(*::p72$Uo=4Y7-XEi/)t3jP:%24Y7jX(/1:tTj+:\7D3_#4hifV(0.+C9-'W0Qq
$9 -;<;U9!1j$0920)XjZE-lP*::P70)F)J-;<-+9!1j$-<)-2BhshJ)*/%2T-<(mE Y*x<_(/Z
$$1%TA5I*$>+33[/(=X-w F2'G,QwMehJ5J<6([xLG\0;'RA27!;,M[25pB#D'oM;3_#uhiU)50.+C6
:2V0%(:/B:PxJ)$/12,8qW3E%+9><_(/Xl:_#pH:Hj(0.+397>T%[/-9%-PxJ+981:$S:M-6
:29!],)S25P=#/Tra2=E+je:V(=xVW K,Iy7.jH:Ft00.+397A<%qW*[BS7>J)*/u2[M4(y

--- End code ---

(This is only an excerpt; I have another few kB worth I'm working on.  More examples aren't hard to find.  In fact, it's an HSPICE "protected" model.  There's no restriction on downloading, reading or reverse-engineering this code, so don't worry about anything legally.)

I've poked at this a bit.  The message is plain text, likely uppercase, alphanumeric with some punctuation.  May be comments with mixed case.  The encoded frequency looks an awful lot like plain text, i.e., just a substitution cypher.  I'm not sure yet if the newlines are preserved or converted.  The range of characters used are  33 to 122 (ASCII #), plus 10 (LF).  It's definitely not encrypted, nor a stateful cipher.  That's why I'm thinking substitution.

Tim

Kalvin:
Tim, you naught boy :)

Anyway, the HSPICE (or spice) has a definitive syntax and keywords, so it should not be too hard to figure out the ciphering algorithm.

StillTrying:
"just a substitution cypher"

I'd tend think not, because the average byte value is 129.90, which is getting very close to the random average even in that small 892 byte sample.
I wouldn't really know where to start with that.

N  Ascii Count   %
  1  58 :    36  4.04
  2  40 (    34  3.81
  3  57 9    26  2.91
  4  47 /    25  2.80
  5  45 -    25  2.80
  6  43 +   24  2.69
  7  48 0    22  2.47
  8  50 2    22  2.47
  9  36 $    21  2.35
 10  49 1   21  2.35
 11  61 =   21  2.35
 12  42 *   19  2.13
 13 120 x    18  2.02
 14  53 5    18  2.02
 15  51 3    16  1.79
 16  35 #    16  1.79
 17  88 X    16  1.79
 18  60 <    16  1.79
 19  55 7    15  1.68
 20 106 j    15  1.68
 
Edit: Ignore that bit, I forgot to allow for C&P ascii and not binary, but still the frequency is too spread, it looks random to me, good luck with that!

amyk:
http://web.engr.oregonstate.edu/~moon/ece323/hspice98/files/chapter_28.pdf

--- Quote ---The library encryption algorithm is based on that of a five-rotor Enigma machine. The encryption process allows the user to specify which portions of subcircuits are encrypted. The libraries are encrypted using a key value that Star-Hspice reconstructs for decryption.
--- End quote ---

The name of the circuit is probably the key, the algorithm itself is based on varying permutations at each position. If you have both plaintext and ciphertext together, this doesn't seem hard to break at all, especially if it's a deterministic encryption.

Kalvin:
Running the simulator under a debugger and studying the simulator's data memory may reveal deciphered plain text, which can be used for further analysis of the ciphering algorithm. Reverse engineering the cipher using the debugger can also be one option.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod