0% found this document useful (0 votes)
7 views6 pages

Blockchain Academic Certificate Verification

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views6 pages

Blockchain Academic Certificate Verification

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Blockchain-based Academic Certificate

Verification
📌 Project Overview
This project implements a blockchain-based system to store and verify
student academic certificates. Each certificate is treated as a block in the
blockchain, ensuring immutability, transparency, and security. Any
tampering attempt breaks the chain, thus maintaining the authenticity of
records.

🌐 Domain
 Blockchain Technology
 Education Technology (EdTech)
 Data Security & Verification Systems

💡 Idea
Instead of relying on paper-based or centralized digital certificates,
this project proposes a distributed ledger for academic certificates.
Each certificate is:

 Assigned a unique certificate ID (e.g., E101, E102)


 Stored in a blockchain as a block with details like student name,
section, year, course, and issuing authority
 Accessible and verifiable by entering the certificate ID

This ensures that no certificate can be faked or modified without breaking


the chain integrity.

❓ Why Blockchain?
 Immutability → Once stored, certificate data cannot be altered.
 Transparency → Certificates can be verified anytime by authorized
users.
 Security → Eliminates chances of forgery and unauthorized
modifications.
 Decentralization → No single authority controls the system,
reducing manipulation risks.
CODE :
import hashlib
import time
# Blockchain structure
class Block:
def __init__(self, index, timestamp, data, previous_hash):
[Link] = index
[Link] = timestamp
[Link] = data
self.previous_hash = previous_hash
[Link] = self.calculate_hash()
def calculate_hash(self):
block_string = str([Link]) + str([Link]) + str([Link]) +
str(self.previous_hash)
return hashlib.sha256(block_string.encode()).hexdigest()
class Blockchain:
def __init__(self):
[Link] = [self.create_genesis_block()]
def create_genesis_block(self):
return Block(0, [Link](), {"message": "Genesis Block"}, "0")
def get_latest_block(self):
return [Link][-1]
def add_block(self, new_block):
new_block.previous_hash = self.get_latest_block().hash
new_block.hash = new_block.calculate_hash()
[Link](new_block)
def is_chain_valid(self):
for i in range(1, len([Link])):
curr = [Link][i]
prev = [Link][i-1]
if [Link] != curr.calculate_hash(
attempts += 1
print("Incorrect password. Try again.")
print("Too many wrong attempts. Suspicious activity reported to admin.\n")
return False
def forgot_password():
code = input("Enter secret code for teachers: ")
if code == secret_code:
print("Access granted via secret code.\n")
return True
else:
print("Incorrect secret code.\n")
return False
# Certificate ID Generator
cert_counters = {}
def generate_certificate_id(course):
first_letter = course[0].upper()
if first_letter not in cert_counters:
cert_counters[first_letter] = 1
else:
cert_counters[first_letter] += 1
return f"{first_letter}{cert_counters[first_letter]:03d}"
# Menu system
def menu(blockchain):
while True:
print("\n--- MENU ---")
print("1. Add Certificates for a Section")
print("2. View Blockchain Data")
print("3. Verify Certificate by ID")
print("4. Exit")
choice = input("Enter choice: ")
if choice == "1":
year = input("Enter Year of Study: ")
section = input("Enter Section: ")
subject = input("Enter Subject/Course: ")
n = int(input("How many students' certificates do you want to add? "))
for _ in range(n):
name = input("Enter Student Name: ")
roll = input("Enter Roll Number: ")
percentage = input("Enter Percentage Score: ")
cert_id = generate_certificate_id(subject)
certificate = {
"Certificate ID": cert_id,
"Name": name,
"Roll No": roll,
"Year": year,
"Section": section,
"Course": subject,
"Percentage": percentage
}
blockchain.add_block(Block(len([Link]), [Link](),
certificate, blockchain.get_latest_block().hash))
print(f"Certificate Added Successfully with ID: {cert_id}")
elif choice == "2":
for block in [Link]:
print(vars(block))
elif choice == "3":
cert_id = input("Enter Certificate ID to Verify: ")
result = blockchain.find_certificate_by_id(cert_id)
if result:
print("✅ Certificate Found:", result)
else:
print("❌ Certificate Not Found.")
elif choice == "4":
print("Exiting...")
break
else:
print("Invalid choice. Try again.")
# Main Execution
blockchain = Blockchain()
print("Welcome to Blockchain Certificate System\n")
option = input("1. Login\n2. Forgot Password\nChoose option: ")
if option == "1":
if authenticate():
menu(blockchain)
elif option == "2":
if forgot_password():
menu(blockchain)
else:
print("Invalid option.")

Output :

🔚 Conclusion
The Blockchain-based Academic Certificate Verification System
provides a secure, transparent, and tamper-proof method for storing and
validating student certificates. By replacing traditional paper-based
verification with a blockchain ledger, the system ensures that certificates
cannot be forged or altered without detection.

This project not only enhances trust and reliability in academic


credentials but also simplifies the verification process for universities,
employers, and students. With features like multi-user
authentication, password protection, certificate auto-generation,
and instant verification, the system demonstrates how blockchain can
revolutionize academic record management.

You might also like