Home

Awesome

BYOF (Bring Your Own Face) - Halo2 Circuit 🔐🔎🌐

<p align="center"> <img src="https://th.bing.com/th/id/OIG.9pxIagvlAC.Hn0uHKVhU?pid=ImgGn" width="300px" alt="image"/> </p>

Welcome to BYOF, where you bring your own face to unlock the secure and privacy-conscious world that enhances the user experience in web3 world like in web2 world. Leverage the power of facial recognition and zero-knowledge proofs to ensure ultimate security for your Ethereum wallets. Say goodbye to traditional passwords or keys and let your face be the key!

About 📖

Inspired by the subtle and intricate patterns of human facial features, BYOF presents a robust Face Wallet Verification system for Ethereum wallets. By transforming biometric data into unique digital representations, our system guarantees that each access is secure, private, and intuitive.

This metaphorical human face you see here illustrates the blend of advanced technology with user convenience – a facial recognition technology that keeps your data safe secure and well-crafted user-experience within the web3 and zero-knowledge proof realm.

Setup 💻

Prerequisites

Installation

# Install the required packages
pip install -r requirements.txt

# Navigate to bridge
cd bridge

# Run maturin
maturin develop

Generate Halo2 Circuit for Ethereum Solidity Verifier

# Generate parameters with power of 2
cargo run gen-params --k 20

# Generate keys
cargo run gen-keys

# If you want to download the binaries directly, use the script
./halo2-binary.sh

# Generate EVM verifier
cargo run gen-evm-verifier

Disclaimer

Journey Ahead 🚀


Example

image.png

{
    "code_error": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "hash_ecc_msg": "0x1759d7dbdcfe9541f9af1ea2b70f6e46ce5d3bc17478cb5d42fae3ac29acaec1",
    "new_feat": "0xfffffffffffffffffffffbffdfffffffffff7ffffffffffff7fffff7ffffffffffffffffffffffffffeffeffbfffbffffffffffefff7ffffff77ffbffffffeffffffee7befff7fffffbffbffeffbefbffbffdfffffffffffdffe9fefff7fffdffeffffff5feefffffffbffffbfbfeffffffffffffffffffeff7ef5ffffff9ffefdf3ffffb7f7ffffffffd77efffffffefefbfffffdffffffffffffdd7efffffdbffffffffffbfffaefbffffffeffffffffdafefffbbfffffffffffbefffffbffffffefedffdfffffffefffbffffdecbd7effffdffffffffffffff7fb7ffffbfffbffffdffffffbffffbffffffbfffffffbfeffffff3fffffffdffffffffffffffbffffffffffffefebfdff5bffdfffffffffffffdfffffffffffff7dfbbfdffffffffffffffefffff7fffbfefffffffffffd7ffbffff6fffbf7ffffbffffffffbdfbfffffffffffc",
    "proof": "0x174c2202565f30ae9e58c4707203aa0e695a35e9cb3998856355a0586dcd1b2c272aa7fa5bf912ff076046437d04de39df459e159978e290cf51fc1c862da6641dd85a9a55f9a245c5635b302ca3c5007c490dc90bcb6ad1f1bf4b82aa76308624d68fc04652a8424cb0baef4e7ddd97ce33d22fe27cecc0c150321a9c9a809f082e6f915edffa43e2e4baa0bf02da1b180f4177fc16d496111154f8017224ed2504fac5b233c73312d3c6a95178f1c305129a0e03afbb86e11a7c8011b1ae0401cfb6e88f5eb700a074841a21ded9858ffc34e7a78538cdda9503c8bf518b2b15dbdddf300b014bf3b9e024de3c6301a45859855627ba6e1912639d16ba1d4b1acc9aa40227504da2ae57fc95ed72c4de872e551181ee5c4f72303548cdb98f09489f5d5d26854d870285e13f3eded9737fd1c4f7f346f2e25b8bd4a129d31e11371e2874e18e414bf710391e2086d70c93a3a65f755ebe692b042b3c3981fd069584cb3235b0108cd40008ed2109fa776d2f3e350893420674f02796a86ccb05765013be6465a9b5f6c56b918db51d88dcd4e57f3104e79396c2b77598db63162bb6d85c4dc6c363953a2768239d6287194733aee1e8a379eb1cf8716193a60db827a80de22817cabc83bfb044a34111c2b6a03aa9394d329da3e90b8b38970b5db937973a3a8cc7a3b2fa69e42ec6a7a300e9d69a6982eb1202fe4232025012cc844c4f918b7f502e75964d148f450f7f465fdab20b1e0f0638621f3010012f9e4ee08d8e56595f24255dca83a235dc3e7f0b6aa4b846378231064305308b11f3f095baeed949fbf76413fd907a8e1628b2ab61f1c3921cb00326d233f95508efb51b3b82a502fcdc5e6b1243b0180c92dcdebd97ff8acd9f221aca61de4c2346dffb87729634aa5ad544780876cc2185e92fdfa3d8dbc81f05a2edad684e070a8f6dad40e98902e605cece9f230447708b41e7b667350ade1c642e08a4841690dd0f93f59fe449486021794ec6e4ad9400b6a5cc8b1220969f512a94bff12697ed837ac7c6e0768ef2026709accac8a0cd6c8042b82985d30129c20ba4c922d5f5391100447a90169bbfa979237ee8f76bb5b88831bf80ff4fa93df15d8e068a554cc6b02f5814884cc2f794b1e85d86b04246b7c51d553dd1d2403bd6e62794839162c1774645c236a3937e69bafdd716fc498e935e9d84e2c44cfb3bb91ce23544ac26af424fd5c3447e7c11cf8a97abc48c9807f484ac97483599130d1b82ae4906abcc81c5beb8cd3cf38554d36ca530923f9c85373cb96aeda643191f074b61833dcef639cf8a3e3deb6d5d19d2f915629f25f2d2cd4bc7af3302ca0f5197fa57fddee24ff4e2d527f4ec31ee66834ad8f65894497c68ac6fbe2c1f16e3e949b3aede853f10b36a7f32d68c0aa0253204284f202980f38de98457a420c601641538b483047818f798ef65026960c3959d37560840b4a6673c9fdeea141eb04a7cef9c77c1dcd8837c0e3c2d38a328bdc21c6e0b56bafd4acc34f3d721377ec0469f5493dd40b4776b22edb13b956f2a4a67e51399fda8d6e96543eb0ec250c09aad6b4ac1f83969d3340037b2533a32ca21c7e8ea91263817f91b4d2004e87dc8c954d91c1f64403ec90cc12ee9defcbf47a6571099b3ffa9d9352f0ae1950e40fc0b35bd177813fe3a8f5da8bca50a6ca5d96803bde260d4d36e4b2796d137fbad042e2e1685d13ee50d7e4fc3ba352ebe4aa8956e1ea5d678b73d0130fbb7858cd3121cdfb4682c74bcc65ae70dbe9c1bd7a2715766ad69caf487184a658a4d483697ed61b8595c1783434919f701377217e067055f063da0bbe22acf4345210a9366a7291eb072dc840b66795130496bca61d64c30aa7b1836b3092bf51b05c39a1e02ec724e2293cbf66497ecf4c12ce8e0ea1aff8c255226300ad7ae4683b85e62f93f91abfab697add157fe3f6ee2785df0e2f381e5bad88c21218c9fe8989709fb8387c265324ddc810ae1e7c0d73e2683e2abaa6632521f1d6e867dc239ad5a50e1acae6f69e811c742b8aaf2b8b93e09b7e17f5df0592e1f62b7d1e849fdc720c54b6343148899002b80dcd2dc347ba9906b81ed3c91a01cc649f6403c7e90fe0dbf72fcb6443f3441f537e1d419863570419272a628732390ce982b04eb41855d1771aaf8e181335d1a0cd2ab0c7d93ef63ddd6c15b0e",
    "proof_bin": "0x174c2202565f30ae9e58c4707203aa0e695a35e9cb3998856355a0586dcd1b2c272aa7fa5bf912ff076046437d04de39df459e159978e290cf51fc1c862da6641dd85a9a55f9a245c5635b302ca3c5007c490dc90bcb6ad1f1bf4b82aa76308624d68fc04652a8424cb0baef4e7ddd97ce33d22fe27cecc0c150321a9c9a809f082e6f915edffa43e2e4baa0bf02da1b180f4177fc16d496111154f8017224ed2504fac5b233c73312d3c6a95178f1c305129a0e03afbb86e11a7c8011b1ae0401cfb6e88f5eb700a074841a21ded9858ffc34e7a78538cdda9503c8bf518b2b15dbdddf300b014bf3b9e024de3c6301a45859855627ba6e1912639d16ba1d4b1acc9aa40227504da2ae57fc95ed72c4de872e551181ee5c4f72303548cdb98f09489f5d5d26854d870285e13f3eded9737fd1c4f7f346f2e25b8bd4a129d31e11371e2874e18e414bf710391e2086d70c93a3a65f755ebe692b042b3c3981fd069584cb3235b0108cd40008ed2109fa776d2f3e350893420674f02796a86ccb05765013be6465a9b5f6c56b918db51d88dcd4e57f3104e79396c2b77598db63162bb6d85c4dc6c363953a2768239d6287194733aee1e8a379eb1cf8716193a60db827a80de22817cabc83bfb044a34111c2b6a03aa9394d329da3e90b8b38970b5db937973a3a8cc7a3b2fa69e42ec6a7a300e9d69a6982eb1202fe4232025012cc844c4f918b7f502e75964d148f450f7f465fdab20b1e0f0638621f3010012f9e4ee08d8e56595f24255dca83a235dc3e7f0b6aa4b846378231064305308b11f3f095baeed949fbf76413fd907a8e1628b2ab61f1c3921cb00326d233f95508efb51b3b82a502fcdc5e6b1243b0180c92dcdebd97ff8acd9f221aca61de4c2346dffb87729634aa5ad544780876cc2185e92fdfa3d8dbc81f05a2edad684e070a8f6dad40e98902e605cece9f230447708b41e7b667350ade1c642e08a4841690dd0f93f59fe449486021794ec6e4ad9400b6a5cc8b1220969f512a94bff12697ed837ac7c6e0768ef2026709accac8a0cd6c8042b82985d30129c20ba4c922d5f5391100447a90169bbfa979237ee8f76bb5b88831bf80ff4fa93df15d8e068a554cc6b02f5814884cc2f794b1e85d86b04246b7c51d553dd1d2403bd6e62794839162c1774645c236a3937e69bafdd716fc498e935e9d84e2c44cfb3bb91ce23544ac26af424fd5c3447e7c11cf8a97abc48c9807f484ac97483599130d1b82ae4906abcc81c5beb8cd3cf38554d36ca530923f9c85373cb96aeda643191f074b61833dcef639cf8a3e3deb6d5d19d2f915629f25f2d2cd4bc7af3302ca0f5197fa57fddee24ff4e2d527f4ec31ee66834ad8f65894497c68ac6fbe2c1f16e3e949b3aede853f10b36a7f32d68c0aa0253204284f202980f38de98457a420c601641538b483047818f798ef65026960c3959d37560840b4a6673c9fdeea141eb04a7cef9c77c1dcd8837c0e3c2d38a328bdc21c6e0b56bafd4acc34f3d721377ec0469f5493dd40b4776b22edb13b956f2a4a67e51399fda8d6e96543eb0ec250c09aad6b4ac1f83969d3340037b2533a32ca21c7e8ea91263817f91b4d2004e87dc8c954d91c1f64403ec90cc12ee9defcbf47a6571099b3ffa9d9352f0ae1950e40fc0b35bd177813fe3a8f5da8bca50a6ca5d96803bde260d4d36e4b2796d137fbad042e2e1685d13ee50d7e4fc3ba352ebe4aa8956e1ea5d678b73d0130fbb7858cd3121cdfb4682c74bcc65ae70dbe9c1bd7a2715766ad69caf487184a658a4d483697ed61b8595c1783434919f701377217e067055f063da0bbe22acf4345210a9366a7291eb072dc840b66795130496bca61d64c30aa7b1836b3092bf51b05c39a1e02ec724e2293cbf66497ecf4c12ce8e0ea1aff8c255226300ad7ae4683b85e62f93f91abfab697add157fe3f6ee2785df0e2f381e5bad88c21218c9fe8989709fb8387c265324ddc810ae1e7c0d73e2683e2abaa6632521f1d6e867dc239ad5a50e1acae6f69e811c742b8aaf2b8b93e09b7e17f5df0592e1f62b7d1e849fdc720c54b6343148899002b80dcd2dc347ba9906b81ed3c91a01cc649f6403c7e90fe0dbf72fcb6443f3441f537e1d419863570419272a628732390ce982b04eb41855d1771aaf8e181335d1a0cd2ab0c7d93ef63ddd6c15b0e",
    "proof_succeed": true,
    "recovered_hash_ecc": "0x148d0e41c16f88ac5a7432d41e51658c67f97211f5a658d7191b0e2f97c385d2",
    "session_id": "uzikfltfneyrclemewuu"
}