摘要 |
PROBLEM TO BE SOLVED: To provide an encryption device and decryption device and an encryption method and decryption method which, without changing the algorithm of a stream cipher, realize safe encryption and decryption algorithms even when the same initial vector is inputted.SOLUTION: An encryption device 10 generates a random number, encrypts plain text using the generated random number and a specific function, creates encrypted intermediate plain text, initializes a stream cipher algorithm using an initial key and an initial vector, and performs stream encryption on the intermediate plain text. A decryption device 50 initializes the stream cipher algorithm using the initial key and the initial vector, makes the inverse function of the specific function used for encrypting the plain text act on intermediate plain text derived by decrypting the cipher text encrypted by the encryption device 10 to separate the intermediate plain text into the random number and the plain text, and outputs the plain text. |