Giter Club home page Giter Club logo

Comments (6)

05nelsonm avatar 05nelsonm commented on May 23, 2024 1

It definitely still makes sense to support /dev/urandom fallback in the absence of getrandom support. Never know how your library will be utilized in other projects and for what purpose.

from cryptography-kotlin.

05nelsonm avatar 05nelsonm commented on May 23, 2024 1

Thought of a scenario where supporting fallback to /dev/urandom would be necessary. If you plan to also support Android Native. Most manufacturers only provide 2 years of updates, and there are a TON of devices running old versions which do not have getrandom available.

from cryptography-kotlin.

whyoleg avatar whyoleg commented on May 23, 2024

Thanks for pointing this!
But, I'm not sure, that link you've posted is what we need to do. The issue in blog post is regarding requiring of initialisation of JCA SecureRandom with values from urandom. We don't have anything like this.
But, I've read more info about random/urandom and from what I've found: urandom provides enough entropy by default for short-living operations and is seeded enough after boot.
So IMO, what is needed, is to leave current approach, but provide additional API to force reseeding random for long-living operations like when generating certificates (which is not availability at the moment)

WDYT?

from cryptography-kotlin.

05nelsonm avatar 05nelsonm commented on May 23, 2024

Imo reseeding is unnecessary. Can see how rust-random has it implemented (polling /dev/random once to ensure /dev/urandom has been seeded).

getrandom does it this way (polling /dev/random once), but requires a syscall and check if it's available.

from cryptography-kotlin.

whyoleg avatar whyoleg commented on May 23, 2024

Im now thinking - may be just drop urandom support at all and use getrandom all the time. It was introduced in linux kernel 3.17 (2014!).
does it really make sense to support fallback?

from cryptography-kotlin.

whyoleg avatar whyoleg commented on May 23, 2024

fixed in 3e6e004 (forgot to link issue in commit...)
Thx for pointing!

from cryptography-kotlin.

Related Issues (4)

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.