Answer the question
In order to leave comments, you need to log in
Need a hash-like function, up to 32 bits, with the ability to set a primary number?
Looking for 2 features. The meaning of the task is that you need to have 2 functions:
1. To create a number, you need the function f([ticket number],[first number]) = [first number][number sequence],
i.e. the result should start with the number that we specified.
for example, there is a series of tickets A, The ticket number will be f(A90414, 0) = the result of the function should be 0ADEA0.
2. For verification, if we take f(0ADEA0), we should get A90414.
0ADEA0 - closed inside a protected area that must be erased with a coin (for the lottery).
Krypkostability is not needed, collisions are possible, the dimension is from 32 to 128 bits.
examples:
A(A34243, 0) = 0a0Fd0 -> check B(0a0Fd0) = A34243;
A(C34303, A) = Aeecd0 -> check B(Aeecd0) = C34303;
Answer the question
In order to leave comments, you need to log in
Alternatively, use RSA. Cryptographic resistance on small numbers is not provided, but it is not needed according to the condition of the problem.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question