Coder Social home page Coder Social logo

hard's Introduction

Hard - Hardened Buffers for Rust

crates.io docs.rs

Storing sensitive data (cryptographic keys, passwords, plaintexts, etc.) can be fraught with issues. Data can be recovered from uninitialised memory, from the contents of core dumps/crash reports, or accidentally revealed via buffer overflows.

Hard attempts to provide buffer types which are hardened against these types of errors. Based on the libsodium cryptographic library, we make use of its secure memory utilities to allocate and manage the memory backing buffer types. Memory allocated using hard is placed directly at the end of a page, followed by a guard page, so any buffer overflow will immediately result in the termination of the program. A canary is placed before the allocated memory to detect modifications on free, and another guard page is placed before this. The operating system is advised not to swap the memory to disk, or include it in crash reports/core dumps. Finally, when the memory is freed, it is first securely cleared, in such a way that the compiler will not attempt to optimise away the operation.

For more information, see the docs.

Security/Vulnerability Disclosures

If you find a vulnerability in hard, please immediately contact [email protected] with details.

My age public key (preferred) is:

age1gglesedq4m2z9kc7urjhq3zlpc6qewcwpcna7s0lwh8k2c4e6fxqf3kdvq

My PGP public key has fingerprint 0x4712EC7C9F404B14, and is available from keyserver.ubuntu.com, pgp.mit.edu, or Github.

License

Licensed under either of:

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

hard's People

Contributors

tom25519 avatar

Stargazers

Andy Bao avatar Matthew avatar Etienne Napoleone avatar nizq avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.