Code Monkey home page Code Monkey logo

fingercrypt's Introduction

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

fingercrypt's People

Contributors

geometrically avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.