File:Keyschedule rc4.png
From Wikimedia Commons, the free media repository
Jump to navigation
Jump to search
Keyschedule_rc4.png (256 × 256 pixels, file size: 3 KB, MIME type: image/png)
File information
Structured data
Captions
Summary
[edit]DescriptionKeyschedule rc4.png |
English: Keyschedule of RC4 algorithm (a widely used stream cipher). The graph represents the successive internal state of the permutation array.
On the horizontal axis : the permutation value. On the vertical axis : the different iterations. Starting with a key "WIKIPEDIA" (72 bits) and an identity permutation (ie. the first line in the graph, which is a perfect gradient as byte 1 is swapped with byte 1, byte 2 with byte 3, etc.), the keyschedule swaps two bytes at each iteration. At the end of the 256 iterations, the last line is sufficiently shuffled for cryptographic use and the keystream generation. |
Date | |
Source | Own work |
Author | Dake |
Licensing
[edit]I, Dake, the copyright holder of this work, hereby publishes it under the following licenses:
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.http://www.gnu.org/copyleft/fdl.htmlGFDLGNU Free Documentation Licensetruetrue |
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license. | ||
Attribution: I, Dake | ||
| ||
This licensing tag was added to this file as part of the GFDL licensing update.http://creativecommons.org/licenses/by-sa/3.0/CC BY-SA 3.0Creative Commons Attribution-Share Alike 3.0truetrue |
This file is licensed under the Creative Commons Attribution-Share Alike 2.5 Generic, 2.0 Generic and 1.0 Generic license.
Attribution: I, Dake
- You are free:
- to share – to copy, distribute and transmit the work
- to remix – to adapt the work
- Under the following conditions:
- attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
You may select the license of your choice.
Code
[edit]Code used to generate the graph :
K = "WIKIPEDIA"
s = dict((i, i) for i in range(256))
j = 0
myfile = open("rc4.raw", "wb")
for i in range(256):
for z in range(256):
myfile.write(chr(s[z]))
j = (j + s[i] + ord(K[i % len(K)])) % 256
s[i], s[j] = s[j], s[i]
myfile.close()
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 15:18, 17 July 2007 | 256 × 256 (3 KB) | Dake~commonswiki (talk | contribs) | {{Information |Description=Keyschedule of RC4 algorithm. View of the successive internal state. On the horizontal axis : the permutation value. On the vertical axis : the different iterations. Starting with a key "WIKIPEDIA" (72 bits) and an identity perm |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
File usage on other wikis
The following other wikis use this file:
- Usage on fr.wikipedia.org