I have a question from my teacher: "Why can a symmetric encryption algorithm be considered a pseudo-random number generation algorithm?
Can anyone explain it to me?
And sorry if my english is not good!
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It only takes a minute to sign up.Sign up to join this community
Here are two standard (and equivalent) definitions of confidentiality in symmetric encryption. If Alice sends Bob a message and Eve manages to see it in transit, Eve cannot (without an unreasonable amount of computation):
The latter criterion indirectly answers to your question. One way to implement a pseudorandom number generator is just to encrypt arbitrary inputs—say, encrypt the all zeroes string and use the ciphertexts as the pseudorandom output.
This also works in the opposite direction—if you have a secure pseudorandom generator, you can build a secure cipher out of it (called a stream cipher) by XORing its output with the messages. So in that sense, encrypting messages confidentially and generating secure pseudorandom numbers are equivalent problems.
Well, like the comments say, it can't. But maybe i can give you a hint, to what i may be related. Shanon worked on perfect security. One of his principes is, that the decrypt and encrypt text are stochatic stochatically independent. Some symmetric system (e.g. one time pad) are perfect secure.
I don't know the context of your teachers question, but this may give you an idea, where you can find an answer.
As you might know, a symmetric encryption algorithm is defined by a single key shared by two parties and the messages are encrypted and decrypted by this same key. We have two kinds of symmetric encryption algorithms: Stream Ciphers and Block Ciphers.
A Stream Cipher works as a Pseudo Random Number Generator (PRNG), then uses the generated number to perform a XOR with your plaintext to get the ciphertext.
So you can use any Stream Cipher as a PRNG by using your plaintext as the seed, then encrypting sucessivelly the result of the encryption during the generation process. You can also perform this using Block Ciphers, but they are much slower than Stream Ciphers.
In 2019 I developped an algorithm which uses a Stream Cipher, Salsa20, as a CSPRNG. https://github.com/mafone/RKHC.