Code Monkey home page Code Monkey logo

memsafecrypto's Introduction

MemSafeCrypto

A subset of BouncyCastle crypto primitives, refactored to use DirectByteBuffer instead of primitive arrays, to avoid leaving sensitive data in memory due to internal copying and garbage compactification done by the JVM.

Summary of Changes

  • introducted ICryptoZeroable interface
  • created CByteArray, CIntArray, and CLongArray classes based on DirectByteBuffer
  • modified BouncyCastle classes to use new array types

Supported Primitives

  • Argon2
  • Blake2b
  • DigestRandomGenerator
  • HKDFBytesGenerator
  • Poly1305
  • Salsa20Engine
  • Scrypt
  • SHA256Digest
  • XSalsa20Engine

Dependencies

None.

(Bouncycastle library is used for tests only).

Original Code

This project is based on BouncyCastle release 1.69:

https://github.com/bcgit/bc-java

Projects That Use MemSafeCrypto

Access Panel

DirCrypt

Passwørd Safe

SecDB

License

The project is licensed under Apache 2.0 license, which I believe is compatible with the BouncyCastle license LICENSE.html.

memsafecrypto's People

Contributors

andy-goryachev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.