Sitelet https://github.com/trustcrypto/python-onlykey/issues/47
Skip to content

setkey not working due to "Error invalid ECC slot" #47

Description

@altsalt

When attempting to manually set the script extracted key I am shown the message Error invalid ECC slot. This occurs when attempting to use setkey ECC1 x or setkey 101 x. In all of GitHub, that error message only appears in this file.

Since line 4662 suggests that this error is being thrown due to an incorrect slot, I looked at the setkey function in cli.py and client.py. It seems as though ECC1 is attempting to use slot_id = 29 which is triggering the error.

Unsure where to track this bug next, but happy to do more debugging with direction. Thanks!

Activity

onlykey commented on Aug 26, 2021

@onlykey
Contributor

Can you try again with onlykey-cli v1.2.6. This now supports key loading and using key names ECC1 (instead of numbers 101). Here are examples to set keys from the script you mentioned.
image

or direct

onlykey-cli setkey RSA2 4 s e7193b62e0c51c16fdfb0b86e0f51c323376cfc7ff5fcdae18fa1964a74d2b9ae6d52baa29aafa3148933ee868ef8a448790f9d2f247bfdd9348287eb29479c27b8618d3c410c62e25c28dd8bda9b8e46ac4371fef9c9387bd43c05dcde5a2711195cf594b40e021acc350232442f86b49c84076d6f8809030e50109850807fd4e1cc33e27f7e6f76c1730bcc65ecc5175395b98f0c9f4fd2591bb5461a5666588d52eb9343ef9136913f2fd4664dc8a7f6bbe8f4d661a46843a4c04082624bd87b39ccdcd7a01aac8431a17fc5c8bf5210fb3f6ab11d633588a9bf2fa7543f2d615d2afbafed5e344015743dbb1dc36bc97da892bfcc6d8dd74adc350d4a0ffcc13d7273f5fef0dc8bb158a86be4a0dd13cdf3cf25f9f9af8fe5949a1772c15fbac3a95898ed922ab6fbd0819738ddb1c3d425c17728c1ed65d942d8c3bc6f2920e4007e0b86008cee98a64857f151d8fb69ffb298b6e23da56fb0b0593cca7e306b97736179717e04643752b0229bbb28e238b6a113d728fb3debe8ed48005ab658b39ce573f041f7255399baa09d5c2bb5d91f9eee106d6a552509e3b69de1c4633340345a2edec2bec06df32fbdc6e92b146c1b6b042a12519e3daf99697e32c309e5b49a54040dea374ed69efd155f2c23ac8c631d7c641ce18b2c52ed5c3975bcdda55c0c8553cacda106460d0117197adac7f46ea6473041ddf1cbe15

Documentation updated here - https://docs.crp.to/command-line.html#setkey-key-slot-type-features-hex-key

Also on device key generation feature is now supported through the CLI - https://docs.crp.to/command-line.html#genkey-key-slot-type-features

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions