summaryrefslogtreecommitdiff
path: root/include/u2f_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/u2f_impl.h')
-rw-r--r--include/u2f_impl.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/u2f_impl.h b/include/u2f_impl.h
index a2f2cfaa97..d3f4800387 100644
--- a/include/u2f_impl.h
+++ b/include/u2f_impl.h
@@ -33,6 +33,19 @@ enum touch_state {
*/
enum touch_state pop_check_presence(int consume);
+/* ---- non-volatile U2F state ---- */
+
+struct u2f_state {
+ uint32_t salt[8];
+ uint32_t salt_kek[8];
+ uint32_t salt_kh[8];
+};
+
+/**
+ * Get the current u2f state from the board.
+ */
+struct u2f_state *get_state(void);
+
/* ---- platform cryptography hooks ---- */
/**
@@ -145,4 +158,11 @@ int g2f_attestation_cert(uint8_t *buf);
enum vendor_cmd_rc u2f_generate(enum vendor_cmd_cc code, void *buf,
size_t input_size, size_t *response_size);
+/**
+ * U2F_SIGN command handler. Verifies a key handle is owned and signs data with
+ * it.
+ */
+enum vendor_cmd_rc u2f_sign(enum vendor_cmd_cc code, void *buf,
+ size_t input_size, size_t *response_size);
+
#endif /* __CROS_EC_U2F_IMPL_H */