Is there a way I can hash a string? I have already made a salt generator. Any ideas? I know how to store the salt and rehash the string to check if the password is correct, but how do I apply the hash and salt to the string?
Offline
Try a simple one. Start by taking apart the string into a list. When doing this, put it against a ascii to convert to binary. Once in binary, using hashing techniques. For a real world example, you could refer to this wikipedia page on MD5 - http://en.wikipedia.org/wiki/MD5#Algorithm Once implemented, you can hash a string with MD5 (or any algorithm of your choice) However, you must code in a truth table so you can do bitwise operations.
Offline
Yeah, that is why I explained that you needed to separate the string into binary, with a table. Should I post a project showing that type thing?
Offline
Alright. I gotta build a table though. (with a C program, of course!)
Offline
bobbybee wrote:
Alright. I gotta build a table though. (with a C program, of course!)
So how does hashing work exactly?
All I can find is how salts are created and stored within the hashed password.
Offline
Did you read the page on wikipedia I linked earlier? Also, I put the binary project online (assuming I didn't make any careless mistakes).
Offline
Do you know bitwise operations?
Offline
SeptimusHeap wrote:
I understand very little of that article
![]()
Sorry if this seems spammy, but is the block library dead?
I remember you as a dev, am I right? Or was that a mod, or website...
Anyways, is it dead?
Offline
G0D_M0D3 wrote:
SeptimusHeap wrote:
I understand very little of that article
![]()
Sorry if this seems spammy, but is the block library dead?
I remember you as a dev, am I right? Or was that a mod, or website...
Anyways, is it dead?
I was a Panther dev.
And yes, Sparks still updates the library.
bobbybee wrote:
Do you know bitwise operations?
Nope.
Offline
SeptimusHeap wrote:
G0D_M0D3 wrote:
SeptimusHeap wrote:
I understand very little of that article
![]()
Sorry if this seems spammy, but is the block library dead?
I remember you as a dev, am I right? Or was that a mod, or website...
Anyways, is it dead?I was a Panther dev.
And yes, Sparks still updates the library.bobbybee wrote:
Do you know bitwise operations?
Nope.
Hashing isnt the best way. I first thought of that, but there are plent of hash decrypters. Infact, I think you should encrypt it yourself
I got the awesome idea.
If someone manages to get to the project, create a hidden sprite, and put all the decrypting stuff there, that way, it would be almost impossible to decrypt.
Offline
Servine wrote:
SeptimusHeap wrote:
G0D_M0D3 wrote:
Sorry if this seems spammy, but is the block library dead?
I remember you as a dev, am I right? Or was that a mod, or website...
Anyways, is it dead?I was a Panther dev.
And yes, Sparks still updates the library.bobbybee wrote:
Do you know bitwise operations?
Nope.
Hashing isnt the best way. I first thought of that, but there are plent of hash decrypters. Infact, I think you should encrypt it yourself
I got the awesome idea.
If someone manages to get to the project, create a hidden sprite, and put all the decrypting stuff there, that way, it would be almost impossible to decrypt.
Servine, if you hash using a salt, it's near impossible to decrypt if you hide the salt (as I plan to do)
Offline
SeptimusHeap wrote:
Servine wrote:
SeptimusHeap wrote:
G0D_M0D3 wrote:
Sorry if this seems spammy, but is the block library dead?
I remember you as a dev, am I right? Or was that a mod, or website...
Anyways, is it dead?I was a Panther dev.
And yes, Sparks still updates the library.
Nope.Hashing isnt the best way. I first thought of that, but there are plent of hash decrypters. Infact, I think you should encrypt it yourself
I got the awesome idea.
If someone manages to get to the project, create a hidden sprite, and put all the decrypting stuff there, that way, it would be almost impossible to decrypt.Servine, if you hash using a salt, it's near impossible to decrypt if you hide the salt (as I plan to do)
Well just saying. Its much easier to just encrypt it yourself.
Offline
Servine wrote:
SeptimusHeap wrote:
Servine wrote:
Hashing isnt the best way. I first thought of that, but there are plent of hash decrypters. Infact, I think you should encrypt it yourself
I got the awesome idea.
If someone manages to get to the project, create a hidden sprite, and put all the decrypting stuff there, that way, it would be almost impossible to decrypt.Servine, if you hash using a salt, it's near impossible to decrypt if you hide the salt (as I plan to do)
Well just saying. Its much easier to just encrypt it yourself.
Bobby? nxIII? Can someone help me?
Offline
Cryptographic hashes (such as SHA-512) are completely irreversible methods.
For example you have no way of knowing (except by randomly hashing things until you get the same hash as me - still not completely guarenteed to be my thing although most likely) what the hash was created from.
For example, try and find out what this hash is.
90826c19fd410c7a0460486936da33f62e2c75107df43954f96722e30b3449a0e5f51bb6a635776b3e38bc7a040b0d4c97507f3678709693f1536e6b123f03ba
It is a SHA-512 hash in hexadecimal form.
Offline
@rookwood101
Thanks for clearing it up for him. Perhaps I'm just not a good explainer.
Offline
rookwood101 wrote:
Cryptographic hashes (such as SHA-512) are completely irreversible methods.
For example you have no way of knowing (except by randomly hashing things until you get the same hash as me - still not completely guarenteed to be my thing although most likely) what the hash was created from.
For example, try and find out what this hash is.
90826c19fd410c7a0460486936da33f62e2c75107df43954f96722e30b3449a0e5f51bb6a635776b3e38bc7a040b0d4c97507f3678709693f1536e6b123f03ba
It is a SHA-512 hash in hexadecimal form.
I know. That's the point.
This is what I want:
Say user Steve makes an account on my program with inputs:
Username: "Steven6"
Password: "Ilovefido"
My program will create a random salt, for Steve it's "ug78al". How would I hash "Ilovefido" in Scratch using the salt "ug78al"? I know how to place the salt in the final product so that it can be accessed by my client while looking innocent, but how exactly do I hash the original password with the salt?
Offline
Sorry about my lack of knowledge in the field, guys. Could anyone explain it in terms that I would understand? I have very little knowledge in the field of data storage and the like. I really only understand the salt part.
Offline
Servine wrote:
SeptimusHeap wrote:
Servine wrote:
Hashing isnt the best way. I first thought of that, but there are plent of hash decrypters. Infact, I think you should encrypt it yourself
I got the awesome idea.
If someone manages to get to the project, create a hidden sprite, and put all the decrypting stuff there, that way, it would be almost impossible to decrypt.Servine, if you hash using a salt, it's near impossible to decrypt if you hide the salt (as I plan to do)
Well just saying. Its much easier to just encrypt it yourself.
It's easier, but not secure
Offline
SeptimusHeap wrote:
Say user Steve makes an account on my program with inputs:
Username: "Steven6"
Password: "Ilovefido"
My program will create a random salt, for Steve it's "ug78al". How would I hash "Ilovefido" in Scratch using the salt "ug78al"? I know how to place the salt in the final product so that it can be accessed by my client while looking innocent, but how exactly do I hash the original password with the salt?
Normally, you combine the password with the salt and then pass them together to the hashing algorithm. For example, in Python:
>>> from hashlib import md5 >>> password = "Ilovefido" >>> salt = "ug78al" >>> md5(password + salt).hexdigest() 'fea0f1f6fede90bd0a925b4194deac11'
For the hash to be useful, you need to have the salt as well (I assume you know this already; but for example: you might store the hash inside a PHP file that checks the user's password against a database. The password + salt is hashed, and the hash is stored in the database, not the plaintext password. If an attacker finds out the salt, then brute-forcing the hashes becomes much easier.)
The hard part in Scratch is the hashing function itself, such as MD5. From what I understand, you're trying to implement a hashing algorithm inside Scratch, which could be very difficult, unless you mod Scratch (you could create an MD5 block!
)
Bobbybee's letter to binary that he mentioned might be a good start.
Have a look at this — it seems to have a good explanation, and might have some simple hash functions you can use.
Hope some of that helps!
Offline
Somebody understands what I was trying to teach him....
Offline
Here you go! I made a little simple rotating hash algorithm in BYOB, based off the article I found. I'm sure you could do it in normal Scratch, too; it'd just take longer to code.
Here's the BYOB file, and screenshots of the hashing algorithm and the xor function.
(Just to warn you; it is a little slow, and I expect it would be slightly slower still in Scratch, despite it being the "simplest acceptable algorithm", according to that article.)
Hope that helps!
Last edited by blob8108 (2012-01-16 07:14:24)
Offline