I am considering two options for link encryption.

  1. There is a secret word that changes every day of each user and consists of ~ 30 characters.
  2. The secret word is always the same.

The question is - naturally there is a smart person who decodes the link, but will it take more time with the first option or not?

Well, can someone tell a good php library to encode a link to a file?

  • why do you want to encode the link? What is your idea? - Vasily Barbashev
  • Yes, it is not necessary for me, but to prove to a person that it is impossible to hide a file with a coded link, but he wants ... =) - Shevtsov Eugene
  • 2
    Creating a bicycle in cryptography is fraught with crutches. - AseN
  • one
    @ Vasily Barbashev why md5, when you can just take the alphabet numbers randomly?)) - andreymal
  • one
    It is quite similar to random letters - andreymal

1 answer 1

The secret word can not be deciphered , not anything else. It can only be guessed (or stolen , but this is cheating, not considered).

Most likely, your system is not powerful enough (or entropy is enough in a word) to allow an attacker to try all possible combinations in one day, so we believe that at least one change did occur.

New situation arises only one. If the change occurred on a combination that the attacker has already tried, then as a result of a successful search without repetitions, he may not find the correct answer.

Therefore, changing the word every day can improve the situation, but theoretically. Even without it, such an attack is difficult to implement in practice, because to meet within a reasonable time, the search will have to be done at a tremendous speed, giving a huge load to the system, causing huge delays and potentially the failure of the entire site, which ... you will notice, probably?