Ola
These libs are for encryption
Download
Things to note...
I first started looking at hashing on this post, https://www.b4x.com/android/forum/threads/banano-getting-the-md5-hash-of-a-string.112108/#content.
As it stands the MD5 hashing is deprecated to due its risks associated with being crackable (brute force, hashtables etc).
The plus 1 on this thread is taking a look at bcrypt.
Let's add this to our BANano Project:
These libs are for encryption
Download
Things to note...
- DO NOT USE MD5, SHA1 for your secure applications e.g. ditigal signatures
- YOU CAN USE SHA-2 i.e. SHA256, SHA512
- ANY HASH IS CRACKABLE, (EASIER FOR MD5 and SHA1) AND MORE HARDER IF IT HAS A "SALT"
- THE MOST ADVANCED ENCRYPTION IS BCRYPT.
What is a CHF?
A cryptographic hash function (CHF) is a hash function that is suitable for use in cryptography. It is a mathematical algorithm that maps data of arbitrary size (often called the "message") to a bit string of a fixed size (the "hash value", "hash", or "message digest") and is a one-way function, that is, a function which is practically infeasible to invert.[1] Ideally, the only way to find a message that produces a given hash is to attempt a brute-force search of possible inputs to see if they produce a match, or use a rainbow table of matched hashes. Cryptographic hash functions are a basic tool of modern cryptography.[2]
The ideal cryptographic hash function has the following main properties:
- it is deterministic, meaning that the same message always results in the same hash
- it is quick to compute the hash value for any given message
- it is infeasible to generate a message that yields a given hash value
- it is infeasible to find two different messages with the same hash value
- a small change to a message should change the hash value so extensively that the new hash value appears uncorrelated with the old hash value (avalanche effect) [3]
Cryptographic hash functions have many information-security applications, notably in digital signatures, message authentication codes (MACs), and other forms of authentication. They can also be used as ordinary hash functions, to index data in hash tables, for fingerprinting, to detect duplicate data or uniquely identify files, and as checksums to detect accidental data corruption. Indeed, in information-security contexts, cryptographic hash values are sometimes called (digital) fingerprints, checksums, or just hash values, even though all these terms stand for more general functions with rather different properties and purposes. (Wikipedia)
I first started looking at hashing on this post, https://www.b4x.com/android/forum/threads/banano-getting-the-md5-hash-of-a-string.112108/#content.
As it stands the MD5 hashing is deprecated to due its risks associated with being crackable (brute force, hashtables etc).
The plus 1 on this thread is taking a look at bcrypt.
Let's add this to our BANano Project:
B4X:
BANano.Header.AddJavascriptFile("hashes.min.js")
BANano.Header.AddJavascriptFile("bCrypt.js")
Last edited: