I am an EE student and recently started getting interested in how actually cryptocurrencies work under the hood. I realized that I could even create my own simple currency as a practise and have been meaning to do so. The idea is to make a dummy cryptocurrency that everyone could see inside out and I could use it in some programming presentation I intended to make for a local programming club I used to be a member of
I realized how can I code most of the things, I will make a system for ownly a small number of users, I won't use SHA256 but my own simple hashing algorithm ... The only thing I don't understand is how the "public/private key" thing works. I understand how the hashing function works, but I don't understand how the "verify" function should work.
I already wrote a simple code that will take the message that is supposed to be Hashed (let's say "Hi world") and will take a key, reapeat it 15 times(let's say "keykeykeykeykey") repeat the message the amount of times it needs to fill a 15 character space ("HiHorldHiWorldH") and than do excluse OR between these two 15 char strings . I don't know how could I make some sort of a public key that would be used with the hash to verify the hashing process. Let's say a function V(hashed message, public key, hashed message) = True/False
This video perhaps explains it better, watch from 4:15-6:00
https://www.youtube.com/watch?v=bBC-nXj3Ng4
Does anyone know how could I make such function ? Or perhaps another simple hashing function + a verify function that could work
Even pointing me in a right direction would be of much help
If I can't verify that the hashing took place and that the hash does really come from that users key+message, than my cryptocurrency is useless even in a presentation
I'l try to explain the problem a bit more clearly here
A user needs to have two keys, a public one and a private one
To hash a message, the user will take Hash function (Hash(message, key) = something)
To verify the hashing process , other users will use that persons public key, message and signature(hashed messgae) and put those in a verifying function that would output only True of False
I already made my own simple hash function that does this
Message : HiWolrd
PrivKey: KEK
PubKey: ???
HiWorldHiWorldH XOR
KEKKEKKEKKEK
=
2ÁÂCrrðÒ!¢s’
Does anyone have an idea how to make a public key and a function that will take 2ÁÂCrrðÒ!¢s’ and the PubKey and output HiWorldHiWorldH ? Or perhaps take all three and output True/False
If you're interested in a subject, invest more time into it than what it takes to watch a 10 minute popsci video on YouTube. If you had just browsed Wikipedia for a few hours, you'd already know a thing or two about RSA, ECC, and electronic signatures. There's a bunch of resources out there about cryptography and cryptocurrencies. Don't waste your or anyone else's time by giving into the Dunning-Kruger effect, actually go put some effort into learning.
https://medium.com/@lhartikk/a-blockchain-in-200-lines-of-code-963cc1cc0e54
>>61310067
I am primarily doing this to learn and practise, the presentation thing is just something I wanted to do later