keeloq algorithm and pic microcontroller

keeloq algorithm and pic microcontroller

Postby phoenix2000 » Thu Oct 09, 2014 7:14 am

hello every body
I want to build a secure 2 way remote control.so i decided to use the encoder and decoder of microchip :HCS family
my question is ,can i use any kind of pic micro controller(without any decoder) in order to decode the hopping code in receiver?
at first i thought that it's impossible because we don't know the keeloq algorithm,to decode the receive code.but reading AN662 put me in doubt.
User avatar
phoenix2000
 
Posts: 20
Joined: Thu Jul 10, 2014 3:36 am
PIC experience: EE Student

Re: keeloq algorithm and pic microcontroller

Postby phoenix2000 » Thu Oct 09, 2014 3:27 pm

nobody knows ???
User avatar
phoenix2000
 
Posts: 20
Joined: Thu Jul 10, 2014 3:36 am
PIC experience: EE Student

Re: keeloq algorithm and pic microcontroller

Postby AussieSusan » Fri Oct 10, 2014 2:58 am

You expect a response in under 8 hours?
Susan
AussieSusan
Verified identity
 
Posts: 173
Joined: Mon Jun 16, 2014 4:45 am
PIC experience: Experienced Hobbyist

Re: keeloq algorithm and pic microcontroller

Postby Joseph Watson » Fri Oct 10, 2014 5:43 am

After looking AN662 over, I think that the implication is that it is possible to implement the KEELOQ® decoder algorithm on many PIC microcontrollers but that there is important information needed about the details of the decryption algorithm that are not disclosed in AN662. They are, however, disclosed in AN652. Once you have the details of the algorithm, it looks like you can implement the decoder yourself but to get the details of the algorithm, you will need to enter into a non-disclosure agreement with Microchip.

Near the bottom of the first page of AN662, it says, "Notice: This is a non-restricted version of Application Note AN652 which is available under the KEELOQ License Agreement. The license agreement can be ordered from the Microchip Literature Center as DS40149."

On page 11, it says, "The confidential and proprietary information contained in this section of AN652 has been removed. The full application note is available under a license agreement and can be ordered as DS40149 from Microchip Technology Inc."

That license agreement will doubtless place you under certain limitations on what you can legally do with the algorithm information. You could try ordering the license agreement to see what it says.

About 35 years ago, when remote locks were first available for cars, a remote transmitter always transmitted the same code when a button was pressed. That made it possible for a crook to build a code grabber that could be used to capture the code when someone locked their car and walked into a store. Later, the crook could transmit the open door command using the captured code and break into the person's car. That is why systems like KEELOQ® were created. They transmit a different code each time the button is pressed. In general, the receiver rejects a code that was previously received, thus preventing the use of such code grabbers. The encryption scheme is used to provide subsequent valid codes that the decoder will be able to recognize and decipher. Good luck with your project.
NCR once refused to hire me because I was too short. I'm still waiting on my growth spurt.
User avatar
Joseph Watson
 
Posts: 49
Joined: Sat May 31, 2014 8:06 pm
Location: Ohio, USA
PIC experience: Experienced Hobbyist

Re: keeloq algorithm and pic microcontroller

Postby phoenix2000 » Fri Oct 10, 2014 8:17 am

thanks dear Joseph. ;)
best regards for you ;)
User avatar
phoenix2000
 
Posts: 20
Joined: Thu Jul 10, 2014 3:36 am
PIC experience: EE Student

Re: keeloq algorithm and pic microcontroller

Postby tunelabguy » Fri Oct 10, 2014 10:41 pm

Many years ago when I was very interested in cryptography, I applied for and got the full details of the algorithm after signing the non-disclosure agreement. It is not very difficult to program if you wanted to do it yourself in a PIC, but if you use it in an application, you would have the responsibility of ensuring that your software containing the algorithm is not made available to anyone else. That means if you put that code in a PIC, you must ensure that PIC is copy-protected. Frankly, I don't think the algorithm is anything special. It is not very efficient in terms of execution time. That is where it gets its security - overkill. But since the intended applications do not process lots of data or run the algorithm frequently, this overkill does not really hurt. Anyone skilled in the basics of cryptography could design an algorithm that is equally secure. Then you would not have to worry about agreements with Microchip. Just roll your own on both sides of the comm link.
User avatar
tunelabguy
Verified identity
 
Posts: 29
Joined: Sun Jul 20, 2014 9:41 pm
PIC experience: Professional 5+ years with MCHP products

Re: keeloq algorithm and pic microcontroller

Postby user2009 » Mon Oct 13, 2014 8:11 am

I dont think its relevant for your applicationn but a couple of month ago I talked to some security researches who broke the security of keeloq devices using side channel attacks [1].

[1] http://www.emsec.rub.de/keeloq
user2009
 
Posts: 13
Joined: Tue Jul 01, 2014 11:48 am
PIC experience: Professional 2-5 years with MCHP products

Re: keeloq algorithm and pic microcontroller

Postby phoenix2000 » Thu Oct 16, 2014 11:50 am

tunelabguy wrote:. Anyone skilled in the basics of cryptography could design an algorithm that is equally secure. Then you would not have to worry about agreements with Microchip. Just roll your own on both sides of the comm link.

thanks for your information ;)
can you please guide me to proper reference , i need to work on cryptography exactly in order to replace a secure algorithm for microchip keeloq encoder/decoder like hcs301/hcs500.
but unfortunatly i know nothing about cryptograghy
Image
so i would appreciate you help me
thanks again for your helpImage
User avatar
phoenix2000
 
Posts: 20
Joined: Thu Jul 10, 2014 3:36 am
PIC experience: EE Student

Re: keeloq algorithm and pic microcontroller

Postby tunelabguy » Thu Oct 16, 2014 1:54 pm

Bruce Schneier's book, "Applied Cryptography" is a good start. Then look at the paper referenced by user2009 in the previous posting, specifically, the reference called "Messing around with garage doors". That paper actually shows the Keeloq algorithm structure, except for the details of the non-linear feedback function, which you don't need unless you are trying to exactly duplicate Keeloq. That will give you an idea of what sort of cryptographic algorithm is well-suited to the limited RAM of these small PICs. Just substitute your own non-linear function using a random lookup table.
User avatar
tunelabguy
Verified identity
 
Posts: 29
Joined: Sun Jul 20, 2014 9:41 pm
PIC experience: Professional 5+ years with MCHP products

Re: keeloq algorithm and pic microcontroller

Postby phoenix2000 » Fri Oct 17, 2014 5:10 am

thanks dear tunelabguy and dear user2009Image
User avatar
phoenix2000
 
Posts: 20
Joined: Thu Jul 10, 2014 3:36 am
PIC experience: EE Student

Next

Return to Zigbee and wireless topics

Who is online

Users browsing this forum: No registered users and 5 guests

cron