Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [random]

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

Filter by
Sorted by
Tagged with
1 vote
0 answers
23 views

Comparing HAVEGE and Jitter Entropy algorithms

How does the HAVEGE method (or rather, the specific adaption of it as used in haveged) for generating randomness from timing differ from that of the Jitter Entropy method? Is there any research ...
user avatar
  • 64k
0 votes
0 answers
44 views

Security consideration for CAPTCHA system

Hi everybody I am developing an image captcha system as a side project something like hcaptcha/Recaptcha - image classification/object localization. I have a few questions regarding the security of ...
user avatar
13 votes
5 answers
3k views

Pseudorandom vs. True Random

Proper security algorithms demand true random numbers. For instance, secret keys & initialization vectors should never not be true random. However, generating numbers using Java's Random library ...
user avatar
0 votes
1 answer
102 views

Is it necessary to use cryptographically-secure randomness in order to create URLs for user activation?

Usually once you register in a website you need to visit a url like: https://example.com/user_activate/^random_string^ Does the ^random_string^ necessarily need to be cryptographically pseudorandom ...
user avatar
1 vote
1 answer
46 views

Should a user refill their 2FA when they login into a different account and back?

Some of our users on our website have two or more accounts they use to log in. With each device they log in a specific device ID is generated. This device ID is stored on the device itself and on the ...
user avatar
  • 113
1 vote
1 answer
59 views

Can I evaluate the quality of my OS random numbers? [duplicate]

Is there a software or website that implements tests of randomness to check if my random numbers are of cryptography quality ?
user avatar
  • 123
7 votes
2 answers
2k views

Is "Math.random" the same as "crypto.getRandomValues" (JavaScript security)

This question may be a little off-topic, but is Math.random the same as crypto.getRandomValues? (JavaScript) Here's an example: Math.random(); // 0.11918419514323941 self.crypto.getRandomValues(new ...
user avatar
1 vote
0 answers
150 views

How many random characters must an unguessable string contain?

I want to add a suffix to my URLs that makes them distinctive and therefore only findable by a person who knows that suffix. I considered using a UUID or hash, but these are usually very long. However,...
user avatar
  • 127
1 vote
1 answer
185 views

Does combining a non-cryptographically secure string with a cryptographically secure string result in a cryptographically secure string?

I'm using php, but the general question applies to any confirmed cryptographically secure pseudo-random string concatenated with a non-cryptographically secure string. I know random_bytes generates a ...
user avatar
  • 302
0 votes
0 answers
90 views

Were Google's old link-sharing links not cryptographically random?

This year, Google is notifying users that shared links to their shared Google drive files will change: https://support.google.com/a/answer/10685032?hl=en The announcement begins: To make file sharing ...
user avatar
9 votes
6 answers
3k views

Can iterated hashes be used to create cryptographically secure random data from strong random seed?

I was wondering if generation of sequential hashes from random seed can be considered "random enough" to be used in cryptographic operations? By sequential hashes I mean the following: First ...
user avatar
0 votes
1 answer
103 views

Verifying public key visually

Verifying a string of long numbers is hard (think of cert public key). I remember there is a tool to visualize this randomness into a "randomness graph" but I cannot recall what is the graph ...
user avatar
  • 103
1 vote
3 answers
436 views

Is a simple random+hmac session cookie breakable?

I make session cookies of form session_id+'|'+hmac_sha256(session_id, static_secret) where session_id = random_string(16 bytes) made with a PRNG (not a CSPRNG!) seeded on the server's timestamp at ...
user avatar
  • 113
1 vote
1 answer
198 views

Randomness of hash of (password + suffix)

Suppose I have a password, say "thisIsThePassword". Then I have MD5 hashes of that password followed by an increasing numeric suffix: MD5("thisIsThePassword1") = ...
user avatar
  • 15.3k
0 votes
3 answers
225 views

How many bytes for password reset token? Should one take steps to hash or conceal raw CSPRNG bytes?

I'm trying to follow the OWASP 'Forgot Password Cheat Sheet' recommendations for password reset functionality via email. This requires my server to generate a token. OWASP says that PHP's random_bytes(...
user avatar
  • 196
1 vote
2 answers
178 views

Is it bad to reveal random bytes from a system?

Let's say you cat /dev/random or /dev/urandom all day from boot to system shutdown, either redirecting the output to a file, or just catting it (in a terminal, or whatever) doesn't matter. Is this ...
user avatar
2 votes
1 answer
531 views

Is Python's `secrets` module using the same code as the `random` module?

The secrets module is marketed as a safe alternative to random for things that are meant to be secret. But what's the actual difference? Looking at their code, in some cases these libraries actually ...
user avatar
  • 21
0 votes
1 answer
157 views

Are weak entropy sources worth it?

I maintain an operating system that can be deployed to embedded devices with highly diverse capabilities. One of the aspects of porting the OS to a device is declaring the available entropy sources (...
user avatar
2 votes
5 answers
526 views

Attacks Relying on Poor Entropy

I'm creating a quantum random number generator as part of my thesis. As part of the research phase, I'm trying to substantiate my aspertion that encryption is significantly weakened if a computer ...
user avatar
4 votes
1 answer
198 views

Security Implications of Caching Randomness

Is it a bad idea to cache randomness in the general case? My feeling is yes, but I'm having a hard time articulating why. Scenario: A programming language of your choice (e.g. node) uses a native call ...
user avatar
  • 161
-1 votes
1 answer
249 views

What is "environmental noise"?

I'm looking at way to generate random numbers for cryptographic purposes. More specifically, I looked at the Linux /dev/urandom function, which is considered a real random number generator. There are ...
user avatar
0 votes
1 answer
349 views

So I just got a voicemail from a random person, where it says 3 random numbers (for example 354) and then "goodbye" [closed]

So basically, i was just playing games as always, and I get a voicemail. It reads-"396 (random numbers just incase the numbers are sensitive information), goodbye" It sounds automated but i'...
user avatar
0 votes
0 answers
151 views

Weird GET request on internet facing Nginx [duplicate]

I spun up an internet facing nginx server in AWS and the logs started showing weird get requests with a search engine's spider as user agent. 172.31.43.193 - - [19/Aug/2020:20:09:19 +0000] "GET /...
user avatar
0 votes
1 answer
354 views

Security of PHP's str_shuffle()

I'm doing some research on PHP's str_shuffle function, I already asked this question multiply times on StackOverflow but got no answer https://stackoverflow.com/questions/61968859/is-it-possible-to-...
user avatar
8 votes
2 answers
298 views

Randomly selected words converted into sentence. Did I lose passphrase strength or gain it?

I got 5 dice and opened EFF's wordlist, and generated a random five-word passphrase (all letters small with spaces, no punctuation) for my PC. The words were making up a meaningful scene in my mind, ...
user avatar
  • 275
5 votes
2 answers
2k views

Is it cryptographically safe to use veracrypt in a virtualbox virtual machine?

Does virtualbox provide enough entropy (random numbers) for the veracrypt program on the virtual machine? Is it cryptographically safe to use veracrypt inside a virtualbox in a windows 10 guest?
user avatar
0 votes
0 answers
198 views

Random URLs to hide assets [duplicate]

Say I own a domain name www.example.com and I'd like to host some resources on it, but being reasonably hidden from the public. Since a 256 bits has a sufficiently large entropy to prevent an ...
user avatar
3 votes
1 answer
133 views

Randomly generating invoice IDs

I'm in the process of setting up a local (i.e. offline and very limited) business, and I'm thinking of generating invoice IDs randomly to avoid the clients knowing that they're customer number #...
user avatar
2 votes
1 answer
255 views

Did PHP's rand() get better?

I know that PHP used the system implementation for its rand() function, which is usually a weak LCG or LFSR implementation. Did this change? In case it still does, I am using Fedora 32. PHP states in ...
user avatar
  • 1,144
0 votes
3 answers
139 views

Is a random number secure (enough) for card numbers and pins?

I've been given the task of generating some gift tokens which comprise a serial number and a pin number, analagous to a pre-paid credit card. The serial and pin will be printed on a card, with the pin ...
user avatar
  • 181
0 votes
0 answers
126 views

Generating trusted random numbers for a group?

Alice and Bob need to share some cryptographically-secure random numbers. Alice does not trust Bob, and Bob does not trust Alice. Clearly, if Alice generates some numbers, and hands them to Bob, Bob ...
user avatar
  • 130
0 votes
1 answer
180 views

What vulnerabilities would this type of "password manager" have?

When I was searching for a password manager to use I stumbled upon the concept of Master Password which instead of encrypting and saving your passwords, generates them by using your master password ...
user avatar
0 votes
1 answer
155 views

Does OAuth2 state parameter need to be cryptographically secure?

In OAuth2, as part of the authorization request, we generate a random string and pass it with the state parameter, so that when we get the response, we can ascertain that the response is a result of ...
user avatar
  • 1,260
4 votes
1 answer
355 views

Does rngd -r /path/to/file inject into /dev/urandom in addition to /dev/random?

I'm new to the /dev/random and /dev/urandom pipes in general and have an application calling from /dev/urandom which I'm attempting to inject entropy into. I'd prefer not to change the source for ...
user avatar
  • 143
1 vote
0 answers
91 views

Anonymous (privacy-preserving) random walk

Quoting this paper - SmartWalk (https://dl.acm.org/doi/pdf/10.1145/2976749.2978319): For graph privacy, strong link privacy relies on deep perturbation to the original graph, indicating a large ...
user avatar
  • 153
1 vote
1 answer
173 views

Cracking .NET random

I know .NET has two PRNGs, one secure and one insecure. What is the approach to cracking the insecure one (I want to use it to test an .aspx site)? I searched all over but I only found references to ...
user avatar
1 vote
2 answers
154 views

Should I generate a lot of random serial keys and pick one for each registration or generate 1 for each user?

I'm talking about Online activation. My current workflow is: User pays via paypal (without registration) Paypal performs a request to my API. My API returns a serial key to the user. Then the user ...
user avatar
1 vote
1 answer
203 views

How can I validate that a PRNG's output is insecure and predictable?

Say I talk to a developer who is using some output of a Pseudo-random number generator in order to do some security task. I know based upon common knowledge that only Cryptographically Secure Pseudo ...
user avatar
2 votes
3 answers
321 views

How can one test if a password generator is cryptographically secured?

Given the plethora of random password generators (RPG) available, I'd like to do some black box testing on some. Let's take https://passwordsgenerator.net/ for example. Assuming the whole generator ...
user avatar
2 votes
0 answers
273 views

Is it safe to generate a temporary API key from a random generator seeded by a secure random generator?

I have a need to generate a key consisting of a given number of random characters that will be used to access resources via a public API. It should not be possible to predict the key. This is done in ...
user avatar
  • 121
10 votes
1 answer
3k views

Is reading from /dev/urandom on macOS Catalina a safe way to produce cryptographically secure data?

I'm reading a lot about entropy on macOS... I know it doesn't use Yarrow anymore as per this FIPS 140-02 doc a NIST compliant DRBG. I read a lot: https://github.com/briansmith/ring/pull/398 How ...
user avatar
  • 689
4 votes
1 answer
520 views

entropy change when reading from /dev/urandom vs /dev/random

I noticed that when reading from /dev/random, I have a very real impact on the entropy available on my linux box. (reading from /proc/system/kernel/random/entropy_avail), Yet when reading from /dev/...
user avatar
  • 689
0 votes
0 answers
119 views

Is it possible to get the original UUID1 from a timestamp?

Say, for example, I generate a time based UUID with the following program. import uuid uuid = uuid.uuid1() print uuid print uuid.time I get the following: 47702997-155d-11ea-92d3-6030d48747ec ...
user avatar
  • 43
3 votes
1 answer
286 views

using HW random number generator as source of entropy

Currently I am using haveged on my server as source of entropy. My Server is used as KVM hypervisor, to run virtual machines. I did not use haveged at the beginning, and I noticed the VMs were ...
user avatar
2 votes
1 answer
233 views

TLS handshake random bytes reused

What would happen if the random bytes provided by the client and the server in the first two messages would be reused by one peer/by both peers? I think it would highly reduce the provided security, ...
user avatar
  • 123
2 votes
1 answer
165 views

Is this schema between a Desktop App and an API secure?

From my previous question: How secure is this schema between a Desktop App (c++) and an API (php). Introduction I made a paid Desktop-app that required constant internet connection (because of its ...
user avatar
2 votes
3 answers
144 views

Benefits of signing a random number?

Is there any benefit to signing a random number? E.g. a link for password reset, sent to email, often includes a base64 encoded random number to prevent someone guessing what the password reset link ...
user avatar
  • 123
1 vote
2 answers
216 views

If I seed a CSPRNG with a truly random number and call the output, does this make the number more, less or equally "random"?

If I have a JavaScript CSPRNG such as isaac.random(), and I seed it using a truly random number T as such: isaac.seed(T), does this make the result of the CSPRNG more, less, or equally random? I ...
user avatar
3 votes
1 answer
302 views

What are some viable, secure sources of entropy for a CSPRNG?

I need some viable sources for entropy to seed a CSPRNG. So far, I have: JS Events Web Crypto API performance.now() Timing for xmlHTTPRequests etc. Are there any other viable/secure entropy sources ...
user avatar
2 votes
1 answer
126 views

Is getting 1-2 outputs from a CSPRNG to seed another CSPRNG less entropy than getting say 5000 outputs from a CSPRNG and using that to seed?

This question builds off of this question. I want to create more entropy from a viable entropy source to seed another CSPRNG. If I use window.crypto.getRandomValues(newUint8Array(1)) To seed a ...
user avatar

1
2 3 4 5
8