M
M
Maxim Shishko2021-03-27 10:25:28
Mathematics
Maxim Shishko, 2021-03-27 10:25:28

How to determine the relationship between numbers knowing several initial values ​​and a final one?

At work, there is equipment on which a password is needed to access the settings, this password is different every time. To obtain this password, you must contact the manufacturer each time. Several times the password was received. Also recently there was a representative of the manufacturer of this equipment and I saw that he entered the serial number of the equipment in the excel file and also the serial number of the password (in the password entry window there is a counter that increases by one after each correct password entry) and as a result, he displayed a password. How can you determine the relationship between these numbers? Maybe there are some online services or something like that

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Sokolov, 2021-03-27
@sergiks

None, most likely.
A simple example: in Excel, the villain and the equipment have a common “secret” - a pair of coprime numbers.
The nth password is the remainder of the division (N * p1) % p2
. For example, can you continue the sequence?14, 28, 42, 56, 70, 1, 15, 29, 43

continuation
57, 71, 2, 16, 30, 44

code and values ​​of simple
Тут намеренно взяты маленькие простые числа, поэтому заметна цикличность «паролей»:
const p1 = 97;
const p2 = 83;

const pass = [];
for (let n = 1; n < 10; n++) pass.push((n * p1) % p2);


Try to pull out the code that checks the password from your equipment and replace it with your own, where the password is "password")

W
Wataru, 2021-03-27
@wataru

In general, no way. It is necessary to reverse-engineer the code that checks or generates passwords. Another, as a hacking option, you can try to change the password counter and enter the old password.
In the saddest case for you, cryptography is used there. Then, without access to the secret key from the manufacturer, there is no way to generate a password, even if you have all the password generation and verification code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question