Protocols – Remote Authentication with Random Number Challenge vs Time Stamp?

Many remote server terminal authentication protocols use random numbers sent by the server as a challenge that the user will encrypt and return to the server. In this way, an opponent can not initiate a replay attack because the number encrypted and sent to the server (with other settings) is random and unknown in advance.

But what happens if the opponent always saves the line and maps each random number he / she has ever encountered to the encrypted traffic that follows it?

If the opponent encounters a random number previously sent by the server, he will be able to replay the traffic.

So why not use the timestamp as a challenge? A timestamp always grows and will always be different from any previous timestamp?

Why is the use of random numbers preferable to timestamping?

java – What would be the simplest way to generate random numbers, really random, without repetition?

I've been looking at solutions involving very complex lists or methods, but I wanted to know if there was a simple way to generate random, really random numbers in JAVA, because with only Math.random, this n & rsquo; Is not enough …

How to display fields in random order in a Drupal view 7

I have an overview of the multiple choice questions. I want to display the correct option field in a random order. How can I do this?
- list item

c # – How to rotate an object of the y axis in two directions at random?

I want to create an effect similar to the one that the object looks around.
As it is inspect around. In this he looks at a window and the idea is to act as if he were looking at the view outside.

Here is a screenshot of the Navi looking out the window:
The camera is positioned by the window, facing the face of Navi:

Navi is looking at the window the view to the outside

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

Public class ItemAction: MonoBehaviour
public float xAngle, yAngle, zAngle;
public float speed;
camMouseLook public mouselook;
public GameObject lockedRoomCamera;
public camera playerCamera;
public GameObject navi;
private bool torotate = false;

empty public Init ()
navi.transform.parent = null;
navi.transform.localScale = new Vector3 (0.5f, 0.5f, 0.5f);
navi.transform.Rotate (new vector3 (0, 180, 0));
PlayerController.disablePlayerController = true;
mouselook.enabled = false;
playerCamera.enabled = false;
lockedRoomCamera.SetActive (true);
torotate = true;


Private update void ()
if (torotate == true)
navi.transform.Rotate (xAngle, Random.Range (90, 270) * speed * Time.deltaTime, zAngle, Space.Self);

I want to rotate the object only on the y-axis randomly, between 90 degrees and 270 degrees. So, it seems that the object looks to the left and right sides.

But now, the object is only turning constantly in a direction to the left.

Sale – Random Titles

Why are you selling this site?
I sell this site because I do not have time to make it work anymore.

How is it monetized?
The domain is empty, but you can launch or juicyads.

Is this site provided with social media accounts?

How long does this site take to run?
All I did was a unique organization with popads that I ran.

What are the challenges of managing this site?
Find the right pictures …

delphi 10 – Random numbers

I would like some help to solve the following problem: I need to create a vector that stores random numbers. However, I have 4 restrictions:
1 – the sum must always be equal to 1.
2 – the first number of the vector must be the largest
3 – the last number of the vector must be the smallest.
4 – the first vector number must be 4 times larger than the last vector number.

I would like to use Delphi 2010, but if there are suggestions in other languages, that's fine.
Any help is welcome!

probability – independent and uniformly distributed random variable

Consider three independent sources uniformly distributed (taking values ​​between $ 0 and $ 1 $) Random variables. What is the probability that the middle of the three values ​​(between the smallest and the largest) is between $ a $ and $ b $ or $ 0 ≤ a <b ≤ 1 $?

$ A) 3 (1 – b) a (b – a) $

$ B) 3 ((b – a) – (b ^ {2} – a ^ {2}) / 2) $

$ C) 6 (1 – b) a (b – a) $

$ D) (1 – b) a (b – a) $

$ E) 6 ((b ^ {2} – a ^ {2}) / 2 – (b ^ {3} – a ^ {3}) / 3) $.

Now, formula for uniform distribution $ int_ {a} ^ {b} xdx = left [ frac{x^{2}}{2} right ]_ {a} ^ {b} $

According to the question average value of $ 3 $ the values ​​are inside $ a $ and $ b. $

So, here are 4 possibilities. Let's say that the numbers are x, y, z.


Case $ 1: $ Only $ y $ can be inside $ a $ and $ b. $

Case $ 2: $ Only $ x, y $ can be inside $ a $ and $ b. $

Case $ 3: $ Only $ y, z $ can be inside $ a $ and $ b. $

Case $ 4: $ $ x, y, z $ everything can be inside $ a $ and $ b. $

So the probability should be $ frac { frac {^ {4} textrm {C} _ {1} times left (b ^ {2} -a ^ {2} right)} {2}} { frac {^ { 8} textrm {C} _ {1} times left (b ^ {2} -a ^ {2} right)} {2}} $

Where am I wrong?

mysql – InnoDB clustered index performance when using random values ​​as a primary key

By default, my primary keys to InnoDB storage engines are auto-incrementing integers. In order to hide the number of rows in the database, the application code implements a random generator for the primary key.

Here is an example of a typical schema:

`id` int (11) unsigned NOT NULL AUTO_INCREMENT,
`project_id` int (11) unsigned DEFAULT NULL,

I read a book and just discovered that InnoDB uses a clustered index sorted by primary key. This basically means that the database file records are indexed and sorted by the value of the primary key. This is fine, as long as the primary key of the next record is always larger than the last record inserted (this occurs by default due to an automatic incremental constraint) .

What happens when the primary key is no longer auto-incremented? In order to keep the file sorted by primary key, there must be many rewrites whenever a primary key smaller than the largest one is inserted.

Am I unclear about how clustered indexes work in InnoDB? because it sounds like a giant performance problem.

api design – Are REST methods that safely return dynamically generated random data

Is a REST method that returns dynamically generated random data for each access considered safe?

According to RFC 2616 (that's me pointing out):

In particular, the convention has been established according to which the EEG and HEAD methods SHOULD NOT have the importance of taking any action other than recovery. These methods should be considered "safe". This allows the user agents to represent other methods, such as POST, PUT, and DELETE, in a special way, so that the user is informed that a potentially dangerous action is requested.

Naturally, it is not possible to make sure that the server does not generate side effects as a result of the execution of a GET request; In reality, some dynamic resources consider that a feature. The important distinction here is that the user has not asked for side effects and therefore can not be held responsible.

From what I understand from this, the method should be considered safe because the only action is to recover. The state of the server does not change with multiple calls (although the result may be different), since all the side effects generated would be the same (like logging of terminal access).

I am not sure if this is the case, because no real resource is used because the data is generated dynamically. I could also misunderstand the concepts of safe methods, idempotence and their relation with the REST APIs. Any information is very appreciated!

graphs – Algorithm to generate random incrementing numbers up to a limit

I'm trying to write code to generate incremental sequences of numbers such as:

0 + 1 + 3 + 5 + 1 = 9
0 + 5 + 1 + 1 + 1 = 8
0 + 1 + 1 + 2 + 1 = 5

I have 3 constraints:

1) I need to have a limited number of addends (here it is = 5)

2) the final sum must be less than a certain limit (the limit is here <9)

3) addends must be random

For now, I generate sequences randomly and selects only those that are appropriate. For 2-digit numbers and for long sequences (> 8) my algorithm takes a lot of time.

At least can you tell me that the CS branch is studying such problems?