Blockchain tutorial 31: Base-32 encoding

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ก.พ. 2025
  • If you like this video and want to support me, go this page for my donation crypto addresses:
    / mobilefish
    This is part 32 of the Blockchain tutorial.
    In this video series different topics will be explained which will help you to understand blockchain.
    It is recommended to watch each video sequentially as I may refer to certain Blockchain topics explained earlier.
    In this tutorial I will explain how the base-32 encoding works.
    Base-32 is basically a way of encoding arbitrary binary data in ASCII text.
    A base-32 encoded value only contains uppercase letters, digits and the equal sign as padding.
    Such a value (excluding padding) can be included in a URL without encoding any characters.
    Base-32 encoding schemes uses the 26 uppercase letters A-Z, and the digits 2-7.
    This encoding scheme is defined in RFC 4648, see: tools.ietf.org...
    The 0 and 1 are skipped due to their similarity with the letters O and I.
    For example lets base-32 encode the word "Cat".
    Cat in ASCII decimal values = [67, 97, 116]
    Cat in binary format = [01000011, 01100001, 01110100]
    Step 1: Convert an input byte stream into a group of 5 bytes.
    If there are less than 5 bytes, at the end, pad additional empty bytes.
    Group = [01000011, 01100001, 01110100, xxxxxxxx, xxxxxxxx]
    Step 2. Divide this group into 8 chunks of 5 bits.
    Chunks = [01000, 01101, 10000, 10111, 0100x, xxxxx, xxxxx, xxxxx]
    Step 3. If a chunk has both actual bits and empty bits, replace the empty bits with 0’s.
    Chunks = [01000, 01101, 10000, 10111, 01000, xxxxx, xxxxx, xxxxx]
    Step 4. Convert each 5 bits chunk to its decimal value (0-31).
    If a 5 bits chunk contains empty bits replace with character ‘=’.
    Chunks = [8, 13, 16, 23, 8, =, =, =]
    Step 5. In the base-32 symbol chart, map each decimal value to its corresponding character.
    Chunks = [I, N, Q, X, I, =, =, =]
    Step 6. The word “Cat” base-32 encoded is “INQXI===”
    Check out all my other Blockchain tutorial videos:
    • Blockchain tutorial
    Subscribe to my TH-cam channel:
    / @mobilefish
    The presentation used in this video tutorial can be found at:
    www.mobilefish...
    #mobilefish #blockchain #bitcoin #cryptocurrency #ethereum

ความคิดเห็น • 14

  • @timursaadak6637
    @timursaadak6637 5 ปีที่แล้ว +3

    Finished the whole course and want to thank the author!

    • @Mobilefish
      @Mobilefish  5 ปีที่แล้ว +1

      You're welcome.

  • @fredysmuriel9233
    @fredysmuriel9233 4 ปีที่แล้ว +1

    Thanks man, you just helped me with my midterm exam. You have a new subscriber and new like.

  • @MickaelJi
    @MickaelJi 3 ปีที่แล้ว

    Great work please continue 🙏 may you will have some gratification from faith

  • @noanyobiseniss7462
    @noanyobiseniss7462 10 หลายเดือนก่อน +1

    Monero Devs have proposed moving from base-58 to base-32.
    Could you make a video on the differences as well as any security issues that may arrive?

  • @hatema
    @hatema 4 ปีที่แล้ว +1

    Thanks man that was really helpful. The actual IETF article made sound so complicated smh

  • @SS-605
    @SS-605 4 ปีที่แล้ว +1

    Hi Professor, Please make videos on hyperleger fabric.

  • @minghualiu7693
    @minghualiu7693 5 ปีที่แล้ว +2

    Great explanation. Quick question here, does it have to add zero up to 5 bytes over the original data? What if the original data is more than 5 bytes? How will base32 work?

    • @Mobilefish
      @Mobilefish  5 ปีที่แล้ว +4

      Example: CatCat
      Binary format:
      [01000011, 01100001, 01110100, 01000011, 01100001, 01110100]
      Group of 5 bytes:
      [01000011, 01100001, 01110100, 01000011, 01100001] [01110100, xxxxxxxx, xxxxxxxx, xxxxxxxx, xxxxxxxx]
      8 chunks of 5 bits:
      [01000, 01101, 10000, 10111, 01000, 10000, 11011, 00001]
      [01110, 100xx, xxxxx, xxxxx, xxxxx, xxxxx, xxxxx, xxxxx]
      If a chunk has both actual bits and empty bits, replace the empty bits with 0’s:
      [01000, 01101, 10000, 10111, 01000, 10000, 11011, 00001]
      [01110, 10000, xxxxx, xxxxx, xxxxx, xxxxx, xxxxx, xxxxx]
      Convert each 5 bits chunk to its decimal value (0-31).
      If a 5 bits chunk contains empty bits replace with character ‘=’
      [8, 13, 16, 23, 8, 16, 27, 1]
      [14, 16, =, =, =, =, =, =]
      In the base-32 symbol chart, map each decimal value to its corresponding character
      If a 5 bits chunk contains empty bits replace with character ‘=’
      [I, N, Q, X, I, Q, 3, B]
      [O, Q, =, =, =, =, =, =]
      CatCat in base32 is: INQXIQ3BOQ======

  • @smoke12316
    @smoke12316 ปีที่แล้ว

    isn't it supposed to be INAVI===?
    in converting CAT ASCII to binary you make error.
    cat is 01000011 01000001 01010100

  • @3dmodeloswarcraftreforged59
    @3dmodeloswarcraftreforged59 4 ปีที่แล้ว +1

    Hello friend, something to communicate with you is that I want to send you a file to see if you can remove the encryption

    • @Mobilefish
      @Mobilefish  4 ปีที่แล้ว

      For legal reasons do not send me any files for me to remove the encryption. By the way removing encryption is NOT EASY and probably impossible to achieve.

  • @syedafzal9964
    @syedafzal9964 6 ปีที่แล้ว +1

    Hi sir Thank you for the your best video but I have a little Dot in Step 4 . How we convert in decimal values.
    Plz sir tell me
    Thank you again.

    • @jefflee9062
      @jefflee9062 6 ปีที่แล้ว

      We use "8" to represent eight in decimal, meanwhile we use "01000" to represent eight in binary.
      We have got binary numbers in step 3; What step 4 do is turning binary numbers from step 3 into decimal number.
      That's why "01000"->"8".