DEV Community

Cover image for Day-1: Understanding Base64
FENIL SHAH
FENIL SHAH

Posted on • Updated on

Day-1: Understanding Base64

Same as other students who want to become software engineer or full stack developer I decided to start my journey in website hacking/pentesting, I'll be posting everyday what I learnt that particular day! The motive of doing this is simple which is to share knowledge. Maybe my daily blogging may help people who want to do the same as me but donno where to start with and also in the other way this will help me to keep tracking of my learnings!

About me: I'm Fenil Shah(18), I'm a security enthusiast as well as a Mozillian. Currently pursuing Bachelor of Computer Application (Second Year).


Day-1: Before moving on to different types of vulnerability I am starting with concepts of website or say how the internet works or types of encryptions and tokens used!

Today I read a blog of Vickie Li in which she explains what base64 encoding is, how to identify the base64 string, how does base64 work, decoding it and other base64 implementations!

Base64 is a binary to ASCII encoding scheme. The pilot use case of base64 is to transmit data across different machines.

This is how base64 encoded string looks like,
eg: SGVsbG8gZGV2enohCkhvcGUgeW91J2xsIGFyZSBkb2luZyB3ZWxsIQ==

- Upper case alphabet characters A-Z.
- Lower case alphabet characters a-z.
- Number characters 0–9.
- Characters + and /.
- The = character is used for padding.
Enter fullscreen mode Exit fullscreen mode

Each Base64 digit represents exactly 6 bits of data. The = padding character is added so that the last encoded block will have four base64 characters.

What is it used for?

  • Data transmission
  • File embedding
  • Data hashing
  • Cryptography
  • Data obfuscation

How does base64 work?

Base64 encoding converts every three bytes of data into four base64 characters. For more to understand in a practical way, I would suggest to have a look at this video on YouTube.


Resources: https://medium.com/swlh/powering-the-internet-with-base64-d823ec5df747 (You need premium subs to read this blog).
Encoding: You can encode any base64 string here
Decoding: You can Decode any base64 string here
Another Tool for Encoding and Decoding: https://url-decode.com/tool/base64-decode

Got doubts? Contact me on Twitter.
Feedbacks are welcomed, do comment it down below! :)

Top comments (2)

Collapse
 
dpaine20 profile image
David Paine20

Thanks for sharing. And providing the link of medium for the detailed article, and the link of youtube for further understanding. For the base64 decode, here is the tool, I want to suggest
url-decode.com/tool/base64-decode
that tool not only provides base64 decode/encode, but you also get access to 100+ web utilities. That will definitely help, and the reader out, in their future projects.

Collapse
 
th3lazykid profile image
FENIL SHAH

Amazeballs! Thanks man for the suggestion as well as feedback! I'll add it to the same!❤️