Key generation from fingerprint

P

pvs

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
 
S

steve

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
 
R

Roedy Green

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.
 
P

pvs

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
 
S

steve

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
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.
 
R

Roedy Green

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 ) );
}
}
 
P

pvs

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
 
R

Roedy Green

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.
 
P

pvs

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
 
R

Roedy Green

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.
 
P

pvs

Hi,
Thanks for your help.I will try as you mentioned.IF i have any question
i will contact you.
PVS
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top