Random Number Generation

Started by
70 comments, last by ApochPiQ 8 years, 12 months ago

Using a one-time pad is just ridiculous. Yes, it's provably unbreakable, so what. It's also completely impractical.

Every well-known, mainstream algorithm such as Rijandel with a key length of 128 or more bits is unbreakable, too. No single secret that you may own can possibly be so valuable that anyone will invest the computional resources needed to break a 128-bit key. Seriously.

(Also, the wrench attack pointed out by BitMaster is more real than you may think, for things which are sufficiently valuable.)

Advertisement

>Whatever you're trying to encrypt isn't nearly as important as you may think.

But it is, TO ME.

I'm sure the USA government thinks just as much of their own data, but not even they opt for such drastic measures. AES-128 and above are hard enough that even a super computer couldn't crack them within the lifespan of a human being. Unless you're storing the blueprints for Skynet-level AI, your methods are serious overkill.

Yo dawg, don't even trip.

If you're really that paranoid about security on some data you have, don't even think about rolling your own. I mean this. Security is hard, and you don't know enough about it to implement anything that even comes close to meeting your requirements effectively. I can say this with absolute confidence because you're not a security specialist (otherwise you wouldn't be asking the questions that you're asking). This is the kind of thinking that leads to exploits like Heartbleed: people thinking they know more than they do, storming in full of over-confidence, and screwing up monumentally.

Just get an off-the-shelf security/encryption package with strong accreditation and be done with it.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.


Is there any way to prove that even exists?

You need to prove or disprove the universe itself is deterministic over the relative time and space involved.

It runs counter to things like free will, ethics, and many types of philosophy, and is a great way to cause religious/philosophy wars.

It isn't enough to prove the universe to be deterministic. It may happen that the universe is nondeterministic in a different time or place, but not in the time and place the randomness is needed.

So not only would you need to prove nondeterminism, you need to prove nondeterminism within that the thing (the data in the computer) during at time frame (when the random data is generated). If that tiny window of space and time happens to be deterministic, it is non-random.

Since computing theory and information theory include variations for both deterministic and nondeterministic spaces -- famously the P=NP problem -- discussion about proof of determinism comes up quite often in the field.


>Whatever you're trying to encrypt isn't nearly as important as you may think.

But it is, TO ME.

All known encryption and cypher routines can be overcome with the $5 wrench attack.

Agreeing with the others, go get established an off-the-shelf solution, pick one of the many options like the well-studied AES-Rijndael 256, Twofish, or RC6. These are currently generally accepted as the most solid algorithms. Avoid DES, 3DES, Blowfish, (they were once recommended by have since had vulnerabilities discovered) and avoid all custom or homemade algorithms and tools, since they are likely at least subtly flawed.

If you want to keep data safe, truly safe, not just safe beyond the norm. Really secure from all forms of attack. You only have one option.

Place your data on a hard drive. Remove the hard drive from your computer. Encase it in concrete. Attach it to a rocket. Blast it into a random region of space.

It is now as safe as is humanly possible.

Of course now it is no use to you. It's gone, but it's safe.

You have to sit down with a clear head and decide what level of security allows you peace of mind, yet still allows you to use the data.

You can be completely paranoid and require thumb print or retina scans before accessing the data, but I could come along with a knife and cut your thumb off, pluck out your eye and still get access to the data.

You could disconnect your computer from all networks and only host the data on that one machine, and I could come along with scanning equipment and read the data straight off your computer screen.

Can you see what we are trying to tell you? Security is relative and the level of security you need may not be anywhere near the level you think you need.

The highest sensible system would include a Faraday cage to suppress EMF fields that could be read from a distance. Multiple professionally installed firewalls running on FreeBSD (the most secure firewalls I have ever seen run on FreeBSD). Physical access to the room would have to be controlled by extra layers of security as well.

Then you would be as secure as you can be, but are you really that paranoid?


DES, 3DES, Blowfish, (they were once recommended by have since had vulnerabilities discovered)

Technically 3DES has no known weaknesses that can be practically exploited, it's just dog slow compared to the more modern (and hardware-accelerated) algorithms available today so it makes no sense to use it. Blowfish is also kinda slow, but its only known weakness is it has a too small block size, which allows one to implement distinguishers if you encrypt a few gigabytes of data with the same key; that doesn't reveal the key, but it's not a feature you want in an encryption algorithm. The only (fatal) flaw of DES is its too small block size, it again besides that has no practically exploitable flaws in its internal structure, which is actually why 3DES is a thing.

But really, it's pretty easy to pick a good encryption algorithm these days, and in any case almost no real world vulnerabilities are predicated on the failure of security properties of a low-level cryptographic primitive, which are incredibly robust today. They virtually all occur as either side channels in the implementation of the higher-level protocols, or edge cases in said protocols that happen to leak sensitive information. The only exceptions I know of are related to very high profile events such as the FLAME forgery, and it generally requires immense amounts of computational power, not to mention skill, to pull off something like this. In other words, I would be much more concerned with how the protocols are implemented than the theoretical properties of the algorithms used.

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

>Whatever you're trying to encrypt isn't nearly as important as you may think.

But it is, TO ME.

I'm going to sound like a broken record here, but one-time pads don't necessarily increase security in a practical setting.

Sure, your data is now secret, but instead you have to figure out how to store the one-time pad. And since it's a massive block of random data, you'll need to store it in digital form. Which generally means a physical disk within a very large safe.

Guess what? You could just put the original data on that same disk in that same safe, and you'd have achieved the same level of security.

(and note that as soon as you plug that disk into a computer, you are back to square one, because an attacker can just as easily steal the one-time pad...)

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

>I can say this with absolute confidence because you're not a security specialist (otherwise you wouldn't be asking the questions that you're asking).

Actually, I do know quite a bit about security, especially cryptography, which is why I'm posting this. I've been going over and over it in my mind, trying to find a reasonable solution, and it seems like true random data is the only thing with absolutely perfect security (at least in terms of the quality of the key).

>You need to prove or disprove the universe itself is deterministic over the relative time and space involved.

It wouldn't really matter if the universe is deterministic per se, because the computer would not know the cause and effect of anything originating outside its system. (For example, RAM is considered random access, because from the computer's perspective, it's unpredictable what the user will do. And the computer doesn't know what input the user will give it either, so even if it's far from random, it's not predictable in that sense. So any physical process that seems random, even if it's only technically pseudo-random, can not be predicted mathematically, simply for a lack of information within the computer [remember that from studying proofs in school?] - in other words, the computer has no way of knowing where or in what state the particles/waves, or whatever the device was using, were in at the time they were read, much less someone else's computer that's trying to hack it.)

>Then you would be as secure as you can be, but are you really that paranoid?

Absolutely.

>They virtually all occur as either side channels in the implementation of the higher-level protocols, or edge cases in said protocols that happen to leak sensitive information.

The word virtually is interesting, as it implies "not entirely". I don't intend to use any overly complex protocols anyway.


The word virtually is interesting, as it implies "not entirely". I don't intend to use any overly complex protocols anyway.

Not exactly sure what your point is here, because I was not actually talking about one-time-pads and my next sentence did eventually start with "the only exceptions I know of". Also, one-time-pads do not offer perfect security. They offer perfect secrecy, you are still lacking authentication and integrity checking, for that you need an unconditionally secure message authentication code (MAC) if you wish to preserve those unconditionally secure properties, which is quite a bit more challenging to implement than the OTP (yeah, it's funny how people get hung up on the "perfect secrecy" bit but completely skip the next chapter which is "secrecy without authenticity is worthless").


Actually, I do know quite a bit about security, especially cryptography, which is why I'm posting this. I've been going over and over it in my mind, trying to find a reasonable solution, and it seems like true random data is the only thing with absolutely perfect security (at least in terms of the quality of the key).

Then maybe you would share what your actual problem is, so that other people who also know quite a bit about security can peer-review and give their opinions and possible alternative solutions. There's this pattern I noticed that people who tend to fixate on one particular feature that they need, invariably fail to mention why they need it, and become somewhat abrasive whenever they are called out on it, and that actually pisses me off quite a bit because people who claim to be knowledgeable in the field should know that transparency is a key attribute... but if you really want to go ahead with your (in my and others' opinions questionable) supposed solution to your problem, then the answer to your problem was given in page 1, and I'm not sure this thread is a great place to talk about popsci quantum physics and discuss the nature of the universe.

“If I understand the standard right it is legal and safe to do this but the resulting value could be anything.”

Bacterius, where to start?

>Also, one-time-pads do not offer perfect security.

Alright, so I'm not using the perfect terminology, I meant secrecy of the data, and I wasn't referring to authentication. Note that I did say "at least in terms of the quality of the key", so I was giving a specific context.

>They offer perfect secrecy, you are still lacking authentication and integrity checking

>yeah, it's funny how people get hung up on the "perfect secrecy" bit but completely skip the next chapter which is "secrecy without authenticity is worthless"

I'm well aware of this, and fully intend to authenticate, but I just wasn't talking about that part of it (that's not what my post was intended to be about anyway).

>Then maybe you would share what your actual problem is, so that other people who also know quite a bit about security can peer-review and give their opinions and possible alternative solutions.

And that's the paradox. Obviously I wouldn't want to tell you anything specific, lest it defeat the purpose of encrypting anything in the first place. Suffice it to say, I want to be able to send data that I will be 100% certain that if any snooper were to intercept it, it would be impossible for them to see the information. (And yes I know about people being hit with wrenches, etc.)

>There's this pattern I noticed that people who tend to fixate on one particular feature that they need, invariably fail to mention why they need it, and become somewhat abrasive whenever they are called out on it, and that actually pisses me off quite a bit because people who claim to be knowledgeable in the field should know that transparency is a key attribute.

As I said, I can't tell you all the details, because that would defeat the purpose. Do I sound abrasive? If so, I apologize. I'm honestly not trying to, but I tend to nitpick people's statements when dealing with issues that are highly technical and must be done in a precise way, and that can seem abrasive I suppose.

>I'm not sure this thread is a great place to talk about popsci quantum physics and discuss the nature of the universe.

I didn't bring up that topic, and I only commented on it in a specific context to which it related to this topic.

This topic is closed to new replies.

Advertisement