CREATE TABLE host_keys (
    id VARCHAR NOT NULL PRIMARY KEY,
    host_id VARCHAR NOT NULL REFERENCES hosts(id),

    counter INT NOT NULL,
    client_ed_pub bytea NOT NULL,
    client_dh_pub bytea NOT NULL,
    client_cert bytea NOT NULL,

    salt bytea NOT NULL,
    info bytea NOT NULL,
    server_ed_priv bytea NOT NULL,

    UNIQUE (host_id, counter)
);