CREATE TABLE certificates (
    subject varchar primary key,
    notbefore varchar,
    notafter varchar,
    data varchar,
    fingerprint varchar,
    serial varchar,
    type varchar
);

CREATE TABLE users (
    username varchar primary key,
    password varchar,
    pubkey varchar,
    revocation varchar
);

CREATE TABLE sessions (
    username varchar,
    sessionid varchar primary key,
    expiry_date varchar
);

CREATE TABLE messages (
    sender varchar,
    recipient varchar,
    subject varchar,
    plaintext varchar,
    ciphertext varchar,
    sent_date varchar,
    msg_digest varchar primary key
);

CREATE TABLE revocation (
    subject varchar primary key,
    proof_of_possession varchar
);
