Giter VIP home page Giter VIP logo

symbolicsoft / noiseexplorer Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 6.0 50.91 MB

Online engine for reasoning about the Noise Protocol Framework.

Home Page: https://noiseexplorer.com

License: GNU General Public License v3.0

HTML 27.88% CSS 0.09% JavaScript 8.40% Go 16.06% Rust 46.67% Shell 0.09% Makefile 0.73% PEG.js 0.08% M 0.01%
cryptographic-protocols cryptography formal-methods formal-verification protocol-analysis protocol-verification symbolic-protocol-analysis

noiseexplorer's People

Contributors

georgio avatar iokill avatar nadimkobeissi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

noiseexplorer's Issues

Improper nonce handling in Go

There are two issues with nonce handling in Go:

  1. Nonces are 32 bits long. The Noise spec requires 64-bit nonce.
type cipherstate struct {
	k [32]byte
	n uint32
}
  1. Nonce overflow.
    The spec requires returning an error if the maximum number is reached. This is the same issue as in the flynn package but more realistic due to 32-bit length.
func incrementNonce(n uint32) uint32 {
	return n + 1
}

func encryptWithAd(cs *cipherstate, ad []byte, plaintext []byte) (*cipherstate, []byte) {
	e := encrypt(cs.k, cs.n, ad, plaintext)
	cs = setNonce(cs, incrementNonce(cs.n))
	return cs, e
}

Allow passing associated data to `writeMessageRegular`

Both the Go and Rust code exports a SendMessage that will either use the handshake state or the cipher state.

The Noise spec specifies EncryptWithAd and DecryptWithAd for the CipherState which allows you to add associated data to the message

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.