Click here to Skip to main content
15,881,651 members
Please Sign up or sign in to vote.
1.92/5 (3 votes)
See more:
I'm new to this forum and want to ask if someone can help me explaining how the usb dongle hardware exactly works and protects a software? How much we can trust that hardware?
Posted

 
Share this answer
 
Comments
Maciej Los 28-May-12 18:18pm    
Succinct and to the point! My 5!
Sandeep Mewara 29-May-12 1:15am    
Thanks losmac.
BillW33 29-May-12 9:42am    
Good answer, +5
Sandeep Mewara 29-May-12 10:41am    
Thanks.
Stefan_Lang 1-Oct-12 11:47am    
Good link, but too general. I followed that particular link recently when looking for a dongle solution, but didn't find it to be very helpful for me as a developer.

I've shared my own experience in a separate solution.
A common misconception is that USB dongles can simply be read via the file system, but that is not the case. These dongles come with specific libraries that allow reading and (restricted) writing access, and all these operations only work in conjunction with some key, so the library alone doesn't help.

I recently integrated dongle protection with our application and can say while it may take longer than the advertisements indicate, it isn't all that hard.

The dongle we use has several keys:
- one encodes our company, and that is useful to store licenses from applications of different companies on one dongle.
- three more are used for validation of the key, read access, and write access. If one key gets hacked, the dongle as a whole still won't be compromised.
- There is also a unique ID for each dongle itself, allowing us to easily identify a particular license.
- There's also a 'Remote Update Encrypt Key' and a User PIN, but we're not using them (yet)

There's even more, such as an independent cell for storing an expiration date, and a method to ensure there was no tampering with the system date-time.

Intercepting the access functions and interpreting the keys isn't easy since all commands get encrypted and contain additional dummy arguments with random values. Also, there really is only one function - the individual operations get encoded via the argument list. So someone watching calls will only ever see one function being called with random arguments and no apparent pattern.

It certainly isn't failsafe. There is no such system. But it sure is lot more difficult to hack. And it's more comfortable for a user who wishes to use the same software license on different machines.

Judging by the data sheets of different companies I've checked there isn't a lot of difference in functionality, only in diffculty to integrate, and pricing.
 
Share this answer
 
Comments
Sandeep Mewara 1-Oct-12 11:56am    
Have my 5 for the answer. :thumbsup:
nv3 1-Oct-12 11:57am    
Thanks for sharing that experience. I might be running into the same situation soon and found that experience very interesting.
CPallini 21-Oct-14 7:08am    
5.
anil gupta 2010 11-Feb-22 11:33am    
@ Stefan_Lang, Can you please let me know if there is any open source software ready to use of securing of application with the help of usb dongles as you explained above...
appreciate your input
Stefan_Lang 18-Jul-22 8:51am    
Sorry for the late answer. I've been disconnected for quite some time.

The short answer is no. Just to be clear, the software mentioned in this topic does not add any security, it only provides an API to access the dongle. You can think of it as a device driver. It's the dongle itself which provides the protection, as each is individually manufactured for this particular purpose.

However, if you're looking for software based protection, you could use an asymmetric encryption scheme, e. g. PGP ( see https://en.wikipedia.org/wiki/Pretty_Good_Privacy ) to achieve a good level of security.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900