Click here to Skip to main content
13,355,538 members (76,474 online)
Click here to Skip to main content
Add your own
alternative version


6 bookmarked
Posted 20 Apr 2009

64-bit electronic key

, 20 Apr 2009
Rate this:
Please Sign up or sign in to vote.
This article demonstrates the use of serial number DS1990 to obtain authorized access to the application.


In the article, I am going to demonstrate how to use Serial Number DS1990 from Dallas Semiconductor as an electronic key to obtain authorized access to an application. This will be the continuation of my article about 1-Wire technology, where I have described temperature measurement [1]. My first concept was to modify the gina.dll library which is used while logging in to Windows. But, as I saw it could cause a lot of problems for beginners and even lock access to the system, I decided to give up it. Nevertheless, for advanced users, I recommend reading [2], [3].

Why DS1990?

Fig. 1. DS1990 memory map [4]

DS1990 is a serial number [4] which contains a unique ROM number (Fig. 1). The number consists of an 8-bit CRC code, a 48-bit serial number, and an 8-bit family code. There are no identical ROM numbers in the world. The other advantages are: very long working life, it is cheap in comparison with transponders or other identity cards, the serial number could be checked because it contains a CRC code, it could be easily implemented in both PCs and microcontrollers.


To use this software, you will need:

  1. DS9097E adapter, which was described in [1] (Fig. 2)
  2. DS1990 serial key (Fig. 3)
  3. iButton Probe DS9092 or its equivalent [5] (Fig. 4)

Fig. 2. DS9097E adapter [1]

Fig. 3. DS1990 serial key

Fig. 4. iButton probe

Using the code

#include <conio.h>
#include <stdio.h>
#include "onewire.h"

void main(int argc, char **argv)
    short* ROM = new short[8];
    COneWire key("IBFS32.DLL",OW_ADAPTER_DS9097E,1);
    short data[] = {'a','b','c','1','2','3'};


    printf("Ready to read...\n");

        if(key.FindDevices() == 1)
            for(int i=0;i<8;i++)
                printf("%2X ",ROM[i]);

    delete[] ROM;


In a loop, I am checking whether the electronic key was touching the probe. If it was, I read the ROM and print it.


There are unlimited applications for DS1990 serial numbers. I hope you will have your own. And to conclude, you have to be conscious that some people have created emulators of DS1990 serial numbers, but do not worry: as long as the robber does not know your key number, you are safe. Also, if you lose your traditional key, everybody could make a copy of it.


  1. Temperature Measurement as an Example of a 1-Wire Technology Application
  2. Winlogon using Mobile Disk
  3. Customizing GINA, Part 1
  4. DS1990 documentation
  5. Demiurg - the producer of Probe DS9092's equivalent


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


About the Author

Jakub Piwowarczyk
Engineer Technical University of Lodz
Poland Poland
No Biography provided

You may also be interested in...

Comments and Discussions

QuestionMaximum number of keys stored Pin
Member 435747111-Feb-15 6:00
memberMember 435747111-Feb-15 6:00 
GeneralBest Contributor On CP For OneWire Pin
Cleveland Mark Blakemore17-Jun-10 19:54
memberCleveland Mark Blakemore17-Jun-10 19:54 
GeneralNot particularly secure Pin
supercat921-Apr-09 8:16
membersupercat921-Apr-09 8:16 
GeneralRe: Not particularly secure Pin
Jakub Piwowarczyk21-Apr-09 10:50
memberJakub Piwowarczyk21-Apr-09 10:50 
GeneralRe: Not particularly secure Pin
supercat923-Apr-09 6:24
membersupercat923-Apr-09 6:24 
GeneralRe: Not particularly secure Pin
Jakub Piwowarczyk8-Dec-11 9:27
memberJakub Piwowarczyk8-Dec-11 9:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.180111.1 | Last Updated 20 Apr 2009
Article Copyright 2009 by Jakub Piwowarczyk
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid