Skip to content
forked from briansmith/ring

Safe, fast, small crypto using Rust & BoringSSL's cryptography primitives.

License

Notifications You must be signed in to change notification settings

SimonSapin/ring

 
 

Repository files navigation

THE SOFTWARE IS PROVIDED "AS IS" AND BRIAN SMITH AND THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL BRIAN SMITH OR THE AUTHORS BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

ring

ring is a crypto library in Rust based on BoringSSL's crypto primitive implementations.

Particular attention is being paid to making it easy to build and integrate ring into applications and higher-level frameworks, and to ensuring that ring works optimally on microcontrollers to support Internet of Things (IoT) applications.

The name ring comes from the fact that ring started as a subset of BoringSSL, and "ring" is a substring of "BoringSSL". Almost all the code in ring comes from BoringSSL, and BoringSSL is derived from OpenSSL. In general an application that uses the subset of BoringSSL APIs that ring supports should work identically if it is recompiled and relinked with BoringSSL instead. ring tracks upstream changes to BoringSSL. Several patches that were developed for ring have already been integrated upstream in BoringSSL.

Documentation

See the documentation at https://briansmith.org/rustdoc/ring/.

See Building the Rust Library for instructions on how to build it.

Contributing

Patches Welcome! Suggestions:

  • More code elimination, especially dead code.
  • Replacing more C code with Rust code.
  • Implementation of SRP-6a in Rust, based on the |rust::digest| API and the C/asm optimized modular exponentiation.
  • Optimizing the PBKDF2-HMAC implementation based on the ideas from fastpbkdf2.
  • Better IDE support for Windows (e.g. running the tests within the IDE) and Mac OS X (e.g. Xcode project files).
  • Support for more platforms in the continuous integration (e.g. Android, iOS, ARM microcontrollers).
  • Static analysis and fuzzing in the continuous integration.

License

See LICENSE.

The ring project happily accepts pull requests without you needing to sign any formal license agreement. The portions of pull requests that modify existing files must be licensed under the same terms as the files being modified. New files in pull requests, including in particular all Rust code, must be licensed under the ISC-style license. Please state that you agree to license your contributions in the commit messages of commits in pull requests, e.g. by putting “I agree to license my contributions to each file under the terms given at the top of each file I changed.” at the end of each commit message.

If your patch is useful for BoringSSL then it would be very nice of you to also submit it to them after agreeing to their CLA.

Online Automated Testing

Travis CI is used for Linux and Mac OS X. Appveyor is used for Windows. The tests are run in debug and release configurations, for the current release of each Rust channel (Stable, Beta, Nightly), for each configuration listed in the table below.

OSArch.CompilersStatus
Linux x86, x64 GCC 4.6, 4.8, 4.9, 5; Clang 3.4, 3.6, 3.7, 3.8 (trunk)
32-bit ARM, AAarch64 Linaro GCC 5.1-2015.08 (build only, no tests are run)
Mac OS X x64 Apple Clang 7.0.2 (clang-700.1.81)
Windows x86, x64 MSVC 2013 Update 5 (12.0), MSVC 2015 Update 1 (14.0)

Bug Reporting

Please file bugs in the issue tracker. If you think you've found a security vulnerability that affects BoringSSL and/or OpenSSL then those projects would probably appreciate it if you report the bug privately to them. The ring project is happy to take any kind of bug report as a pull request that fixes it and/or adds a test for the issue, or as an issue filed in the public issue tracker. Do NOT report any security vulnerability privately to the ring developers.

About

Safe, fast, small crypto using Rust & BoringSSL's cryptography primitives.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 48.9%
  • Assembly 38.6%
  • Rust 5.1%
  • C++ 4.6%
  • Perl 1.8%
  • Makefile 0.5%
  • Other 0.5%