noise_protocol 0.1.0 copy "noise_protocol: ^0.1.0" to clipboard
noise_protocol: ^0.1.0 copied to clipboard

discontinued
outdated

A Dart implementation of Noise protocol, which can be used for securing communications (E2EE, etc.).

Pub Package Github Actions CI

Overview #

Noise framework is a secure handshake protocol, which has been analyzed by professional cryptographers. It has been adopted by products/companies such as WhatsApp (whitepaper) and Slack (blog post).

Important: this early version doesn't pass acceptance tests yet.

A short introduction #

Noise protocol defines 24 possible handshake patterns. You need to choose one that's relevant for your requirements. For example:

  • KK
    • A two-message handshake in which both parties know each other's static keys.
  • XX
    • A three-message handshake in which both parties lack any pre-existing knowledge about each other.
  • XXpsk3
    • A three-message handshake in which both parties know a symmetric secret.
  • IK
    • A two-message handshake in which initiator knows the responder's static key.
  • N
    • A one-message handshake in which initiator knows the responder's static key. Suitable for use cases such as file encryption.

You also need to choose a key exchange algorithm, a cipher, and a hash algorithm. This implementation supports:

  • Key exchange algorithms:
    • X25519
  • Ciphers:
    • AES-GCM
    • ChaCha20-Poly1305 AEAD
  • Hashes:
    • BLAKE2s
    • SHA2-256

Please remember that you also need to use of prologue and/or payload to prevent replay attacks and identity probing.

The output of a Noise handshake is two symmetric encryption keys: one for encrypting, one for decrypting.

Please read more at noiseprotocol.org.

2
likes
30
pub points
14%
popularity

Publisher

unverified uploader

A Dart implementation of Noise protocol, which can be used for securing communications (E2EE, etc.).

Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

collection, cryptography, kms, meta, typed_data

More

Packages that depend on noise_protocol