3 ms·
Okay, subreddit created: https://www.reddit.com/r/encrypted_gb_codes/ https://www.reddit.com/r/encrypted_gb_codes/ I mispelled gh as gb, but that makes it more
by jesushax 4y ago
Okay, subreddit created: https://www.reddit.com/r/encrypted_gb_codes/ https://www.reddit.com/r/encrypted_gb_codes/
I mispelled gh as gb, but that makes it more memorable (Great Britain, world war II spies, the cryptonomicon partially taking place in the UK, easy peasy).
Okay, so where was I? Right, the encrypted backup codes! Here is the code
encrypted = []
secret_key = input('secret key: ')
try:
for index, character in enumerate(input('secret to encrypt: ')):
encrypted.append(ord(character) ^ ord(secret_key[index]))
except IndexError:
print('Your key is not big enough to securely encrypt the secret!')
print('Go play cryptopals to see why using XOR that way would be bad')
print(''.join(hex(i) for i in encrypted))
Aaand the secret is live on reddit. For redundancy I need to plaster this everywhere (hiding it in public key exchanges would also be easy!), but this will do for now:
https://www.reddit.com/r/encrypted_gb_codes/comments/uj1fll/my_first_github_recovery_code_encrypted/ https://www.reddit.com/r/encrypted_gb_codes/comments/uj1fll/...