Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions sys/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,7 @@ endif

ifneq (,$(filter fido2_ctap,$(USEMODULE)))
FEATURES_REQUIRED += periph_flashpage
FEATURES_REQUIRED += periph_flashpage_in_address_space
FEATURES_REQUIRED += periph_gpio_irq

USEPKG += tiny-asn1
Expand Down
19 changes: 14 additions & 5 deletions sys/fido2/ctap/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
menuconfig MODULE_FIDO2_CTAP
bool "FIDO2 CTAP"
depends on HAS_PERIPH_FLASHPAGE
depends on HAS_PERIPH_FLASHPAGE_IN_ADDRESS_SPACE
depends on HAS_PERIPH_GPIO
depends on HAS_PERIPH_GPIO_IRQ
depends on MODULE_FIDO2
Expand All @@ -27,6 +28,7 @@ menuconfig MODULE_FIDO2_CTAP
select MODULE_CRYPTO_AES_256
select MODULE_CIPHER_MODES
select MODULE_HASHES
select MODULE_PERIPH_FLASHPAGE_IN_ADDRESS_SPACE
help
Y to enable CTAP protocol support. The Client-to-Authenticator
Protocol (CTAP) is an application layer protocol for the communication
Expand Down Expand Up @@ -108,12 +110,19 @@ config FIDO2_CTAP_UP_BUTTON_FLANK_RISING

endchoice

config FIDO2_CTAP_FLASH_START_PAGE
int "First flash page to store data in"
default -1
config FIDO2_CTAP_NUM_FLASHPAGES
int "Amount of flashpages to use"
range 2 256
default 4
help
Configuring this incorrectly can lead to firmware corruption so make sure
the flash page is located after the firmware.
Configure how many flashpages are used to store FIDO2 CTAP data.

To save a credential (rk) in flash memory, roughly 156 bytes are needed. This
number might change slightly depending on the flash block size.
Therefore, if one wants to e.g. save 40 credentials and the flashpage
size is 4096 bytes roughly 156 * 40 / 4096 (2) flashpages are needed.
To save authenticator state data one additional flashpage is needed.
So in total one has to configure 3 to save 40 credentials.

rsource "transport/Kconfig"

Expand Down
Loading