Skip to main content

CREATE KEY (bSQL) | Blockpoint Docs

Adds a key to a database. For examples, see Examples.

bSQL Syntax Conventions

Syntax

CREATE KEY <key_type> { "key_name" } 

<key_type> ::= SYMMETRIC

Arguments

key_name
The name of the key to be created.

key_type
The type of key to be created (for now only SYMMETRIC keys are supported).

Permissions

Any user can create a key. The encryption key created is attached to their corresponding bSQL login. In order to use the key to encrypt a column in a blockchain the user must have MANAGEMENT permissions on the database and have ownership of the key.

Examples

Creating a key.

The following example creates a new symmetric key named "shipKey".

CREATE KEY 
SYMMETRIC "shipKey";

See Also