FPGARelated.com
Forums

Hardware based IP protection of FPGA designs

Started by gnua...@gmail.com September 24, 2022
My customer is asking for a redesign of a very profitable board to deal with components that are EOL.   Because of delivery issues from the EOL components, they are asking for the IP and manufacturing rights if I can't build them adequately.  This seems a bit egregious, but I'm willing to do it if I can protect my financial interests.  

The ideal solution would be a device of some sort, soldered to the board, that disables the design if a serial number does not match in some way.  But I can't figure out a way to do this that can't be circumvented. 

I've been assuming they would want the source code for the FPGA, but maybe not.  If they have the source code, I don't think I can make the design secure.  They can always alter the code to remove the dependency on the key.  But if they don't demand that, a one wire chip could be added to provide adequate security.  I believe Maxim will sell you registration numbers, so you have your own private devices for authentication.  

I guess I need to learn more about this.

-- 

Rick C.

- Get 1,000 miles of free Supercharging
- Tesla referral code - https://ts.la/richard11209
On 9/24/22 3:41 AM, gnuarm.del...@gmail.com wrote:
> My customer is asking for a redesign of a very profitable board to deal with components that are EOL. Because of delivery issues from the EOL components, they are asking for the IP and manufacturing rights if I can't build them adequately. This seems a bit egregious, but I'm willing to do it if I can protect my financial interests. > > The ideal solution would be a device of some sort, soldered to the board, that disables the design if a serial number does not match in some way. But I can't figure out a way to do this that can't be circumvented. > > I've been assuming they would want the source code for the FPGA, but maybe not. If they have the source code, I don't think I can make the design secure. They can always alter the code to remove the dependency on the key. But if they don't demand that, a one wire chip could be added to provide adequate security. I believe Maxim will sell you registration numbers, so you have your own private devices for authentication. > > I guess I need to learn more about this. >
Microsemi, now Microchip, has FPGAs that the programming tools can be setup to need authorization keys to program a specific number of devices. The system is designed for this sort of environment, where you don't have complete trust of your assembly house. They don't need the FPGA source code unless they need to change or retarget the FPGA, and if you give them that, you will need to price the transaction understanding that you are lossing control over your IP. If they are just building a defined product, they just need the compiled bit-stream, which for some devices, like the Microsemi ones I mentioned, may have some control over its duplication if properly encrypted.
gnuarm.del...@gmail.com <gnuarm.deletethisbit@gmail.com> wrote:
> The ideal solution would be a device of some sort, soldered to the board, > that disables the design if a serial number does not match in some way. > But I can't figure out a way to do this that can't be circumvented.
You can do some kind of DRM with crypto keys and such, but do you have a way to securely identify one board from another? If you can safely query the FPGA serial number you can bind a decryption key (eg of the bitfile or some critical firmware) to that serial number, and only issue keys for specific FPGAs. But if they can spoof the FPGA serial number then they can make every FPGA look the same. For example, working with Stratix 10s lately, we haven't found a way to get the chip serial number via JTAG without programming a bitfile that reads it out. Although I suppose you could first program a 'good' (encrypted) bitfile that reads out the serial number. That would require somebody to MITM that bitfile to replace it with a chosen-serial number: not impossible, but hard to do at scale. (Bonus points if every device has a slightly different way to send the serial number, like every bitfile send it with a encrypted with a different key) Or, if the thing is online in some way, you can make it check in to a licence server, where you would notice if lots of the same serial number turned up and could block them. Theo
On 9/25/22 11:24 AM, Theo wrote:
> gnuarm.del...@gmail.com <gnuarm.deletethisbit@gmail.com> wrote: >> The ideal solution would be a device of some sort, soldered to the board, >> that disables the design if a serial number does not match in some way. >> But I can't figure out a way to do this that can't be circumvented. > > You can do some kind of DRM with crypto keys and such, but do you have a way > to securely identify one board from another? If you can safely query the > FPGA serial number you can bind a decryption key (eg of the bitfile or some > critical firmware) to that serial number, and only issue keys for specific > FPGAs. > > But if they can spoof the FPGA serial number then they can make every FPGA > look the same. > > For example, working with Stratix 10s lately, we haven't found a way to get > the chip serial number via JTAG without programming a bitfile that reads it > out. Although I suppose you could first program a 'good' (encrypted) > bitfile that reads out the serial number. That would require somebody to > MITM that bitfile to replace it with a chosen-serial number: not impossible, > but hard to do at scale. (Bonus points if every device has a slightly > different way to send the serial number, like every bitfile send it with a > encrypted with a different key) > > Or, if the thing is online in some way, you can make it check in to a > licence server, where you would notice if lots of the same serial number > turned up and could block them. > > Theo
The Microsemi FPGA's each have a factory assigned crypto-serial number (and individual key) built into the FPGA itself, and a programming file can be generated that can only program that EXACT FPGA (that factory assigned key). You can also generate a programming file encrypted to a generic key that any of that model FPGA can take (when you trust the programming facility) Their secure programmer takes a programming file encrypted to the programmers key, and with a secure file that the designer has to sign, gets the public key for the FPGA and decrypts and reencrypt the programming file for THAT FPGA, while ticking off the usage count kept in its own secure storage. This seems fairly secure.
On Saturday, September 24, 2022 at 3:42:02 AM UTC-4, gnuarm.del...@gmail.com wrote:
> My customer is asking for a redesign of a very profitable board to deal with components that are EOL. Because of delivery issues from the EOL components, they are asking for the IP and manufacturing rights if I can't build them adequately. This seems a bit egregious, but I'm willing to do it if I can protect my financial interests. > > The ideal solution would be a device of some sort, soldered to the board, that disables the design if a serial number does not match in some way. But I can't figure out a way to do this that can't be circumvented. > > I've been assuming they would want the source code for the FPGA, but maybe not. If they have the source code, I don't think I can make the design secure. They can always alter the code to remove the dependency on the key. But if they don't demand that, a one wire chip could be added to provide adequate security. I believe Maxim will sell you registration numbers, so you have your own private devices for authentication. > > I guess I need to learn more about this.
If I am going to give them source code for the FPGA, the only way I can assure they can't build units without compensation, is to have a part on the board that is essential to the operation, and is only available from me. So a small CPLD might do the job. Lattice has a part with 5V compatibility which I would need anyway, but it's missing any logic! Only ADC and other "power" related circuits. The parts in this series with logic are in much larger packages. Still... Hmmm... I think the way Greenpak works, is you do your designs with the "special" versions of the chips, then Greenpak "makes" your chips for you. That would do the job. I'll have to see the best way to insert something like that into the design so it is indispensable. -- Rick C. + Get 1,000 miles of free Supercharging + Tesla referral code - https://ts.la/richard11209
On 26/9/22 04:36, gnuarm.del...@gmail.com wrote:
> On Saturday, September 24, 2022 at 3:42:02 AM UTC-4, gnuarm.del...@gmail.com wrote: >> My customer is asking for a redesign of a very profitable board to deal with components that are EOL. Because of delivery issues from the EOL components, they are asking for the IP and manufacturing rights if I can't build them adequately. This seems a bit egregious, but I'm willing to do it if I can protect my financial interests. >> >> The ideal solution would be a device of some sort, soldered to the board, that disables the design if a serial number does not match in some way. But I can't figure out a way to do this that can't be circumvented. >> >> I've been assuming they would want the source code for the FPGA, but maybe not. If they have the source code, I don't think I can make the design secure. They can always alter the code to remove the dependency on the key. But if they don't demand that, a one wire chip could be added to provide adequate security. I believe Maxim will sell you registration numbers, so you have your own private devices for authentication. >> >> I guess I need to learn more about this. > > If I am going to give them source code for the FPGA, the only way I can assure they can't build units without compensation, is to have a part on the board that is essential to the operation, and is only available from me.
Firstly, if they're trying to ensure robustness against future supply shortages, i.e they might need to change to a different FPGA, they're going to need the source code anyway. Secondly, if you add a smaller chip to add authentication, it needs to perform some critical function that cannot easily be replicated. That is, it needs to be the part that implements your core innovations. Removing it (and changing the FPGA code) must not result in a workable device. If you can do that without incurring the exact same continuity problem that you could have with the main chip, go for it. But I think this kind of secure lockout is much harder than you think, and probably harder that it's worth. Another path that might work with some networked equipment is to design it to either "phone home" periodically, or to expire an internal license key that must be renewed to restore operation. But that's more appropriate for a high-value device where you don't charge your customers, and may only be legal in a rental/subscription model, not outright ownership. It typically engenders so much ill will among buyers that you'll sell enough more without any protection to make up the difference. Business is built on relationships of trust. If you don't trust these folk, and can't get them to agree to some regime that will keep your confidence, quit them and find someone else to do business with. Clifford Heath.
On Sunday, September 25, 2022 at 7:46:42 PM UTC-4, Clifford Heath wrote:
> On 26/9/22 04:36, gnuarm.del...@gmail.com wrote: > > On Saturday, September 24, 2022 at 3:42:02 AM UTC-4, gnuarm.del...@gmail.com wrote: > >> My customer is asking for a redesign of a very profitable board to deal with components that are EOL. Because of delivery issues from the EOL components, they are asking for the IP and manufacturing rights if I can't build them adequately. This seems a bit egregious, but I'm willing to do it if I can protect my financial interests. > >> > >> The ideal solution would be a device of some sort, soldered to the board, that disables the design if a serial number does not match in some way. But I can't figure out a way to do this that can't be circumvented. > >> > >> I've been assuming they would want the source code for the FPGA, but maybe not. If they have the source code, I don't think I can make the design secure. They can always alter the code to remove the dependency on the key. But if they don't demand that, a one wire chip could be added to provide adequate security. I believe Maxim will sell you registration numbers, so you have your own private devices for authentication. > >> > >> I guess I need to learn more about this. > > > > If I am going to give them source code for the FPGA, the only way I can assure they can't build units without compensation, is to have a part on the board that is essential to the operation, and is only available from me. > Firstly, if they're trying to ensure robustness against future supply > shortages, i.e they might need to change to a different FPGA, they're > going to need the source code anyway. > > Secondly, if you add a smaller chip to add authentication, it needs to > perform some critical function that cannot easily be replicated. That > is, it needs to be the part that implements your core innovations. > Removing it (and changing the FPGA code) must not result in a workable > device. > > If you can do that without incurring the exact same continuity problem > that you could have with the main chip, go for it. But I think this kind > of secure lockout is much harder than you think, and probably harder > that it's worth. > > Another path that might work with some networked equipment is to design > it to either "phone home" periodically, or to expire an internal license > key that must be renewed to restore operation. But that's more > appropriate for a high-value device where you don't charge your > customers, and may only be legal in a rental/subscription model, not > outright ownership. It typically engenders so much ill will among buyers > that you'll sell enough more without any protection to make up the > difference. > > Business is built on relationships of trust. If you don't trust these > folk, and can't get them to agree to some regime that will keep your > confidence, quit them and find someone else to do business with.
Trust, but verify. If I can get a chip on the board, that is made with my part number, I think security by obscurity will be adequate. I've yet to find that part. GreenPak has some op amp chips that don't seem to combine much on board that would be useful to this design. If I can put an obscure part in the signal path, that should be adequate for my purposes. It's a part number they will need to buy through me. The part I've found seems to have enough to make it a programmable gain amp, which might suffice. So far, it's hard to read the data sheet and actually understand the limitation. Like the bandwidth, it looks like it's programmable, but I'm not sure I believe what they show. -- Rick C. -- Get 1,000 miles of free Supercharging -- Tesla referral code - https://ts.la/richard11209
I'm looking at the Greenpak SLG46580 and SLG47004 as candidates.  The SLG47004 has amplifiers, rheostats and switches, which might be useful to customize a part of the analog circuitry.  The SLG46580 has four LDOs which I'm pretty sure I'm going to need at least three of, depending on the FPGA chosen.  

Give these parts custom part numbers and I think that will help protect the design a lot.  Maybe not complete assurance, but this is a large company who will only be interested in getting their boards.  I don't think they will be intentionally cheating me, but it might be tricky to get confirmation, when they build units.  This shortcuts the process.  

-- 

Rick C.

-+ Get 1,000 miles of free Supercharging
-+ Tesla referral code - https://ts.la/richard11209
Richard Damon <Richard@damon-family.org> wrote:
> The Microsemi FPGA's each have a factory assigned crypto-serial number > (and individual key) built into the FPGA itself, and a programming file > can be generated that can only program that EXACT FPGA (that factory > assigned key). You can also generate a programming file encrypted to a > generic key that any of that model FPGA can take (when you trust the > programming facility) > > Their secure programmer takes a programming file encrypted to the > programmers key, and with a secure file that the designer has to sign, > gets the public key for the FPGA and decrypts and reencrypt the > programming file for THAT FPGA, while ticking off the usage count kept > in its own secure storage. > > This seems fairly secure.
It does, but it doesn't seem to address the OP's threat model. Which is that they want to give the third party the source code and the ability to generate their own FPGA bitfiles while still maintaining control (to prevent overproduction). In that instance the third party can modify the FPGA to work around the protection, and you need to do attestation against some external authority (microcontroller for example) to 'activate' the system, and a way that can't be spoofed by changing the FPGA bitfile. So if you can run the secure programmer on a microcontroller and extract the serial number without trusting any bitfile, you might be able to use that as a key for some component that you do not release to the third party (eg firmware that runs on a soft-core inside the FPGA). Or you could require your third party to submit their FPGA bitfile for signing by an approved key server you control, along with a list of serial numbers of FPGAs you want to allow to run it. It sounds like they have a useful toolkit, but it would need further understanding of the pieces and put them together to meet the requirements. Theo
On 9/27/22 4:58 AM, Theo wrote:
> Richard Damon <Richard@damon-family.org> wrote: >> The Microsemi FPGA's each have a factory assigned crypto-serial number >> (and individual key) built into the FPGA itself, and a programming file >> can be generated that can only program that EXACT FPGA (that factory >> assigned key). You can also generate a programming file encrypted to a >> generic key that any of that model FPGA can take (when you trust the >> programming facility) >> >> Their secure programmer takes a programming file encrypted to the >> programmers key, and with a secure file that the designer has to sign, >> gets the public key for the FPGA and decrypts and reencrypt the >> programming file for THAT FPGA, while ticking off the usage count kept >> in its own secure storage. >> >> This seems fairly secure. > > It does, but it doesn't seem to address the OP's threat model. Which is > that they want to give the third party the source code and the ability to > generate their own FPGA bitfiles while still maintaining control (to prevent > overproduction). In that instance the third party can modify the FPGA to > work around the protection, and you need to do attestation against some > external authority (microcontroller for example) to 'activate' the system, > and a way that can't be spoofed by changing the FPGA bitfile. > > So if you can run the secure programmer on a microcontroller and extract the > serial number without trusting any bitfile, you might be able to use that as > a key for some component that you do not release to the third party (eg > firmware that runs on a soft-core inside the FPGA). > > Or you could require your third party to submit their FPGA bitfile for > signing by an approved key server you control, along with a list of serial > numbers of FPGAs you want to allow to run it. > > It sounds like they have a useful toolkit, but it would need further > understanding of the pieces and put them together to meet the requirements. > > Theo
IF you actually need to give source code, then this system doesn't provide protection, but my reading of the situation doesn't define that they absolutely need to get source code, but the OP thinks they may want it. Fundamentally, if you give source code, you have not true secretes in what you give them. If you can put something ESSENTIAL, that is also not possible to reverse engineer or duplicate into something you can control, you can maintain control, at least until they figure out how to get around that toll-gate. In my opioion, if you are going to sell the code for the major part of the system, you need to price that part of the transaction to get what you need out of it, and make the effectively unenforceable unit fees (if any) small enough that they aren't incentivized to break the agreement.