LibFPrint was originally developed as part of an academic project at the University Of Manchester.
It aimed to hide the differences between consumer fingerprint scanners and provide a single uniform API to application developers.
The ultimate goal of the FPrint project is to make fingerprint scanners widely and easily usable under common Linux environments.
This branch contains an experimental driver for the ELAN
04f3:0c4c Match-on-Chip sensor used in some dual-boot laptops.
The implementation here is intentionally different from a normal "Linux owns the device storage" flow:
- Windows and Linux are expected to share the same device-side storage.
- Linux uses adopt/link semantics by default.
fprintd-enrollis implemented as "verify an existing on-device template and link it to the current Linux user".- Linux does not create new device-side templates by default.
- Linux does not delete device-side templates by default.
In practice, the safe usage model is:
- Enroll the finger in Windows first.
- Boot Linux.
- Enroll once in Linux to adopt/link the existing template.
- Use verify/unlock normally from Linux afterwards.
open/closeverifyidentifyenroll-as-adoptfor existing Windows-created templates- local adopted-link persistence under
/var/lib/fprint/... - local
list/deletesemantics for adopted links
- device-side Linux-owned enroll
- device-side template delete
- device-wide storage erase/reset
Those operations are unsafe for the shared-storage dual-boot target.
The branch was validated with a build-tree workflow like:
meson setup /root/libfprint-build --wipe \
-Dudev_rules=disabled \
-Dudev_hwdb=disabled \
-Dintrospection=false
meson compile -C /root/libfprint-buildUseful smoke tests from the build tree:
export LD_LIBRARY_PATH=/root/libfprint-build/libfprint
/root/libfprint-build/examples/device-info
/root/libfprint-build/examples/open-close
/root/libfprint-build/tests/test-elan04moc-list-fixed
/root/libfprint-build/tests/test-elan04moc-verify-fixed
/root/libfprint-build/tests/test-elan04moc-enroll-fixedIf you want to try this on a normal distribution install, replace the runtime pieces as a matched set:
libfprint-2.so.2.0.0fprintdfprintd-enrollfprintd-verifyfprintd-listfprintd-delete
A practical sequence is:
- Build
libfprintfrom this branch. - Build
fprintdagainst that build-treelibfprint. - Back up the distro binaries and libraries.
- Install the custom builds over the distro versions.
- Run
ldconfig. - Restart
fprintd.
Example replacement flow:
install -m 0755 /root/libfprint-build/libfprint/libfprint-2.so.2.0.0 \
/usr/lib/x86_64-linux-gnu/libfprint-2.so.2.0.0
ln -sf /usr/lib/x86_64-linux-gnu/libfprint-2.so.2.0.0 \
/usr/lib/x86_64-linux-gnu/libfprint-2.so.2
install -m 0755 /root/fprintd-build/src/fprintd /usr/libexec/fprintd
install -m 0755 /root/fprintd-build/utils/fprintd-enroll /usr/bin/fprintd-enroll
install -m 0755 /root/fprintd-build/utils/fprintd-verify /usr/bin/fprintd-verify
install -m 0755 /root/fprintd-build/utils/fprintd-list /usr/bin/fprintd-list
install -m 0755 /root/fprintd-build/utils/fprintd-delete /usr/bin/fprintd-delete
ldconfig
systemctl daemon-reload
systemctl restart fprintdBack up your original distro files before doing this.
If command-line fprintd-verify works but the desktop does not show a
fingerprint option, check PAM first.
On the test system, enabling PAM support was required:
pam-auth-update --enable fprintdAfter that, common-auth contained a line like:
auth [success=3 default=ignore] pam_fprintd.so max-tries=3 timeout=10
Then restart or re-login to refresh the desktop session. For GNOME/GDM, restarting GDM or logging out/in was needed before the fingerprint option appeared in Settings.
- deleting a fingerprint in Linux removes the local link
- the Windows-owned on-device template remains
- re-enrolling in Linux after deletion re-adopts the same device template
This is by design.
If you want to use the same finger on both Windows and Linux, do it in two steps:
- Enroll the finger in Windows first.
- Boot Linux and enroll that finger again to adopt/link the same template.
That is the supported flow for shared-storage devices.
If Windows later deletes a finger that Linux has already adopted:
- Linux should not crash
- the local Linux link becomes stale
- future verification should fail/no-match until you delete the stale local link and adopt again
On the validated hardware, 40 FF 12 returned success but the
payload68 body was all zeroes. The driver therefore:
- uses stable
id32material for the main adopted key path - stores
payload68state only as a diagnostic signal - does not require non-zero
40 FF 12payload to make verify/enroll work
mac_d changes with the identify challenge and must not be used as the
main equality key for matching. This branch stores mac_d only as a
diagnostic hash.
The on-disk print blob contains both stable fields and diagnostic fields.
Using a full raw-byte equality check causes false no-match results.
This branch matches using stable fields only:
- first
adopted_key - then
secure_id_hash
and intentionally ignores:
mac_d_observed_hashdevice_count_snapshotslot
for authentication equivalence.
For this sensor, delete must behave like local unlink for adopted prints. Trying to garbage-collect an on-device "duplicate" by treating it as a device-owned Linux template causes the next enroll to fail.
This branch handles delete as a no-op on device storage for adopted prints.
If your PAM stack is configured with pam_fprintd.so max-tries=1, one real
verify-no-match can end the whole PAM transaction and push the UI back to
password auth immediately.
If you want retry behavior at the lock screen, increase it, for example:
auth [success=3 default=ignore] pam_fprintd.so max-tries=3 timeout=10
When using a custom build/install prefix, fprintd may log that it cannot
open /usr/local/etc/fprintd.conf. On the validated setup this warning was
harmless and did not block enumeration, enroll, list, delete, or verify.
If you previously adopted a template as root, delete that local link
before adopting the same finger for a normal user. Otherwise duplicate
detection may trip on the old local record.
If Windows later enrolls a new finger, the device-side template count will increase. That should not invalidate a Linux adopted link for an already-adopted finger.
Expected behavior:
- the existing Linux-adopted finger stays usable
- the new Windows finger is simply unknown to Linux until it is adopted
device_count_snapshotmay change, but it is diagnostic only- a Linux re-adopt is only needed if the originally adopted Windows finger was deleted or re-enrolled on the Windows side
Section 6 of the license states that for compiled works that use
this library, such works must include LibFPrint copyright notices
alongside the copyright notices for the other parts of the work.
LibFPrint includes code from NIST's NBIS software distribution.
We include Bozorth3 from the US Export Controlled distribution, which we have determined to be fine being shipped in an open source project.
- IRC -
#fprint@irc.oftc.net - Matrix -
#fprint:matrix.orgbridged to the IRC channel - MailingList - low traffic, not much used these days