Question...
Question...
Using this table, how would you guys figure out the other values?
TABLE
FB -> 00
2C -> CF
3B -> C0
0A -> F1
0C -> EF
TABLE
FB -> 00
2C -> CF
3B -> C0
0A -> F1
0C -> EF
Re:Question...
My first quess what xor with constant:
0xfb xor 0xfb = 0x00
0x3b xor 0xfb = 0xcf
0x0a xor 0xfb = 0xf1
But strangely, 0x2c xor 0xfb = 0xd7 and 0x0c xor 0xfb = 0xf7
So, 0x2c and 0x0c are off. At this point, I draw a bit-table, to ease figuring out what is happening..
111|11|011 = 0xFB
000|00|000 = 0x00
001|01|100 = 0x2c ->
110|10|111 = 0xD7, should have got 0xCF
110|01|111 = 0xCF
001|11|011 = 0x3b ->
110|00|000 = 0xC0
000|01|010 = 0x0a ->
111|10|001 = 0xf1
000|01|100 = 0x0c ->
111|10|111 = 0xf7, should have got 0xef
111|01|111 = 0xef
So at least xorring with 0xe3 inverts all the right bits. It's always the two middle bits that cause complications. Taking these bits alone, gives us:
11 -> 00, 01 -> 01 or 10 ???.. Clearly not taking enough bits to account.
It seems that when 0x02 is set, we need to xor the middle bits. So algorithm becomes:
1. xor the original number with 0xe3
2. if 0x02 was set in the original number, xor again with 0x18
Alternatively, since 0x04 and 0x02 are never set at the same time in the given examples, we could xor with 0x18 when 0x02 is not set and get the same results.
Ok, I admit, I did take some dead-ends, but mainly because I typoed my calculations and got weird results from my computer.
0xfb xor 0xfb = 0x00
0x3b xor 0xfb = 0xcf
0x0a xor 0xfb = 0xf1
But strangely, 0x2c xor 0xfb = 0xd7 and 0x0c xor 0xfb = 0xf7
So, 0x2c and 0x0c are off. At this point, I draw a bit-table, to ease figuring out what is happening..
111|11|011 = 0xFB
000|00|000 = 0x00
001|01|100 = 0x2c ->
110|10|111 = 0xD7, should have got 0xCF
110|01|111 = 0xCF
001|11|011 = 0x3b ->
110|00|000 = 0xC0
000|01|010 = 0x0a ->
111|10|001 = 0xf1
000|01|100 = 0x0c ->
111|10|111 = 0xf7, should have got 0xef
111|01|111 = 0xef
So at least xorring with 0xe3 inverts all the right bits. It's always the two middle bits that cause complications. Taking these bits alone, gives us:
11 -> 00, 01 -> 01 or 10 ???.. Clearly not taking enough bits to account.
It seems that when 0x02 is set, we need to xor the middle bits. So algorithm becomes:
1. xor the original number with 0xe3
2. if 0x02 was set in the original number, xor again with 0x18
Alternatively, since 0x04 and 0x02 are never set at the same time in the given examples, we could xor with 0x18 when 0x02 is not set and get the same results.
Ok, I admit, I did take some dead-ends, but mainly because I typoed my calculations and got weird results from my computer.
Re:Question...
Well, I haven't taken an answer yet...
But I personally would first start by converting back to base 10 and see if that got me anywhere. (using three signifigant figures, just for visual neatness)
251 -> 000
044 -> 207
059 -> 192
010 -> 241
012 -> 239
It's too late at night for me - but next I would try and work out the relationship between each number - mathematically - are they mltiples, number of factors - common elements et.al.
Then failing that, because Hexadecimal is as common in computing as Binary (and 2 digit Hex is the same as 1 byte)- I would assume a computer connection and convert to the following:
11011111 -> 00000000
00110100 -> 11110011
etc...
And try to see if there was a more visual reason. However as I said I'm too tired to actually work with this (I can convert bases in my sleep) but maybe that gives somebody some ideas?
But I personally would first start by converting back to base 10 and see if that got me anywhere. (using three signifigant figures, just for visual neatness)
251 -> 000
044 -> 207
059 -> 192
010 -> 241
012 -> 239
It's too late at night for me - but next I would try and work out the relationship between each number - mathematically - are they mltiples, number of factors - common elements et.al.
Then failing that, because Hexadecimal is as common in computing as Binary (and 2 digit Hex is the same as 1 byte)- I would assume a computer connection and convert to the following:
11011111 -> 00000000
00110100 -> 11110011
etc...
And try to see if there was a more visual reason. However as I said I'm too tired to actually work with this (I can convert bases in my sleep) but maybe that gives somebody some ideas?
Re:Question...
Lost, you just solved it. Thanks so much
000 -> 251
001 -> 250
002 -> 249
003 -> 248
004 -> 247
005 -> 246
(...)
025 -> 226
026 -> 225
027 -> 224
028 -> 223
029 -> 222
030 -> 221
(...)
100 -> 151
101 -> 150
102 -> 149
(...)
200 -> 051
201 -> 050
202 -> 049
203 -> 048
204 -> 047
205 -> 046
(...)
245 -> 006
246 -> 005
247 -> 004
248 -> 003
249 -> 002
250 -> 001
251 -> 000
000 -> 251
001 -> 250
002 -> 249
003 -> 248
004 -> 247
005 -> 246
(...)
025 -> 226
026 -> 225
027 -> 224
028 -> 223
029 -> 222
030 -> 221
(...)
100 -> 151
101 -> 150
102 -> 149
(...)
200 -> 051
201 -> 050
202 -> 049
203 -> 048
204 -> 047
205 -> 046
(...)
245 -> 006
246 -> 005
247 -> 004
248 -> 003
249 -> 002
250 -> 001
251 -> 000
Re:Question...
Your most welcome -- and people say I spend too much time looking at Hexadecimal figures!
It's interesting they've used 251 as the reference point... seeing as in it's most common use (Computers) - Numbers are usually given as Powers of 2.
But I s'pose
FF -> 00
and
00 -> FF
Might look a tad obvious.
It's interesting they've used 251 as the reference point... seeing as in it's most common use (Computers) - Numbers are usually given as Powers of 2.
But I s'pose
FF -> 00
and
00 -> FF
Might look a tad obvious.
Re:Question...
Well, the 251 varies, it seems. It depends on the number of the object that's changed. In this example, it seems that it was object 4 and they did (255-4)-Color_Byte.
Re:Question...
Online game where you can make your own maps, and your own objects for them. The game downloads the maps you enter to your comp so the client can handle them, but it means that people can open them and use those objects. For those that don't want that to happen to their objects, they put an encryption in. It's for that encryption that this was needed. Works like a charm now, the little tool we made for it
Re:Question...
Be aware that this isn't encryption, it's obfuscation, and is about as "secure" as a ROT13 (means, not at all).
If what you're looking for is encryption, check out any one of the numerous publically available encryption algorithms, don't roll your own.
PS: "Question..." doesn't qualify as a good thread name. If my post didn't really contribute to the subject, that's because I keep clicking on it because the subject doesn't ring a bell.
If what you're looking for is encryption, check out any one of the numerous publically available encryption algorithms, don't roll your own.
PS: "Question..." doesn't qualify as a good thread name. If my post didn't really contribute to the subject, that's because I keep clicking on it because the subject doesn't ring a bell.
Every good solution is obvious once you've found it.
Re:Question...
Well, they call it encryption ;D It's as secure as one of those puzzles you find in a newspaper. Any kid can solve it. That's why they put in their Users Agreement that it is forbidden to attempt to break that encryption ::)
P.S. You always clicking this thread does mean this is a good thread name, as it gets read
P.S. You always clicking this thread does mean this is a good thread name, as it gets read
Re:topic title
In the US, you don't have to put it in there for it to be forbidden. Outside the US, it's against the law for them to forbid you pur sang. You can disassemble the stuff if you need it in some cases.Kon-Tiki wrote: Well, they call it encryption ;D It's as secure as one of those puzzles you find in a newspaper. Any kid can solve it. That's why they put in their Users Agreement that it is forbidden to attempt to break that encryption ::)
Everybody reading your thread means your name is way too vague. Nobody reading it either means the topic is too specific, uncomprehendable or too complex. You are best off with no moderators replying about your topic title, let me tell you that...P.S. You always clicking this thread does mean this is a good thread name, as it gets read
-
- Member
- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:Question...
ooooy, deep hatchets are flying round the court here. *chuckle*
me ducks away and gets his @$$ outta fire now ere it gets worse. *rofl*
Ha en bra dag
ps: kon-tiki 's been the balsa-boat with which Thor Heyerdahl set off to some islands. )
me ducks away and gets his @$$ outta fire now ere it gets worse. *rofl*
Ha en bra dag
ps: kon-tiki 's been the balsa-boat with which Thor Heyerdahl set off to some islands. )
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
BlueillusionOS iso image
Re:Question...
Well, first of all, I was just kidding around with the name-thing. Didn't know what else to name it. Aside of that, no mods've complained 'bout it, so why even bring that up?
Second of all: anything to back those law-things up? Ought to be a good laugh. And what about if they're located in the US and I'm in Europe?
Thirdly: It's from Peru to the Polynesian islands, to prove all those little tribes on each island were descendants from one big tribe in Peru (probably the Incas), migrated there by Kon-Tiki (Sun-God/Fire-God), their chieftain, high-priest and god.
Second of all: anything to back those law-things up? Ought to be a good laugh. And what about if they're located in the US and I'm in Europe?
Thirdly: It's from Peru to the Polynesian islands, to prove all those little tribes on each island were descendants from one big tribe in Peru (probably the Incas), migrated there by Kon-Tiki (Sun-God/Fire-God), their chieftain, high-priest and god.
-
- Member
- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:Question...
@kon-tiki: I've read some books of Thor Heyerdahl quite some years ago,so I couldn't remember exactly. Thanks for shedding some light on that.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
BlueillusionOS iso image
Re:Question...
(Please, mom, just this one time, OK? I never bragged about it before... )Kon-Tiki wrote: Well, first of all, I was just kidding around with the name-thing. Didn't know what else to name it. Aside of that, no mods've complained 'bout it, so why even bring that up?
...only because this is the "General", not the OS-Dev or Programming forum.
No, serious. A good thread title raises your chances for a good answer, doesn't annoy basically uninterested visitors, reduces completely unrelated clutter (like my post here ) and keeps df's server load down. Pick your choice as to whyt to think about a better thread title next time.
Every good solution is obvious once you've found it.