Forward secrecy.

Each connection's keys are derived from a secret that is erased after
deriving the keys and the secret for the next connection.
This commit is contained in:
akwizgran
2011-11-16 15:35:16 +00:00
parent d02a68edfc
commit f6ae4734ce
45 changed files with 506 additions and 430 deletions

View File

@@ -29,6 +29,11 @@ class H2Database extends JdbcDatabase {
private static final Logger LOG =
Logger.getLogger(H2Database.class.getName());
private static final String HASH_TYPE = "BINARY(32)";
private static final String BINARY_TYPE = "BINARY";
private static final String COUNTER_TYPE = "INT NOT NULL AUTO_INCREMENT";
private static final String SECRET_TYPE = "BINARY(32)";
private final File home;
private final Password password;
private final String url;
@@ -42,7 +47,7 @@ class H2Database extends JdbcDatabase {
ConnectionWindowFactory connectionWindowFactory,
GroupFactory groupFactory) {
super(connectionContextFactory, connectionWindowFactory, groupFactory,
"BINARY(32)", "BINARY", "INT NOT NULL AUTO_INCREMENT");
HASH_TYPE, BINARY_TYPE, COUNTER_TYPE, SECRET_TYPE);
home = new File(dir, "db");
this.password = password;
url = "jdbc:h2:split:" + home.getPath()