carlos / contra Public

Clone
git clone https://amadan.net/carlos/contra

Plain git — no account needed to clone.

Download

Download this file

1CREATE TABLE `accounts` (`id` blob,`email_index` blob NOT NULL,`kdf_salt` blob NOT NULL,`created_at` datetime,PRIMARY KEY (`id`));
2
3CREATE UNIQUE INDEX `idx_accounts_email_index` ON `accounts`(`email_index`);
4
5CREATE TABLE `login_keys` (`id` blob,`account_id` blob NOT NULL,`branch` text NOT NULL,`public_key` blob NOT NULL,`created_at` datetime,PRIMARY KEY (`id`));
6
7CREATE INDEX `idx_login_keys_account_id` ON `login_keys`(`account_id`);
8
9CREATE TABLE `wraps` (`id` blob,`account_id` blob NOT NULL,`kind` text NOT NULL,`format_version` integer NOT NULL,`version` integer NOT NULL,`kdf_params` text NOT NULL,`cred_salt` blob,`kcv` blob NOT NULL,`nonce` blob NOT NULL,`ciphertext` blob NOT NULL,`created_at` datetime,PRIMARY KEY (`id`));
10
11CREATE INDEX `idx_wraps_kind` ON `wraps`(`kind`);
12
13CREATE INDEX `idx_wraps_account_id` ON `wraps`(`account_id`);
14
15CREATE TABLE `vaults` (`id` blob,`account_id` blob NOT NULL,`drop_box_public_key` blob NOT NULL,`created_at` datetime,PRIMARY KEY (`id`));
16
17CREATE INDEX `idx_vaults_account_id` ON `vaults`(`account_id`);
18
19CREATE TABLE `vault_members` (`id` blob,`vault_id` blob NOT NULL,`account_id` blob NOT NULL,`ephemeral_public_key` blob NOT NULL,`nonce` blob NOT NULL,`ciphertext` blob NOT NULL,`created_at` datetime,PRIMARY KEY (`id`));
20
21CREATE INDEX `idx_vault_members_account_id` ON `vault_members`(`account_id`);
22
23CREATE INDEX `idx_vault_members_vault_id` ON `vault_members`(`vault_id`);
24
25CREATE TABLE `items` (`id` blob,`vault_id` blob NOT NULL,`version` integer NOT NULL,`nonce` blob NOT NULL,`ciphertext` blob NOT NULL,`created_at` datetime,`updated_at` datetime,PRIMARY KEY (`id`));
26
27CREATE INDEX `idx_items_vault_id` ON `items`(`vault_id`);
28
29