Skip to content

Commit b22e58f

Browse files
author
Andrzej Kurek
committed
Change public key format sent to driver to {0x04, X, Y} from raw {X, Y}.
1 parent 05d409d commit b22e58f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

main.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,12 +171,11 @@ int main(void)
171171
atecc608a_key_slot_device, pubkey, sizeof(pubkey),
172172
&pubkey_len));
173173

174-
/* Import a subset of the key, omitting the 0x04 prefix - only raw X & Y */
175174
ASSERT_SUCCESS_PSA(atecc608a_drv_info.p_key_management->p_import(
176175
atecc608a_public_key_slot,
177176
atecc608a_drv_info.lifetime,
178-
key_type, alg, PSA_KEY_USAGE_VERIFY, pubkey+1,
179-
pubkey_len-1));
177+
key_type, alg, PSA_KEY_USAGE_VERIFY, pubkey,
178+
pubkey_len));
180179

181180
ASSERT_SUCCESS_PSA(atecc608a_drv_info.p_asym->p_sign(
182181
atecc608a_key_slot_device, alg, hash, sizeof(hash),

0 commit comments

Comments
 (0)