User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
resources:rc4 [2019/11/01 16:38]
jgoeders
resources:rc4 [2019/11/01 16:39] (current)
jgoeders
Line 6: Line 6:
 As you may be aware, if we XOR a value with another value twice, we get back the original value (''​A ^ B ^ B == A''​). ​ Thus, if we use the same key to generate the same pseudo-random stream of bytes, and XOR'd them with the cyphertext, we will get back the original plaintext. ​ Using the same key and algorithm for encryption and decryption makes RC4 a **symmetric** encryption algorithm. ​ This means that the provided module can be used to perform either encryption or decryption.  ​ As you may be aware, if we XOR a value with another value twice, we get back the original value (''​A ^ B ^ B == A''​). ​ Thus, if we use the same key to generate the same pseudo-random stream of bytes, and XOR'd them with the cyphertext, we will get back the original plaintext. ​ Using the same key and algorithm for encryption and decryption makes RC4 a **symmetric** encryption algorithm. ​ This means that the provided module can be used to perform either encryption or decryption.  ​
  
-Assuming one is using the provided module to perform RC4 decryption, the cyphertext is provided to the ''​bytes_in''​ input, and the key to the ''​key''​ input. ​ The decryption process begins when the ''​start''​ signal is raised, and when completed, the ''​done''​ output will be high for a single cycle. The resulting plaintext is available from the ''​bytes_out''​ output.+Assuming one is using the provided module to perform RC4 decryption, the cyphertext is provided to the ''​bytes_in''​ input, and the key to the ''​key''​ input. ​ The decryption process begins when the ''​enable''​ signal is raised, and when completed, the ''​done''​ output will be high for a single cycle. The resulting plaintext is available from the ''​bytes_out''​ output, which won't change until you start a new encryption/​decryption process (by lower and raising the enable signal).
  
 ^ Module Name = decrypt_rc4 ^^^^ ^ Module Name = decrypt_rc4 ^^^^