Editing
Hash Functions and Digital Signatures
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== <span style="color: #FFFFFF;">Applying</span> == '''Modeling 'The Integrity Check' (How Hashing works):''' <syntaxhighlight lang="python"> import hashlib def get_file_fingerprint(data_string): """ Creates a SHA-256 hash of a string. """ return hashlib.sha256(data_string.encode()).hexdigest() original = "Pay Alice $100" tampered = "Pay Alice $900" print(f"Original Hash: {get_file_fingerprint(original)}") print(f"Tampered Hash: {get_file_fingerprint(tampered)}") # Note how the two hashes are completely different, # even though only one digit changed! </syntaxhighlight> ; Signature Landmarks : '''Blockchain (Bitcoin)''' β Every block contains the hash of the previous block; if you change one transaction in history, every hash in the future "breaks," making it impossible to cheat. : '''Software Updates''' β When your phone downloads an update, it checks the digital signature to ensure it really came from Apple or Google and not a virus. : '''Git (Version Control)''' β Every commit in Git is named after its hash; this ensures that your source code can never be silently corrupted. : '''Password Storage''' β Websites never store your actual password; they only store the hash. When you log in, they hash your input and see if it matches the stored fingerprint. </div> <div style="background-color: #8B4500; color: #FFFFFF; padding: 20px; border-radius: 8px; margin-bottom: 15px;">
Summary:
Please note that all contributions to BloomWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
BloomWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information