thx for reading
[1.51]file protection
#1
Posted 02 March 2013 - 02:47 AM
thx for reading
#2
Posted 02 March 2013 - 04:02 AM
#3
Posted 02 March 2013 - 05:42 AM
#4
Posted 02 March 2013 - 05:53 AM
Lua is barely capable (if even!) of doing this, it would literally take months and then more.
#5
Posted 02 March 2013 - 06:57 AM
#6
Posted 02 March 2013 - 11:54 PM
Also encryption isn't necessarily slow, even in CC. RC4 comes to mind.
#7
Posted 03 March 2013 - 02:22 AM
http://pastebin.com/Q20qiLbz
has a critical weakness (find it and you get a cookie :3) (and a fixed version)
basically just encrypts all folders and puts it into one file and sets startup, preventing people from getting in and deleting your shtuff
#8
Posted 03 March 2013 - 02:40 AM
That's more of an OS thing, though. I don't think this is feasible at all.
Also, about Java.
Java programs have to get compiled into Assembly and made into a exe for other users to edit them.
Unless they know assembly.
Java doesn't encrypt, it obfuscates.
Just wanted to let you know.
#9
Posted 03 March 2013 - 02:42 AM
immibis, on 02 March 2013 - 11:54 PM, said:
Also encryption isn't necessarily slow, even in CC. RC4 comes to mind.
technically its possible using a passworded encryption, but then the user would have to input passwords to start the PC or run files :3
#10
Posted 03 March 2013 - 03:37 AM
martin509, on 03 March 2013 - 02:40 AM, said:
That's more of an OS thing, though. I don't think this is feasible at all.
Also, about Java.
Java programs have to get compiled into Assembly and made into a exe for other users to edit them.
Unless they know assembly.
Java doesn't encrypt, it obfuscates.
Just wanted to let you know.
Compilation != obfuscation.
#11
Posted 03 March 2013 - 01:54 PM
martin509, on 03 March 2013 - 02:40 AM, said:
That's more of an OS thing, though. I don't think this is feasible at all.
Also, about Java.
Java programs have to get compiled into Assembly and made into a exe for other users to edit them.
Unless they know assembly.
Java doesn't encrypt, it obfuscates.
Just wanted to let you know.
Java is compiled into Java bytecode, and it's possible to decompile the bytecode or read it directly (after translating it into a human-readable form). It's compiled for efficiency reasons, not security. No matter what you do to the program, a sufficiently determined person can always reverse it.
Pinkishu, on 03 March 2013 - 02:42 AM, said:
#12
Posted 03 March 2013 - 02:03 PM
PixelToast, on 03 March 2013 - 02:22 AM, said:
http://pastebin.com/Q20qiLbz
has a critical weakness (find it and you get a cookie :3) (and a fixed version)
basically just encrypts all folders and puts it into one file and sets startup, preventing people from getting in and deleting your shtuff
Edit: It doesn't seem to actually encrypt anything, it just creates a startup program that requires a password.
Edit 2: Apparently because / is read-only... after making your program ignore that, it does actually delete the files and does actually encrypt them.
Edit 3: Now it scans the files properly, deletes them all (including startup, itself and apis/enc), then crashes without any error message (probably too long without yielding) during genkey, because this code:
for l1=1,len do local num=math.random(1,len) while tKeys[num] do num=math.random(1,len) end tKeys[num]=trueis about the slowest way possible to randomly order a list of numbers.
Then I discovered your encryption algorithm, which relies heavily on table.insert, simply doesn't work on large amounts of data, because table.insert gets slower as the list gets bigger - it's O(n) per insert or O(n^2) overall. Then I didn't really have a choice but to encrypt less data - I originally used 3 copies of 'adventure', then lowered it to 1.
Edit 4: Decryption doesn't work, using startup program it creates. "startup:223: bad argument #1 to pairs (table expected, got string)"
#13
Posted 06 March 2013 - 05:32 PM
martin509, on 03 March 2013 - 02:40 AM, said:
That's more of an OS thing, though. I don't think this is feasible at all.
Also, about Java.
Java programs have to get compiled into Assembly and made into a exe for other users to edit them.
Unless they know assembly.
Java doesn't encrypt, it obfuscates.
Just wanted to let you know.
The JVM is the part that gets turned into machine code, it runs the bytecode as it goes along, and assuming it does a proper JIT system, it should recognise what lines are used most and then cache the machine code so it compiles parts to machine code when it knows they work.
Also, Java generally outputs jars, not exes, though it does generally depend on your compiler settings.
wilcomega, on 02 March 2013 - 02:47 AM, said:
thx for reading
Useful trivia - lua does compile to bytecode just like java, but saving it to file is more tricky than you'd expect. It's not just as simple as writing a string to file, and even then it's easy to make out bits and pieces, particularly strings.
So what you're talking about is doable, but not exactly fun to write.
#17
Posted 14 March 2013 - 06:07 AM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


This topic is locked









