Create user custom key
    • PDF

    Create user custom key

    • PDF

    Article summary

    Summary

    Generate a random high-entropy key with the given bits (supported for symmetric keying schemes only). You can also get a key returned in plaintext, along with a key sealed with the current version of the specified master key. The request can only be made with the key type used for encryption and decryption.

    POST https://kms.apigw.ntruss.com/keys/v1/{keyTag}/createCustomKey
    POST https://kms.apigw.ntruss.com/keys/v2/{keyTag}/createCustomKey
    

    Request

    Request parameters

    Parameter nameTypeDescription
    keyTagString (Required)Tag value of the master key to use for the generated key seal

    Request body

    {
      "requestPlainKey" : boolean,
      "bits" : integer,
      "context": string
    }
    
    Parameter nameTypeDescription
    requestPlainKeyBoolean (Optional)Flag to select whether the generated key should be returned in plain text (false by default)
    bitsInteger (Optional)Bits of the key to be generated
    128, 256, 512 (256 by default)
    contextString (Optional)Use when the master key has a convergent encryption applied
    Context data (up to 50 bytee)
    Base64 encoding required

    Response

    Response body

    {
      "plaintext" : string,
      "key_version": integer
      "ciphertext" : string
    }
    
    Parameter nameTypeDescription
    plaintextString- Plain text form of the generated key
    requestPlainKey: return only if true
    Base64 encoded
    key_versionInteger- Master key version information
    ciphertextString- Sealed form of the generated key
    Base64 encoded

    Was this article helpful?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.