I have already introduce to you about the basics of CRC and CRC-32 here and here. If you don’t know about CRC, please take a look at those guides.
There are some libraries to calculate CRC-32 in Python, 2 of them are: zlib and binascii. Here’re the sample codes:
For applications that require data compression, zlib module allow compression and decompression.
zlib has crc32 method to computes a CRC (Cyclic Redundancy Check) checksum of data. If value is present, it is used as the starting value of the checksum; otherwise, a fixed default value is used.
The algorithm is not cryptographically strong, and should not be used for authentication or digital signatures. Since the algorithm is designed for use as a checksum algorithm, it is not suitable for use as a general hash algorithm.
zlib.crc32(str.encode('hello from loitools.com'))
A cyclic redundancy check (CRC) is an error-detecting code designed to detect accidental changes to raw computer data, and is commonly used in digital networks.
A CRC32 algorithm typically takes in a file stream or character array and calculates an unsigned long codeword from the input.
One can transmit this codeword and re-calculate it on the receiver end, then compare it to the transmitted one to detect an error.
Types of CRC
The most commonly used polynomial lengths are:
CRC-8: 9 bits
CRC-16: 17 bits
CRC-32: 33 bits
CRC-64: 65 bits
Data length and CRC Length
The math is pretty simple. An 8-bit CRC boils all messages down to one of 256 values. If your message is more than a few bytes long, the possibility of multiple messages having the same hash value goes up higher and higher.
A 16-bit CRC, similarly, gives you one of the 65,536 available hash values. What are the odds of any two messages having one of these values?
A 32-bit CRC gives you about 4 billion available hash values.
A Base64 encoder is, basically, a way of encoding arbitrary binary data in ASCII text. It takes 4 characters per 3 bytes of data, plus potentially a bit of padding at the end.
Essentially each 6 bits of the input is encoded in a 64-character alphabet. The “standard” alphabet uses A-Z, a-z, 0-9 and + and /, with = as a padding character. There are URL-safe variants.
When you have some binary data that you want to ship across a network, you generally don’t do it by just streaming the bits and bytes over the wire in a raw format. Why? Because some media are made for streaming text. You never know – some protocols may interpret your binary data as control characters (like a modem), or your binary data could be screwed up because the underlying protocol might think that you’ve entered a special character combination (like how FTP translates line endings).
So to get around this, people encode the binary data into characters. Base64 is one of these types of encodings.
Base64 can be used in a variety of contexts:
Evolution and Thunderbird use Base64 to obfuscate e-mail passwords
Base64 can be used to transmit and store text that might otherwise cause delimiter collision
Base64 is often used as a quick but insecure shortcut to obscure secrets without incurring the overhead of cryptographic key management
Spammers use Base64 to evade basic anti-spamming tools, which often do not decode Base64 and therefore cannot detect keywords in encoded messages.
Base64 is used to encode character strings in LDIF files
Base64 is sometimes used to embed binary data in an XML file, using a syntax similar to …… e.g. Firefox’s bookmarks.html.
Base64 is also used when communicating with government Fiscal Signature printing devices (usually, over serial or parallel ports) to minimize the delay when transferring receipt characters for signing.
Base64 is used to encode binary files such as images within scripts, to avoid depending on external files.
Can be used to embed raw image data into a CSS property such as background-image.
A hash function takes an arbitrary string as input then it produces an output that is fixed in length called Message Digest or Hash Value or just Hash.
So, SHA-256 is a hash function that always produces 256 bit long output.
What is SHA?
SHA stands for “Secure Hash Algorithm” is an algorithm to produce hash output from an input.
Its enhanced version is called SHA-1. The algorithm offers five separate hash functions which were created by National Security Agency (NSA) and were issued by the National Institute of Standards and Technology (NIST).
MD4, MD5, SHA-256, SHA-512
An n-bit hash is a map from arbitrary length messages to n-bit hash values.
Current popular hashes produce hash values of length n = 128 (MD4 and MD5) and n = 160 (SHA-1)
An n- bit cryptographic hash is an n-bit hash which is one-way and col lision-resistant. Therefore above hashes can provide no more than 64 or 80 bits of security, respectively, against collision attacks.
SHA-256 is a 256-bit hash and is meant to provide 128 bits of security against collision attacks.
SHA-512 is a 512-bit hash, and is meant to provide 256 bits of security against collision attacks.
SHA-1 (short for Secure Hash Algorithm 1) is one of several cryptographic hash functions.
SHA-1 is most often used to verify that a file has been unaltered. This is done by producing a checksum before the file has been transmitted, and then again once it reaches its destination.
Vulnerabilities of the SHA Hash Function
SHA-1 is only one of the four algorithms in the Secure Hash Algorithm (SHA) family. Most were developed by the US National Security Agency (NSA) and published by the National Institute of Standards and Technology (NIST).
SHA-0 has a 160-bit message digest (hash value) size and was the first version of this algorithm.
SHA-1 is the second iteration of this cryptographic hash function. SHA-1 also has a message digest of 160 bits
SHA-2 is stronger than SHA-1 and attacks made against SHA-2 are unlikely to happen with current computing power.
As I has already introduced about MD5 that explained about what MD5 is? its history with pros and cons, then you can see that MD5 is non-reversible. So why you still see MD5 Decrypter on the internet?
How MD5 decrypter works?
They (MD5 decrypters) are not really doing any reversal with your given MD5 String.
They actually register all kind of string that users have entered and the MD5 output into a database, then, when user take a look a MD5 hash decrypter, they look up in the database to see if there are any recored with that MD5 hash.
So it should be called MD5 Lookup.
Then with those explanation, you can see that all kind of MD5 Decrypters only work for some common phrases or you are betting on your luck.