Christian T Public Key

Public Key


*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

1 Like

Christian!! I sent you an Exploding Kitty!!!
You have 24 hours to follow up with these instructions from @nathanjmartin!


1 Like

Original kitties for you!

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!