Key generation from fingerprint

Discussion in 'Java' started by pvs, Oct 1, 2005.

  1. pvs

    pvs Guest

    Hi,
    How to get hashcode from a fingerprint image? Can we generate keys from
    an input fingerprint image?Please give me some suggestion how to do
    that.
    Thanks,
    PVS
     
    pvs, Oct 1, 2005
    #1
    1. Advertising

  2. pvs

    steve Guest

    On Sat, 1 Oct 2005 15:26:14 +0800, pvs wrote
    (in article <>):

    > Hi,
    > How to get hashcode from a fingerprint image? Can we generate keys from
    > an input fingerprint image?Please give me some suggestion how to do
    > that.
    > Thanks,
    > PVS
    >


    which biometric device are you using?

    does it return an image , or does it return some sort of mapping of the
    print?

    steve
     
    steve, Oct 9, 2005
    #2
    1. Advertising

  3. pvs

    Roedy Green Guest

    On 1 Oct 2005 00:26:14 -0700, "pvs" <> wrote or
    quoted :

    >How to get hashcode from a fingerprint image?


    The word "fingerprint" can mean literally a description of the ridges
    on a human finger. It has many analogous meanings.

    Computing a hash on a array of bytes can be done with any sort of
    digest then folding it into 32 bits with XOR.. See
    http://mindprod.com/jgloss/digest.html

    You want something quick to compute, perhaps a CRC32 or an Adlerian.

    The problem is you will find this fingerprint only if you have an
    EXACT match. So presumably you have done some sort of categorising so
    that the slop difference between the original and the crime scene
    print won't ruin lookup.
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Again taking new Java programming contracts.
     
    Roedy Green, Oct 9, 2005
    #3
  4. pvs

    pvs Guest

    Hi,
    Thanks for your reply.
    Actually what i am going to do is... i will take a fingerprint image
    from database then using that fingerprint image i have to generate
    public and private keys.I don't know how to do exactly.If you have any
    idea please let me know.
    Thanks,
    PVS

    steve wrote:
    > On Sat, 1 Oct 2005 15:26:14 +0800, pvs wrote
    > (in article <>):
    >
    > > Hi,
    > > How to get hashcode from a fingerprint image? Can we generate keys from
    > > an input fingerprint image?Please give me some suggestion how to do
    > > that.
    > > Thanks,
    > > PVS
    > >

    >
    > which biometric device are you using?
    >
    > does it return an image , or does it return some sort of mapping of the
    > print?
    >
    > steve
     
    pvs, Oct 12, 2005
    #4
  5. pvs

    steve Guest

    On Thu, 13 Oct 2005 06:25:41 +0800, pvs wrote
    (in article <>):

    > Hi,
    > Thanks for your reply.
    > Actually what i am going to do is... i will take a fingerprint image
    > from database then using that fingerprint image i have to generate
    > public and private keys.I don't know how to do exactly.If you have any
    > idea please let me know.
    > Thanks,
    > PVS
    >
    > steve wrote:
    >> On Sat, 1 Oct 2005 15:26:14 +0800, pvs wrote
    >> (in article <>):
    >>
    >>> Hi,
    >>> How to get hashcode from a fingerprint image? Can we generate keys from
    >>> an input fingerprint image?Please give me some suggestion how to do
    >>> that.
    >>> Thanks,
    >>> PVS
    >>>

    >>
    >> which biometric device are you using?
    >>
    >> does it return an image , or does it return some sort of mapping of the
    >> print?
    >>
    >> steve

    >

    go look at :
    http://java.sun.com/docs/books/tutorial/security1.1/overview/

    something like:
    Signature dsa = Signature.getInstance("SHA/DSA");
    PrivateKey priv = pair.getPrivate();

    dsa.initSign(priv);

    FileInputStream fis = new FileInputStream(args[0]);
    byte b;
    while (fis.available() != 0) {
    b = (byte) fis.read();
    dsa.update(b);
    };

    fis.close();


    byte[] sig = dsa.sign();


    you can see it is not that hard.
     
    steve, Oct 13, 2005
    #5
  6. pvs

    Roedy Green Guest

    On Fri, 14 Oct 2005 05:27:20 +0800, steve <> wrote or
    quoted :

    >something like:
    > Signature dsa = Signature.getInstance("SHA/DSA");
    > PrivateKey priv = pair.getPrivate();
    >
    > dsa.initSign(priv);


    He just needs a digest, not a digitally signed digest, doesn't he?

    See http://mindprod.com/jgloss/digest.html
    http://mindprod.com/jgloss/md5.html
    http://mindprod.com/jgloss/sha1.html
    http://mindprod.com/jgloss/adler.html



    import java.io.UnsupportedEncodingException;
    import java.security.MessageDigest;
    import java.security.NoSuchAlgorithmException;

    /**
    * Test MD5 digest computation
    *
    * @author Roedy Green
    * @version 1.0
    * @since 2004-06-07
    */
    public class MD5
    {

    /**
    * test MD5 digest, requires Java 1.4+
    *
    * @param args not used
    */
    public static void main ( String[] args ) throws
    UnsupportedEncodingException, NoSuchAlgorithmException
    {
    byte[] theTextToDigestAsBytes = "The quick brown fox jumped over
    the lazy dog's back".getBytes( "8859_1" /* encoding */ );
    MessageDigest md = MessageDigest.getInstance( "MD5" );
    md.update( theTextToDigestAsBytes );
    byte[] digest = md.digest();
    System.out.println( digest.length );
    // 16 bytes, 128 bits long
    }
    }

    ..
    I think Adler should suffice. It is quick and generates 32 bits, all
    you need for a hashCode.

    // generate an 32-bit Adler checksum/digest
    import java.io.UnsupportedEncodingException;
    import java.util.zip.Adler32;

    public class Adler
    {
    /**
    * test Adler digest
    * @param args not used
    */
    public static void main ( String[] args ) throws
    UnsupportedEncodingException
    {
    byte[] theTextToDigestAsBytes = "The quick brown fox jumped over
    the lazy dog's back".getBytes( "8859_1" /* encoding */ );
    Adler32 digester = new Adler32();
    digester.update( theTextToDigestAsBytes );
    // getValue produces a long to conform to the Checksum
    interface.
    // Actual result is 32 bits long not 64!
    int digest = (int) digester.getValue();
    System.out.println( Integer.toHexString( digest ) );
    }
    }
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Again taking new Java programming contracts.
     
    Roedy Green, Oct 14, 2005
    #6
  7. pvs

    pvs Guest

    Hi all,
    Thank you very much for your reply's.
    I tried the code you have written here.it is generating some key from
    the text but my problem is....it should take fingerprint image as input
    and from that we have to generate keys.
    I am sorry if i am giving trouble.I told you that i am not a good
    programmer.please help me how to proceed.
    Can we give fingerprint image as input instead of the text in your
    code? i mean with the same or similar code can we generate for the
    fingerprint image?
    Thanks,
    PVS
     
    pvs, Oct 21, 2005
    #7
  8. pvs

    Roedy Green Guest

    On 20 Oct 2005 21:25:30 -0700, "pvs" <> wrote or
    quoted :

    >Can we give fingerprint image as input instead of the text in your
    >code? i mean with the same or similar code can we generate for the
    >fingerprint image?


    What form does your hardware provide the image, byte array, char
    string? array of ints? a number of fields?

    It depends on that detail how to write a good hashCode and equals
    method for you lookup.

    It also depends on some collapsing. If you get the literal image, the
    lookup key will not work since another crime scene image of the same
    person will be slightly different. Hopefully some custom software has
    analysed the image and converted to it set of repeatable numbers.

    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Again taking new Java programming contracts.
     
    Roedy Green, Oct 21, 2005
    #8
  9. pvs

    pvs Guest

    Hi,
    My prof. told me to take a fingerprint image that is available in
    internet like .bmp or .jpg images and from that i have to generate
    keys. i don't know whether it is possible from an image like that or i
    have to take the fingerprint directly from a fingerprint reader and
    generate the keys? you said that if it is a leteral image the key will
    not work so is there any other way to generate?
    Thanks,
    PVS
     
    pvs, Oct 22, 2005
    #9
  10. pvs

    Roedy Green Guest

    On 21 Oct 2005 19:06:42 -0700, "pvs" <> wrote or
    quoted :

    >My prof. told me to take a fingerprint image that is available in
    >internet like .bmp or .jpg images and from that i have to generate
    >keys. i don't know whether it is possible from an image like that or i
    >have to take the fingerprint directly from a fingerprint reader and
    >generate the keys? you said that if it is a leteral image the key will
    >not work so is there any other way to generate?


    hmm. This is just a toy. Sure, you can take a key from a bmp or any
    other sort of image. The catch is to match you must use the EXACT same
    image as a lookup key. See http://mindprod.com/jgloss/hashcode.html
    and http://mindprod.com/jgloss/adler.html
    and http://mindprod.com/jgloss/hashmap.html
    and http://mindprod.com/jgloss/hashtable.html
    for how to create a 32-bit hashcode from such a byte array.

    If they key is off by even 1 bit, a hashMap won't find it. Obviously
    this would be useless for matching sample fingerprints from crime
    scene ones.

    If you search google for "fingerprint encoding" or "fingerprint
    analysis" you will discover there are all sorts of proprietary schemes
    to look for features and encode them in under 200 bytes in a way that
    a crime scene analysis would give a number the same or very close to
    the original.

    For "close to" you would use a TreeMap to look up fingerprints by
    encoded fingerprint.
    --
    Canadian Mind Products, Roedy Green.
    http://mindprod.com Again taking new Java programming contracts.
     
    Roedy Green, Oct 22, 2005
    #10
  11. pvs

    pvs Guest

    Hi,
    Thanks for your help.I will try as you mentioned.IF i have any question
    i will contact you.
    PVS
     
    pvs, Oct 27, 2005
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Javier Camacho

    Microsoft FingerPrint Reader

    Javier Camacho, Sep 16, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    5,530
    =?Utf-8?B?Sm9obg==?=
    Oct 21, 2005
  2. Replies:
    1
    Views:
    5,972
    JScoobyCed
    Nov 7, 2005
  3. Replies:
    2
    Views:
    3,258
    James Harvey
    Apr 18, 2006
  4. emrefan
    Replies:
    6
    Views:
    3,136
    emrefan
    Aug 29, 2006
  5. kpoan
    Replies:
    0
    Views:
    963
    kpoan
    Sep 7, 2006
Loading...

Share This Page