{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/766","repository_url":"https://api.github.com/repos/rust-lang/rfcs","labels_url":"https://api.github.com/repos/rust-lang/rfcs/issues/766/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rfcs/issues/766/comments","events_url":"https://api.github.com/repos/rust-lang/rfcs/issues/766/events","html_url":"https://github.com/rust-lang/rfcs/issues/766","id":55856848,"number":766,"title":"Figure out in-tree crypto story","user":{"login":"steveklabnik","id":27786,"avatar_url":"https://avatars.githubusercontent.com/u/27786?v=3","gravatar_id":"","url":"https://api.github.com/users/steveklabnik","html_url":"https://github.com/steveklabnik","followers_url":"https://api.github.com/users/steveklabnik/followers","following_url":"https://api.github.com/users/steveklabnik/following{/other_user}","gists_url":"https://api.github.com/users/steveklabnik/gists{/gist_id}","starred_url":"https://api.github.com/users/steveklabnik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steveklabnik/subscriptions","organizations_url":"https://api.github.com/users/steveklabnik/orgs","repos_url":"https://api.github.com/users/steveklabnik/repos","events_url":"https://api.github.com/users/steveklabnik/events{/privacy}","received_events_url":"https://api.github.com/users/steveklabnik/received_events","type":"User","site_admin":false},"labels":[{"id":168418468,"url":"https://api.github.com/repos/rust-lang/rfcs/labels/A-wishlist","name":"A-wishlist","color":"d7e101","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2015-01-29T05:02:16Z","updated_at":"2016-12-19T22:32:48Z","closed_at":null,"body":"<a href=\"https://github.com/brson\"><img src=\"https://avatars.githubusercontent.com/u/147214?v=3\" align=\"left\" width=\"96\" height=\"96\" hspace=\"10\"></img></a> **Issue by [brson](https://github.com/brson)**\n_Wednesday Jun 04, 2014 at 22:05 GMT_\n\n_For earlier discussion, see https://github.com/rust-lang/rust/issues/14655_\n\n_This issue was labelled with: A-libs in the Rust repository_\n\n---\n\nWe've previously made the decision not to distribute any crypto with Rust at all, but this is probably not tenable since crypto is used everywhere. My current opinion is that we should not distribute any crypto _written in Rust_, but that distributing bindings to well-regarded crypto is fine.\n\nFigure out a strategy here, build consensus, then start implementing a robust crypto library out of tree, with the goal of merging into the main distribution someday. There are some existing efforts along these lines that should be evaluated for this purpose.\n"},"comment":{"url":"https://api.github.com/repos/rust-lang/rfcs/issues/comments/268098295","html_url":"https://github.com/rust-lang/rfcs/issues/766#issuecomment-268098295","issue_url":"https://api.github.com/repos/rust-lang/rfcs/issues/766","id":268098295,"user":{"login":"burdges","id":680126,"avatar_url":"https://avatars.githubusercontent.com/u/680126?v=3","gravatar_id":"","url":"https://api.github.com/users/burdges","html_url":"https://github.com/burdges","followers_url":"https://api.github.com/users/burdges/followers","following_url":"https://api.github.com/users/burdges/following{/other_user}","gists_url":"https://api.github.com/users/burdges/gists{/gist_id}","starred_url":"https://api.github.com/users/burdges/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/burdges/subscriptions","organizations_url":"https://api.github.com/users/burdges/orgs","repos_url":"https://api.github.com/users/burdges/repos","events_url":"https://api.github.com/users/burdges/events{/privacy}","received_events_url":"https://api.github.com/users/burdges/received_events","type":"User","site_admin":false},"created_at":"2016-12-19T22:32:48Z","updated_at":"2016-12-19T22:32:48Z","body":"A few constant time building blocks sound small compared to say pulling in an extra hash function, much less AES and RSA, like every existing crypto library does. \r\n\r\nAren't those `Algorithm` structs in ring too confining for a general purpose crypto library?  Those fit well both with ring's history in BoringSSL of course, and more generally for providing TLS, but a more rust-like API would probably be `Algorithm::new(..)` and traits, like rust-crypto.\r\n\r\nI'd say leave any \"stakeholders\" who want uber-safety to using ring and sodiumoxide.  Those projects make a range of safety decisions, including evaluating if the Rust code is mature enough to replace solid C code.  Rust is not lacking in foot gun free crypto libraries. \r\n\r\nRust is weaker on flexible building blocks though: \r\n\r\nWe want to simplify building a separate crate to provide a crypto primitive, without needing to dig too deeply into rustc or LLVM.  Right now, people send pull requests to rust-crypto, but that project should not be responsible for everyone's pet cipher or hash function.  I suppose just breaking rust-crypto in a crypto-current and crypto-legacy crates would require exposing enough building blocks that new ciphers and hash functions need not send pull requests. \r\n\r\nWe want to simplify using such crates in protocols, including unconventional protocols involving stuff like blind signatures, Axolotl, elligator, semi-private keys, mixnets, ECQV, post-quantum, etc.  We should not worry about public-key algorithms right now, as stand alone crates do those well enough, but the symmetric crypto should not stand in the way when people when do unusual asymmetric stuff.\r\n\r\nApplications are increasingly needing these unconventional usages.  If you insist on avoiding all foot guns, then either important new things get built in languages like Go, or else everyone maintains their own private fork of the crypto library.  And I doubt you'll do as good a job of being foot gun free as ring anyways. \r\n\r\nIn this vein, [curve25519-dalek](https://github.com/isislovecruft/curve25519-dalek) is the right approach to doing a public key library.  All the mathematical submodules are well documented and exported.  Fixed-size arrays are used everywhere with the help of the arrayref crate, so no slices.  etc."}}
{"actor":{"display_login":"burdges"}}