Commit graph

237 commits

Author SHA1 Message Date
bunnie
de514ac66f rename packages in prep for upload to crates.io 2022-10-03 00:24:45 +08:00
bunnie
4e40ae6c5d move from target selectors to feature selectors for back-ends
This will allow for e.g. xous on riscv32-imac but not a precursor
target, for example: by using feature selectors we get to have
a bigger range of targets that we support, such as for implementations
that haven't been upstreamed or have official target-triples.

The downsides are:

- patch override libraries don't absorb feature flags. so, for
example, the AES crate that is used to patch other crates won't
be aware of the target features without modifying the referencing
crates.

- features are normally meant to be additive, but target features
are mutually exclusive. The mutex is enforced by a check in
utralib that throws a panic on build if two targets are accidentally
selected at the same time.
2022-10-02 02:56:44 +08:00
bunnie
52728bce1f more xous-ipc bumps 2022-09-27 01:15:00 +08:00
bunnie
f188e0f866 re-bump xous-ipc to 0.9.9 2022-09-26 16:50:38 +08:00
bunnie
507ab42836 downgrade xous-ipc to 0.9.7 until i have permissions to push a new version 2022-09-26 16:11:26 +08:00
bunnie
3579dfdd17 update xous-ipc and xous versions 2022-09-26 16:07:35 +08:00
bunnie
114d60bc53 migrate logserver API to external package 2022-09-26 14:06:46 +08:00
bunnie
72859d18dd fix UX update issue on FIDO adding records.
maybe need to also chase this down in the password add new area too?

need to check.
2022-09-23 00:37:15 +08:00
bunnie
278570d8d3 progress on issue #223
This adds the abort flow to the U2F approvals. Needs more testing.
2022-09-23 00:27:14 +08:00
bunnie
13402b99b9 fix #224
was a logic bug where the database name was not updated while
doing some refactoring previously
2022-09-22 22:05:57 +08:00
bunnie
8fe4c50373 improve error reproting on #206 2022-09-20 23:24:42 +08:00
bunnie
ba45fc2685 fix validator issue on hotp count 2022-09-20 23:13:18 +08:00
bunnie
9225cbaba3 resolve issue #206 by adding check for existing basis 2022-09-20 23:06:22 +08:00
bunnie
22a440f75f Add HOTP initial count feature; try to fix HOTP panic
- HOTP now prompts for an initial count
- Found a code path where improperly formatted HOTP field can
lead to a 0-value being passed to a totp generator
- Added guardrails around the TOTP generator so it can't divide by 0:
it issues a warning instead.
2022-09-19 23:44:45 +08:00
bunnie
47ce1e3149 add version history for TOTP records 2022-09-18 21:53:35 +08:00
bunnie
d1cda8f669 add hotp support
hotp is merged as a "minor" feature off of totp. In other words,
the default mode is totp, but one can specify a totp record
to be an hotp record and it will behave as an hotp record.

We re-use the "step_seconds" field to specify the count parameter.
There is no separate initial count / count field -- the two are
tracked in a single u64 that is stored in the "step_seconds" field
of what would be a totp record.

This also revs the TOTP record to v2. This *should* not break
anything:

- v1 records deserialize as totp records into v2 (which is correct,
as there are no hotp in v1)
- when a v1 record is saved to disk, it is stored in v2 format
- v1 records that are not edited stay as v1
2022-09-17 00:39:47 +08:00
bunnie
fad3aa6ec0 fix fido readback from test vectors made in hosted mode 2022-09-17 00:39:19 +08:00
bunnie
b22e3a1b43 fix dependabot security issue in base64 dependency 2022-09-11 21:48:20 +08:00
bunnie
3899f25837 add a usability note 2022-09-09 15:35:16 +08:00
bunnie
7902676918 note dependency for protobuf-compiler for the upload tool to work 2022-09-09 15:33:10 +08:00
Nickolai Zeldovich
6e1e2acd28 minor cleanup 2022-08-31 15:33:27 -04:00
Nickolai Zeldovich
b604b746e9 format conversion for importing Google Authenticator TOTP 2022-08-31 14:38:06 -04:00
bunnie
9a4933b648 Merge branch 'main' into rustls-exp2 2022-08-16 15:13:56 +08:00
bunnie
1ff85cab41 add note about host readout to the README.md 2022-08-14 00:21:53 +08:00
bunnie
a9e9592094 improve error messaging when host readout is not enabled 2022-08-14 00:20:46 +08:00
bunnie
eb2fda3c6c
Merge pull request #213 from gsora/feat/vault-bitwarden-import
feat(vault): support Bitwarden export formatting for Vault
2022-08-14 00:01:07 +08:00
bunnie
e7576ebb42 reduce debug level on vault 2022-08-13 23:55:40 +08:00
bunnie
8570449b04 make vendor backup locked out by default; hook to UX enable dialog box
also halts updates of the TOTP timer bar while this is happening
to avoid overflowing the server queue with unanswered redraw
requests
2022-08-13 23:54:36 +08:00
Gianguido Sorà
5acb0af82b feat(vault): support Bitwarden export formatting for Vault
Allows folks with Bitwarden data to (mostly) import it in Vault, both
passwords and TOTPs.
2022-08-13 17:40:25 +02:00
Gianguido Sorà
1defdff915 chore(vault): add serde_repr for vaultbackup-rs 2022-08-13 17:40:02 +02:00
Gianguido Sorà
9a219d8aba chore(vault): add default for PasswordEntries 2022-08-13 17:39:37 +02:00
bunnie
56172e37a9 shift vendor command space to 0x70 range
this avoids conflicts with OpenSK and open-ssh's handling
of their vendor commands.
2022-08-13 22:25:07 +08:00
Gianguido Sorà
dca1ec86de fix(vault): don't panic when reading backup::PayloadType off an empty
vec
2022-08-13 16:01:51 +02:00
bunnie
9e0b63c871 make the "hash" arguments match the display UX values
that way any entries that would show up "exactly" as the same
description would flag as conflicts on re-upload
2022-08-13 21:46:06 +08:00
bunnie
7ec39e4be6 strip out the random-guid code 2022-08-13 21:37:56 +08:00
Gianguido Sorà
cd42cf6395 fix(vault): storage for totp and passwords derive pddb key from their
unique content

Instead of generating a unique GUID every time a new record gets
created, hash known unique content for every entry and use that as key.

The StorageContent trait now has a hash() method that returns a Vec
containing the SHA-256 hash of the object's unique content.

Hashing is done by re-using the same calls that ctap uses.

This allows dupes detection when restoring a backup, allowing us to
employ a "never overwrite" policy: Precursor is the main source of truth
for such data.
2022-08-13 13:29:42 +02:00
Gianguido Sorà
cdfae27afc feat(vault): implement basics of dupe detection
Still needs a way to deterministically generate a key for each entry.

Idea: a `hash() -> String` method on StorageContent so that new_record
can call it, store said object with the newly-generated key.

Since this is a deterministic operation, restoring a backup with dupes
would not overwrite what's present in PDDB already.
2022-08-12 18:47:38 +02:00
Gianguido Sorà
473e1cf77b chore(vault): address warnings 2022-08-12 17:37:51 +02:00
Gianguido Sorà
51b04fe14e Merge branch 'main' into feat/vault-usb-totp-loading 2022-08-12 17:16:30 +02:00
Gianguido Sorà
29dfe4eb98 feat(vault): add logging, support Wire format 2022-08-12 16:57:47 +02:00
Gianguido Sorà
115781b979 feat(vault): implement VendorSession for backup/restore calls that span
multiple CTAPHID sessions
2022-08-12 16:57:05 +02:00
Gianguido Sorà
a594342d03 feat(vault): add bulk new record method on storage abstraction
Instead of syncing for each new record, new_records() only syncs:
- when it's writing an entry that has index multiple of 10
- when it's the last packet in sequence
2022-08-12 16:55:59 +02:00
Gianguido Sorà
2e50699c82 feat(vault): add Wire type for >7601 bytes of CTAPHID payload 2022-08-12 16:55:12 +02:00
Gianguido Sorà
5758b1d4c0 feat(vault): handle usb restore for >7601 bytes of payload 2022-08-12 16:54:26 +02:00
bunnie
2e0f1df894 intermediate commit through experiments 2022-08-12 15:56:05 +08:00
bunnie
6fff73ace8 fix missing path to try_send_message 2022-08-11 03:11:47 +08:00
bunnie
cfa65a3a72 add some notes about integration with #205 2022-08-11 02:48:56 +08:00
bunnie
b39ec5d044 don't crash if the pumper thread can't send a redraw poll 2022-08-11 02:48:38 +08:00
bunnie
e824334747 add a thin UX layer to manage switching host readout mode
needs a bit more integration with the final TOTP/password
scripts logic
2022-08-11 02:32:38 +08:00
bunnie
d1bd99a7f2 demonstrate switching of core between configurations using shell commands 2022-08-10 18:58:55 +08:00