Click here to Skip to main content
Licence CPOL
First Posted 20 Apr 2009
Views 12,906
Downloads 91
Bookmarked 5 times

64-bit electronic key

By | 20 Apr 2009 | Article
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)

About the Author

Jakub Piwowarczyk

Engineer
Technical University of Lodz
Poland Poland

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
GeneralBest Contributor On CP For OneWire PinmemberCleveland Mark Blakemore18:54 17 Jun '10  
GeneralNot particularly secure Pinmembersupercat97:16 21 Apr '09  
GeneralRe: Not particularly secure PinmemberJakub Piwowarczyk9:50 21 Apr '09  
GeneralRe: Not particularly secure Pinmembersupercat95:24 23 Apr '09  
GeneralRe: Not particularly secure PinmemberJakub Piwowarczyk8:27 8 Dec '11  

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.

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