Proxmark3 developers community

Research, development and trades concerning the powerful Proxmark3 device.

Remember; sharing is caring. Bring something back to the community.


"Learn the tools of the trade the hard way." +Fravia

You are not logged in.

#1 2014-10-23 11:21:23

asper
Contributor
Registered: 2008-08-24
Posts: 1,409

New algo discovered

00 - 195225786
01 - 195225787
02 - 195225784
03 - 195225785
04 - 195225790
05 - 195225791
06 - 195225788
07 - 195225789
08 - 195225778
09 - 195225779
10 - 195225776
11 - 195225777
12 - 195225782
13 - 195225783
14 - 195225780
15 - 195225781
16 - 195225770
17 - 195225771

I recently came accross a new algo (not exactly rfid related) and I think I find it out; on the left is the shown value, on the right the real written value (find the relation was not easy but I am almost sure it is correct); my "progression" seems to be correct, can someone explain it mathematically ? It should be "base4-something" but I am not able to implement it in excel...

Last edited by asper (2014-10-23 18:23:48)

Offline

#2 2014-10-23 15:29:46

marshmellow
Moderator
From: US
Registered: 2013-06-10
Posts: 2,299

Re: New algo discovered

11 is listed twice on the left, is that a typo or correct?

Offline

#3 2014-10-23 15:39:24

marshmellow
Moderator
From: US
Registered: 2013-06-10
Posts: 2,299

Re: New algo discovered

assuming the first 11 is 10, i believe it is a basic xor.  convert to hex both numbers and xor them and you will find the constant.

Offline

#4 2014-10-23 15:40:59

marshmellow
Moderator
From: US
Registered: 2013-06-10
Posts: 2,299

Re: New algo discovered

if it helps, add this function to excel to calculate xor

Public Function BitXorH(x As String, y As String, Optional z As String = "0", Optional w As String = "0", Optional v As String = "0", Optional u As String = "0", Optional t As String = "0", Optional s As String = "0") As String
    BitXorH = Hex(Val("&H" & x) Xor Val("&H" & y) Xor Val("&H" & z) Xor Val("&H" & w) Xor Val("&H" & v) Xor Val("&H" & u))
End Function

Offline

#5 2014-10-23 17:31:48

asper
Contributor
Registered: 2008-08-24
Posts: 1,409

Re: New algo discovered

Yes double 11 is a typo, sorry!
I converted to bin and saw a 2-bits-base4 correlation-progression obviously starting frim the last 2 bits:
10
11
00
01
try to decode in bin; i think it better solve the problem.

Offline

#6 2014-10-23 17:51:26

marshmellow
Moderator
From: US
Registered: 2013-06-10
Posts: 2,299

Re: New algo discovered

it is xor.  (xor last 2 hex values of large number and the hex value of the small value)

Offline

#7 2014-10-23 18:36:31

asper
Contributor
Registered: 2008-08-24
Posts: 1,409

Re: New algo discovered

Sorry man an example:

06 - 195225788

06 => H06 ==> 0xor6 = 6
195225788 => HBA2E8BC ==> BxorC = 7

Maybe is "xor last 2 hex values MINUS ONE of large number and the hex value of the small value"... or not ?

Offline

#8 2014-10-23 21:16:00

marshmellow
Moderator
From: US
Registered: 2013-06-10
Posts: 2,299

Re: New algo discovered

xor the last2 with the hex of the num2

Num	       Hex	Last2	Num2	Hex	Xor
195225786	BA2E8BA	BA	0	0	BA
195225787	BA2E8BB	BB	1	1	BA
195225784	BA2E8B8	B8	2	2	BA
195225785	BA2E8B9	B9	3	3	BA
195225790	BA2E8BE	BE	4	4	BA
195225791	BA2E8BF	BF	5	5	BA
195225788	BA2E8BC	BC	6	6	BA
195225789	BA2E8BD	BD	7	7	BA
195225778	BA2E8B2	B2	8	8	BA
195225779	BA2E8B3	B3	9	9	BA
195225776	BA2E8B0	B0	10	A	BA
195225777	BA2E8B1	B1	11	B	BA
195225782	BA2E8B6	B6	12	C	BA
195225783	BA2E8B7	B7	13	D	BA
195225780	BA2E8B4	B4	14	E	BA
195225781	BA2E8B5	B5	15	F	BA
195225770	BA2E8AA	AA	16	10	BA
195225771	BA2E8AB	AB	17	11	BA

Last edited by marshmellow (2014-10-23 21:18:44)

Offline

#9 2014-10-23 22:28:16

asper
Contributor
Registered: 2008-08-24
Posts: 1,409

Re: New algo discovered

Ok i understand now, thank you for the clarification.

My findings also work:

00 - 195225786 = 1011101000101110100010111010
01 - 195225787 = 1011101000101110100010111011
02 - 195225784 = 1011101000101110100010111000
03 - 195225785 = 1011101000101110100010111001
04 - 195225790 = 1011101000101110100010111110
05 - 195225791 = 1011101000101110100010111111
06 - 195225788 = 1011101000101110100010111100
07 - 195225789 = 1011101000101110100010111101
08 - 195225778 = 1011101000101110100010110010
09 - 195225779 = 1011101000101110100010110011
10 - 195225776 = 1011101000101110100010110000
11 - 195225777 = 1011101000101110100010110001
12 - 195225782 = 1011101000101110100010110110
13 - 195225783 = 1011101000101110100010110111
14 - 195225780 = 1011101000101110100010110100
15 - 195225781 = 1011101000101110100010110101
16 - 195225770 = 1011101000101110100010101010
17 - 195225771 = 1011101000101110100010101011

You can see that there is a sort of "base4" coding; consider last 6 bits only:

111010
111011
111000
111001

111110
111111
111100
111101

110010
110011
110000
110001

100110
100111
100100
100101

and so on with higher bits so in my opinion there is a base4 coding of the decimal short value.

Last edited by asper (2014-10-23 22:36:14)

Offline

#10 2014-10-24 05:18:30

marshmellow
Moderator
From: US
Registered: 2013-06-10
Posts: 2,299

Re: New algo discovered

I think you may be looking too hard.
It is doubtful that it is a coincidence that you can xor the last 2 words of the written number with BA and always get the value your looking for.  Unless there are additional samples that tell a more complex story.

Offline

#11 2014-11-03 10:14:55

asper
Contributor
Registered: 2008-08-24
Posts: 1,409

Re: New algo discovered

Man can I contact you via mail or some social media ?

Offline

#12 2014-11-03 16:15:48

marshmellow
Moderator
From: US
Registered: 2013-06-10
Posts: 2,299

Re: New algo discovered

I think you still have my ICQ

Offline

Board footer

Powered by FluxBB