Introduction: Biometric Vascular Gateway - Why Veins?
Fingerprints have been demonstrated to be insecure but are widely used for biometrics. Iris images are also used but provide a poor, invasive user experience.
Hand vein patterns may provide a similarly unique image to fingerprints and iris scans. While veins have been used before for authentication using raw image correlation, we sought to build a system that deterministically extracts cryptographic keys which can be used for encryption, directly from vein images. This stateless system offers the ability to decouple biometric data (vein scans) from generated keys so that in the event of theft, the system would not contain any personal information nor keys. Vein images are acquired by shining infrared LEDs through a diffuser sheet onto the surface of a user’s hand. Because they are more absorbent of this wavelength of light than flesh, veins will appear darker in the image captured by the camera. This enables the system to reliably extract veins from the image to process for feature extraction and ultimately key generation.
Step 1: Set Up Raspberry Pi
You'll need to install Raspbian on your Pi to create your BVG. We recommend using NOOBS to do this. The Raspberry Pi foundation has published a good guide here. To be safe, make sure to format your SD card using NOOBS before running the installer.
Step 2: Set Up an SSH Connection to Your PI
In order to complete setup you'll need to be able to SSH into your Pi. There are a number of ways to do this, but the easiest is to connect an ethernet cord between your pi and your computer and set up internet sharing. On a mac you can do this by going to System Preferences -> Sharing and then turning on Internet Sharing for your ethernet port (See screenshot above).
Next you'll need to get your Pi's IP address. If you've set up internet sharing then it's probably 192.168.2.3, but you can plug a monitor and keyboard into the pi and run the linux ifconfig command to find out for sure.
Once you have the IP address you can SSH into the Pi by running the following on your machine:
When prompted for a password enter: raspberry
Step 3: Set Up Infrared Imaging
In this step, you'll get your Raspberry Pi seeing in infrared.
- Raspberry Pi 2
- Pi NoIR camera
- 40 high power infrared LEDs (in the 850 - 880 nm range)
- If you don't have access to a DC power supply to take apart, any off-the-shelf power supply unit will do fine, provided it can provide at least 2A @ 5V.
- Wire 20 LEDs in parallel on each breadboard, with one resistor in series with each resistor. This circuit diagram shows how 10 of those LEDs should be wired up (the other 10 are identical, on the other side of the breadboard).
- Strip the plastic and the connector off the end of your power source (or simply attach leads to your power supply unit) and connect the +5V and ground lines to the breadboard as appropriate.
- Connect your Pi NoIR to the Raspberry Pi using the provided flex connector cable
- Run the following command and manually inspect in the video output that you can see bright light being emitted from the powered-up LED rig.
raspivid -ex fixedfps -co 100 -ev 0 -ss 4000 -t 10000
Step 4: Build the Enclosure
In this step, you'll build an enclosure to house the imaging components. Because the Pi NoIR camera is fixed focus, the height is the most important dimension to hold constant to ensure you get a crisp vein image. The design of the rest of the box can be altered without effect. Because we're using a visible light filter, it's not important for the box to be fully closed, even if the system is meant to be used in environments with ample visible light.
- Visible light filter, purchased from PeauProductions
- 18" x 24" sheet of 1/8" thick duron
- 11" x 17" sheet of 0.10" thick acrylic
- 3/4" wooden dowels
- diffuser paper (any tracing paper will suffice)
- Download the .AI files for the laser-cuttable pieces here and laser-cut the pieces from Duron (except for the file which says to use acrylic)
- Note that you may have to edit them to work for your laser cutter. We used a 60 W Universal VLS 4.60, but these materials should be laser-cuttable by anything.
- Assemble the box, as in the image.
Cut the dowels to the correct length, and then cut them further to separate the top half of the box (above the diffuser paper) from the bottom half (below the diffuser paper), as in this image.
Build the box by friction-fitting the dowels into the top piece of Duron, then add glue as needed to hold them in place.
Affix the diffuser paper using tape to an appropriately-cut piece of acrylic.
Use Velcro to affix the breadboards with the IR LEDs to the underside of the top piece.
Step 5: Set Up the Key Extraction Dependencies
sudo apt-get install octave sudo apt-get install liboctave-dev
Install OpenCV on your Raspberry PI
Follow the instructions here to install OpenCV on your Pi. Make sure to install the Python 2.7 bindings.
Install Octave Packages
Download the octave packages from here, and then install them with the following commands:
tar -zvf octave-packages.tar octave pkg install control-2.6.6.tar.gz pkg install signal-1.3.0.tar.gz pkg install general-1.3.4.tar.gz pkg install image-2.2.2.tar.gz pkg install io-2.2.11.tar.gz pkg install statistics-1.2.4.tar.gz exit
Install Python Packages
Run the following commands to install the python packages:
sudo pip install numpy sudo pip install Shapely sudo pip install RPi.GPIO
Step 6: Install Key Extraction Software
First, download the source code here.
Unzip this folder on the pi to ~/bvg.
Parts of the source code are written in c++. You'll need to compile these. To do this run the following commands:
mkoctfile ~/bvg/matlab/cpp_smooth.cpp mkoctfile ~/bvg/matlab/cpp_vote.cpp
Step 7: Run the Vein Extractor
Now that you've got everything installed you're ready to run it!
Assuming you're already in your cv3 virtualenv, you can just run the code with the following command
sudo python /home/pi/bvg/src/main.py
This script will listen for you to press the button on your box, take a picture, normalize it, crop it, extract the veins, and then generate and print a feature vector from your veins.
We have a be nice policy.
Please be positive and constructive.