Hacker Newsnew | past | comments | ask | show | jobs | submit | tixzdk's commentslogin

This is also available in Node 10 behind the `--harmony-bigint` flag. I've already made two modules with https://github.com/emilbayes/secure-random-uniform#bigint-su... and https://github.com/emilbayes/biguintle. Lots of fun!


(Keep in mind that Node 10 will update to V8 6.8 before it becomes LTS, so it will get BigInt without any flags.)



I pay 15€ for unlimited everything in Denmark (but with reasonable caps imposed on European roaming)


My hair and my beard



Yup, disk arrays can be quite a problem when it comes to forensics recovery. This has been a bit of a nemesis of mine over the years. Friends or family will decide to buy a single RAID solution for backup and configure it to write files across the disks for performance because they don't know any better. Four years later they'll come to me because something happened to the array like a failed or corrupted controller NVRAM and they want to recover the files. For backup I recommend mirrored single individual spinning disks, preferably in multiple locations.


thanks! oh those destitute days of swap as an actual resource instead of just a, something must be broken, i just filled up 32 gigs of main memory.


Important excerpt from random.c:

   * When random bytes are desired, they are obtained by taking the SHA
   * hash of the contents of the "entropy pool".  The SHA hash avoids
   * exposing the internal state of the entropy pool.  It is believed to
   * be computationally infeasible to derive any useful information
   * about the input of SHA from its output.  Even if it is possible to
   * analyze SHA in some clever way, as long as the amount of data
   * returned from the generator is less than the inherent entropy in
   * the pool, the output data is totally unpredictable.  For this
   * reason, the routine decreases its internal estimate of how many
   * bits of "true randomness" are contained in the entropy pool as it
   * outputs random numbers.
   *
   * If this estimate goes to zero, the routine can still generate
   * random numbers; however, an attacker may (at least in theory) be
   * able to infer the future output of the generator from prior
   * outputs.  This requires successful cryptanalysis of SHA, which is
   * not believed to be feasible, but there is a remote possibility.
   * Nonetheless, these numbers should be useful for the vast majority
   * of purposes.
This is the same old story. /dev/urandom is what you should use, unless you believe that the hash function is broken


> /dev/urandom is what you should use, unless you believe that the hash function is broken

And if you believe the hash function is broken, then the crypto you're using that random number generation for is probably broken too.


Pony! Seems like a very interesting language that doesn't get much exposure. Predictable GC, fine grained capabilities, actor model (concurrent by default), no deadlocks etc.

http://ponylang.org


I think the article gets this wrong. `window.crypto` should be read-only


I find the following in Chrome:

> window.crypto.getRandomValues

// getRandomValues() { [native code] }

> window.crypto.getRandomValues = function () { return "aloha" }

> window.crypto.getRandomValues()

// "aloha"

Not sure if this is the case in all browsers. `window.crypto` certainly should be read-only.


In Chrome, window.crypto is read-only:

> window.crypto

< Crypto {subtle: SubtleCrypto}

> window.crypto = "hi!"

< "hi!"

> window.crypto

< Crypto {subtle: SubtleCrypto}

But not anything underneath, including getRandomValues(), as you write. A recent issue about this [1] on the WebCrypto spec itself was closed with 'wontfix' because in their view, polyfilling web APIs is a common and accepted practice.

[1] https://github.com/w3c/webcrypto/issues/107


Shouldn't all pollyfills check only override the functions if they're missing?


What if it's present but the implementation is incomplete?


E.g. an extra optional parameter.


https://www.w3.org/Bugs/Public/show_bug.cgi?id=25345

It looks like they intentionally don't do that in order to prevent the illusion of security.


"A woman wearing a red hat" from the samples cracked me up


im so happy to know I'm not the only one looool


And the letter, which was sent as priority mail, had been opened when they went to retrieve it...


Now they must assume that information is compromised and take action.


Which is what? Give every Dane a new health record?


I read that to mean _legal_ action.

IANAL, and can't profess to any knowledge whatsoever of Danish law, but opening a package clearly addressed to someone else without permission may be reasonable grounds for litigation.

Though to the question "what good will that do", you're right, it's not like new health records can be issued.

Depending on the details of what was shared and what ties them to an individual though, I suppose it might be possible to issue new IDs.


They wrote that they do not belive that there was a compromise of the data.


So? An unencrypted CD was accessible for a time period to a third party. It's good security practice to consider the data to be compromised. Especially a powerful, malicious actor will put in effort to make it appear that this is not the case.

If anything, this requires a severe audit of the security practices of the affected organisations. Moreover, I think citizens of Denmark are entitled to know what information about their personal health records is leaked.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: