Click here to Skip to main content
Click here to Skip to main content

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.

Introduction

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.

Installation

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'};

    if(!key.StartSession())
    {
        printf("%s\n",ErrorDescr(key.GetLastError()));
        exit(-1);
    }

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

    while(!_kbhit())
    {
        if(key.FindDevices() == 1)
        {
            key.GetRomCode(0,ROM);
            for(int i=0;i<8;i++)
                printf("%2X ",ROM[i]);
            printf("\n");
        }
        Sleep(10);
    }

    delete[] ROM;

    key.EndSession();
}

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

Conclusions

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.

Bibliography

  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

License

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

Share

About the Author

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

Comments and Discussions

 
GeneralBest Contributor On CP For OneWire PinmemberCleveland Mark Blakemore17-Jun-10 18:54 
GeneralNot particularly secure Pinmembersupercat921-Apr-09 7:16 
GeneralRe: Not particularly secure PinmemberJakub Piwowarczyk21-Apr-09 9:50 
GeneralRe: Not particularly secure Pinmembersupercat923-Apr-09 5:24 
GeneralRe: Not particularly secure PinmemberJakub Piwowarczyk8-Dec-11 8:27 

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

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

| Advertise | Privacy | Mobile
Web02 | 2.8.140814.1 | Last Updated 20 Apr 2009
Article Copyright 2009 by Jakub Piwowarczyk
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid