Giter Club home page Giter Club logo

endguard-dart's People

Contributors

robojones avatar

Stargazers

 avatar

Watchers

 avatar  avatar

endguard-dart's Issues

Complete API test

The API test is not using all exported functionality. The following aspects are currently missing in the test:

  • error handling (using the custom error types)
  • state export and import

Add API test

Ensure that the main module exports the correct datatypes needed. Add a test for this that only uses endguard.dart and native types as imports.

InvalidProtocolBufferException should be a MessageAuthenticationException

If a message uses a wrong message format, then it cannot be authenticated or decrypted. In the context of this encryption scheme, this should be considered a MessageAuthenticationException. Having a separate exception type for this would complicate the error handling for the library-user. The library is intended to be used more or less like this:

final message = decryptionQueue.pop();
try {
  connection.decrypt(message)
} on MessageAuthenticationException {
  // discard message, do not attempt to decrypt message again
}

Important this should only apply to the parts where we try to parse unauthenticated content. Authenticated content is assumed to have the correct syntax. If not, then that is an implementation error.

Update readme

The readme needs to be updated to better explain the project

  • link to specification
  • usage example (warn to read the other sections)
  • important security information (correct usage)
    • introduce concept: decryption queue (diagram), error handling
    • handshake (explain what to do with the keys)
    • connection state (importance of persistent storage)

Refactor the code

The structure of the code needs improvement and many doc comments are missing.

  • Rename the src/encryption directory to src/crypto because "encryption" is overused (e.g. src/connection/encryption.dart) and there will be more crypto functions like a MAC.
  • Rename the InitialPackageEncryption class to HandshakeEncryption
  • Add doc comments to all exported methods, variables and classes

Dependency upgrades

The dependencies need to be kept up-to-date. Dependabot does not yet support Dart packages.

Add optional additional authenticated data (aad)

There should be the option to pass additional authenticated data (aad) to the handshake and encrypt/decrypt methods.

The aad could be used in protocols to authenticate the recipient or the server address.

Null safety

Update all modules to null-safe versions.

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.