HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Need an anti-hackable code formula... read...

02-10-2004, 09:21 PM#1
ChaosWolfs
I want to be able to create a password that can be only used by your name and has your score on it.
So far, coding the name into numbers is easy.
My code name is
7645875131

The formula i used was every 3 letters goes into a Number.
ABC = 1
DEF = 2
GHI = 3
JKL = 4
MNO = 5
PQR = 6
STU = 7
VWX = 8
YZ = 9

and then my code becomes backwards making more difficult to decode unless you know the formula. I want to be able to add a score to the password. Lets say if the guy had 277 points. i want the 277 points be in the code, but not saying 277 or else it is easy to change.

I do not want the code to be
2777645875131

because Then the player will know the first 3 digits is his score and he will change it. I want the code to include the score so its not easy to figure out to break like the name code.

Give any formula ideas.. plz or any new code ideas for the name. or something.
02-10-2004, 09:23 PM#2
MysticGeneral
Convert the numbers into letters. Or add an arithmetic formula 277 / 3 * 5 + 15 for example. (I made up random numbers)
02-10-2004, 09:29 PM#3
Bloodlust
make it some steps.. like 5er steps

and if they change it, there is a high chance of getting a score like xx1 xx2 xx3 xx4 xx6 etc at the end and they will get verbally punished for their sexual preferences.

and at the end have the same score with a multiplier like x3

if the first score and the last score / 3 isnt equal.. verbally punish for liking other male cheaters
02-10-2004, 09:30 PM#4
ChaosWolfs
If i convert the score into letters and had 277 as a score.

It would probably look like
AFF7645875131

The only thing that will be changing in every password like everytime you save would be the letters. The first 3 numbers is the score and last 10 digits is numbers. Players might trade letters to get a higher score... or even guess letters.

Also. I need to also change the name code once in a while. So give some name formulas as well as score.
02-10-2004, 09:32 PM#5
MysticGeneral
Do something where for every 10 points that's an "a" and then every other than 10 points goes into a higher letter... z would be 260 points. Then aa would be 270 points. ab 280, az would be 520. ba would be 530. bb = 540, bz = 780. Etc... etc... zzz would be somewhere in the hundred thousands I believe.

Just make it more unobvious - mix around the letters - form an artificial alphabet.
02-10-2004, 09:36 PM#6
AllPainful
Convert name to numbers,

put score at begining of name in numbers

make first digit keep track of how many digits in numbers. (so you don't accidentally convert some of the numbers into the name check, and you don't convert some of the name into the score.)

multiply the WHOLE thing by a number

Then in your "Check" trigger when they type in their PW, you would divided the PW by the same number you multiplied it by, and do "MOD = 0" if MOD does not equal 0 than it is an invalid PW.

So your 2777645875131 would be 32777645875131 (The 3 is to keep track of how many numbers in the score) then you multiply the ENTIRE think by a number (I will use 5) to get 163888229375655 this would be the password, changing 1 digit would be Destroy the PW completely, because
1- It would most likely mess up the "Check" (first) digit
2- If would most likely mess up the "Name" portion of the code
3- It could make is so the MOD does not equal 0 like it should.
02-10-2004, 11:01 PM#7
ChaosWolfs
Quote:
Originally posted by MysticGeneral
Do something where for every 10 points that's an "a" and then every other than 10 points goes into a higher letter... z would be 260 points. Then aa would be 270 points. ab 280, az would be 520. ba would be 530. bb = 540, bz = 780. Etc... etc... zzz would be somewhere in the hundred thousands I believe.

Just make it more unobvious - mix around the letters - form an artificial alphabet.


I created 6 formulas for a name. My name turned out to be
7645875131
7245775141
6488368162
dxycvdcaba
dzycddcaya
xyvvbxaxz

but the letters will take longer to decode since it has to decode to numbers which will take a while to get the number correct. i like allpainful's idea..

Should i make the name code smaller? if i do, more people like with Chaos in the beginning of their name will have the same password....

Warcraft3 for some reasons makes the numbers smaller.... Im pretty sure im doing the math right, but its not coming out correctly...

this is a pain of an ass to do. Can someone create a map with triggers that create not-so-easy-hackable-or-changeable(NoEhOC) codes that includes the name in it or most of the player name and the score (the score is 3 digits long max)

Will give 50 points...
02-10-2004, 11:32 PM#8
Cubasis
I along with DaKaN have brainstormed this matter to the deepest end of the universe. So listen.

Firstly, create your own alphabet. With as many symbols as you can (which any user can type). That includes a-z, A-Z, 0-9. Put them in random order ("create your own alphabet"). So you have like a base-80 format. (base-10 is the common numberic system we know. 0-9, HEX (base-16) f.ex. are 0-9 + A-F.... this is just a good thing to know, but we would then have our own base-80 system which has alot more symbols)).

So, we start at converting the values we want to store, as we're always trying to keep the password as small as possible, you convert everything you want to store into our base-80 format. Then you can do some more formulas on the base-80 text to scramble it even more.

Then, we have 1 "check" digit, and 1 (or 2) "nick" digits.

The nick digit is found first, it basicly does some algorithm on the nickname to provide a unique base-80 digit. It can be everything from adding the asc-ii values of each symbol of his name, multiplying with 5, and taking the last/first "2" numbers from it or whatever you think of.

Then the check digit is created, that uses a similar algorithm as AllPainfull gave an example earlyer, just a unique digit that gets created based on the whole password.

Then when you put it all in your password, you be sure to scramble it to different places, f.ex. put the check-digit into the middle, etc etc.

That's it.

Now to sum up, with a base-80 (note, i'm just guessing at the number of symbols, it's likely more than 80), you can get the following different values from each number of symbols, f.ex.:

1 base-80 digit = 80 in base-10 (our numeric system)
2 base-80 digits = 6400 different values
3 base-80 digits = 512000 different values.

So you effectively get much higher value considering our own numberic system.

So in the end, the password could be like this:

Fjd89Wxpt5P

And somewhere hidden in it is a Check Digit, and a Nick Digit, everything else are the stored values!

Hope this helps.

Cubasis

ps: If you know jass, you might wanna use it and cause then you can combine different segments of the password-creation into different functions, use HeavyLocker on it, and noone will be able to understand it.

ps2: If you want to store booleans in the code, f.ex. what quests the player had finished, or wether he has killed a boss or sumtin, you can store up "6" booleans in a single base-80 digit. So it'll work like a "limited" (only 6 elements) boolean array.
It works like this:
Code:
1 2 4 8 16 32
Think of each of these as a boolean "value". So "1" is the first boolean, "2" is the second, "4" is the third etc etc. Then, you just "add" the "true" booleans together to form a number. F.ex. if i killed boss #2, #5, #6 the number would be:
Code:
2 + 16 + 32 = 50
... Converted to Base-80 it would be sumtin like G (just making it up).
This system creates a unique number for whatever set of booleans you need.
02-10-2004, 11:47 PM#9
Mr. Euthanasia
first convert it to hex, then convert to binary, then inverse, then convert to hex, then take that number to the power of ((5^-1)logx).

For example a score of 246:
246
(you could skip this step) to hex = F6
to binary = 11110110
inverse = 00001001
to hex = 09
9^((5^-1) log[9]) = 1.52095286

EDIT: oooh, instead you could shift all the bits left after you inverse it.
11110110
inverse = 00001001
shift = 00010010
to hex = 12
18^((5^-1) log[18]) = 2.06605469
and if you want you can convert that to hex, which is: 40043A3D

also, chop up your code, don't have score in one place, split it up into 3 or more, same with name and so on.
For example a code would be(I'm only showing score):
2.0xxx660xx54x6x9
02-11-2004, 12:20 AM#10
johnfn
my idea is alot ezr then these other ideas; i suppose if someone was really dedicated they could hack it, but otherwise....

just do something like this

277*3 to get ...erm.... (pulls out mental calculater) 600 + 210 + 21 is..... 831. then do something like scrambling the digits.


277xxxxxxxx becomes xxx1xx8x3xx

thats probably what im going to do.
02-11-2004, 01:33 AM#11
Aiursrage2k
Experimental
1: #of bits, pad with 0 using Max# of bits-#of bits
2: Xor Score with the MaxScore
3: add the binary strings together
4: Split the binary string into chunks of 3 then convert the chunks to Octal

Example:
Score: 5, 3 bits
Max Score: 31, 5 bits

1: 00011
2: 11010
3: 0001111010
Result: 0750

Decode:
0750:Score 5, 3 bits thats okay. Valid
0710: Score 8, 3 bits, too few bits, hes cheating
1550: Score 5, 4 bits, too many bits, hes cheating again.
> 1700 cheating again
02-11-2004, 01:45 AM#12
Darimus
You need to make sure that it sets up units on the map using triggers, and removes all at start... and also make sure removes all items from ground at start, and are placed via triggers... or else if they unprotect the map they may place a hero on the map, make it level 100, full items and stuff... but without that they must edit the JASS triggers and make a script to create the hero, instead of merely placing the hero

[I forgot to mention: I didn't even bother with legacy's code system, I just added 3 custom items to the store and got max level and -saved... gave me a code to use in normal map]
02-11-2004, 09:00 AM#13
Cubasis
Eh, people...

Mr. Euthanasia (btw, your name is hard to type :P).

Firstly, i love your idea of scrambling the binary. But...taking the logarithmics of the result is a "lil" farfetched :P resulting in a gigantic number. Remember, one always wants the tinyest password in their maps. I also reccomend making it upside-down, erhm, that is: 11010011 would then be: 11001011 ... just inverse in the other sense. That creates a even wierder number.

This along with ones' custom case-80 system + a check digit + a nick-digit would make the best password system (along with a few other things).

Johnfn: That is a rather inefficiant system there :/, Although you and me have it in common to scramble the numbers (although i scramble everything in a case-80 system). The bad point is that it's easy for some player to mess with the password, trying different values, and accidently strike gold. It's also highly easy to crack if someone were to look at the code.

Aiursrage: Although a pretty smart system, it's pretty inefficient on size. Considering a value of 31 makes a password the size of 4 symbols. It's has possibilities, like if you added a nick-digit, used some other "case", and etc. But a "Check" digit works just as well, atleast with a unique number from cirka 0-80 (or 0-6400) So if a player tries any other combination as a password, the check-digit will catch him.

Darimus: :P, I don't think that's the problem :P, this is for a password system so people don't hack through it and get themselves a super-hero. There ofcourse always is a danger of someone just placing themselves the hero, but for most maps, they'd not get far. F.ex. in my map, the hero the player chooses gets put to a certain array, and is accessed from there throughout the script, so he can't use the lvl 100 hero to f.ex. do quests, buy stuff, or anything.

Anyways

Cubasis
02-11-2004, 11:00 AM#14
johnfn
alright here, heres my _other_ idea, i suppose its going to be alot harder to crack...

what you do is first input a 'check' code. First what you do is scramble around the digits a bit

120[score]0[hero class]09[level]223[ability level]65[name check]

then what we do is say... do random arithmatic with the two numbers. so maybe 120 will be xor'ed, and 0 multiplied (by the check code), ect, ect.

then you could scramble it based on the check code. How? Im not exactly sure, but ideas are coming to mind...hmmm....

anyway, this type of code would be VERY hard to crack because you would need to know the check code, or else none of the password would unscramble right. You would need to know the password to get the score and hero class right.


p.s. there is the possibility that a hacker would try to keep on entering 0 as the check code. To undo this, have the computer generate a check code (i.e. a random # from 1 to 255).

p.s.s. I suppose the worst part about this is the length... not only do you need to write down the code, you also need the 'check' code.


Hope my idea was helpful, or provided inspiration, or something...
02-11-2004, 12:22 PM#15
Cubasis
lol, DUDE!

Read what i wrote above. I and DaKaN (the one with the old old password-saving thread in Triggers And Utilities) have worked together todevelope/brainstorm the "best" password saving system possible in wc3...

In it, there are only 2 (or 3, if you choose) "extra" digits (beside the stored values). A Check digit...similar to what you're doing, but just 1 (or 2) symbol for the whole password... this is used to check if a password is legit. Then a Nick digit that does a algorithm on the players' nick to result in 1 digit. These are put somewhere in the password (not on the ends that is).

Then all the values are "Converted" to your own custom-made language (with 62 symbols (that is, a-z, A-Z, 0-9)) so they get effectively "reduced" in size.

f.ex. the alphabet can be like this
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890

Note, this is non "scrambled", but you would scramble up the alphabet to make it even harder to crack. Then if you wanted to score the value 487. It would be: g1

And then they would be scrambled into the password to be like:

xxgxxCxxxx1xNx

(where C is check digit, and N is nick digit (just an example)).

THAT, is the ultimate password system.... (oh, and i forgot to add "Mr. Euthanasia" bit-scramble system to make it even harder to crack (if that's possible)).

So, while that is the ultimate password system, it certainly isn't a easy one to code (preferably requires extensive knowledge in jass). So, you might wanna create a simpler one for yourself, like johnfn has been suggesting (although his last one was kinda.... ineffective in size, and even not so much easier to "code")

Cubasis