[riot-notifications] [RIOT-OS/RIOT] FIDO2 support in RIOT (#16489)

benpicco notifications at github.com
Mon Aug 23 23:21:44 CEST 2021


@benpicco commented on this pull request.



> + * state of authenticator. Stored in flash memory
+ */
+typedef struct {
+    uint8_t initialized_marker;                 /**< CTAP initialized marker */
+    bool pin_is_set;                            /**< PIN is set or not */
+    int rem_pin_att;                            /**< remaining PIN tries */
+    uint8_t pin_hash[SHA256_DIGEST_LENGTH / 2]; /**< LEFT(SHA-256(pin), 16) */
+    ctap_config_t config;                       /**< configuration of authenticator */
+    uint16_t rk_amount_stored;                  /**< total number of resident keys stored on device */
+    uint8_t cred_key[CTAP_CRED_KEY_LEN];        /**< AES CCM encryption key for cred */
+    bool cred_key_is_initialized;               /**< AES CCM key initialized flag */
+    ctap_crypto_key_agreement_key_t ag_key;     /**< Platform key agreement key */

you might want to order the struct by the size of the member's types to reduce padding :wink: 

http://www.catb.org/esr/structure-packing/

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16489#pullrequestreview-736578809
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210823/cd4ac7a0/attachment.htm>


More information about the notifications mailing list