Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Dollar Plus

by ambrus (Abbot)
on Oct 01, 2010 at 17:51 UTC ( [id://862996]=note: print w/replies, xml ) Need Help??


in reply to Dollar Plus

The story of this obfuscation is this. When martin posted the obfuscation ASCII arithmetic, I praised it in the chatterbox, but mentioned that it would be even more amazing if one could have a similar obfuscation that

worked over the GF(128) field.
martin replied with this obfu the day after, which indeed does what I asked for.

Again, the characters long string literal gives the coefficients of a polynomial. This time, however, the values are over GF(128), represented in the obvious way, with the bit i of the character adding g**i to the value where g is a generator of the field. The first map loop generates the first 257 powers of g, writing them to @+. Then this table is inverted to %+ which functions as a discrete logarithm table. This allows one to compute the product of two values $x, $y as simply $+[$+{$x}+$+{$y}] (except when one of the values is zero for which an extra test $;eq$/ is needed at one place). The polynomial is again evaluated at a points in a geometric series.

Of course, some obfuscations have multiple layers, so one can't easily be sure one does what it looks like. Thus, I verified that my thinking is right by trying to construct a new polynomial.

$;^=$;;$:='+';${::}{$:}=$_,for{},[];$==65;@+=map{$=<<=1; $=^=131,if+128&$=;chr$=}0..1<<8;@+{@+}=(0..126)x$=;print map{$:=$+[$+{$:}+$+{z}];$/=$;;$/=$;eq$/?$_:$+[$+{$/}+$+{ $:}]^$_,for@_;$/}@_=split//,"gi!EVpr/'Vts\6X0Kw\tZj'TF". "\36\5\e?S\b/1! P84&p{\\0FY[\aW%\ck";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://862996]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2024-04-23 06:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found