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

Credential management #107

Closed

Conversation

kaczmarczyck
Copy link
Collaborator

@kaczmarczyck kaczmarczyck commented May 6, 2020

New command for #106 . This PR contains all changes for reference, and will be split into smaller chunks. The commit 6724acf moves all changes to a separate file. While they belong to mod conceptually, this file has grown too large already and the commit is for opening discussion about if we want to split mod up like that.

@kaczmarczyck kaczmarczyck self-assigned this May 6, 2020
Copy link
Member

@ia0 ia0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just reviewed the persistent storage change. It looks good to me.

src/ctap/storage.rs Outdated Show resolved Hide resolved
@kaczmarczyck
Copy link
Collaborator Author

The implementation is heavily reworked after the rebase!

libraries/crypto/src/ecdh.rs Outdated Show resolved Hide resolved
libraries/crypto/src/ecdsa.rs Show resolved Hide resolved
src/ctap/storage.rs Outdated Show resolved Hide resolved
src/ctap/storage.rs Outdated Show resolved Hide resolved
src/ctap/storage.rs Outdated Show resolved Hide resolved
src/ctap/credential_management.rs Show resolved Hide resolved
src/ctap/credential_management.rs Outdated Show resolved Hide resolved
src/ctap/credential_management.rs Outdated Show resolved Hide resolved
src/ctap/credential_management.rs Show resolved Hide resolved
src/ctap/credential_management.rs Outdated Show resolved Hide resolved
@jmichelp jmichelp changed the base branch from master to develop January 6, 2021 14:58
Copy link
Member

@ia0 ia0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me, but it's quite big. I have the feeling we need stronger testing strategy than review, unit tests, and test suite to get some confidence about the correctness.

libraries/crypto/src/ecdsa.rs Show resolved Hide resolved
@kaczmarczyck
Copy link
Collaborator Author

You mentioned a potential improvement / optimization of the storage API and RAM usage, PR size and testing. What do you think of the following plan:

For storage: I keep the storage in this PR as is for reference (see below), and work on improving RAM usage in a new PR.

For PR size: This PR is pretty old, and was blocked by the 2.1 spec to land. Therefore, it has some ballast. I need heavier code changes with #252 anyway, and wanted to split out some of the changes made here for some time. But, I wanted to finish the storage review with you first so you don't have to review it again. I'll keep this PR open for reference, and send out a few smaller PRs for crypto, storage etc.

For testing: I tested this PR with the latest Chrome, since it supports credential management. It works, when you add one little change: You remove the check for PIN permissions (not the PIN check, just the permissions). This is a new 2.1 feature that doesn't seem to be supported yet. Everything else (the crypto, the command and subcommands) works. If you have any other ideas, please let me know.

@ia0
Copy link
Member

ia0 commented Jan 8, 2021

For storage: SGTM

For PR size: No problem, I wasn't saying we should split it. Just that I've most probably missed some stuff.

For testing: Ideally (is it even feasible?), we would have our implementation be a library with a thin wrapper for Tock and other side-effect dependency code, and we would have a Rust specification of CTAP (which should be very small and straight-forward code because there's no embedded-programming constraints or other performance constraints). We would then be able to fuzz our implementation against this specification (like for the persistent storage). The Rust specification could also be a reference specification for the community (including the configuration and scenario generator). We might at least want to start an issue to make our CTAP code a library, since it would enable simpler fuzzing (just crash-detection or other basic soundness properties, not correctness). And it might be easier to adapt to other backends as Tock.

@kaczmarczyck
Copy link
Collaborator Author

Closing this PR as #256 is the new, rebased command, minus #253 and #254.

@kaczmarczyck kaczmarczyck deleted the credential-management branch January 13, 2021 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants