CREATE TABLE IF NOT EXISTS persistent_keys
(
    id          BLOB PRIMARY KEY NOT NULL
);

CREATE TABLE IF NOT EXISTS ephemeral_keys
(
    id                      BLOB PRIMARY KEY NOT NULL,
    persistent_key          BLOB NOT NULL,
    expires_at              INTEGER NOT NULL,
    FOREIGN KEY(persistent_key) REFERENCES persistent_keys(id)
);
