Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
charon
PostPosted: Apr 24, 2012 - 10:14 PM
Newbie


Joined: Apr 24, 2012
Posts: 3


Does anyone know what should be in the 13 byte "OtherData" field when sending a Check MAC packet to an ATSHA204 IC? The datasheet specifies it's "Remaining constant data needed for response calculation" but that's all the information I can find.

I created a MAC using the part and I wanted to check it with the original challenge using Check MAC, but I get an unsuccessful comparison return code (0x01). I've tried both zeros and NULL, but neither changes the result.
 
 View user's profile Send private message  
Reply with quote Back to top
Adez_CC
PostPosted: Apr 25, 2012 - 07:06 AM
Rookie


Joined: Apr 10, 2012
Posts: 26
Location: Indonesia

Hello charon,

Are you using the library provided by Atmel? If not, you can download the library here
http://www.atmel.com/tools/CRYPTOAUTHENTICATIONATSHA204DEVELOPMENTLIBRARY.aspx

Regarding your question, you can check the datasheet page 37 and 46. The message that will be hashed by CheckMac must match with the message hashed by Mac command. So, "OtherData" should be filled so that the two messages are identical.


Adez
 
 View user's profile Send private message  
Reply with quote Back to top
charon
PostPosted: Apr 25, 2012 - 07:51 PM
Newbie


Joined: Apr 24, 2012
Posts: 3


Hi Adez,

I am using the library provided by Atmel.

I did as you suggested and made the messages identical with OtherData, and the comparison is successful. It makes sense that the messages need to be identical, I just didn't make that connection before...

Thanks for your help!
 
 View user's profile Send private message  
Reply with quote Back to top
kakaxi
PostPosted: Sep 27, 2012 - 07:00 AM
Newbie


Joined: Sep 13, 2012
Posts: 7


dear boys,the checkmac is serve to check the mac coommad right or not?
if so ,Prior to running this mac, the Nonce commands I have been optionally run.THEN Prior to running CHECKMAC command, the Nonce commands also have been optionally run ?like this the result will be different,because the nounce command result is diffent twice.so what should i do ?please ,thank you .
 
 View user's profile Send private message  
Reply with quote Back to top
Adez_CC
PostPosted: Dec 12, 2012 - 01:10 AM
Rookie


Joined: Apr 10, 2012
Posts: 26
Location: Indonesia

kakaxi wrote:
dear boys,the checkmac is serve to check the mac coommad right or not?
if so ,Prior to running this mac, the Nonce commands I have been optionally run.THEN Prior to running CHECKMAC command, the Nonce commands also have been optionally run ?like this the result will be different,because the nounce command result is diffent twice.so what should i do ?please ,thank you .


To use CheckMac command, you need to run Nonce command in Passthrough mode. So, the Nonce will be the same for the Mac command and CheckMac command.
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits