pico2024 C3
Summary
TLDRThe video script discusses a custom cyclical cipher for encrypting and decrypting messages. It explains the process of downloading cipher text and encoder, and submitting the flag 'pcctf{example}' if the flag is 'example'. The script describes the decryption method involving character lookup and computing differences between character indices. The video concludes with a Python script that can decrypt the cipher, suggesting the flag might be 'PicoCTF{adlib}'.
Takeaways
- 🔐 The script is about a custom cyclical cipher used for encryption.
- 📄 The cipher text and encoder can be downloaded for use.
- 🏁 The flag format is 'pcctf{example}' if the flag was 'example'.
- 🔑 The encryption scheme relies on a secret encoder.
- 🔡 The cipher text consists of a mix of uppercase and lowercase letters.
- 🔄 The encoder involves a lookup process and character index manipulation.
- 🤖 A decoder script is created to reverse the encoding process.
- 🔄 The decoder computes the difference between characters and uses lookup tables.
- 🔢 The process involves subtracting and then adding back values from lookup tables.
- 💻 The final step is to run a Python program that takes itself as input to reveal the flag.
- 🏴☠️ The flag is revealed to be 'PicoCTF{adlib}' after running the Python program.
Q & A
What is the custom cyclical Cipher mentioned in the transcript?
-The custom cyclical Cipher is a cryptographic algorithm that involves encoding text using a specific method, which in this case, involves downloading a cipher text and an encoder.
How is the flag supposed to be submitted according to the transcript?
-The flag should be submitted in a specific format, such as 'pcctf{example}' if the flag was 'example'.
What is the significance of the flag format in the context of the cipher?
-The flag format is important because it indicates the expected structure of the output after decryption, but the actual decryption process does not depend on the encoder being secret.
What is the nature of the cipher text mentioned in the transcript?
-The cipher text consists of a collection of uppercase and lowercase letters.
What is the role of the encoder in the decryption process described in the transcript?
-The encoder is used to encode the text before it is encrypted. The transcript suggests that a decoder script is needed to reverse the process.
What does the process of looking up and subtracting in the cipher involve?
-The process involves finding the index of a character in a lookup table and then subtracting it from the index of the previous character to compute the difference.
Why is it necessary to swap certain elements in the decoder script according to the transcript?
-Swapping elements in the decoder script is necessary to reverse the encoding process, which involves reversing the operations performed by the encoder.
What is the purpose of creating a decoder script as described in the transcript?
-The purpose of creating a decoder script is to decrypt the encoded text back to its original form.
How does the difference between characters in the cipher relate to the decrypted output?
-The difference between characters, when computed and added back, helps to retrieve the original character from the cipher text.
What is the significance of the 'self input' mentioned in the transcript?
-The 'self input' suggests that the Python program requires its own code as input to function correctly, which is an unusual requirement and part of the challenge.
What is the final flag obtained from the Python program as per the transcript?
-The final flag obtained from the Python program is 'Pico CTF{adlib}' after following the described decryption process.
Outlines
🔐 Custom Cyclical Cipher Decryption
The paragraph discusses a custom cyclical cipher and provides instructions on how to download the cipher text and encoder. It mentions that the flag format is 'pcctf{example}' and emphasizes that while flag formats are usually not secret, this cipher's encoder is. The text is a mix of uppercase and lowercase letters. The process involves looping through characters, finding their index, and using two lookup tables to compute the difference between the current and previous characters. The aim is to create a decoder script by swapping elements in the lookup tables. The paragraph also suggests that the difference between characters can be used to decrypt the text, and a Python script is proposed to achieve this. The final flag is deduced to be 'picctf{adlib}'.
Mindmap
Keywords
💡Cyclical Cipher
💡Flag
💡Encoder
💡Decryption
💡Lookup
💡Index
💡Character
💡Python
💡Self Input
💡Context
💡Difference
Highlights
Introduction to the custom cyclical Cipher
Instructions to download cipher text and encoder
Details on how to enclose the flag for submission
Mention that the flag format is 'pcctf{example}'
Explanation that the flag format does not assist with decryption
Discussion on the dependency of the cipher on the encoder's secrecy
Description of the cipher text composition
Process of creating a decoder script
Attempt to swap elements in the cipher
Explanation of the lookup process in the cipher
Strategy to compute the difference from the previous letter
Observation of the pattern in the cipher text
Proposal to look up the difference and add it back
Construction of a variable to hold the character for decryption
Success in decrypting the cipher text
Requirement for a Python program to take self-input
Execution of the Python program with self-input
Revelation of the flag 'Pico CTF{adlib}'
Transcripts
C3 this is the custom cyclical Cipher uh
download the cipher text here download
the encoder here enclose the flag and
our wrapper for submission if the flag
was example you would submit pctf
example all right so um the flag
format's not going to help us with
decryption on our crypto schemes don't
depend on the encoder be secret but this
one
does right so let's grab those
all right so our safer text is a
collection of uppercase lowercase
letters let's go ahead and grab that
encoder
oops Okay so so we have a couple lookup
things we Loop through the characters we
find the
index character and lookup one we
subtract it from the
previous index that into look up
two all right
well try to create
a decoder
script Okay so
let's maybe try just swapping these
things okay
um so I'll say like
Echo ABCD pipe convert. uh
python convert.
py we'll say get rid of that new line OB
BBD Python 3 convert
to.py all right well we're gonna have to
work harder than that
so all right so we looked it
up we looked it up in the first thing
and we subtracted so we're Computing the
difference from the previous letter so
when I do a b c d
b c and d we're all one more which is
why we're getting those Capital B's in
our crypto
thing so I really do think we can just
look up the difference
here we can do but we're going to need
to
add and
then can't say previous this current
because we need it really to be
something from lookup one so we really
need like
look up one. index out BCE the whole
string though
so we'll build a
variable for this
character then we'll add it so we look
up the difference we add it back
in that's going to be the previous one
we added these things up let's try that
so uh
great so that seems to work so
now okay that gave us a Python program
asky order for to character self input
python
2
um so I guess we give this Python
program to itself because it says self
input so
cat file. py pipe and it's python 2 it
says a d l i BS so our flag is I guess
going to be Pico CF a d l i BS
5.0 / 5 (0 votes)