diff --git a/common/defs/fido/apple.json b/common/defs/fido/apple.json new file mode 100644 index 0000000000..26c3e1f02f --- /dev/null +++ b/common/defs/fido/apple.json @@ -0,0 +1,5 @@ +{ + "name": "Apple", + "webauthn": ["apple.com"], + "use_self_attestation": false +} diff --git a/common/defs/fido/apple.png b/common/defs/fido/apple.png new file mode 100644 index 0000000000..8145a493d5 Binary files /dev/null and b/common/defs/fido/apple.png differ diff --git a/core/embed/rust/src/ui/model_tt/component/fido_icons.rs b/core/embed/rust/src/ui/model_tt/component/fido_icons.rs index 71f55fcadf..df39e17a65 100644 --- a/core/embed/rust/src/ui/model_tt/component/fido_icons.rs +++ b/core/embed/rust/src/ui/model_tt/component/fido_icons.rs @@ -3,6 +3,7 @@ //! do not edit manually! +const ICON_APPLE: &[u8] = include_res!("model_tt/res/fido/icon_apple.toif"); const ICON_AWS: &[u8] = include_res!("model_tt/res/fido/icon_aws.toif"); const ICON_BINANCE: &[u8] = include_res!("model_tt/res/fido/icon_binance.toif"); const ICON_BITBUCKET: &[u8] = include_res!("model_tt/res/fido/icon_bitbucket.toif"); @@ -41,6 +42,7 @@ const ICON_WEBAUTHN: &[u8] = include_res!("model_tt/res/fido/icon_webauthn.toif" pub fn get_fido_icon_data>(icon_name: Option) -> &'static [u8] { if let Some(icon_name) = icon_name { match icon_name.as_ref() { + "apple" => ICON_APPLE, "aws" => ICON_AWS, "binance" => ICON_BINANCE, "bitbucket" => ICON_BITBUCKET, diff --git a/core/embed/rust/src/ui/model_tt/res/fido/icon_apple.toif b/core/embed/rust/src/ui/model_tt/res/fido/icon_apple.toif new file mode 100644 index 0000000000..d6c97f897e Binary files /dev/null and b/core/embed/rust/src/ui/model_tt/res/fido/icon_apple.toif differ diff --git a/core/src/apps/webauthn/knownapps.py b/core/src/apps/webauthn/knownapps.py index e9125e83cf..252c9653d9 100644 --- a/core/src/apps/webauthn/knownapps.py +++ b/core/src/apps/webauthn/knownapps.py @@ -21,6 +21,14 @@ class FIDOApp: # fmt: off def by_rp_id_hash(rp_id_hash: bytes) -> FIDOApp | None: + if rp_id_hash == b"\x22\x65\xcb\xcc\x3e\xf2\x41\x06\xc9\xe0\xed\xdb\xd0\x4f\x3c\xca\x0d\x03\x22\x5d\xa3\xfc\xca\x8e\x2d\x86\xf7\xa3\x94\xaf\x92\x83": + # WebAuthn key for Apple + return FIDOApp( + "apple.com", # label + "apple", # icon_name + None, # use_sign_count + False, # use_self_attestation + ) if rp_id_hash == b"\x96\x89\x78\xa2\x99\x53\xde\x52\xd3\xef\x0f\x0c\x71\xb7\xb7\xb6\xb1\xaf\x9f\x08\xe2\x57\x89\x6a\x8d\x81\x26\x91\x85\x30\x29\x3b": # U2F key for Amazon Web Services return FIDOApp(