Skip to content

Instantly share code, notes, and snippets.

@gnrfan
Last active November 11, 2015 19:49
Show Gist options
  • Save gnrfan/31705229676b09911a4f to your computer and use it in GitHub Desktop.
Save gnrfan/31705229676b09911a4f to your computer and use it in GitHub Desktop.
KYLO (REN) AS CIPHERTEXT WITH KEY "SKYWALKER" USING THE VIGENERE CYPHER (THANK YOU JJ ABRAMS)
#!/usr/bin/env python
# -*- coding: utf8 -*-
"""
According to Wikipedia [1], the Vigènere cipher is a method of
encrypting alphabetic text by using a series of different Caesar
ciphers based on the letters of a keyword. It is a simple form
of polyalphabetic substitution.
An eastern egg based on cryptography is something you could expect [2]
from JJ Abrahams for the upcoming "Starwars: The Force Awakens" movie.
Padmé means "Lotus Flower" [3] in Sanskrit and "Ren" means
"Lotus Flower" [4] in Japanese. If you add this observation to the
already disclosed fact that Kylo Ren is obsessed with Vader and is part
of the Knights of Ren you might be into something.
Padmé Amidale was the wife of Anakin Skywalker and died after loosing
her will to leave before giving birth to Luke and Leia. When Anakin
awakes from the duel with his former master Obi-Wan Kenobi he learns
from his current master, Darth Sidious that his wife is dead, that
he even killed her himself in an outburst of ire enhanced by the
Dark side of The Force. Anakin had joined the Dark Side of the Force
for the very purpose of saving his wife's life and Sidious was
supposed to lead him during the process sharing with him the teaching
of the legendary Sith Lord Darth Plagueis.
It is all logical that Anakin, now Vader, felt betrayed by his master
and tricked into joining the Dark Side. Any effort during his long years
serving his new master that could bring his lost love back, at least in
the form of a Force Ghost, looks like something a determined egocentric
Sith Lord like Darth Vader would at least attempt.
This takes as to the Skywalker family as recurring theme in the Starwars
universe: Anakin Skywalker was the supposed chosen one, the being that
would bring balance to the force. He ended up having a progeny but not
his master nor himself knew about the birth of the twins.
Is it logical that Darth Vader himself or his master on his own interest
would try to give Anakin a child and successor using genetic engineering?
Specially if Vader were to be the one looking to engineer his son he
would surely want this son to also be a descendant of his beloved lost
wife.
Is this who Kylo Ren really is? The genetically-engineered heir to
Vader's Dark Side throne? We don't know.
Since the Vigènere Cipher is know to require a key, what other key more
relevant than "SKYWALKER" could we use? Considering the "Ren" part is
just a hint, the "Kylo" part must be the ciphertext.
So what do you obtain from the Vigènere Cipher using "SKYWALKER" as the
key and "KYLO" as the ciphertext? "SONS". Sons!!!
This suggests the Knights of Ren are the "Sons of Padmé", a rightful
name for a secret society started by Padme's widower!
I learnt about all of this by watching this Youtuve Video [5] by
Patrick Haney so kudos to him or to whoever came with the idea of
running the name "Kylo" thru' the Vigènere Cipher.
You can learn more about the Vigénere Cipher in Chapter 19 [6] of the
book "Automating Boring Stuff with Python" [7] available online.
More info here:
[1] https://en.wikipedia.org/wiki/Vigen%C3%A8re_cipher
[2] http://www.retrozap.com/that-time-j-j-abrams-hid-a-book-in-boston/
[3] https://en.wikipedia.org/wiki/Om_mani_padme_hum
[4] http://japanesekanji.nobody.jp/flower/lotus_flower.htm
[5] https://www.youtube.com/watch?v=f5xzDKpwWVo
[6] https://inventwithpython.com/hacking/chapter19.html
[7] http://amzn.to/1PoZ83B
"""
from itertools import starmap, cycle
def decrypt(message, key):
"""Implements Vigenère cypher description"""
def dec(c,k):
return chr(((ord(c) - ord(k)) % 26) + ord('A'))
return "".join(starmap(dec, zip(message, cycle(key))))
if __name__ == '__main__':
assert decrypt(message="KYLO", key="SKYWALKER") == "SONS"
@gnrfan
Copy link
Author

gnrfan commented Nov 11, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment