Skip to content

Geometrically/Fingercrypt

Repository files navigation

Fingercrypt

NuGet version () License () Downloads ()

Fingercrypt is a simple solution for secure fingerprint/biometric hashing which also supports comparison checks using permutations.

Contents

Introduction

Fingercrypt allows for the secure storage of fingerprints while allowing for easy comparison checks! It uses OpenCV in order to process the image. Image processing is done in four simple steps. First, the image converted to a black and white form, with the lines of the fingerprint being white and the rest being black. Then, the finger's ridges are outlined using the Cv2 canny algorithm. After that, the region of interest is captured to crop out all unneccasary things that are not the actual fingerpint. After that, the Hough Lines Transform is applied to get the lines from the image, which are then consequently hashed.

Here is the process visualized:

Step 1 Step 2 Step 3

Step three is not that visible, sorry about that!

How to Use

Fingercrypt comes with 2 main methods, HashFingerprint and CheckFingerprint

string HashFingerprint(string imgPath, bool inverseColors)

  • imgPath - The relative path to the image
  • inverseColors - True if the fingerprint's lines are darker than the finger

byte[] HashFingerprint(LineSegmentPoint[] lines, int linesPerChunk=1, int chunkSize=16)

  • lines - The OpenCV2 Lines of the fingerprint
  • linesPerChunk - How many lines are stored in every SHA-512 Hash. Tradeoff between computation time during checking and storage space
  • chunkSize - [NOT IMPLEMENTED] The length (in bytes) of each SHA-512 Hash

bool CheckFingerprint(string hashedLines, LineSegmentPoint[] lines, float chunkPercentThresold, int chunkLength = 128, int linesPerChunk = 1, int allowedVariation = 1)

  • hashedLines - The fingerprint hash
  • chunkPercentThresold - The minimum percentage of chunks that match in order for the hashes to be considered matching
  • lines - The lines that are being checked against the fingerprint hash
  • chunkLength - [NOT IMPLEMENTED] The length (in bytes) of each SHA-512 Hash
  • linesPerChunk - How many lines are stored in every SHA-512 Hash. Tradeoff between computation time during checking and storage space
  • allowedVariation - The allowed variation of each point in a line that can still count as a match

LineSegmentPoint[] GetImageLines(Mat img)

  • img - The image of a fingerprint that lines need to be retrieved from

Releases

No releases published

Packages

No packages published

Languages