SlideShare a Scribd company logo
1
Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT)
Student Name :P.YUVARAJU
Department :CSE
Course :CRYPTOGRAPHY&NETWORK SECURITY
LAB
Course code :20CS607
Roll no :22NU1A0587
2
Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT)
Object oriented programming
LAB
3
Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT)
PROGRAM OUTCOMES
SNO OUTCOMES DESCRIPTION
1 Engineering Knowledge Apply the knowledge of mathematics , science, engineering fundamentals and an
engineering specialization to the solution of complex engineering problems .
2 Problem Analysis Identify , formulate, research literature &analyze complex engineering problems reaching
substantiated conclusions using first principles of mathematics , natural science , engineering
science .
3 Design/Development of
solution
Design solutions for complex engineering problems and design system components of
processes that meet the specified needs with appropriate consideration for the public health
safety and the cultural, societal and environmental considerations
4 Conduct Investigations of
complex problems
Use research –based knowledge and research methods including design of experiments and
interpretation of data and synthesis of the information to provide valid conclusions
5 Modern tool usage Create, select and apply appropriate techniques, resources and modern engineering and IT
tools including prediction and modeling to complex engineering activities with an
understanding of the limitations .
6 The Engineering and society Apply reasoning informed by the contextual knowledge to assess societal ,health ,safety ,
legal and cultural issues and the consequent responsibilities relevant to the professional
engineering practice
4
Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT)
PROGRAM OUTCOMES
SNO OUTCOMES DESCRIPTION
7 Environmental and
sustainability
Understand the impact of professional engineering solutions and environmental contexts and
demonstrate the knowledge of and need for sustainable development
8 Ethics Apply ethical principles and commit to professional ethics and responsibilities and norms of
engineering practice.
9 Individual and teamwork Function effectively as an individual , and as a member or leader in diverse terms and in
multidisciplinary settings
10 Communication Communicate effectively on complex engineering activities with the engineering community
and with society at large such as being able to comprehend and write effective reports and
documentation, make effective presentation, and give and receive clear instructions .
11 Project management and
finance
Demonstrate knowledge and understanding of the engineering and management principles
and apply theses to one’s own work ,as a member and leader in a team ,to manage projects
and in multidisciplinary environments.
12 Lifelong Learning Recognize the need for and have the preparation and ability to engage in independent and
life-long learning in the broadest context of technological change.
5
Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT)
COURSE OUTCOMES
Code Course Outcomes
20CS607.1 Create and apply the role of languages like HTML, CSS
20CS607.2 Build dynamic web pages using JavaScript
20CS607.3 Create and apply the role of language like XML
20CS607.4 Develop Web Applications using PHP & MySql
20CS607.5 Install & Use Frameworks
6
Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT)
SYLLABUS SHEET:
7
Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT)
SHA-1 ALOGRITHM:
The SHA-1 (Secure Hash Algorithm 1) is a widely used cryptographic
hash function that generates a 160-bit hash value from any input data.
It’s commonly represented as a 40-character hexadecimal number. SHA-
1 is primarily utilized in applications that require data integrity, such as
digital signatures, certificate verification, and version control systems.
However, over time, vulnerabilities have been discovered in SHA-1,
making it less secure against collision attacks where two different inputs
produce the same hash. As a result, it has been largely replaced by more
secure algorithms like SHA-256 and SHA-3 in modern cryptographic
practices. Despite its declining use, SHA-1 remains an essential part of
cryptographic history and has paved the way for stronger hashing
mechanisms.
8
Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT)
Source code
import hashlib
# Input text
text = "This is a sample message"
# Encode the text to bytes
text_bytes = text.encode()
# Create SHA-1 hash object
sha1_hash = hashlib.sha1()
# Update the hash object with the bytes
sha1_hash.update(text_bytes)
# Get the hexadecimal digest
digest = sha1_hash.hexdigest()
print("SHA-1 Message Digest:", digest)
9
Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT)
OUTPUT
Message Digest (SHA-1): b2e98ad6f6eb8508dd6a14cfa704bad7f05f6fb1
10
Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT)
DIGITAL SIGNATURE SCHEMA:
The Digital Signature Standard (DSS) is a federal standard for digital
signatures, established by the United States in 1994. It specifies
algorithms that ensure the authenticity and integrity of digital messages
or documents. DSS primarily employs the Digital Signature Algorithm
(DSA), which is based on public-key cryptography. Using DSS, a sender
can generate a digital signature for a message, allowing the recipient to
verify its authenticity using a public key. This protects against
unauthorized tampering and guarantees the source of the message.
DSS is widely used in secure communications, certificate authorities,
and data verification systems. Over time, its algorithms have been
enhanced to keep up with modern cryptographic security demands.
11
Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT)
SOURCE CODE:
from Crypto.PublicKey import DSA
from Crypto.Signature import DSS
from Crypto.Hash import SHA256
key = DSA.generate(2048)
msg = input("Enter the message to sign: ").encode('utf-8')
hash_obj = SHA256.new(msg)
signer = DSS.new(key, 'fips-186-3')
signature = signer.sign(hash_obj)
print("nGenerated Signature:", signature.hex())
public_key = key.publickey()
verifier = DSS.new(public_key, 'fips-186-3')
verify_msg = input("nEnter the message to verify: ").encode('utf-8')
verify_hash = SHA256.new(verify_msg)
try:
verifier.verify(verify_hash, signature)
print("Signature is VALID. The message is authentic.")
except ValueError:
print("Signature is INVALID. The message may have been altered.")
12
Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT)
OUTPUT:
Message: b'Hello, this is a secure message!’
Digital Signature: b'x1fx85x06...x9d' # (A long binary string - exact value varies)
The message is authentic
13
Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT)

More Related Content

PDF
Dagrep v006-i009-complete 2
PDF
Dagrep v006-i009-complete
PDF
Dr. Charles Pak
PDF
Cyber Security And Digital Forensics Proceedings Of Iccsdf 2021 1st Edition K...
PPTX
Architecture centric support for security orchestration and automation
PDF
Cryptocoding Based on Quasigroups 1st Edition Daniela Mechkaroska
PDF
IRJET- Survey of Cryptographic Techniques to Certify Sharing of Informati...
PDF
Study and implementation of DES on FPGA
Dagrep v006-i009-complete 2
Dagrep v006-i009-complete
Dr. Charles Pak
Cyber Security And Digital Forensics Proceedings Of Iccsdf 2021 1st Edition K...
Architecture centric support for security orchestration and automation
Cryptocoding Based on Quasigroups 1st Edition Daniela Mechkaroska
IRJET- Survey of Cryptographic Techniques to Certify Sharing of Informati...
Study and implementation of DES on FPGA

Similar to CNS.ksjfkdjdjgfejfgejfgejgfjgfjegfejgfjerfegf (20)

PDF
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
PDF
DevSecOps_Talk_Oracle_Sept2022.pdf
PDF
CRYPTOGRAPHY ALGORITHMS FOR WEB SECURITY
PDF
Optimized Algorithm for Hiding Digital Text in a Colour Image Using FPGA
PDF
IRJET - A Novel Approach Implementing Deduplication using Message Locked Encr...
PDF
Image and text Encryption using RSA algorithm in java
PDF
Reputation System for Improving Security in VOIP
PDF
Proceedings of the International Conference on Data Engineering and Communica...
PDF
IRJET- An Intrusion Detection and Protection System by using Data Mining ...
PDF
Literature Survey: Secure transmitting of data using RSA public key implement...
PDF
STAYING SAFE AND SECURED ON TODAY AND TOMORROW’S AFRICA CYBERSPACE WORKSHOP 2017
PPTX
ASEP midsem review_ asep project[1].pptx
PDF
Paper id 27201448
PPTX
Quantum computing
PPTX
Final_Presentation_ENDSEMFORNITJSRI.pptx
PDF
Human Centred Intelligent Systems Proceedings of KES HCIS 2021 Conference 244...
PDF
A PARALLEL AND FORWARD PRIVATE SEARCHABLE PUBLIC KEY ENCRYPTION FOR CLOUD BAS...
DOC
David Patterson IT Security Resumes 2016
PDF
August 2024 - Top 10 Cited Articles in International Journal of Security, Pri...
PDF
IRJET - Privacy Preserving Keyword Search over Encrypted Data in the Cloud
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
DevSecOps_Talk_Oracle_Sept2022.pdf
CRYPTOGRAPHY ALGORITHMS FOR WEB SECURITY
Optimized Algorithm for Hiding Digital Text in a Colour Image Using FPGA
IRJET - A Novel Approach Implementing Deduplication using Message Locked Encr...
Image and text Encryption using RSA algorithm in java
Reputation System for Improving Security in VOIP
Proceedings of the International Conference on Data Engineering and Communica...
IRJET- An Intrusion Detection and Protection System by using Data Mining ...
Literature Survey: Secure transmitting of data using RSA public key implement...
STAYING SAFE AND SECURED ON TODAY AND TOMORROW’S AFRICA CYBERSPACE WORKSHOP 2017
ASEP midsem review_ asep project[1].pptx
Paper id 27201448
Quantum computing
Final_Presentation_ENDSEMFORNITJSRI.pptx
Human Centred Intelligent Systems Proceedings of KES HCIS 2021 Conference 244...
A PARALLEL AND FORWARD PRIVATE SEARCHABLE PUBLIC KEY ENCRYPTION FOR CLOUD BAS...
David Patterson IT Security Resumes 2016
August 2024 - Top 10 Cited Articles in International Journal of Security, Pri...
IRJET - Privacy Preserving Keyword Search over Encrypted Data in the Cloud
Ad

Recently uploaded (20)

PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
PDF
Arduino robotics embedded978-1-4302-3184-4.pdf
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPT
Project quality management in manufacturing
PPTX
web development for engineering and engineering
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
Strings in CPP - Strings in C++ are sequences of characters used to store and...
PPTX
Welding lecture in detail for understanding
PPTX
MET 305 MODULE 1 KTU 2019 SCHEME 25.pptx
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
Geodesy 1.pptx...............................................
PPTX
additive manufacturing of ss316l using mig welding
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PDF
ETO & MEO Certificate of Competency Questions and Answers
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
SM_6th-Sem__Cse_Internet-of-Things.pdf IOT
Arduino robotics embedded978-1-4302-3184-4.pdf
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Project quality management in manufacturing
web development for engineering and engineering
CH1 Production IntroductoryConcepts.pptx
Model Code of Practice - Construction Work - 21102022 .pdf
Strings in CPP - Strings in C++ are sequences of characters used to store and...
Welding lecture in detail for understanding
MET 305 MODULE 1 KTU 2019 SCHEME 25.pptx
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Geodesy 1.pptx...............................................
additive manufacturing of ss316l using mig welding
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
ETO & MEO Certificate of Competency Questions and Answers
Operating System & Kernel Study Guide-1 - converted.pdf
Infosys Presentation by1.Riyan Bagwan 2.Samadhan Naiknavare 3.Gaurav Shinde 4...
Ad

CNS.ksjfkdjdjgfejfgejfgejgfjgfjegfejgfjerfegf

  • 1. 1 Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT) Student Name :P.YUVARAJU Department :CSE Course :CRYPTOGRAPHY&NETWORK SECURITY LAB Course code :20CS607 Roll no :22NU1A0587
  • 2. 2 Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT) Object oriented programming LAB
  • 3. 3 Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT) PROGRAM OUTCOMES SNO OUTCOMES DESCRIPTION 1 Engineering Knowledge Apply the knowledge of mathematics , science, engineering fundamentals and an engineering specialization to the solution of complex engineering problems . 2 Problem Analysis Identify , formulate, research literature &analyze complex engineering problems reaching substantiated conclusions using first principles of mathematics , natural science , engineering science . 3 Design/Development of solution Design solutions for complex engineering problems and design system components of processes that meet the specified needs with appropriate consideration for the public health safety and the cultural, societal and environmental considerations 4 Conduct Investigations of complex problems Use research –based knowledge and research methods including design of experiments and interpretation of data and synthesis of the information to provide valid conclusions 5 Modern tool usage Create, select and apply appropriate techniques, resources and modern engineering and IT tools including prediction and modeling to complex engineering activities with an understanding of the limitations . 6 The Engineering and society Apply reasoning informed by the contextual knowledge to assess societal ,health ,safety , legal and cultural issues and the consequent responsibilities relevant to the professional engineering practice
  • 4. 4 Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT) PROGRAM OUTCOMES SNO OUTCOMES DESCRIPTION 7 Environmental and sustainability Understand the impact of professional engineering solutions and environmental contexts and demonstrate the knowledge of and need for sustainable development 8 Ethics Apply ethical principles and commit to professional ethics and responsibilities and norms of engineering practice. 9 Individual and teamwork Function effectively as an individual , and as a member or leader in diverse terms and in multidisciplinary settings 10 Communication Communicate effectively on complex engineering activities with the engineering community and with society at large such as being able to comprehend and write effective reports and documentation, make effective presentation, and give and receive clear instructions . 11 Project management and finance Demonstrate knowledge and understanding of the engineering and management principles and apply theses to one’s own work ,as a member and leader in a team ,to manage projects and in multidisciplinary environments. 12 Lifelong Learning Recognize the need for and have the preparation and ability to engage in independent and life-long learning in the broadest context of technological change.
  • 5. 5 Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT) COURSE OUTCOMES Code Course Outcomes 20CS607.1 Create and apply the role of languages like HTML, CSS 20CS607.2 Build dynamic web pages using JavaScript 20CS607.3 Create and apply the role of language like XML 20CS607.4 Develop Web Applications using PHP & MySql 20CS607.5 Install & Use Frameworks
  • 6. 6 Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT) SYLLABUS SHEET:
  • 7. 7 Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT) SHA-1 ALOGRITHM: The SHA-1 (Secure Hash Algorithm 1) is a widely used cryptographic hash function that generates a 160-bit hash value from any input data. It’s commonly represented as a 40-character hexadecimal number. SHA- 1 is primarily utilized in applications that require data integrity, such as digital signatures, certificate verification, and version control systems. However, over time, vulnerabilities have been discovered in SHA-1, making it less secure against collision attacks where two different inputs produce the same hash. As a result, it has been largely replaced by more secure algorithms like SHA-256 and SHA-3 in modern cryptographic practices. Despite its declining use, SHA-1 remains an essential part of cryptographic history and has paved the way for stronger hashing mechanisms.
  • 8. 8 Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT) Source code import hashlib # Input text text = "This is a sample message" # Encode the text to bytes text_bytes = text.encode() # Create SHA-1 hash object sha1_hash = hashlib.sha1() # Update the hash object with the bytes sha1_hash.update(text_bytes) # Get the hexadecimal digest digest = sha1_hash.hexdigest() print("SHA-1 Message Digest:", digest)
  • 9. 9 Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT) OUTPUT Message Digest (SHA-1): b2e98ad6f6eb8508dd6a14cfa704bad7f05f6fb1
  • 10. 10 Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT) DIGITAL SIGNATURE SCHEMA: The Digital Signature Standard (DSS) is a federal standard for digital signatures, established by the United States in 1994. It specifies algorithms that ensure the authenticity and integrity of digital messages or documents. DSS primarily employs the Digital Signature Algorithm (DSA), which is based on public-key cryptography. Using DSS, a sender can generate a digital signature for a message, allowing the recipient to verify its authenticity using a public key. This protects against unauthorized tampering and guarantees the source of the message. DSS is widely used in secure communications, certificate authorities, and data verification systems. Over time, its algorithms have been enhanced to keep up with modern cryptographic security demands.
  • 11. 11 Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT) SOURCE CODE: from Crypto.PublicKey import DSA from Crypto.Signature import DSS from Crypto.Hash import SHA256 key = DSA.generate(2048) msg = input("Enter the message to sign: ").encode('utf-8') hash_obj = SHA256.new(msg) signer = DSS.new(key, 'fips-186-3') signature = signer.sign(hash_obj) print("nGenerated Signature:", signature.hex()) public_key = key.publickey() verifier = DSS.new(public_key, 'fips-186-3') verify_msg = input("nEnter the message to verify: ").encode('utf-8') verify_hash = SHA256.new(verify_msg) try: verifier.verify(verify_hash, signature) print("Signature is VALID. The message is authentic.") except ValueError: print("Signature is INVALID. The message may have been altered.")
  • 12. 12 Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT) OUTPUT: Message: b'Hello, this is a secure message!’ Digital Signature: b'x1fx85x06...x9d' # (A long binary string - exact value varies) The message is authentic
  • 13. 13 Nadimpalli Satyanarayana Raju Institute of Technology (NSRIT)