Skip to content

Commit

Permalink
fixup! feat(core): Integrate Optiga into PIN verification.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewkozlik committed Sep 26, 2023
1 parent d3d0144 commit 2aa7bfb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions core/.changelog.d/3296.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Integrate Optiga into PIN verification for Model R.
4 changes: 2 additions & 2 deletions core/embed/trezorhal/unix/optiga.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ bool optiga_random_buffer(uint8_t *dest, size_t size) {

bool optiga_pin_set(const uint8_t pin_secret[OPTIGA_PIN_SECRET_SIZE],
uint8_t out_secret[OPTIGA_PIN_SECRET_SIZE]) {
memcpy(out_secret, OPTIGA_PIN_SECRET_SIZE, pin_secret);
memcpy(out_secret, pin_secret, OPTIGA_PIN_SECRET_SIZE);
return true;
}

bool optiga_pin_verify(const uint8_t pin_secret[OPTIGA_PIN_SECRET_SIZE],
uint8_t out_secret[OPTIGA_PIN_SECRET_SIZE]) {
memcpy(out_secret, OPTIGA_PIN_SECRET_SIZE, pin_secret);
memcpy(out_secret, pin_secret, OPTIGA_PIN_SECRET_SIZE);
return true;
}

0 comments on commit 2aa7bfb

Please sign in to comment.