Re: USB-Memorystick - serial number
- From: Ulrich Korndoerfer <ulrich_wants_nospam@xxxxxxxxxxxx>
- Date: Thu, 02 Feb 2006 07:27:08 +0100
Hi,
SK schrieb:
Hello,
a few months ago I asked the same question, but I got the answer, that this is not possible, since the USB keys do not have unique serial number.
It depends. Officially all USB devices which can be accessed as mass storage device (acting as mass storage USB class) have to have an unique id (see sub specs and window specs). This id is used to differentiate between otherwise identical devices (say you have two sticks from the same mfg, same product series) attached.
Now it may be that some manufacturers ignore this requirement. Which would do no harm as long only one of their devices is plugged in. But I don't care about those. I just select a mf who provides unique ids (just a matter of buying some and test them).
The reason why I was asking this is that I would like to protect my software (basically a tool for the management of other programs) with the serial number of users USB key - I would like to prevent copy protection. I am not charging for this program, but this is a dangerous tool if it falls into wrong hands. What is your reason?
I want to have a hardware token to which the software's registration is bound to. Everyone who has the token can register (anonymously) the software. No token, no registration. No registration, no running software. After registration the software runs without needing the token again.
On this behalf I am searching for either a client side user mode driver which communicates with the (windows standard) kernel mode usb mass storage class device driver (usbstor.sys I think) and gives me the serial id by just calling one function (hiding the complexity of calling the kernel mode driver by windows api). Or, if such user mode driver is not available, how to get the id using the windows user mode apis in direct.
Btw, there are plenty of other ways for getting a hardware token.
Readily available including client side user mode driver software are smart cards and their companion card readers (USB too). There are versions of smart cards which can be programmed in Basic and can do eg encryption inside the card. So one could add extra security when it comes to authenticate the card. Costs are about 1-2$ for the smart card and about 20-25$ for the reader.
Even the use of a ready made USB-serial converter (including its cable and plugs) could be used as long as the devices use a eg FTDI252R chip. Price is about 20$ or may be lower. For this chip the chip vendor gives away a client side user mode driver.
Or just use one of the commercially available so called dongles. Price is 20$ or lower.
Or build your own one. Basically a FTDI252R chip suffices. Make a small pcb (the chip does not need any extra elements) and solder the chip and a USB-plug on it. Chip costs ~3$, plug and pcb are about 1$. OK, add an other 1$ for the housing and you end up with 5$.
Or buy a U3 smart USB stick. From the U3 org there is a client side user mode driver available which allows to read the serial (U3 must have unique serials too and in this case mfs must do it as otherwise they do not get the U3 logo and could not sell their devices under this logo) and much more (as securely writing data to hidden device memory and reading it back). Principally those U3 variants of USB mem sticks are not much more expensive than their simple counterparts. But as U3 sticks are used to hold masses of big application software they usually have high mem caps (0.5 GB and more). So their cost is about 40$ and above. This will change in the near future (as flash chip prices will go down and perhaps U3 sticks with lower mem cap will come to the market). But as I do not need masses of mem (for me 1 MB or below would suffice), I would rather avoid buying high mem cap sticks.
For me and my purposes all above solutions have one or two drawbacks. For eg. building them myself the amount needed is to high. Also german laws impose complicated and expensive duties to the mfs of electronic devices.
Then there is the price. A simple USB stick of low mem cap (say 64 MB) at this time is the cheapest of all (10$ and less). So I will stick to the stick solution :-).
-- Ulrich Korndoerfer
VB tips, helpers, solutions -> http://www.proSource.de/Downloads/
----------------------------------------------------------------------- Plea for a bright future for VB classic. Sign the petition to Microsoft: -> http://classicvb.org/petition/ ----------------------------------------------------------------------- .
- References:
- USB-Memorystick - serial number
- From: Ulrich Korndoerfer
- Re: USB-Memorystick - serial number
- From: SK
- USB-Memorystick - serial number
- Prev by Date: Re: Writing to .TXT file question
- Next by Date: Re: Change language keyboard
- Previous by thread: Re: USB-Memorystick - serial number
- Next by thread: Re: USB-Memorystick - serial number
- Index(es):
Relevant Pages
|