Encedo HEM API Developer Manual
  • Welcome!
  • Preliminary
    • Quick Start
    • General information
  • Security
    • Report an issue
    • Advisory
      • Hall of fame
  • Reference
    • API Reference
      • System
        • Version & Status
        • Checkin
        • Configuration
        • Upgrade
          • Firmware
            • Low level USB mode
          • Management app
        • Self-test
        • Reboot
        • Shutdown
      • Authorization
        • Initialization
        • User authentication
        • External authenticator
          • Registration
          • Authentication
      • Key Management
        • Create a key
        • Derive a key
        • Import a key
        • Update a key
        • Delete a key
        • Get a public key
        • List the keys
        • Search a key
      • Cryptography operations
        • HMAC
        • ExDSA
        • ECDH
        • Encryption
          • Encryption/Decryption
          • Wrap/Unwrap
      • Audit log
      • Storage
Powered by GitBook
On this page
  1. Reference
  2. API Reference
  3. Key Management

Import a key

This key management operation allows importing of a public key to the keys repository and treats it as a trusted key afterwards.

Allowed users

Allowed

Not allowed

Allowed

Required access scope

keymgmt:imp

Import a public key

POST https://my.ence.do/api/keymgmt/import

Import a public key and save it in the keys repository.

Headers

Name
Type
Description

Authorization*

String

Bearer JWT_TOKEN

Content-Type*

String

application/json

Request Body

Name
Type
Description

descr

String

Base64 encoded additional description

label*

String

Label of a key

mode

String

Key operation mode (for NIST ECC only)

pubkey*

String

Base64 encoded external public key

type*

String

Type of key to create

{
  "kid":"d51ea62a3f49a84cadbd0958e1499ecf"
}

Possible pubkey type

Type
Description

SECP256R1

NIST P-256 ECC key

SECP384R1

NIST P-384 ECC key

SECP521R1

NIST P-521 ECC key

SECP256K1

SEC2-v2 ECC key

CURVE25519

CURVE25519 ECC ECDH only key

CURVE448

CURVE4ECC ECDH only key

ED25519

ED25519 ECC EdDSA only key

ED448

ED448 ECC EdDSA only key

Possible key mode (for NIST ECC keys only)

Response data for successful operation

Name
Type
Description

kid

String

Key ID, 32 chars hex string

Log entries

Event
Result
Source

LOG_TYPE_FAILED_SCOPE_CHECK

LOG_RESULT_FAILED

403

LOG_TYPE_KEY_IMPORT

LOG_RESULT_ERROR

400

LOG_TYPE_KEY_IMPORT

LOG_RESULT_FAILED

406

LOG_TYPE_KEY_IMPORT

LOG_RESULT_OK

200

PreviousDerive a keyNextUpdate a key

Last updated 3 years ago

Check the list .

here