Searching \ for '[PIC] Using a microcontroller to keep an algorithm' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'Using a microcontroller to keep an algorithm'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] Using a microcontroller to keep an algorithm'
2008\06\25@130519 by Tomás Ó hÉilidhe

picon face

Let's say I came up with a very special algorithm, one that would be
very valuable to sell.

If I distribute it as a binary executable file for something like
Windows or Mac, then of course people can just look at the machine code
to figure out what it's doing.

I've been looking into using a microcontroller to keep an algorithm
private. Let's say I have an algorithm as follows:
   It takes a 128-Bit number as input and gives a 128-Bit number as output.

Now here's what I have in mind:
   I get my hands on a microcontroller that has either built-in USB or
built-in Ethernet. I compile my algorithm for the microcontroller in
question. I produce a device about the size of a matchbox and sell it,
and the consumer plugs this device into their PC, perhaps into a USB
port. The microcontroller will take input from the PC, run the algorithm
and then give output to the PC.

Has this been done before? (Try not to throw plates at me if it has)

I've heard about the "code protect" feature of PIC chips. Does this
feature prevent the program code from being read from the chip? Is it
100% secure?

Lastly, how would you suggest I go about this: USB or Ethernet. Ethernet
would be handy in that I could set it up as a webserver that takes input
and then gives the output on a webpage. Another good thing about this is
that it would be platform independent and would work on anything that
has a web browser.

USB would be attractive because it's what people are "used to" and it
seems USB ports are more ubiquitous than Ethernet ports. Also I do away
with a batter because I can take power from the USB port. How good is
USB though when it comes to cross-platform development?

2008\06\25@132337 by Ariel Rocholl

flavicon
face
www.google.es/search?hl=es&q=usb+protection+dongle&meta=

2008/6/25 Tomás Ó hÉilidhe <spam_OUTtoeTakeThisOuTspamlavabit.com>:
{Quote hidden}

>

2008\06\25@133409 by Tamas Rudnai

face picon face
> Has this been done before? (Try not to throw plates at me if it has)

Yes, manu USB dongle do that.

> I've heard about the "code protect" feature of PIC chips. Does this
> feature prevent the program code from being read from the chip? Is it
> 100% secure?

Nope, even Microchip said there is no 100% protection. If you do a little
search on piclist archives you will find links to pages reverse engineering
chips, like PIC. They have to use advanced technology, so people in garage
unlikely to break your code but it can be done. Depends on how valuable your
stuff is...

Tamas



On Wed, Jun 25, 2008 at 6:04 PM, Tomás Ó hÉilidhe <.....toeKILLspamspam@spam@lavabit.com> wrote:

{Quote hidden}

>

2008\06\25@133926 by Dario Greggio

face picon face
Ariel Rocholl wrote:
>>Lastly, how would you suggest I go about this: USB or Ethernet. Ethernet
>>would be handy in that I could set it up as a webserver that takes input
>>and then gives the output on a webpage. Another good thing about this is
>>that it would be platform independent and would work on anything that
>>has a web browser.

Hmmm, if that device is going to be a "dongle", making it Ethernet will
make it easier to "clone" i.e. any PC will be able to do that (sooner or
later).
A USB slave is (much) more complicated to clone.

--
Ciao, Dario

2008\06\25@135834 by Tomás Ó hÉilidhe

picon face


Dario Greggio wrote:
> Hmmm, if that device is going to be a "dongle", making it Ethernet will
> make it easier to "clone" i.e. any PC will be able to do that (sooner or
> later).
> A USB slave is (much) more complicated to clone.

How can they clone it if they haven't got access to the machine code of
the algorithm? (The machine code is run on the PIC)

2008\06\25@140920 by Eoin Ross

flavicon
face
Google "Break PIC code protection"

http://www.google.com/search?hl=en&client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&hs=m7t&q=break+PIC+%22code+protection%22&btnG=Search

gets one to here....

http://www.bunniestudios.com/?page_id=13

http://www.sxlist.com/techref/microchip/crack.htm


>>> Tomás Ó hÉilidhe <toespamKILLspamlavabit.com> 25 Jun 08 13:58:00 >>>


Dario Greggio wrote:
> Hmmm, if that device is going to be a "dongle", making it Ethernet
will
> make it easier to "clone" i.e. any PC will be able to do that (sooner
or
> later).
> A USB slave is (much) more complicated to clone.

How can they clone it if they haven't got access to the machine code of

the algorithm? (The machine code is run on the PIC)

2008\06\25@141111 by Tamas Rudnai

face picon face
They will read that code out. How? That's how:

http://www.flylogic.net/blog/

Tamas


On Wed, Jun 25, 2008 at 6:58 PM, Tomás Ó hÉilidhe <.....toeKILLspamspam.....lavabit.com> wrote:

{Quote hidden}

>

2008\06\25@142349 by Dario Greggio

face picon face
Tomás Ó hÉilidhe wrote:

>
> Dario Greggio wrote:
>
>>Hmmm, if that device is going to be a "dongle", making it Ethernet will
>>make it easier to "clone" i.e. any PC will be able to do that (sooner or
>>later).
>>A USB slave is (much) more complicated to clone.
>
>
> How can they clone it if they haven't got access to the machine code of
> the algorithm? (The machine code is run on the PIC)

If it is not a dongle, then (as I said) my question is pointless. I
believed it was a "protection device", a key. If it creates a "result" -
the algorhitm result, then this is different.

--
Ciao, Dario

2008\06\25@161838 by Richard Prosser

picon face
Tomas,

Don't  "smart cards"  e.g. satellite decoder cards do a similar trick
in  that part of the decoding is carried out by the card itself?
These have been "broken" also.

RP

2008/6/26 Dario Greggio <EraseMEadpm.tospam_OUTspamTakeThisOuTinwind.it>:
{Quote hidden}

>

2008\06\26@041957 by Alan B. Pearce

face picon face
>Has this been done before? (Try not to throw plates at me if it has)

This is what practically every dongle in existence does. They have been
around for years, the early ones not as complex as what you are suggesting,
but as time went on they have got more complex to a point where they do what
you are suggesting.

Look at rainbow Systems, Flex LM, and a number of other similar companies
that provide both USB and Printer Port dongles.

2008\06\26@051348 by Tamas Rudnai

face picon face
> Look at rainbow Systems, Flex LM, and a number of other similar companies
> that provide both USB and Printer Port dongles.

Oh, and I forgot to mention that several times crackers can eliminate
dongles by writing a device driver that acts as the dongle, so the software
things that the dongle is attached.

The equation for security and protection is always the same. The first
lesson should learn is that there is no 100% protection - you can talk about
your home security system, a bank, an encryption algorithm or your USB
dongle, it is always remain true. The only thing you can do is to increase
the effort someone has to put on to break it. So if you think that your
invention worth 100million U$ then it will be most probably broken -
assuming others think the same and they could not produce it by themselves.
In that case the best protection is to protecting it by law - patenting it
for example - in my opinion.

Tamas



On Thu, Jun 26, 2008 at 9:19 AM, Alan B. Pearce <A.B.Pearcespamspam_OUTrl.ac.uk> wrote:

{Quote hidden}

> -

2008\06\26@085132 by Tomás Ó hÉilidhe

picon face


Tamas Rudnai wrote:
> Oh, and I forgot to mention that several times crackers can eliminate
> dongles by writing a device driver that acts as the dongle, so the software
> things that the dongle is attached.

I might be naive, but I think it would be very easy to make a 100 %
secure solution:

* Take a microcontroller that just doesn't have a facility for reading
the code memory out of it. No facility. At all. Fullstop.
* Program this microcontroller with your algorithm
* Put the microcontroller into a small little product about the size of
a thumb drive that hooks up via USB
* Make the computer give input to the microcontroller via USB
* Then the device gives output via USB

The PC never sees the algorithm. Also, since the microcontroller has no
facility whatsoever for reading the program code, the only conceivable
way of finding out what it's doing is to cut it open and somehow
manually read from the memory... but I don't know how possible that is,
or how many million Euro it would cost.

Add an exploding ink pack inside the chip aswell :-D

2008\06\26@085155 by Tomás Ó hÉilidhe

picon face


Tamas Rudnai wrote:
> Oh, and I forgot to mention that several times crackers can eliminate
> dongles by writing a device driver that acts as the dongle, so the software
> things that the dongle is attached.

This won't work if the algorithm is actually *inside* the dongle.

2008\06\26@090340 by Tamas Rudnai

face picon face
> This won't work if the algorithm is actually *inside* the dongle.

This is actually how they crack dongles so you can use that cracked software
without the key - finding out the algorithm used by the dongle. I do not
think if someone can find out an algorithm that cannot be figured out by
someone else... Even RSA key can be cracked...

Tamas


On Thu, Jun 26, 2008 at 1:51 PM, Tomás Ó hÉilidhe <@spam@toeKILLspamspamlavabit.com> wrote:

>
>
> Tamas Rudnai wrote:
> > Oh, and I forgot to mention that several times crackers can eliminate
> > dongles by writing a device driver that acts as the dongle, so the
> software
> > things that the dongle is attached.
>
> This won't work if the algorithm is actually *inside* the dongle.
>
>

2008\06\26@092425 by Tamas Rudnai

face picon face
> I might be naive, but I think it would be very easy to make a 100 % secure
solution:

You forgot the first rule of all security systems: There is _NO_ 100%
sercure solution!

> * Take a microcontroller that just doesn't have a facility for reading
> the code memory out of it. No facility. At all. Fullstop.

OK, let's say you invent the wheel and find out the hard wired micro code in
your microcontroller (that is not even microcontroller anymore, but that's
another subject). That means the controller has to be fully hard wired in
the factory. Do you think that one cannot be copied? I think this list
discussed this already, that Soviet Union copied everything during the cold
war. Also, did you see those links we were sending you? Where people sand
off the plastic case off the silicon? And where they just cut those tiny
wires, attaches, hooks or whatever other wires? Then they just read your
code out? I do not know if I shall tell you that to executing a machine
instruction the CPU has to read that word out of the flash or rom or
whatever memory it was stored. So you can intercept it and record it with a
digital scope or you can act as the memory addressing circuit to read out
the bytes - only matter of effort. Human even can dismantle, modify and even
construct biological DNA - Do you think that some wire and silicon would be
a problem?

Other interesting thing is that how fast you can make that chip? Are you
going to put it together with an FPGA and calculate 3D graphics so that you
need that to play a game? You can do that with your graphics card but this
is already exists: You cannot play PlayStation2 games on Xbox or Nintendo
Wii...

Maybe I have just a tube vision here but I cannot understand what do you
mean by "algorithm"? And why do you think that if a 100% secure system would
be possible to make in such an easy way why other people did not do that
already? Sorry of my bitter message but It seems to me that you do not read
those links we are sending you, only asking questions and making some
theories.

Tamas


On Thu, Jun 26, 2008 at 1:50 PM, Tomás Ó hÉilidhe <KILLspamtoeKILLspamspamlavabit.com> wrote:

{Quote hidden}

>

2008\06\26@093110 by Enki

picon face
On 26 Jun 2008 at 13:51, Tomás Ó hÉilidhe wrote:

>
>
> Tamas Rudnai wrote:
> > Oh, and I forgot to mention that several times crackers can eliminate
> > dongles by writing a device driver that acts as the dongle, so the software
> > things that the dongle is attached.
>
> This won't work if the algorithm is actually *inside* the dongle.
>

       Sure, but we are in a real world.
       

2008\06\26@093836 by James Nick Sears

flavicon
face
The real world question here also is, is it more profitable to annoy
your customers with some hair-brained copy protection scheme that is
sure to not work in the first place than it is to just release the
software and accept that some people will steal it?

The only way the protection won't be broken is if the algorithm isn't
worth enough to entice people to do so.  I don't care if it's in the
software itself, in a USB dongle, or in a PIC transmitting remotely
from the surface of Mars.  If it's worth anything, people will break
it, at a cost much much less than what you paid to try to protect it.
Have any idea how much Microsoft spent and how many legitimate
customers were annoyed by XP activation?  Neither do I, except to say
a LOT.  But no pirating "customers" are annoyed because on any
respectable torrent site there are copies that don't require the
activation.  Likewise, Apple spent who knows how many millions of
dollars locking the iPhone to AT&T, only for some high school kid to
figure out how to hack it.

Copy protection is really probably more at this point about some level
of due diligence so that you can sue any large offenders more easily
than any illusion of complete protection.

I'm also reminded of the software I've had (mostly at work) in the
past that had protection dongles and such.  What a PITA and the
reality is, hacked versions of most of that stuff are available online
anyway.

If you really have such a valuable algorithm, I'd be thinking about
sales and marketing, not oddball copy protection schemes.  You just
need to make enough money to be a LOT of money, not prevent all people
from pirating your work.  In any case, it's probably more important
just to make that money quickly so you can afford the lawyers to go
after big offenders.

Just my 2c.  I'm definitely and admittedly biased.  Few things annoy
me more than really intrusive copy protection.  In the long run, it's
always broken anyway, and so it ends up annoying your paying users far
more than the pirates.

-n.



On Thu, Jun 26, 2008 at 9:03 AM, Tamas Rudnai <RemoveMEtamas.rudnaiTakeThisOuTspamgmail.com> wrote:
{Quote hidden}

>> -

2008\06\26@095642 by Shawn Tan

flavicon
face
part 1 1456 bytes content-type:multipart/signed; boundary="nextPart10047430.RdVlYUfe5b"; (decoded 7bit)

--nextPart10047430.RdVlYUfe5b
Content-Type: text/plain;
 charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On Thursday 26 June 2008 13:50:59 Tom=E1s =D3 h=C9ilidhe wrote:
> Tamas Rudnai wrote:
> > Oh, and I forgot to mention that several times crackers can eliminate
> > dongles by writing a device driver that acts as the dongle, so the
> > software things that the dongle is attached.
>
> I might be naive, but I think it would be very easy to make a 100 %
> secure solution:

If it was easy, it would be very easily broken too. d:

Trying to steal code by reading the actual bits or cracking the case open i=
s=20
very *last century*. Attacking the algorithm does not even require access t=
o=20
the actual software bits. You should realise that there are so many=20
side-channel attacks (current, thermal, em, chip-in-the-middle, etc)=20
possible. It is often easier to attack a chip from the side channels than t=
o=20
read the actual bits.

I am am IC designer. The only way to 100% secure an algorithm in a chip is =
to=20
make it worth =A30.00. That way, nobody would bother to crack it. If it's w=
orth=20
a lot of money like you say, somebody will definitely make the effort to=20
crack it.


=2D-=20
with metta,
Shawn Tan

Aeste Works (M) Sdn Bhd - Engineering Elegance
http://www.aeste.net

--nextPart10047430.RdVlYUfe5b--


part 2 35 bytes content-type:text/plain; charset="us-ascii"
(decoded 7bit)

2008\06\26@105656 by Alan B. Pearce

face picon face
> * Take a microcontroller that just doesn't have a facility for reading
> the code memory out of it. No facility. At all. Fullstop.

As others have already told you this does not exist. Intel did go through a
loop at one stage with ROM version of their 8041 and 8048 micros, where they
would factory test the bare chip, and then not bond the wire that allowed
the ROM to be read. But that was easily got around.

These days there are very sophisticated techniques for finding out what goes
on inside the chip - and without dismantling the chip. By measuring the
small amount of EMC energy given off during operation it is possible to
determine what parts of the chip are operating, and with a little knowledge
(that may require opening one up to determine the actual chip type) it is
possible to determine the program execution loops and operations of running
code. These sorts of techniques are well known in military circles (look for
the US Forces 'Tempest' range of equipment to see what measures are taken to
stop this).

2008\06\26@140910 by Herbert Graf

flavicon
face

On Thu, 2008-06-26 at 13:50 +0100, Tomás Ó hÉilidhe wrote:
>
> Tamas Rudnai wrote:
> > Oh, and I forgot to mention that several times crackers can eliminate
> > dongles by writing a device driver that acts as the dongle, so the software
> > things that the dongle is attached.
>
> I might be naive,

Unfortunately, yes.

> but I think it would be very easy to make a 100 %
> secure solution:

It's impossible to make ANYTHING 100% secure.

> * Take a microcontroller that just doesn't have a facility for reading
> the code memory out of it. No facility. At all. Fullstop.

Alright, that might remove the EASY ways of getting code out of a chip.
It does nothing to stop the hard ways. Suffice it to say, that if you've
got enough money, there are tools out there that can probe the contents
of the chip pretty easily.

> * Program this microcontroller with your algorithm
> * Put the microcontroller into a small little product about the size of
> a thumb drive that hooks up via USB
> * Make the computer give input to the microcontroller via USB
> * Then the device gives output via USB

So, assuming you can't attack the chip physically (which already isn't
true), if you brute force things you can infer the algorithm pretty
easily. This has been done since the first computers were created.

>
> The PC never sees the algorithm. Also, since the microcontroller has no
> facility whatsoever for reading the program code, the only conceivable
> way of finding out what it's doing is to cut it open and somehow
> manually read from the memory... but I don't know how possible that is,
> or how many million Euro it would cost.

It's done all the time, although most companies won't admit to it. As
for cost, it's not as much as you might think, certainly not in the
millions in most cases.

Please, just get the idea of 100% secure out of your head, it's not
going to happen.

Not matter what you create, given enough time and effort it can be
cracked. You should focus on making it "hard enough" to crack, get your
value out of the product, and then just move on.

Look at it this way: how much money does the movie industry have? They
wanted something 100% secure for HD-DVD/Bluray. They came up with AACS.
It was cracked (Jan 2007) within months of it's debut. They then came up
with BD+, supposedly far more secure then AACS, and some say the reason
Bluray won the battle. It took a little longer, but after about a year
it was also cracked (Nov 2007).

So, even when money is almost unlimited, it only took a few months to
crack the "most secure" methods they could come up with.

Granted, your product will likely NEVER be as large a target, but the
fact remains that there is no such thing as 100% secure, and to try to
achieve it is an absolute waste of time and money.

Now, if the media companies would only realize that and stop punishing
legitimate purchasers of their products...

TTYL

2008\06\26@161751 by William \Chops\ Westfield

face picon face

On Jun 26, 2008, at 5:50 AM, Tomás Ó hÉilidhe wrote:

> * Take a microcontroller that just doesn't have a facility for reading
> the code memory out of it. No facility. At all. Fullstop.

Ah.  A write-only memory!  The microcontroller will be pretty useless  
if it can't read its own code memory.  And if IT can read it, there's  
probably a way for a cracker to read it too...

BillW

2008\06\26@164137 by olin piclist

face picon face
Tomás Ó hÉilidhe wrote:
>> Oh, and I forgot to mention that several times crackers can eliminate
>> dongles by writing a device driver that acts as the dongle, so the
>> software things that the dongle is attached.
>
> This won't work if the algorithm is actually *inside* the dongle.

Sure it can.  The driver just emulates the algorithm.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

2008\06\26@164301 by olin piclist

face picon face
Tomás Ó hÉilidhe wrote:
> * Take a microcontroller that just doesn't have a facility for reading
> the code memory out of it. No facility. At all. Fullstop.

There is no such thing.  If someone wants to badly enough, they can read the
microcontroller memory.  All the microcontroller manufacturer can do is make
this too expensive to be useful in most cases.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.


'[PIC] Using a microcontroller to keep an algorithm'
2008\07\04@015419 by Vitaliy
flavicon
face
James Nick Sears wrote:
>If you really have such a valuable algorithm, I'd be thinking about
sales and marketing, not oddball copy protection schemes.  You just
need to make enough money to be a LOT of money, not prevent all people
from pirating your work.  In any case, it's probably more important
just to make that money quickly so you can afford the lawyers to go
after big offenders.<

I agree with James.

In the long run, you just need to find a "sweet spot": make your stuff
reasonably difficult to copy, and price it low enough to take away the
incentive for hackers to break it.

The greedy and the paranoid usually shoot themselves in the foot.

Vitaliy

More... (looser matching)
- Last day of these posts
- In 2008 , 2009 only
- Today
- New search...