![]() |
|
Python One Time Pad Generator - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45) +--- Forum: Blackhat • Red Team • Offensive Security (https://hackforums.net/forumdisplay.php?fid=447) +---- Forum: Cryptography, Encryption, and Decryption (https://hackforums.net/forumdisplay.php?fid=126) +---- Thread: Python One Time Pad Generator (/showthread.php?tid=6200705) |
Python One Time Pad Generator - MiguelSanchez - Apr 8, 2022 I wrote a key generator, which works via recursive SHA256 digests. Using a starting stream it create a digest from your starting string and a salt, then recursively creates the next characters by using the SHA256digest itself plus the salt as the seed for a new SHA256 digest, This occurs repeatedly until the desired size is reached, in this case 32MB. I've attached a class, named distribution, which keeps track of how many times each byte occurs. Over a large testing period I can confirm it's non-repeating with a random distribution that equals out as the volume increases. To create keys over 100MB I'd turn off the distribution.add_bytes on line 51. To see the distribution just run Code outdist.graph_distribution()Code from hashlib import sha256 |