Red Gate forums :: View topic - Patch-friendly settings
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SmartAssembly EAP
SmartAssembly EAP forum

Patch-friendly settings

Search in SmartAssembly EAP forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
garethhayter



Joined: 20 Apr 2010
Posts: 32

PostPosted: Thu Apr 29, 2010 12:44 pm    Post subject: Patch-friendly settings Reply with quote

Background: We use binary patches for our application, which means that users only need to download a small file instead of the full setup file. The patch file includes a diff of all files in the installation ie: only changes are included.

I'm not sure whether smartassembly uses any form of randomisation which would cause the obfuscated version of each assembly to be different every time a new obfuscation is performed. This would mean that the patch files would be larger than they could be.

If smartassembly does use any randomisation, it would be nice to be able to specify a seed value when invoking via the commandline. That would mean that it puts the power in the author's hands as to when to create a new seed value and thus get a bit of extra protection, but he could keep the seed value the same for a few builds, just to keep the patch file size small.

Thanks,
Gareth.
_________________
Gareth Hayter
Back to top
View user's profile Send private message
Alex.Davies



Joined: 02 Dec 2008
Posts: 335
Location: Cambridge, uk

PostPosted: Thu Apr 29, 2010 3:02 pm    Post subject: Reply with quote

Hi gareth,
That's an interesting scenario. SA doesn't use a random generator for obfuscation, so a seed value isn't needed. However, the unicode obfuscation is fairly chaotic, so a small change could cause a large amount of types and methods to change name.

The weaker ascii renaming scheme is much less chaotic, I would suggest using that for this situation.

A random number is used for strings encoding. I think this use case is niche enough that I won't be able to add the seed feature for it, at least in this version. Let me know whether you find it causes a large patch size.

Does anyone else use SA in this kind of scenario?

Cheers,
_________________
Alex
Developer,
Red Gate .NET Tools
Back to top
View user's profile Send private message
Sentinel



Joined: 27 Apr 2010
Posts: 7

PostPosted: Thu Apr 29, 2010 10:35 pm    Post subject: Reply with quote

I am aware of this scenario but thought it imposible to generate patch file for changed assembly with acceptable size. It will be nice if it become possible.
Back to top
View user's profile Send private message
garethhayter



Joined: 20 Apr 2010
Posts: 32

PostPosted: Fri Apr 30, 2010 10:45 am    Post subject: Reply with quote

I'll need to perform some tests to check patch size of ascii vs. unicode and strings encoding vs. none. I'll try to get that done this weekend.
_________________
Gareth Hayter
Back to top
View user's profile Send private message
Alex.Davies



Joined: 02 Dec 2008
Posts: 335
Location: Cambridge, uk

PostPosted: Fri Apr 30, 2010 11:33 am    Post subject: Reply with quote

Actually, on closer inspection, the random generator used in strings encoding already has a fixed seed, so the whole thing should be deterministic. However, it's still likely to be chaotic.
_________________
Alex
Developer,
Red Gate .NET Tools
Back to top
View user's profile Send private message
garethhayter



Joined: 20 Apr 2010
Posts: 32

PostPosted: Tue May 04, 2010 10:38 am    Post subject: Reply with quote

Here's an interesting approach by another obfuscation tool: http://www.retrologic.com/rg-docs-patchex.html

Probably not something for this version, but would be nice to aim for it next version...
_________________
Gareth Hayter
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group