CREATE TABLE public.crypto_key (
	id serial NOT NULL,
	user_id int4 NOT NULL,
	description varchar(255) NOT NULL DEFAULT '',
	"key" char(144) NOT NULL,
	CONSTRAINT crypto_key_pk PRIMARY KEY (id),
	CONSTRAINT crypto_key_fk FOREIGN KEY (user_id) REFERENCES public."user"(id) ON DELETE CASCADE ON UPDATE CASCADE
);

COMMENT ON COLUMN public.crypto_key.key IS 'salt(16 bytes) + [key encrypted with pbkdf2(pass, salt)]';
