Skip to content

Ergonomics improvements #131

Description

@chrysn

Working on documentation and examples, some things popped out:

  • Software libraries should really have easy initializers. Fixed in Move WithRng to dedicated crate #123 and rustcrypto: Update and build on underlying WithRng for renamed standalone operation #124

  • Algorithm type inference works well for hashing and other single-entry-point places, but for Dh, the algorithm needs to be cloned, and then type inference breaks apart, and all of a sudden you have to use a proper generic rather than an impl Cal.

    This could be fixed by making inference easier (how?), by making the algorithm Copy (meh), or by allowing to get an algorithm back from a data item (maybe? maybe even going further "roll me a key matching X and give me DH and pubkey").

  • When you already know an algorithm to be fixed, you still have to go through some scheme's constructor. (Provide global algorithm tool #117)

  • Do we want to have an easy generator for random nonces in AEAD?

  • Have some direct conversions between types. The upcoming tutorial example runs a DH key to raw_secret_bytes() and that into AeadProvider::load_from_keydata, which is not only unergonomic but may also hinder secret independence demonstrations.

(This list will likely grow before being tackled.)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions