ConfuserEx icon indicating copy to clipboard operation
ConfuserEx copied to clipboard

Customized ConfuserEx

Open uniqmr opened this issue 9 years ago • 6 comments

Dear Sir, Sorry to bother you again.

var l = (uint)Mutation.KeyI0;
uint[] q = Mutation.Placeholder(new uint[Mutation.KeyI0]);

            var k = new uint[0x10];
            var n = (uint)Mutation.KeyI1;
            for (int i = 0; i < 0x10; i++)
           {
                n ^= n >> 12;
                n ^= n << 25;
                n ^= n >> 27;
                k[i] = n;
            }

If I change the above code like following..

var l = (uint)Mutation.KeyI0;
uint[] q = Mutation.Placeholder(new uint[Mutation.KeyI0]);

            var k = new uint[0x16];    
            var n = (uint)Mutation.KeyI1;
            for (int i = 0; i < 0x16; i++)
           {
                n ^= n >> 14;
                n ^= n << 25;
                n ^= n >> 27;
                k[i] = n;
            }

Will it be customized version of ConfuserEx? Will it cause any error inside?

Thanks

uniqmr avatar Feb 27 '16 04:02 uniqmr

Hi, Yes it could be customized like this. However, you will need to change the corresponding part in the encryption process (in EncodePhase.cs).

yck1509 avatar Mar 05 '16 13:03 yck1509

Thanks for reply. In Constant.cs : I wrote:

var k = new uint[0x12];
var n = (uint)Mutation.KeyI1;
for (int i = 0; i < 0x12; i++) {
    n ^= n >> 12;
    n ^= n << 25;
    n ^= n >> 27;
    k[i] = n;
}

In EncodePhase.cs: I wrote :

var key = new uint[0x12];
uint state = keySeed;
for (int i = 0; i < 0x12; i++) {
    state ^= state >> 12;
    state ^= state << 25;
    state ^= state >> 27;
    key[i] = state;
}

Now, after encrypted by customized ConfuserEx, my Software is running well and app size is much smaller (213KB vs 136KB) than that was encrypted by your ConfuserEx 0.6.0.

Is it ok? Why size is smaller?

uniqmr avatar Mar 07 '16 18:03 uniqmr

You may want to use the latest source code to base your edit on, since I fixed a bug that would cause this to happen.

yck1509 avatar Mar 07 '16 18:03 yck1509

Thanks. Brother, Best of luck.

uniqmr avatar Mar 08 '16 04:03 uniqmr

Dear Sir, Modification I have made above is not working in your latest source.

In Constant.cs : I wrote:

var k = new uint[0x12];  // instead of 0x10
var n = (uint)Mutation.KeyI1;
for (int i = 0; i < 0x12; i++) {  // instead of 0x10
    n ^= n >> 12;
    n ^= n << 25;
    n ^= n >> 27;
    k[i] = n;
}

In EncodePhase.cs: I wrote :

var key = new uint[0x12];   // instead of 0x10
uint state = keySeed;
for (int i = 0; i < 0x12; i++) {  // instead of 0x10
    state ^= state >> 12;
    state ^= state << 25;
    state ^= state >> 27;
    key[i] = state;
}

With Normal protection preset it shows the error, please see the attached file. Please help me on this issue. confuser

Thanks.

uniqmr avatar Mar 27 '16 18:03 uniqmr

Some problem... how to fix...? What have I to change in the same part ?

Dexx77 avatar Nov 18 '18 18:11 Dexx77