entropy

How to solve performance problem with Java SecureRandom?

If you want a cryptographically strong random number in Java, you use SecureRandom. Unfortunately, SecureRandom can be very slow. If it uses /dev/random on Linux, it can block waiting for sufficient entropy to build up. How do you avoid the peformance penalty? Has anyone used Uncommon Maths as a solution to this problem? Can anybody co...

Alternative Entropy Sources

Okay, I guess this is entirely subjective and whatnot, but I was thinking about entropy sources for random number generators. It goes that most generators are seeded with the current time, correct? Well, I was curious as to what other sources could be used to generate perfectly valid, random (The loose definition) numbers. Would using m...

What is the computer science definition of entropy?

I've recently started a course on data compression at my university. However, I find the use of the term "entropy" as it applies to computer science rather ambiguous. As far as I can tell, it roughly translates to the "randomness" of a system or structure. What is the proper definition of computer science "entropy"? ...

information criteria for confusion matrices

One can measure goodness of fit of a statistical model using Akaike Information Criterion (AIC), which accounts for goodness of fit and for the number of parameters that were used for model creation. AIC involves calculation of maximized value of likelihood function for that model (L). How can one compute L, given prediction results of ...

Shannon's entropy formula. Help my confusion.

Hi, my understanding of the entropy formula is that it's used to compute the minimum number of bits required to represent some data. It's usually worded differently when defined, but the previous understanding is what I relied on until now. Here's my problem. Suppose I have a sequence of 100 '1' followed by 100 '0' = 200 bits. The al...

Entropy encoding of a binary stream

I want to compress a binary stream. I know that after each '1' there is an higher probability of finding a '0', and after each '0' there is an higher probability of finding a '1'. How should I encode it? I was thinking about Rice codes, but I didn't get so far... Thanks in advance for any reply. ...

Does any software exist for building entropy pools from user input?

It'd be nice to be able, for some purposes, to bypass any sort of algorithmically generated random numbers in favor of natural input---say, dice rolls. Cryptographic key generation, for instance, strikes me as a situation where little enough random data is needed, and the requirement that the data be truly random is high enough, that thi...

Has anyone tried any of the SQLite3 wrapper APIs for easier database functionality on the iPhone?

Coming from a non-SQL background, I've been having a hard time absorbing SQLite3 for the past few days. Has anyone had any good results using any of the SQLite3 wrapper APIs out there? Do they work reliably? Which is best? I am also hearing buzz about Core Data coming to the iPhone. Not sure whether that info is trustworthy or not but ma...

what part of numbers has more entropy?

Given the sequence pf numbers N1, N2, N3... from some source, not a PRNG but say sensor or logging data of some kind, is it safe to assume that processing it like this Nn / B = Qn  Rem Mn will result in the sequence Q haveing less entropy than the sequence M? Note: assume that B is such that both Q and M has the same sized range. ...

How to calculate the entropy of a file?

Hello! How to calculate the entropy of a file? (Or let's just say a bunch of bytes) I have an idea, but I'm not sure that it's mathematically correct. My idea is the following: Create an array of 256 integers (all zeros). Traverse through the file and for each of its bytes, increment the corresponding position in the array. At the en...

Weighted Decision Trees using Entropy

I'm building a binary classification tree using mutual information gain as the splitting function. But since the training data is skewed toward a few classes, it is advisable to weight each training example by the inverse class frequency. How do I weight the training data? When calculating the probabilities to estimate the entropy, do ...

JavaCard random number generation speed

Hi, I'm implementing an authentication protocol using ECDSA on javacard. The funniest thing I noticed was the "secure random number genrator" takes 700ms for execution. This can be considered as percfectly number. But after I load the applet to the card for the first time this time is 150ms. ECDSA signature therefore takes 228ms for i...

Data Compression

i have a task to compress a stock market data somehow...the data is in a file where the stock value for each day is given in one line and so on...so it's a really big file. Eg, 123.45 234.75 345.678 889.56 ..... now the question is how to compress the data (aka reduce the redundancy) using standard algorithms like Huffman or Arith...

I need some weak entropy. I know I can use an unitialized buffer, but if I just need an integer's worth, would its address suffice instead?

I'm on Linux, which has address space layout randomization. Is it necessary to to declare a buffer on the stack, leave it uninitialized, and use it for entropy, or can I just take the address of something already on the stack, cast it to an integer and (knowing that it is somewhat random due to address space layout randomization) use tha...

How random is urandom?

In Linux, just how random is /dev/urandom/? Is it considered safe? Also is it possible to get a stream of 1's? ...

DPAPI + Entropy

We have a WPF app that allows our users to download encrypted content and we want to provide the ability to decrypt this content off-line. The idea is to download the keys and store them using the DPAPI but I'm having trouble with the entropy parameter. Is there any way to generate an entropy to consistently use for the DPAPI functions ...

Securely Storing Optional Entropy While Using DPAPI

So I am trying to store the symmetric key using DPAPI. All is well and great, but what to do with the entropy? This answered question here really doesn't provide enough insight. It seems like a slippery slope - I could use the machine store to store the entropy but then what prevents someone from getting at that as well? Note: I am stori...

How to calculate the entropy of a source ?

How to calculate the entropy of a source? Is there a uniform algorithm how to calculate the entropy of a source e.g. mouse mouvments or keystrokes? ...

are projects with high developer turn over rate really a bad thing?

I've inherited a lot of web projects that experienced high developer turn over rates. Sometimes these web projects are a horrible patchwork of band aid solutions. Other times they can be somewhat maintainable mosaics of half-done features each built with a different architectural style. Everytime I inherit these projects, I wish the ...

Mutual Information / Entropy Calculation Help

Hi, Hoping someone can give me some pointers with this entropy problem. Say X is chosen randomly from the uniform integer distribution 0-32 (inclusive). I calculate the entropy, H(X) = 32 bits, as each Xi has equal probability of occurring. Now, say the following pseudocode executes. int r = rand(0,1); // a random integer 0 or 1 r ...