The generation of random or pseudorandom data, and the use of randomness in security protocols

learn more… | top users | synonyms

3
votes
1answer
71 views

Managing keys generated with insufficient entropy

Since the Linux RNG which provides /dev/random (and by extension /dev/urandom) is seeded by "mouse and keyboard activity, disk I/O operations, and specific interrupts" (source, PDF) and since virtual ...
2
votes
2answers
54 views

Offline RSA strong prime test similar to Phuctor?

One of the ways that RSA keys get consistently owned is when they're generated without enough entropy. Dan Kaminsky refers to a study which found that 1 in 200 RSA keys were badly generated and these ...
2
votes
1answer
29 views

What comprises the AIS-31 standard for TRNGs?

I'm researching how my smart card's chipset generates random numbers. According to a source in forums the YubiKey NEO is based on the A700x chipset from NXP. The page for the chipset indicates that ...
5
votes
1answer
44 views

PID randomization benefits

What is the concrete advantage of using random PIDs instead of traditional sequential ones? Some times ago, I've read an article in the french magazine MISC (no. 74 - July/August, 2014) publishing a ...
4
votes
1answer
42 views

Is is possible to avoid internal seeding of a RNG and seed the generator manually using OpenSSL's RAND_bytes()?

I'm trying to write a random number generator with the OpenSSL library. The provided RAND_bytes() function is self-seeding with the /dev/urandom. That's why I am only able to reseed with the ...
4
votes
2answers
94 views

Should other processes be running while an iPhone or Android is generating a cryptographically random number?

I need to generate a cryptographically secure random number on iOS and Android. I could use a software approach or leverage the built in OS API for this. In each case, is it better to generate a ...
5
votes
2answers
79 views

Linux random number compliance

Not sure if this is the right forum, and I am pretty sure that his must have been answered before (I searched a lot but I haven't found a definitive answer). Do the Linux random number generators ...
1
vote
2answers
100 views

Is `arc4random` secure enough?

I need to generate many many initialization vectors and session keys in C++ code. I am wondering if arc4random is up to the task. Last I heard, there are many weaknesses in the RC4 cipher. Should I ...
3
votes
1answer
111 views

Predicting Math.random() numbers?

I was reading up on the documentation for Math.random() and I found the note: Math.random() does not provide cryptographically secure random numbers. Do not use them for anything related to ...
17
votes
6answers
2k views

What does “random” mean in the context of password creation?

Disclaimer: as you will see from my question I'm a total outsider in this subject, just very curious. I was wondering how easy it would be to crack a password-protected RAR5 file, and I found many ...
8
votes
1answer
128 views

RSA key generation: gpg vs openssh

When I generate RSA key for ssh (both server-side and client-side): dpkg-reconfigure openssh-server ssh-keygen the key generation is completed instantly. However, when I generate RSA key for gpg, ...
7
votes
4answers
359 views

How to check randomness of random number generators?

Assume that I have a smart card that returns an 8 byte (for example) random value on reception of a command. The question is that: How I can check if this value is really random? (I don't have any ...
1
vote
1answer
88 views

How to protect against random number generator attacks

I am using custom hardware on which i'm using the random noise from an ADC converter and a few other seeds. I combine these in an algorithm and have tested it against FIPS PUB 140-2 for a random ...
1
vote
1answer
68 views

Is it fine to store single-use beta keys plain-text?

Is it okay to store single-use beta keys in plain-text in the database? I'll be pre-generating and storing about 2M keys. The keys get passed around so that people can sign up with it, rather than let ...
1
vote
0answers
65 views

Ring Oscillator: TRNG vs PUF

Ring oscillators can be used in hardware true random number generators (TRNG), and also in physically unclonable functions (PUFs). The designs seem fairly similar: TRNG based on ring oscillators: ...
8
votes
2answers
168 views

AES encryption on embedded device: Can this be secure?

I plan to create an encryption program for an embedded device with the following characteristics: CPU is Intel 80186 compatible @ ~20 MHz 128 KB RAM, of which I have ~20 KB at my disposal for ...
1
vote
3answers
90 views

How to compare passwords with duplicate password

On Steam, the gaming client, I have this habit of creating multiple "smurf" accounts. I have a randomly-generated, unique password, and I decided to use the same password for all of my multiple ...
0
votes
2answers
108 views

Initialization of a LUKS encrypted partition with cipher or /dev/urandom

I've created a few encrypted devices with LUKS and cryptsetup on Linux and am pretty comfortable with disk encryption in this regard. I've seen it mentioned in many different places that when setting ...
1
vote
0answers
33 views

How is the random string of Thunderbird's profile folder generated? [closed]

As per this link, Thinderbird creates a folder by name in the format ".default” where ”” is an eight digit string randomly generated by Thunderbird. But how is it generated? Which random generator ...
7
votes
7answers
617 views

Is it possible to make a more secure random number generator algorithm by XORing two or more less secure random number algorithms?

Is it possible to make a more secure random number generator (e.g. for cryptologic purposes) by combining two or more less secure random number generator algorithms using XOR? Here is an example of ...
20
votes
7answers
3k views

Are humans a strong or weak RNG? [duplicate]

Thomas Pornin has stated in the past on multiple occasions (I'm not going to source them, he can argue with me if he wants) that humans are bad RNGs. While I agree that human RNG for password ...
0
votes
1answer
144 views

Creating secure PIN in Java

I need to create cryptographically secure PIN number in Java using secret id for each user. This simple approach comes to mind: int getPin(String secretUserIdStr) { String pepper = ...
4
votes
2answers
335 views

Including and storing the order of character entry in a password as an enhanced security measure

I'm sure I will be quickly corrected if this is a stupid idea, or if it has already been tried. My question is: has this idea been tried before? If not, are there good reasons it would not work, or ...
2
votes
1answer
168 views

Key's random art image is mostly black

I have generated an SSH key on Ubuntu 10.04 with ssh-keygen -t rsa -C "example@example.com" and the key's random art image comes out mostly empty (modified slightly): +--[ RSA 2048]----+ | ...
1
vote
1answer
180 views

Where does /dev/random get its entropy?

I read over and over about how /dev/random gets its entropy from "hardware events." What exactly are these hardware events and how can we be sure that it is random enough?
-2
votes
2answers
115 views

2 way encryption of a string into numerical string using random number

I have a random number like 0.323978544752212. I want to encrypt a string using this random number into to numerical string i.e. final string is like ...
23
votes
11answers
4k views

One liner to create passwords in linux?

How do you create a readable password using bash with one line? What if i'm looking for 128 bits of entropy? EDIT By readable I mean the 94 printable ascii characters (without space). It can use ...
2
votes
1answer
137 views

Why is using [x] to generate random keypairs a bad idea?

Anyone who has generated large GPG public/private keypairs has come across this annoying message: "Not enough random bytes available. Please do some other work to give the OS a chance to collect more ...
2
votes
4answers
401 views

Add a file as entropy source for /dev/random

What I have: A large file containing lots of secret, true-random bytes (yes, I'm sure they're not merely pseudo-random). I'll call it F. What I want to do: Tell Linux that it can use this file as an ...
4
votes
2answers
359 views

Can the human brain generate cryptographically secure random numbers?

A security conscious friend of mine was attempting to generate entropy using random dice rolls to generate a random password, and I became curious about the security of random number generators and ...
1
vote
2answers
120 views

Do DES keys have to be random?

In stream cipher (namely the OTP ) . The pad which the plain text is Xored with has to be random to achieve perfect secrecy , or psudorandom to ensure semantic security Dose this apply to DES or ...
4
votes
2answers
124 views

How does an insecure RNG affect cryptography, and how do I measure the corresponding loss of security?

Suppose a given random number generator has poor entropy, and is compressible by any compression algorithm (zlib, bzip2, lzma, etc). Specifically the issues with this RNG are: Bad entropy Bad seed ...
0
votes
2answers
77 views

Is there something similar to pseudorandom generators but in the opposite direction?

Pseudorandom generators (PRG) are functions that takes a random small input (called the Seed) and maps it into much larger output . However, the mapping process must be unpredictable in order for the ...
2
votes
1answer
71 views

Usefulness of bcrypt(UUIDv4())

One of my colleagues is working on securing OAuth 2 client IDs and secrets for our OAuth server and he has come up with this scheme where he would not only use UUID v4 to generate random values, but ...
1
vote
0answers
44 views

Steps for creating a test environment where GUIDs are exploitable?

I have been using GUIDs as un-guessable tokens in various situations for some time. I came across this question/answer which seems to suggest that while this is ok in some situations, it should not ...
4
votes
3answers
562 views

Would it be secure to generate random number using AES?

I know that there are already tools out there to generate cryptographic random number, but I was wondering if using AES could do the same. For example, I have a secret key for AES on my server and a ...
0
votes
2answers
302 views

How to generate an unpredictable but short string? [closed]

I want to built some short urls for uploaded files and links on my own server. Simple enough, I upload files and my script returns me a link. On access, the link is translated to the file and download ...
2
votes
1answer
198 views

What cryptosystem makes the encrypted text look like random noise?

Suppose one wants to setup a cryptographic protocol in which 2 parties communicate using an encryption scheme that produces encrypted messages indistinguishable from random data (the desired property) ...
3
votes
2answers
158 views

Reliable random seed for RNG

I want to create my computer passwords with a RNG, but I am thinking about one thing: I would use python to write that script and the RNG is controlled by one seed, most likely the time. If I would ...
35
votes
6answers
6k views

Are random URLs a safe way to protect profile photos?

I would like to move from sequential to random user-ids so I can host profile photos publicly. i.e. example.com/profilepics/asdf-1234-zxcv-7890.jpg How long must user-ids be to keep anyone from ...
2
votes
1answer
114 views

Does RAND_add(&Time,sizeof(Time),0) at each ssl connect reduce randomness or not?

Reviewing openssl 1.0.1g s23_clnt.c code i see that : int ssl23_connect(SSL *s) { BUF_MEM *buf=NULL; unsigned long Time=(unsigned long)time(NULL); void (*cb)(const SSL *ssl,int ...
2
votes
1answer
330 views

How secure is Vigenere cipher for random data?

Traditional situation It is easy to crack a ciphertext encrypted by Vigenere cipher, if you know the plaintext is in a natural language like English. There are two methods to discover the key used to ...
3
votes
2answers
437 views

MySQL ENCRYPT salt is not random?

I know there's little reason to still use ENCRYPT() nowadays, what with bcrypt being almost ubiquitous and MySQL providing better hashes such as SHA1. But while dabbling with ENCRYPT() on MySQL ...
2
votes
3answers
555 views

Hashing speed with true random passwords

Just a theoretical question: If I had ideal users, who all provide fully random 128-bit passwords, And also, I invalidate every password shorter than 128 bits. Then would I still need a slow hash ...
1
vote
1answer
232 views

SSL Handshake random number?

I realized all of the phase of the handshake but I do not understand how it does that from the two randomly generated numbers are unable to generate a session key that the client and the server uses ...
2
votes
1answer
331 views

Is the following code seeding OpenSSL's PRNG necessary, superfluous, or harmful?

As I was going through Crypt::SSLeay, preparing it for the next release, I noticed the following code, written way before my time, ... int rand_bytes_read; static int bNotFirstTime; char buf[ 1024 ...
3
votes
2answers
131 views

How can you detect an insecure, non-random token?

I know that some of PHP's random functions are insecure due to them not being completely random and are considered a bad practice. My question is how an attacker go about finding that the developer ...
2
votes
1answer
264 views

-bash: -sudo: command not found [closed]

Some dependencies were missing when I installed THC Hydra. I found this site which directs me to install the missing package: sudo apt-get install libsvn-dev libapr1-dev libaprutil1-dev But when I ...
2
votes
1answer
70 views

Are the problems with Window's CSPRNG still an issue on modern Windows?

The paper Cryptanalysis of the Random Number Generator of the Windows Operating System describes some problematic aspects of the Windows CSPRNG. However the paper was written in 2007, and looked at ...
3
votes
2answers
181 views

What does the “period” of a random number generator measure?

What is "period" in the context of pseudo-random number generators? For example when someone says "The Mersenne Twister has a 2^19337−1 period" what does it mean? I would appreciate a simple as ...