- ROT13 aka "Rotate by 13"
- Why 13? Because of 13 being mid of 26 alphabets and hence easy to encrypt and decrypt. Similarly for ROT5 for 0-9 numeric characters
- Very simple and easily crackable via frequency analysis
- Requirement:
Crypto.Cipher
module - Remark: Key & Message both must be 16, 24 or 32 bit long.
Example:
Key = '0123456789012345'
Message = 'Dhairya Rockstar'
- Requirement:
Hashlib
module - NOTE: Message to be encrypted should be entered in byte format, example:
md5.update(b'Sample Text')
- Two important functions:
digest()
: Encrypt in byte formathexdigest()
: Encrypt in hexadecimal format. More secured thandigest()
- Different types
SHA
- Increasing complexities ->
sha1
<sha256
<sha512
block_size
and digest_size
functions
- Important to specify
.digest(value)
- Done so as to avoid brute force crack and done to provide more security
Star the repo ⭐️ if you like 😄
Let's connect on