paint-brush
Develop blockchain “Trusted Diploma” in 15 minutes. Step by step instructionby@Andrii
2,426 reads
2,426 reads

Develop blockchain “Trusted Diploma” in 15 minutes. Step by step instruction

by Andrii.ryzhenkoAugust 4th, 2018
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Surfing the Web, I have noticed several articles about <a href="https://medium.com/@emercoin" data-anchor-type="2" data-user-id="dd52d1827102" data-action-value="dd52d1827102" data-action="show-user-card" data-action-type="hover" target="_blank">Emercoin</a> and <a href="https://medium.com/@BitfuryGroup" data-anchor-type="2" data-user-id="f3c72b23a620" data-action-value="f3c72b23a620" data-action="show-user-card" data-action-type="hover" target="_blank">The Bitfury Group</a> success story.

People Mentioned

Mention Thumbnail

Company Mentioned

Mention Thumbnail

Coins Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Develop blockchain “Trusted Diploma” in 15 minutes. Step by step instruction
Andrii.ryzhenko HackerNoon profile picture

Surfing the Web, I have noticed several articles about Emercoin and The Bitfury Group success story.


Emercoin blockchain changes the educational sector with "Trusted Diploma" verification system_Emercoin together with Business & Technology University based in Tbilisi ( ) addressed the global issue of fake…_emercoin.com

First several times I just skipped them, but then decided to look inside.

“We are very happy to work with the innovative Emercoin team on this crucially important project. The Trusted Diploma platform will help our school build a secure and immutable database of education certificates, which will help our graduates as they pursue successful careers,” said Mikheil Batiashvili, the BTU university rector (today — Minister of Education, Science, Culture and Sports of Georgia).

Let’s take a look at what happens when you add files to IPFS:

  • Each file and all of the blocks within it are given a unique fingerprint called a cryptographic hash.
  • IPFS removes duplications across the network and tracks version history for every file.
  • Each network node stores only content it is interested in, and some indexing information that helps figure out who is storing what.
  • When looking up files, you’re asking the network to find nodes storing the content behind a unique hash.
  • Every file can be found by human-readable names using a decentralized naming system called IPNS.

Step 1. Creation Diploma file

In a fantastic world, all Universities use one standard format of the digital diploma. However, in real life, there are a lot of different options with unclear name conventions:

  • pdf diploma copy
  • a predefined .pdf template with locked design and filled student data
  • low-quality scan or photo


We have to work with all of them!Create own ‘handmade’ file in MS Word or MS Paint, input your personal or test data and save as pdf or jpeg. Don’t worry about the quality of document as it’s just testing.

My ugly example

Step 2. Upload file network. Check unique hash

Next step put this file in the blockchain.

We know that public blockchain cannot support media file storing. So we have to use another solution. Upload files to IPFS and store only hash to the public blockchain

The unique file has the unique hash. If we upload diploma file to IPFS than hackers cannot change it as hash will be re-created.

Go to https://globalupload.io/

Upload your diploma file. Copy and save you hash

QmZLuAQNzXZnzrZwyhusnyJW2HTna8zrPqwwNr2NtPen5P

Step 3. Adding data in blockchain

Open notepad and create your own diploma record including hash of diploma:

Andrii Ryzhenko;Ukraine;Kiev;Master;FI-82;KPI; 2018;QQmZLuAQNzXZnzrZwyhusnyJW2HTna8zrPqwwNr2NtPen5P

But Ethereum data transaction supports hex format. Use a convector “text to hex” and transfer actual record


Convert a String to Hex - Online Hex Tools_World's simplest collection of useful utilities for working with hexadecimal data. Convert hex numbers to other…_onlinehextools.com

My example

My hex text

416e647269692052797a68656e6b6f3b556b7261696e653b4b6965763b4d61737465723b46492d38323b4b50493b20323031383b516d5a4c7541514e7a585a6e7a725a77796875736e794a573248546e61387a72507177774e72324e7450656e3550

Now we ready send data to the Ethereum blockchain.

Time to install MetaMask. Skip if you used it before

I usually use MetaMask web plugin.

Go to www.metamask.io website and follow a basic instruction to install it. Save mnemonic words to restore access in case issues.

Next, go https://faucet.rinkeby.io/

Finish a simple quest. Copy you account address from MetaMask to Google+ post.

Input link to faucet form and select 3 days delay for 18.75 Ethers.

Wait for account balance update

Run Ethereum Transaction

Go to the Ethereum MetaMask wallet. Select Rinkeby Test Network. Additionally, you can use public Ethereum network or run own private Ethereum networks (MS Azure or Google Cloud).

Click SEND, input data:

  • Recipient Address: Select any (in future it’s can be student address or Ministry of Education portal)
  • Amount: 0 (in future it’s can be 0.0000000171 to mark transaction)
  • Transaction Data (optional): paste your hex output. Transaction data must be a hex string

Click NEXT

Increase Gas Limit (better add zero, as 21000 wei is not enough. Ethereum spends 68 gas for non-zeros byte)

Click SEND

Wait for transaction results

Step 4. Validation of the diploma

Open link of your last transaction in MetaMask.

Validate the main parameters of the Ethereum transaction:

  • Transaction status is “Success”
  • Is address From is filled and its equal to University account
  • Check “Input Data” filed, but don't forget change selection of UTF-8 option

My transaction link example


Rinkeby Transaction 0x4d38f11fc2aba277b44a2cfba8a7775bf8739339edff999d7e6a29b0e0dc567f_Rinkeby (ETH) detailed transaction info for 0x4d38f11fc2aba277b44a2cfba8a7775bf8739339edff999d7e6a29b0e0dc567f_rinkeby.etherscan.io

Copy hash string to browser link https://ipfs.io/ipfs/{copy_your_file_hash}.

Open the diploma file and compare it with uploaded version.

Summary

  • University diploma certification system on blockchain is up and running
  • Only authorized staff can upload data from the unique address. Everybody can check diploma
  • 15 minutes project with zero budget

Don’t forget share or like the article to help other people discover and read it.

Thanks a lot! Don’t forget you can clap up to 50 times! ❤

Kindly follow Medium and LinkedIn https://www.linkedin.com/in/andrii/

Read more…

Developing pirates “Black Label” voting system. Blockchain Smart Contract on Solidity. 15 minutes step by step instruction

.

.

.

EOS first baby steps: account, wallet, keypair, testnet, transfer tokens, validate transactions