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

learn more… | top users | synonyms (1)

-1
votes
3answers
293 views

Virus using input from victims mic to generate encryption keys

I am a software engineer from Bucharest and I've created an audio based encryption and authentication application called WaveCrypt. It basically allows users to encrypt (AES) their files with an ...
0
votes
1answer
62 views

ssh-keygen: How is the seed generated?

How is the seed for ssh-keygen generated? I expect it will take information from /dev/random and request supplementation with system activity if we have insufficient random bits. An Instructor ...
4
votes
1answer
88 views

Ways to generate symmetric and asymmetric keys

We are using Beaglebone Black based custom board, and want to use hybrid encryption for encrypting firmware file, i.e. symmetric for encryption big firmware file and asymmetric for encrypting ...
11
votes
1answer
212 views

What's eating my entropy? Or what does entropy_avail really show?

Below are graphs with the value of /proc/sys/kernel/random/entropy_avail on a Raspberry Pi. This answer which might not be correct describes it as: The pattern always comes to the same "stable" saw ...
3
votes
2answers
130 views

Are password generators secure?

Here's a scenario that I often encounter: Some user needs access to something on my network, but they don't have an existing account in AD. I create an AD account for them which I then use to allow ...
0
votes
0answers
43 views

Choosing Key and IV in AES-256

I am working on a real-life project for a firm. I have to encrypt data using AES 256 as per specification. I want to know how are the key and IV are really chosen in real world projects. /dev/urandom ...
12
votes
3answers
3k views

Is a concatenation of random numbers better than a single random number?

We are generating random numbers 16 digits in length. One option that was put forward was to generate four random numbers of 4 digits each and concatenate them instead of just generating a single 16 ...
1
vote
3answers
317 views

How to generate random but unique tokens for authentication?

I need to create unique and long tokens for email verification, but I am not sure about how. Currently we are on staging servers or we are just using os.urandom() in Django. But I need to know what ...
5
votes
1answer
107 views

How bad it is to feed /dev/random with /dev/urandom?

I have seen many blog posts, or blog comments which recommends to feed /dev/random entropy using output from /dev/urandom. I'm not a crypto expert, but it looks like a good way to replace hard-to-...
0
votes
1answer
88 views

Is `/dev/urandom` secure to generate a salt on a Virtual Machine?

I've read the new password_hash() function from PHP uses /dev/urandom to generate a secure salt, however this assumes some noise from device drivers. Is possible that /dev/urandom is not so random ...
7
votes
6answers
144 views

Should I use a cryptograpically secure random number generator when I generate IDs?

It is common to generate random identifiers to expose through an API instead of using a simple auto incrementing primary key. The reasons are many: Prevents easy enumeration. Does not give away ...
5
votes
2answers
206 views

How secure are these password schemes?

On One liner to create passwords in linux?, I see advice generally of the form head -c16 /dev/urandom | md5sum. They're all random combinations of text manipulation commands, sha1, base64 and md5sum ...
1
vote
1answer
26 views

Synchronized nonce

If two parties (Say A and B) have a shared secret key (K), is there any way for each party to use the shared secret key to generate nonce(N) sequence which is equal on both sides without having to ...
3
votes
1answer
70 views

Is this good/secure method for client-server communication encryption?

Something came to my mind, and I wonder if this is proper method for client-server communication, and if this method is wide-used. On connection, client generates seed, encrypts it using asymmetric ...
3
votes
1answer
56 views

Should I use random usernames for a MySQL database? [duplicate]

I have a script that accesses a MySQL database - clearly a strong, random password and a username unique to the script with no more privileges than it needs are all sensible norms here. However, is ...
5
votes
1answer
119 views

Simple, Secure PHP API Design

I'm trying to design a secure RESTful API web service with as few moving parts as possible. I have some questions, and want to make sure my design is secure. For the data transmission level of ...
2
votes
2answers
114 views

Are there any security advantages to the “TrueCrypt-Paradigm”?

TrueCrypt and its successors use a file format that has the special property, that it looks completely random, there's only a salt (which is random) and the cipher text (which looks random). I like to ...
3
votes
1answer
69 views

Is SHA1 / PBKDF2-HMAC-SHA1 indissociable from random data?

I want to make sure that the result of PBKDF2-HMAC-SHA1 is indissociable from random data (given random parameters). Basically, PBKDF2-HMAC-SHA1 looks like just a bigger SHA-1 hash, which is normal ...
3
votes
2answers
90 views

Is it possible to crack g++ rand()?

So, I have this: I know that some code was used to generate a random sequence, and it looked roughly like this: #include <iostream> #include <string> int main() { const std::string ...
3
votes
2answers
109 views

How significant are these Dieharder results on a Raspberry pi

I was running the Dieharder test suite on my raspberry pis hardware random number generator, and it came back with this: root@raspberrypi:/home/pi# dieharder -a -g 201 -f /dev/hwrng #=========...
11
votes
1answer
205 views

How long to re-seed /dev/urandom in a virtual machine?

I have read plenty about the distinction between /dev/random and /dev/urandom. I understand that the prevailing advice is to use /dev/urandom. The explanation - that 256 bits of 'proper' randomness ...
4
votes
1answer
52 views

Is there a PRNG in Java with a period of at least 256 bits?

From what I can tell, Sun JRE/JDK's are limited to only providing 128-bit strong cryptography without downloading an unlimited strength jurisdiction policy files. My question is, if I install theses ...
1
vote
1answer
46 views

Best practice for serving sensitive data?

Our invoice vendor serves invoice images via http and does not require any type of authentication. EX: http://example.com/companyid/image.php?id=Lhjjfkedhf_739567395 Using HTTPS would be a good ...
1
vote
1answer
65 views

Is reseeding OpenSSL CSPRNG necessary if using RAND_bytes?

I read that cryprographic secure PRNG (CSPRNG) need a random seed to provide random output. Looking at OpenSSL that seems to be archived by RAND_poll() and random data is fetched with RAND_bytes(buf, ...
0
votes
1answer
29 views

Creating secure random output that is repeatable across machines [duplicate]

I'm having trouble figuring out a solution to this problem. Basically what i am trying to do is create random data that can be repeated across multiple machines by a user but is also secure from ...
3
votes
2answers
70 views

Securely generate a rng seed using a small number

I'm trying to figure out a secure method to generate a rng seed to a rng using a small pin number that is 5 digits. The issue that i can see with this is an attacker could very easily just loop ...
0
votes
3answers
117 views

Access Key In URL - Securing The Unsecured!

I'm having some difficulties doing this the right way (as much as it can go). Some time ago, I've asked a question here, asking for help on how to implement sending an access link through email. ...
0
votes
1answer
70 views

Which ciphers produce random cipher text?

I already know AES produces a "random" output. 5e4e6440826d6afc4535fbf078455f791159701a9df624ddd4e4dda84523b6a7 Its cipher-text doesn't follow a pattern and is indistinguishable from noise. Is ...
3
votes
2answers
69 views

Is there any practical weakness to using MT19937 to generate passphrases?

Suppose I use MT19937 to choose random words out of (say) the Diceware word list. I know MT19937 is not considered a cryptographically secure PRNG, but Wikipedia suggests the weakness is rather ...
1
vote
1answer
99 views

What is the purpose of including time as a part of random in TLS Client & Server Hello messages? [duplicate]

RFC 5246 Section 7.4.1.2 states that the 32 bytes of random required in the Client and Server Hello messages should be 4 bytes of time and 28 bytes of random. Why can't it be 32 bytes of random? ...
5
votes
1answer
125 views

Random string vs hash(random string)?

I'm implementing a one-time token service. Each of these one-time token represents some server side data/action associated with it (a 'email confirm' action for example), so that my web service can ...
3
votes
1answer
101 views

What are the problems of using OTP encryption with TRNG?

I've programmed a simple One-Time Pad "encryptor" that can merge two files into one by using bitwise XOR. The pseudo-random key files are generated by using the CryptGenRandom() function from ...
5
votes
1answer
318 views

Is keepass random password generator fully secure and trustworthy?

Am I safe using keepass for generating passwords? For example my accounts, am I safe using a keepass generated password? Could my future keepass master-keys be safely generated in keepass? What method ...
1
vote
0answers
62 views

Token-based authentication for specific requirement

We have the following requirement for creating a token in .NET to be used in providing a challenge token and an actual authentication (auth) token. The auth token will then be used to authenticated ...
3
votes
0answers
83 views

Is there a benefit in measuring randomness? How would it be done?

Is there any benefit in determining how random a given file, stream, signal is? I guess this would be useful to determine If something is (poorly) encrypted To verify the proper encryption of a ...
2
votes
2answers
54 views

Securing a Secure Entropy Service

Many moons ago, I answered a question about Java blocking due to a lack of entropy in /dev/random. (http://security.stackexchange.com/a/53025/41709) My main suggestion was to use /dev/urandom, but I ...
5
votes
1answer
116 views

Resetting the Windows RNG

According to this research, Windows seems to produce the same sequence of random numbers indefinitely when a process is kicked off before a VM snapshot is taken. This is a huge issue obviously when ...
3
votes
1answer
81 views

Skewed Randomness

According to random.org, Any source of true randomness may contain skew towards 0 or 1 in the data I am a bit confused about what this exactly means and why this "skew" is present in all "true ...
5
votes
2answers
83 views

Two ways of generating the IV

I'm looking at some code, and in a particular scenario, the code would need to generate two IVs. The second IV-generating code simply uses the C# Rijndael GenerateIV() The first IV-generating code ...
3
votes
1answer
94 views

Defeating ROP attacks in x86

Most defense techniques against ROP revolves around randomization, such as ASLR. If I mark all regions of memory, other than the code segment, non-executable, will this defeat ROP?
4
votes
1answer
292 views

OpenSSL 0.9.6a PRNG algorithm weakness: How to exploit?

I saw an OpenSSL security advisory for Openssl 0.9.6a Recently a cryptographic flaw in OpenSSL's built-in pseudo-random number generator (PRNG) was pointed out to us by Markku-Juhani O. Saarinen , ...
2
votes
0answers
51 views

TRNG from smartphone accelerometer

I hope this is not a stupid question :/ but I'm trying to generate a true random number from smartphone's accelerometer, than pass it as seed to a CSPRNG to generate true random numbers. I know that a ...
3
votes
1answer
105 views

Is Jericho Comms TRNG reliable?

I'm looking for a method to generate true random bits/numbers on smartphones. Create a custom TRNG seems to be tricky and a lot of people suggest to trust in already existing ones, widely tested and ...
1
vote
2answers
1k views

Can I rely on openssl_random_pseudo_bytes() being very random in PHP?

I came across an application which needs to generate a random token for each user. It is very important that each generated token is unique. Application code was as follows: $token = md5(...
4
votes
2answers
200 views

Does adding a random character to a pseudo-randomly generated password improve entropy significantly?

I'm asking a practical question. I was taught computers are bad at generating random data. Does this mean password generators, such as the one built into Keepass, suck? If yes, then would it help for ...
3
votes
1answer
2k views

Correct way to generate password salts in PHP 5.3 on Linux given my constraints?

In examining our database storage of hashed passwords with salts, I note a high rate of salt collisions, i.e., there are far too many cases where two table rows have the same salt stored. One ...
-4
votes
1answer
107 views

Hacking bad people to help a good cause [closed]

I want to hire a hacker to get emails by and between 2 people I think are participating in something unethical. It is very important that I not break any laws. A review of this site makes it appear "...
2
votes
2answers
116 views

Is a random work factor an increase or decrease of security?

Assume you use a proven hashing algorithm, like bcrypt with a work factor of 10 or PBKDF2 with 10K iterations. Normally that's really secure already and would give enough security already for most ...
0
votes
1answer
104 views

A “hardware” random number generator for mobile phone

I have been trying to write a random number generator using the hardware of the phone. After reading other people's attempts and tried some. I came up with the following to generate the seed: Play ...
4
votes
1answer
112 views

Is encrypted data a good random source?

Given that someone needs my encryption key to predict the output, can I encrypt arbitrary data (zeroes, system logs, personal photos) with AES and a secure passphrase, and use the result as a RSA/SSH/...