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

U2F: remove code related to U2F #62

Merged
merged 1 commit into from
Mar 7, 2024
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: 0 additions & 1 deletion doc/apdu.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ baking.
| `EXC_REFERENCED_DATA_NOT_FOUND` | 0x6A88 | Referenced data not found. |
| `EXC_WRONG_VALUES` | 0x6A80 | The parameters in the data field are incorrect. |
| `EXC_SECURITY` | 0x6982 | Security condition not satisfied. |
| `EXC_HID_REQUIRED` | 0x6983 | Authentication method blocked. |
| `EXC_CLASS` | 0x6E00 | Class not supported. |
| `EXC_MEMORY_ERROR` | 0x9200 | Memory error. |

Expand Down
8 changes: 0 additions & 8 deletions src/apdu.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,6 @@ static inline bool delay_reject(void) {
return true;
}

static inline void require_permissioned_comm(void) {
/* U2F is dangerous for privacy because any open website
in the browser can use it silently if the app is opened.*/
if (G_io_apdu_media == IO_APDU_MEDIA_U2F) {
THROW(EXC_HID_REQUIRED);
}
}

size_t provide_pubkey(uint8_t* const io_buffer, cx_ecfp_public_key_t const* const pubkey);

size_t handle_apdu_error(uint8_t instruction, volatile uint32_t* flags);
Expand Down
5 changes: 0 additions & 5 deletions src/apdu_pubkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ size_t handle_apdu_get_public_key(uint8_t instruction, volatile uint32_t *flags)
THROW(EXC_WRONG_PARAM);
}

// do not expose pks without prompt through U2F (permissionless legacy comm in browser)
if (instruction == INS_GET_PUBLIC_KEY) {
require_permissioned_comm();
}

global.path_with_curve.derivation_type = parse_derivation_type(G_io_apdu_buffer[OFFSET_CURVE]);

size_t const cdata_size = G_io_apdu_buffer[OFFSET_LC];
Expand Down
1 change: 0 additions & 1 deletion src/exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#define EXC_REFERENCED_DATA_NOT_FOUND 0x6A88
#define EXC_WRONG_VALUES 0x6A80
#define EXC_SECURITY 0x6982
#define EXC_HID_REQUIRED 0x6983
#define EXC_CLASS 0x6E00
#define EXC_MEMORY_ERROR 0x9200

Expand Down
Loading