Code Monkey home page Code Monkey logo

noise-kotlin's Introduction

Noise for Kotlin

Maven Central

Noise for Kotlin enables implementation of Noise protocols based on Diffie-Hellman key agreement.

Warning: This project has not been independently audited. Help is welcome to increase security or to make risks explicit. Also see the Security policy.

API documentation

See the API docs about the latest release or use the Gradle dokkaHtml task for a local copy about any version.

How to build

Run the tests. On POSIX:

./gradlew test

On Windows:

gradlew test

See HandshakeTest for some example handshakes.

Instead of test, use jar to create a JAR in build/distributions.

How to use in an application

Add the noise-kotlin dependency to your project.

Then, implement Cryptography for your platform and initialize a Handshake.

Design decisions

  • Provide pure functions only, never a callback, leaving effect handling to the user.
    • Consequence: users must provide any generated keys upfront. Not yet sure if this will work for all situations.
  • Support only Curve25519, ChaCha20-Poly1305, and SHA-256 to reduce the need to choose and since these are available on most platforms.
  • Use only Kotlin types and functions, and nothing directly from Java SE or libraries.
    • Consequence: all cryptographic function dependency implementation is behind an interface, which users need to implement using native platform functions.
  • Do not include particular masking, encryption, or zeroization functionality for sensitive data, to avoid disproportional complexity.
    • Consequence: run with sufficiently protected volatile memory and protect heap dump data from unauthorized access.

Test vectors

Test vectors are used from:

Related resources

noise-kotlin's People

Contributors

dependabot[bot] avatar sander avatar sander-cb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

rsoares-cb

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.