picoCTF str_xor Function Explained (XOR Cypher)

Поделиться
HTML-код
  • Опубликовано: 1 апр 2022
  • This video explains an advanced encryption function that is used in at least 10 picoCTF challenges most of whom are for beginner students.
    Link to code in the video:
    replit.com/@SanjinDedic/xorex...
    More picoCTF videos:
    PicoCTF General Skills part 1:
    • picoCTF General Skills...
    picoCTF General Skills part 2:
    • PicoCTF General Skills...
    SOCIAL:
    Twitter: / sanjindedic
    Facebook Page: / headstartacademyau
    WEBSITES
    www.headstartacademy.com.au/
    robotix.com.au/
    About me
    I have been a technology enthusiast from as long as I can remember with a special love for robots. I completed my Robotics degree at A.N.U and majored in Computer Vision. In 2012 after 5 years working as a Design Engineer, I decided to get into education. My first passion was bringing Arduino Programming and 3D printing to schools but I as the years went by Python became my new favourite toy for creating text based applications like chatbots and 2D games. Since 2015 I have been teaching part time while authoring books and online courses used by tens of thousands of students across Australia as well as doing extensive teaching training in collaboration with Digital Learning and Teaching Victoria.
    About Head Start Academy
    I believe that coding is an extremely useful and universally valued skill. Today most students in Australia experience some coding in school or in after school programs. Some students enjoy it immensely and are left wanting more, these are the students I want to help. My goal is to build on that enthusiasm, introduce them to like minded peers and help them learn the skills and habits that will set them on a path to excellence in Computer Science.
    In our classes students will experience the following:
    • Small group learning: 6 - 12 students
    • Instruction from an educator who has university level qualifications in both education and Digital Technologies
    • Minute by minute peer and instructor feedback on their code
    • Lifetime access to learning materials (videos + pdf guides) for all the content covered
    • Research skills and best practice use of coding websites like Stack Overflow and GitHub
  • НаукаНаука

Комментарии • 6

  • @thienchi1147
    @thienchi1147 8 месяцев назад

    nice content, thank u

  • @tonyitalia7798
    @tonyitalia7798 2 года назад

    Thank's you.
    Like this.

    • @SanjinDedic
      @SanjinDedic  2 года назад

      Happy to help! I thought that this code was too complicated for an easy challenge so I made this to explain it, hopefully the XOR stuff makes a bit more sense now

  • @adryelgainza1686
    @adryelgainza1686 2 года назад

    I have one question. What is the "return "".join([chr(ord(secret_c) ^ ord(new_key_c)) for (secret_c,new_key_c) in zip(secret,new_key)])
    " doing? Is this the actual implementation of xor?

    • @SanjinDedic
      @SanjinDedic  2 года назад +1

      Yes it is the implementation ord(secret_c )^ord(new_key_c) actually does the xor and returns an ineger value (which I keep representing in binary) the for loop simply cycles through the charcters in secret and the characters in message
      If I wrote that code myself in a way that is meant to be understood I would use 5 lines instead they used 2 variable for loops, list comprehensions and multiple operations all on one line

    • @adryelgainza1686
      @adryelgainza1686 2 года назад

      @@SanjinDedic Oh alright thank you!