i bought a nuki, but i haven’t received it yet, but i thought i’d develop the C code before it arrives to get a better understanding of how it works.
I tried to use the information available after 9. Command usage examples here
I’ll describe all the steps involved in my program for Authorization:
CL sends: 0x0100030027a7
NUKI sends: 0x03002fe57da347cd62431528daac5fbb290730fff684afc4cfc2ed90995f58cb3b749db9
CL sends: 0x0300f88127ccf48023b5cbe9101d24baa8a368da94e8c2e3cde2ded29ce96ab50c159241
NUKI sends (Challenge for authorization authenticator): 0x04006cd4163d159050c798553eaa57e278a579affcbc56f09fc57fe879e51c42df17c3df
CL sends: (Create autorization authenticator payload) 0x0500b09a0d3979a029e5fd027b519eaa200bc14ad3e163d3be4563843e021073bcb1c357
[Both sides have shared key as : 0x217fcb0f18caf284e9bdea0b94b83b8d10867ed706bfdedbd2381f4cb3b8f730**]**
NUKI sends (Challenge for authorization data): 0x0400e0742cfea39cb46109385bf91286a3c02f40ee86b0b62fc34033094de41e2c0d7fe1
CL sends (create authorization data payload): 0x0600c8dd9f1a75de7a09100dcef9745b350d4005f54c682f5edbc08251d8cef04a2e027b93c65f4f70656e204e756b6920466f62203546433639333742202020202020202020007b93c65f7b93c65f7b93c65f7b93c65f7b93c65f7b93c65f7b93c65f7b93c65fae5b
NUKI sends (Authorization-id command):
CL receives 07003A270A2E453443C3790E657CEBE634B03F01
CL receives 02F45681B4067background-lightgreen1D46E6E15EDF0200000083B3
CL receives 3643C6D97EF77ED51C02A277CBF7EA479915982F
CL receives 13C61D997A56678AD77791BFA7E95229A3DD34F8
CL receives 7132BF3E3C97DB9F
This is where it gets a bit tricky, because as you can see, there’s a bit of text i think it doesn’t belong there:
I removed that, and i think its missing 4 bits, because 0x0700, takes 2 bytes, after that we must have 32 bytes for the authenticator , that means the Authorization-ID starts at byte 34 . That is not possible on your example;
So i guessed the 4 bits and came up with:
Can you clarify if my line of thought is correct until now?
I have one more doubt but i’ll leave it for a reply bellow.
Thank you very much .