react-nativecryptographymd5password-hashcryptographic-hash-function

decrypt ,md5 encrypt data in react native


I want to know, how can I decrypt, md5 encrypt data in react native. May you help me. I can't fine any tutorial in web. I added md5 library for encrypt but I can't decrypt that cod. If you know about encrypt too, please explain that. How can I use in react native cod. Thanks


Solution

  • MD5 is not an encryption algorithm! It is a message-digest algorithm used as a hash function.

    Cryptographic hash functions are one-way, deterministic, compression functions that behave randomly.

    The MD5 pre-image resistance theoretically is broken bu not practically. Instead of the generic preimage attack with 2128 complexity, there is an attack that requires 2123.4 complexity. MD5, however, is not practically broken. You cannot reach the 123-bit search space in a meaningful time. Consider the collective power of BitCoin miners; in 2020/1/17 they reached 126.1314 Exahashes per second, that makes

    However, you can find collisions for MD5. There are two good libraries two produce collisions; corkami or hashclash

    For encryption, use AES or ChaCha20 with proper modes like AES-GCM or AES-GCM-SIV and ChaCha20-Poly1305 bot provides authenticated encryption that you will get Confidentiality, Integrity, and authentication.