GithubHelp home page GithubHelp logo

bat-native-tweetnacl's People

Contributors

bbondy avatar evq avatar fmarier avatar gdregalo avatar mkarolin avatar ryanjarv avatar sergeyzhukovsky avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bat-native-tweetnacl's Issues

brave-core build fails

The brave-core build fails with the following error. I assume stdio needs to be included but let me know otherwise.

 ../../brave/vendor/bat-native-tweetnacl/tweetnacl.cc:42:13: error: use of undeclared identifier 'stderr'
  fprintf(stderr, "Could not read %llu byes from /dev/urandom. Abort.\n", count);

randombytes must fail noisily

Silently returning on syscall failures is a fail-dangerous not a fail-safe approach. ranodmbytes should abort the process if it can't get random data and if the caller is not set up to handle failure.

However, there's a simpler way: if we're just running this in brave-core, we can just use crypto::RandBytes.

This is not high-priority because we currently don't use randombytes, I think: we call crypot_sign_keypair(pk, sk, seeded=1) meaning that sk is prepopulated with a seed generated elsewhere. But it would be good to avoid having dangerous randombytes code around.

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.