The invention discloses an equal-length symmetric
encryption and decryption method based on a Josephh ring concept, and the method comprises the steps: setting two random keys key1 and key2 which are respectively used for the conversion from a
plaintext to a numerical value and the conversion from the numerical value to a
ciphertext; setting a variable parameter step of the Josephh ring; encrypting the
plaintext by using the Josephh ring parameter; and analyzing the
ciphertext by using Josephh ring inverse conversion. The method has the beneficial effects that two complex and efficient
modes of key conversion and Josephh ring conversion are combined, and the difficulty of
ciphertext decoding is greatly improved. In this way, the security of the encrypted character string is ensured, and the information is effectively prevented from being illegally acquired and utilized. According to the method,
encryption is carried out under the condition that the length of the original character string is not changed, it is ensured that the length of the encrypted ciphertext is completely the same as the length of the
plaintext, the effectiveness and
readability of information are ensured, and the transmission problem caused by the too long ciphertext is avoided.