Christian T Public Key

Public Key
0c680b9e7c9a6f96b473ac1b79de1939b4f4c858f73263b5e8f4e5ee0951dce6fcb1f9bfd4c788d6c4a16d89b55939218e57e972a40597542fb97a866bc3befd

Address
80ae2c68110b7caa0f7942604e2d7e68c454d4be

*Note: I had an wrong address due to a wrong keccak usage. If you are using the keccak online tools, follow this steps *
Convert the hexadecimal string in file “pub” to a binary file using xxd (part of vim).
xxd -r -p pub pub.bin
In the online tool, select “File Hash” and Keccak-256. Upload pub.bin. The result is the proper hash
Then tail the result in the address file:
echo “” | tail -c 41 > address

1 Like

This is great, can you make a post on #bc-iot-bootcamp:bc-week-1-theory-background subcategory to help people with encoding issues!

Hello @cthomas!
If you’re looking for an example for how to do the second part of the assignment, please check out this thread: Afzal's Public Key & Address from @afzal and @tintin -

As a reminder here’s step three of this week’s assignment:

Step 3: Send a secret message and decode it with another member of the community. You must use a SHARED SECRET and ALL the information must be published visibly on the community forum.

How will you create that shared secret? Use your creativity!

Perhaps you can use their public keys? So comment on someone else’s public key post and communicate with them. Perhaps you can implement a sort of diffie-hellman shared secret. Agree with them on what could be a common secret with all your communication happening publicly. Write a secret message, (make it worth the trouble, make it fun!) and publish it as a reply to their public key post. If you feel like it you can match with more than one person, perhaps you can replicate a “Whisper-like” protocol. What’s something interesting that becomes possible once you understand and implement a publicly creatbale shared secret?

Just did it… Sorry for the delay

1 Like

Hi @cthomas

Using your publicKey, I have encrypted a message for you to decrypt.

Here is the encrypted message for your next steps:

{iv: “c7adb530be0a5c3a50cba4f7a2440dba”, ephemPublicKey: “041b6bd5d13ef3ba739b5117b5afdb40fdf1186c0765f6fba105f92b974d2d6f68fd1ff9fd8a9d014d2aa358e4a00e99fd4df9db65a3c095d35bc26fbf8b7c39c1”, ciphertext: “e32ded25bec0fd3c0a8525de1b416bd19732c1985cea0075c84092d3440d677fede007bba970dd33f060d1aff11afbc111afe3ab591d6c0f12d32fefe31271a324422fb8fd45d838f4d9a971d3edcca05e2e7b54df879e0b9fd8c0f6aa07acba073f487e3d073d22a00c9726679bc6ccbd3339f024a5cde126c3c9885571301957012ce5d6bb805e8cd00a72634a2161d8e1a050797d40c5a5077467c68763e33e2f82ad67ad384ece25fd47a42eb2faad1bd8130924c6d0f389744a912f864915c948f88a117d789030104f3b62af7d7de85597629e76353c41427b07b20c5d7ed2f4c592c7c3f90d12aed1c06509c9735a9ffe247f0a8ed10280b53a38214644c0dd8cdaf97db6d0cff310ddadd2cb”, mac: “32faa72a6451efad051cba699b8e3727d5c10b20c9e605150cca6da1251b90fa”}

Hey @pkrasam!
Thanks for that. I am going to work on this. So let me see if i understood the principle:

  • We are going to use the Diffie-Hellman key exhange, right?
  • My public key is the common paint or i am heading wrong direction?
1 Like

So this is your public key aka ephemeral public key
ephemPublicKey: “041b6bd5d13ef3ba739b5117b5afdb40fdf1186c0765f6fba105f92b974d2d6f68fd1ff9fd8a9d014d2aa358e4a00e99fd4df9db65a3c095d35bc26fbf8b7c39c1”
This is you message encrypted with a symetric key based on my public key and your private key:
ciphertext: “e32ded25bec0fd3c0a8525de1b416bd19732c1985cea0075c84092d3440d677fede007bba970dd33f060d1aff11afbc111afe3ab591d6c0f12d32fefe31271a324422fb8fd45d838f4d9a971d3edcca05e2e7b54df879e0b9fd8c0f6aa07acba073f487e3d073d22a00c9726679bc6ccbd3339f024a5cde126c3c9885571301957012ce5d6bb805e8cd00a72634a2161d8e1a050797d40c5a5077467c68763e33e2f82ad67ad384ece25fd47a42eb2faad1bd8130924c6d0f389744a912f864915c948f88a117d789030104f3b62af7d7de85597629e76353c41427b07b20c5d7ed2f4c592c7c3f90d12aed1c06509c9735a9ffe247f0a8ed10280b53a38214644c0dd8cdaf97db6d0cff310ddadd2cb”

So @pkrasam what encryption did you use?

Hi @cthomas

You’re directionally right and here are some clues.

You can find my public key and address here: PK’s public key and address

Like others, I am using eth-crypto as well and you can find the source code & tutorials here: eth-crypto

Thanks @pkrasam,
I found the eth-crypto (node) clue in the post from @afzal earlier. In fact I was trying to do it the hard way by following the diffie-Hellman explanation - which I really to try to do as it sounds very interesting - But for this I will do it with the eth-crypto tutorial.
I’ll be back to you soon

Hey @cthomas, I was trying to do things the hard way too! It took me a lot longer than I had thought to get this done, but if you get real stuck I created a sandbox that you may find helpful! See Nathan's public key

I like your direction @cthomas! I think there are some responses to the assignment are missing the idea of creating a diffie-hellman exchange element to create a shared secret and are using the public/private keys already generated to encode and decode - a WORTHY exercise as well although not the original intent :slight_smile:

@pkrasam… Rah Lovely!!!
here is your message
{“message”:“Happy Sunday Christian …No dramas mate …glad you’re able to find a solution for the priv/pub/address”,“signature”:“0xa498b1274ebff4341e90c9c124f836b6f37c75c3a377b5b76b77eec5377a78ef1da77fd7db909156337dc4b885d8992d3689e8573dcc1bdf306e1b796a5b8df11c”}
took me forever to find out the JSON was not correct. After I copy and paste from here.
Thanks also to @nathanjmartin for the snippet: I was just trying to use ciphertext and not the whole JSON…

1 Like

And to end on a victory note, my message to you
{“iv”:“811ff7545021c630bc61e1417da92c44”,“ephemPublicKey”:“04cb0d3683833ef37e4e1034d2fa7cdbb1cbec100d5822fa800864dd22dcccf65543bc1c6ad818b25ce61884e4b1e3f3e1ebacda9b124b4023ca60bd7c57660fa4”,“ciphertext”:“6dc158369e14f4d34201261649d7fca6e6027d0c29d5d99a7bde6b88ce682c75a85d9b324e7d8bfec09d40ad1a04744d1793935b65e45a8d62b195fa7f7702abfac9a0fd993ce7a5ab7ab01fe79592c54668e69ff8b8f0d2401c46734528c0a62093bdee2749413fcd02aa42ba263448fa2d32825b04b50600d63fbb7a5953ba3d1fa24a2536316e7bc7fc1f6a5dfc865bb0573d17ccac3399c30edb22fd1b3435d09b0fc7ab4f3d59069d9ae07927d6bbf63078ea31b209b2b5bde2d320beff32fb5265a4a4ec5f1431939d0bcc3ce5f9dcf405ed591737a1da645fb903d594f53cd1bfc9510889d3ea346d39d867d4”,“mac”:“a2a61976d3aca8c573b5d71cf904ef4403ff928fadf2c41ff8d0bf1e5a6131d1”}

1 Like

Christian!! I sent you an Exploding Kitty!!!
https://ropsten.etherscan.io/tx/0x5778169c120bbec7d8387bc185df1fc92ffb17e6bf97e01c316214717d0f0ded
You have 24 hours to follow up with these instructions from @nathanjmartin!

Hahaaaa!

1 Like

Original kitties for you! https://ropsten.etherscan.io/tx/0xbd1f6db1d9c26d4ea3f2f493fe9a2fb26925a9a6b2bcb370f71282b7a2c92df7

Sorry guys! This independence day week pull me off the ELK bootcamp…
I am bck now and following the week 2 video. I’ll try to catch today with week 3

1 Like

Lovely to catch up with you!