Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/fido2.1 #55

Merged
merged 99 commits into from
Sep 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
397f1a7
implement mc following fido2.1 (with some TODOs)
dangfan Jun 7, 2022
4cd9123
add initial support for ga
dangfan Jun 14, 2022
f805741
make mc, ga, and pin work
dangfan Aug 14, 2022
2a0344f
add pin protocol 2
dangfan Aug 22, 2022
22e8761
Add credential management support
dangfan Aug 25, 2022
5b930a1
remove user name and icon in ctap's user entity
dangfan Aug 25, 2022
f01b8b5
rename constants
dangfan Aug 26, 2022
5dee669
refactor ctap
dangfan Aug 26, 2022
2c1ecae
add credProtect support in CTAP
dangfan Aug 27, 2022
32685c5
fix hmac-secret in CTAP 2.1
dangfan Aug 27, 2022
0f01039
add credBlob support for CTAP 2.1
dangfan Aug 27, 2022
05d85e3
fix credProtect in CM
dangfan Aug 27, 2022
d8b7750
add support for largeBlobKey
dangfan Aug 27, 2022
6b514c6
add large blobs support
dangfan Aug 28, 2022
a084321
[CTAP] fix ga extension length and lbw size limit in gi
dangfan Aug 30, 2022
fb25239
[CTAP] finish timer related todos
dangfan Aug 30, 2022
d4bc3be
[CTAP] fix cbor map keys ordering and add user's name and displayName
dangfan Aug 31, 2022
62704e2
[CTAP] refactor get next assertion
dangfan Aug 31, 2022
dc0a62d
upgrade littlefs
dangfan Aug 31, 2022
918344b
upgrade tinycbor
dangfan Aug 31, 2022
a570587
[CTAP] fix timer type in ga
dangfan Aug 31, 2022
247128e
[CTAP] fix lb initializing issue
dangfan Aug 31, 2022
281edaa
allow legacy CREDENTIAL_MANAGEMENT cmd
z4yx Sep 20, 2022
a5b1619
fix permission check error in CTAP
dangfan Sep 21, 2022
a26c95d
test FIDO 2.1 with libfido2-tools
z4yx Sep 23, 2022
f452a29
fix working dir
z4yx Sep 23, 2022
1403b1e
build the latest version of libfido2
z4yx Sep 23, 2022
455913b
require libfido2 1.11.0
z4yx Sep 24, 2022
7499ccb
Update tests.yml
z4yx Sep 24, 2022
e8d11d4
Update tests.yml
z4yx Sep 24, 2022
125332a
cache libfido2
z4yx Sep 24, 2022
b83e666
fix RP enumeration error
dangfan Sep 24, 2022
f1112c0
Merge remote-tracking branch 'origin/fido2.1' into fido2.1
z4yx Sep 24, 2022
3554144
test display name
z4yx Sep 24, 2022
43cd7a5
test RK deletion
z4yx Sep 24, 2022
b9f98e5
add update user information
dangfan Sep 25, 2022
f01ff5f
change all display names
z4yx Sep 25, 2022
3481a73
limit the lengths of display name and name to 64
dangfan Sep 25, 2022
6b9be46
add more debug messages
dangfan Sep 25, 2022
6227eb5
add more logs
dangfan Sep 25, 2022
9e06fb6
add more logs
dangfan Sep 25, 2022
db41cfc
add more logs
dangfan Sep 25, 2022
9d70589
fix the slots computation error
dangfan Sep 25, 2022
e707ad3
Merge branch 'feature/refactor_keys' into fido2.1
dangfan Nov 18, 2022
d5343a8
fix uninitialized dc
dangfan Jul 15, 2023
9684d50
fix a warning from address sanitizer
z4yx Jul 12, 2023
92a04e3
FIDO2 only allows authenticator reset in 10s after power-up
z4yx Jul 15, 2023
2bdcdd7
shouldn't randomize flag fields in nonce
z4yx Jul 19, 2023
edb6332
update to latest canokey-crypto
z4yx Jul 19, 2023
8ce58df
sort elements of arrays in authenticator info
z4yx Jul 19, 2023
b48c943
fix uninitialized fields in dc
z4yx Jul 19, 2023
c09f93a
fix missing assignment
z4yx Jul 19, 2023
779505f
minimize the scope of reused buffers
z4yx Jul 22, 2023
9f4ebb6
fix step 11 of authenticatorMakeCredential
z4yx Jul 25, 2023
c55b382
reboot emulation in test program
z4yx Jul 25, 2023
2260508
fix conditions of selecting response fields of GA
z4yx Jul 29, 2023
69b03c7
update checking of pin_uv_auth_param length
z4yx Jul 29, 2023
776339c
fix credProtect behavior in MC
z4yx Aug 2, 2023
81c7d4a
fix credProtect behavior in GA
z4yx Aug 2, 2023
d00cffd
add a condition of clientPin as per spec
z4yx Aug 2, 2023
019a025
return PIN_AUTH_BLOCKED if consecutive PIN errors detected
z4yx Aug 3, 2023
3e15d9f
make sure that last_cm_cmd is updated
z4yx Aug 5, 2023
e8f7cd5
fix DC_META_FILE update
z4yx Aug 5, 2023
8b77624
enlarge the CTAP buffer
z4yx Aug 5, 2023
39274be
correct hmac-secret processing with Pin Protocol V2
z4yx Aug 6, 2023
5531ce6
fix hmac-secret processing in authenticatorGetNextAssertion
z4yx Aug 6, 2023
3acddbd
randomize credBlob field if not used
z4yx Aug 7, 2023
b1e4d2c
compare nonce while matching allowList among DCs
z4yx Aug 7, 2023
01e66ca
only support credBlob with DC, so the credential ID can be shorter
z4yx Aug 8, 2023
2b91795
reorder keys in the extension map
z4yx Aug 9, 2023
dcad77b
fix default credProtect level in U2F
z4yx Aug 9, 2023
0c480e6
some flags should be kept for authenticatorGetNextAssertion
z4yx Aug 8, 2023
dabd704
fix the "up" option processing
z4yx Aug 8, 2023
484d116
declare FIDO_2_0 in versions
z4yx Aug 9, 2023
5216d25
add Wink command of U2F
z4yx Aug 9, 2023
c1776de
update FIDO tests on CI
z4yx Aug 9, 2023
3ff8554
test fido over udp
z4yx Aug 9, 2023
3fd6788
place lfs-root in current dir
z4yx Aug 9, 2023
1870751
reset clock ticks in nfc test mode
z4yx Aug 10, 2023
ee1d7ac
test FIDO2 in NFC mode
z4yx Aug 10, 2023
d54e75e
Make fido2-tests up-to-date
z4yx Aug 14, 2023
195f1db
should allow zero-length pinAuth
z4yx Aug 14, 2023
8312e65
check missing parameters later
z4yx Aug 15, 2023
d4241fd
fix parameter checking of CM
z4yx Aug 17, 2023
5f6e241
fix CM sub-command: Updating user information
z4yx Aug 19, 2023
0afc345
run vendor tests
z4yx Aug 19, 2023
014d45f
fix authenticatorLargeBlobs
z4yx Aug 21, 2023
96fe3fd
Fixing a bug in python-fido2 0.9.3
z4yx Aug 22, 2023
c99eeea
fix parameter checking of LB
z4yx Aug 22, 2023
ca8a00d
fix permission checking of LB
z4yx Aug 23, 2023
97f8219
return large blob key in cred enumeration
z4yx Aug 25, 2023
860c275
inconsistent DC state recovery
z4yx Aug 28, 2023
07335cd
filesystem error injection support
z4yx Aug 28, 2023
8b35c38
minor changes
z4yx Aug 31, 2023
70c8669
update libfido2-based test script
z4yx Oct 20, 2022
dc706c4
should not return credProt if it is not requested
z4yx Sep 4, 2023
cbef369
security enhance with memcmp_s
z4yx Sep 4, 2023
ef64308
fix LB test script
z4yx Sep 13, 2023
20de9c0
prevent invalid ECC key generation
z4yx Sep 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 25 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
run: |
sudo apt-add-repository ppa:yubico/stable
sudo apt-get update
sudo apt-get install -q -y git gcc g++ cmake swig psmisc procps pcscd pcsc-tools yubico-piv-tool libhidapi-dev libassuan-dev libgcrypt20-dev libksba-dev libnpth0-dev opensc openssl openssh-server libpcsclite-dev libudev-dev libcmocka-dev python3-pip python3-setuptools python3-wheel lcov yubikey-manager
sudo apt-get install -q -y git gcc g++ cmake swig psmisc procps pcscd pcsc-tools yubico-piv-tool libhidapi-dev libassuan-dev libgcrypt20-dev libksba-dev libnpth0-dev opensc openssl openssh-server libpcsclite-dev libudev-dev libcmocka-dev python3-pip python3-setuptools python3-wheel lcov yubikey-manager libcbor-dev
pip3 install --upgrade pip

- name: Set up Go 1.13
Expand All @@ -24,28 +24,42 @@ jobs:
submodules: recursive

- name: Cache GO Modules
uses: actions/cache@v1
uses: actions/cache@v3
env:
cache-name: go_mod
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('./go.mod') }}

- name: Cache Patched GPG
uses: actions/cache@v1
uses: actions/cache@v3
env:
cache-name: cache_gpg_binary
with:
path: gnupg
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./test-via-pcsc/build_gpg.sh') }}

- name: Cache FIDO Tools
uses: actions/cache@v3
env:
cache-name: cache_fido_tools
with:
path: |
u2f-ref-code
libfido2
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('./test-via-pcsc/build_fido_tests.sh') }}

- name: Build Patched GPG
run: |
./test-via-pcsc/build_gpg.sh
gpg --version

- name: Build FIDO Tests
run: ./test-via-pcsc/build_fido_tests.sh
run: |
./test-via-pcsc/build_fido_tests.sh
sudo ldconfig
which fido2-token
ldd $(which fido2-token)

- name: Build for Test
run: |
Expand Down Expand Up @@ -92,10 +106,14 @@ jobs:

- name: Test the FIDO2
run: |
echo 1 >/tmp/canokey-test-nfc # Emulate the NFC mode
#echo 1 >/tmp/canokey-test-nfc # Emulate the NFC mode
#pushd test-real && ./test-libfido2.sh && popd
cd fido2-tests
~/.local/bin/pytest --color=yes --nfc tests/standard/
~/.local/bin/pytest --color=yes --nfc tests/vendor/canokeys/ --capture=no
#../build/fido-hid-over-udp &
git pull
~/.local/bin/pytest --color=yes --vendor canokeys --nfc tests/standard/
~/.local/bin/pytest --color=yes --vendor canokeys --nfc tests/vendor/canokeys/
#kill %1

- name: Test the U2F
run: |
Expand Down
12 changes: 8 additions & 4 deletions applets/ctap/ctap-errors.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
#define CTAP2_ERR_INVALID_CBOR 0x12
#define CTAP2_ERR_MISSING_PARAMETER 0x14
#define CTAP2_ERR_LIMIT_EXCEEDED 0x15
#define CTAP2_ERR_UNSUPPORTED_EXTENSION 0x16
#define CTAP2_ERR_FP_DATABASE_FULL 0x17
#define CTAP2_ERR_LARGE_BLOB_STORAGE_FULL 0x18
#define CTAP2_ERR_CREDENTIAL_EXCLUDED 0x19
#define CTAP2_ERR_PROCESSING 0x21
#define CTAP2_ERR_INVALID_CREDENTIAL 0x22
Expand All @@ -25,7 +26,6 @@
#define CTAP2_ERR_UNSUPPORTED_ALGORITHM 0x26
#define CTAP2_ERR_OPERATION_DENIED 0x27
#define CTAP2_ERR_KEY_STORE_FULL 0x28
#define CTAP2_ERR_NO_OPERATION_PENDING 0x2A
#define CTAP2_ERR_UNSUPPORTED_OPTION 0x2B
#define CTAP2_ERR_INVALID_OPTION 0x2C
#define CTAP2_ERR_KEEPALIVE_CANCEL 0x2D
Expand All @@ -37,12 +37,16 @@
#define CTAP2_ERR_PIN_AUTH_INVALID 0x33
#define CTAP2_ERR_PIN_AUTH_BLOCKED 0x34
#define CTAP2_ERR_PIN_NOT_SET 0x35
#define CTAP2_ERR_PIN_REQUIRED 0x36
#define CTAP2_ERR_PUAT_REQUIRED 0x36
#define CTAP2_ERR_PIN_POLICY_VIOLATION 0x37
#define CTAP2_ERR_PIN_TOKEN_EXPIRED 0x38
#define CTAP2_ERR_REQUEST_TOO_LARGE 0x39
#define CTAP2_ERR_ACTION_TIMEOUT 0x3A
#define CTAP2_ERR_UP_REQUIRED 0x3B
#define CTAP2_ERR_UV_BLOCKED 0x3C
#define CTAP2_ERR_INTEGRITY_FAILURE 0x3D
#define CTAP2_ERR_INVALID_SUBCOMMAND 0x3E
#define CTAP2_ERR_UV_INVALID 0x3F
#define CTAP2_ERR_UNAUTHORIZED_PERMISSION 0x40
#define CTAP1_ERR_OTHER 0x7F
#define CTAP2_ERR_SPEC_LAST 0xDF
#define CTAP2_ERR_EXTENSION_FIRST 0xE0
Expand Down
Loading
Loading