Skip to content

⚡️ A cryptocurrency, crypto-currency, or crypto is a collection of binary data which is designed to work as a medium of exchange. ... Cryptocurrencies are generally fiat currencies, as they are not backed by or convertible into a commodity. Some crypto schemes use validators to maintain the cryptocurrency.

License

Notifications You must be signed in to change notification settings

nphausg/cryptocurrency-pbkdf2-sha512-aes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CryptoJS - PBKDF2 - SHA512 - AES

-----------------------------------------------------

✔️ 1. PBKDF2

PBKDF2 is a password-based key derivation function. In many applications of cryptography, user security is ultimately dependent on a password, and because a password usually can't be used directly as a cryptographic key, some processing is required. A salt provides a large set of keys for any given password, and an iteration count increases the cost of producing keys from a password, thereby also increasing the difficulty of attack.

✔️ 2. SHA-2

SHA-2 (Secure Hash Algorithm 2) is a set of cryptographic hash functions designed by the United States National Security Agency (NSA) and first published in 2001.[3][4] They are built using the Merkle–Damgård construction, from a one-way compression function itself built using the Davies–Meyer structure from a specialized block cipher

✔️ 3. AES

The Advanced Encryption Standard (AES), also known by its original name Rijndael is a specification for the encryption of electronic data established by the U.S. National Institute of Standards and Technology (NIST) in 2001.[4]

🚀 Encrypt

Using PBKDF2 to generate key derivation:

let encryptedKey = CryptoJS.PBKDF2(password, salt, { hasher: CryptoJS.algo.SHA512, keySize, iterations });

Using AES with custom IV to encode

let encryptedMessage = CryptoJS.AES.encrypt(planText, encryptedKey, { iv: iv });

🚀 Decrypt

Using PBKDF2 to generate key derivation:

let decryptedKey = CryptoJS.PBKDF2(password, salt, { hasher: CryptoJS.algo.SHA512, keySize, iterations });

Using AES with custom IV to decode

let decryptedMessage = CryptoJS.AES.decrypt(encryptedMessage, decryptedKey, { iv: iv });

-----------------------------------------------------

✨ Contributing

Please feel free to contact me or make a pull request.

👇 Authors

Copyright (c) $today.year . All rights reserved.
Last modified $file.lastModified

About

⚡️ A cryptocurrency, crypto-currency, or crypto is a collection of binary data which is designed to work as a medium of exchange. ... Cryptocurrencies are generally fiat currencies, as they are not backed by or convertible into a commodity. Some crypto schemes use validators to maintain the cryptocurrency.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages