Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

breaking sqlcipher usage update #132

Merged
merged 3 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# 20210727.145430
## 0.5.0

## [lair\_keystore\_client-0.0.2](crates/lair_keystore_client/CHANGELOG.md#0.0.2)
- breaking sqlcipher update for ios compatibility

## [lair\_keystore-0.0.2](crates/lair_keystore/CHANGELOG.md#0.0.2)
## 0.4.1

## [lair\_keystore\_api-0.0.2](crates/lair_keystore_api/CHANGELOG.md#0.0.2)
- Add a way to migrate unencrypted databases to encrypted by providing an environment variable `LAIR_MIGRATE_UNENCRYPTED="true"`, Lair will detect databases which can't be opened and attempt migration. #121

# 0.4.0

- pin serde and rmp-serde #119

## 0.0.2
39 changes: 24 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ futures = "0.3.28"
# determinism of the strict client/server version checks
hc_seed_bundle = { version = "=0.2.4", path = "./crates/hc_seed_bundle" }
# lair_keystore_api must be pinned to enable strict version checks
lair_keystore_api = { version = "=0.4.5", path = "./crates/lair_keystore_api" }
lair_keystore_api = { version = "=0.5.0", path = "./crates/lair_keystore_api" }
lru = "0.12.3"
nanoid = "0.4.0"
one_err = "0.0.8"
Expand All @@ -27,7 +27,7 @@ rcgen = { version = "0.10.0", features = [ "zeroize" ] }
rmp-serde = "1.3.0"
rmpv = { version = "1.3.0", features = [ "with-serde" ] }
rpassword = "7.2.0"
rusqlite = { version = "0.31", features = [ "modern_sqlite" ] }
rusqlite = { version = "0.32.1", features = [ "modern_sqlite" ] }
serde = { version = "1", features = [ "derive", "rc" ] }
serde_bytes = "0.11.9"
serde_json = "1"
Expand Down
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ lair_keystore = "0.1.1"
- Library usage with underscores:

```rust
use lair_keystore::create_sql_pool_factory;
let _sqlite_store_factory = create_sql_pool_factory(".");
use lair_keystore::*;
```

## `lair-keystore` commandline executable usage:
Expand All @@ -43,7 +42,7 @@ License: MIT OR Apache-2.0

### `lair-keystore --help`
```text
lair_keystore 0.4.5
lair_keystore 0.5.0
secret lair private keystore

USAGE:
Expand Down Expand Up @@ -74,7 +73,7 @@ SUBCOMMANDS:
```
### `lair-keystore init --help`
```text
lair-keystore-init 0.4.5
lair-keystore-init 0.5.0
Set up a new lair private keystore.

USAGE:
Expand All @@ -92,7 +91,7 @@ FLAGS:
```
### `lair-keystore url --help`
```text
lair-keystore-url 0.4.5
lair-keystore-url 0.5.0
Print the connection_url for a configured lair-keystore
server to stdout and exit.

Expand All @@ -106,7 +105,7 @@ FLAGS:
```
### `lair-keystore import-seed --help`
```text
lair-keystore-import-seed 0.4.5
lair-keystore-import-seed 0.5.0
Load a seed bundle into this lair-keystore instance.
Note, this operation requires capturing the pid_file,
make sure you do not have a lair-server running.
Expand Down Expand Up @@ -143,7 +142,7 @@ ARGS:
```
### `lair-keystore server --help`
```text
lair-keystore-server 0.4.5
lair-keystore-server 0.5.0
Run a lair keystore server instance. Note you must
have initialized a config file first with
'lair-keystore init'.
Expand Down
20 changes: 10 additions & 10 deletions crates/hc_seed_bundle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ SeedBundle parsing and generation library.
#### Rationale

- Applications like Holochain have different requirements than classic
blockchain systems in terms of key management. Namely there is no need
for read-only or hardened wallets (Holochain handles these concepts
through capabilities and membranes).
blockchain systems in terms of key management. Namely there is no need
for read-only or hardened wallets (Holochain handles these concepts
through capabilities and membranes).
- Applications like Holochain still have need of hierarchy and determinism
in key (or in this case seed) derivation.
in key (or in this case seed) derivation.
- Since we're using libsodium for hashing, signature, and encryption
algorithms, let's use it for derivation as well.
algorithms, let's use it for derivation as well.
- To be psychologically compatible with the
[Bitcoin "HD Wallet" spec](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki),
we will do away with the "context" part of sodium KDF by always setting
it to `b"SeedBndl"` and focusing on the `subkey_id` and can declare a
chain of subsequent derivations of a 32 byte seed in the form
`m/68/1/65/8` where we apply `subkey_id`s 68, 1, 65, then 8 in turn.
[Bitcoin "HD Wallet" spec](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki),
we will do away with the "context" part of sodium KDF by always setting
it to `b"SeedBndl"` and focusing on the `subkey_id` and can declare a
chain of subsequent derivations of a 32 byte seed in the form
`m/68/1/65/8` where we apply `subkey_id`s 68, 1, 65, then 8 in turn.

#### hcSeedBundle Encoding Spec

Expand Down
20 changes: 10 additions & 10 deletions crates/hc_seed_bundle/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@
//! ### Rationale
//!
//! - Applications like Holochain have different requirements than classic
//! blockchain systems in terms of key management. Namely there is no need
//! for read-only or hardened wallets (Holochain handles these concepts
//! through capabilities and membranes).
//! blockchain systems in terms of key management. Namely there is no need
//! for read-only or hardened wallets (Holochain handles these concepts
//! through capabilities and membranes).
//! - Applications like Holochain still have need of hierarchy and determinism
//! in key (or in this case seed) derivation.
//! in key (or in this case seed) derivation.
//! - Since we're using libsodium for hashing, signature, and encryption
//! algorithms, let's use it for derivation as well.
//! algorithms, let's use it for derivation as well.
//! - To be psychologically compatible with the
//! [Bitcoin "HD Wallet" spec](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki),
//! we will do away with the "context" part of sodium KDF by always setting
//! it to `b"SeedBndl"` and focusing on the `subkey_id` and can declare a
//! chain of subsequent derivations of a 32 byte seed in the form
//! `m/68/1/65/8` where we apply `subkey_id`s 68, 1, 65, then 8 in turn.
//! [Bitcoin "HD Wallet" spec](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki),
//! we will do away with the "context" part of sodium KDF by always setting
//! it to `b"SeedBndl"` and focusing on the `subkey_id` and can declare a
//! chain of subsequent derivations of a 32 byte seed in the form
//! `m/68/1/65/8` where we apply `subkey_id`s 68, 1, 65, then 8 in turn.
//!
//! ### hcSeedBundle Encoding Spec
//!
Expand Down
9 changes: 0 additions & 9 deletions crates/lair_keystore/CHANGELOG.md

This file was deleted.

2 changes: 1 addition & 1 deletion crates/lair_keystore/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lair_keystore"
version = "0.4.5"
version = "0.5.0"
description = "secret lair private keystore"
license = "MIT OR Apache-2.0"
repository = "https://github.com/holochain/lair"
Expand Down
13 changes: 6 additions & 7 deletions crates/lair_keystore/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ lair_keystore = "0.1.1"
- Library usage with underscores:

```rust
use lair_keystore::create_sql_pool_factory;
let _sqlite_store_factory = create_sql_pool_factory(".");
use lair_keystore::*;
```

## `lair-keystore` commandline executable usage:
Expand All @@ -43,7 +42,7 @@ License: MIT OR Apache-2.0

### `lair-keystore --help`
```text
lair_keystore 0.4.5
lair_keystore 0.5.0
secret lair private keystore

USAGE:
Expand Down Expand Up @@ -74,7 +73,7 @@ SUBCOMMANDS:
```
### `lair-keystore init --help`
```text
lair-keystore-init 0.4.5
lair-keystore-init 0.5.0
Set up a new lair private keystore.

USAGE:
Expand All @@ -92,7 +91,7 @@ FLAGS:
```
### `lair-keystore url --help`
```text
lair-keystore-url 0.4.5
lair-keystore-url 0.5.0
Print the connection_url for a configured lair-keystore
server to stdout and exit.

Expand All @@ -106,7 +105,7 @@ FLAGS:
```
### `lair-keystore import-seed --help`
```text
lair-keystore-import-seed 0.4.5
lair-keystore-import-seed 0.5.0
Load a seed bundle into this lair-keystore instance.
Note, this operation requires capturing the pid_file,
make sure you do not have a lair-server running.
Expand Down Expand Up @@ -143,7 +142,7 @@ ARGS:
```
### `lair-keystore server --help`
```text
lair-keystore-server 0.4.5
lair-keystore-server 0.5.0
Run a lair keystore server instance. Note you must
have initialized a config file first with
'lair-keystore init'.
Expand Down
2 changes: 1 addition & 1 deletion crates/lair_keystore/src/docs/help.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### `lair-keystore --help`
```text
lair_keystore 0.4.5
lair_keystore 0.5.0
secret lair private keystore

USAGE:
Expand Down
2 changes: 1 addition & 1 deletion crates/lair_keystore/src/docs/import-seed-help.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### `lair-keystore import-seed --help`
```text
lair-keystore-import-seed 0.4.5
lair-keystore-import-seed 0.5.0
Load a seed bundle into this lair-keystore instance.
Note, this operation requires capturing the pid_file,
make sure you do not have a lair-server running.
Expand Down
2 changes: 1 addition & 1 deletion crates/lair_keystore/src/docs/init-help.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### `lair-keystore init --help`
```text
lair-keystore-init 0.4.5
lair-keystore-init 0.5.0
Set up a new lair private keystore.

USAGE:
Expand Down
2 changes: 1 addition & 1 deletion crates/lair_keystore/src/docs/server-help.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### `lair-keystore server --help`
```text
lair-keystore-server 0.4.5
lair-keystore-server 0.5.0
Run a lair keystore server instance. Note you must
have initialized a config file first with
'lair-keystore init'.
Expand Down
2 changes: 1 addition & 1 deletion crates/lair_keystore/src/docs/url-help.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### `lair-keystore url --help`
```text
lair-keystore-url 0.4.5
lair-keystore-url 0.5.0
Print the connection_url for a configured lair-keystore
server to stdout and exit.

Expand Down
3 changes: 1 addition & 2 deletions crates/lair_keystore/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
//! - Library usage with underscores:
//!
//! ```
//! use lair_keystore::create_sql_pool_factory;
//! let _sqlite_store_factory = create_sql_pool_factory(".");
//! use lair_keystore::*;
//! ```
//!
//! # `lair-keystore` commandline executable usage:
Expand Down
1 change: 1 addition & 0 deletions crates/lair_keystore/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ impl StandaloneServer {
// construct our sqlite store factory
let store_factory = crate::store_sqlite::create_sql_pool_factory(
&self.config.store_file,
&self.config.database_salt,
);

// spawn the server
Expand Down
Loading
Loading