encryption technique
TRANSCRIPT
![Page 1: Encryption Technique](https://reader034.vdocuments.site/reader034/viewer/2022050804/5464d106b4af9f6d4f8b4c2e/html5/thumbnails/1.jpg)
Encryption Techniques
Keerthana.J
(060341039)
![Page 2: Encryption Technique](https://reader034.vdocuments.site/reader034/viewer/2022050804/5464d106b4af9f6d4f8b4c2e/html5/thumbnails/2.jpg)
Topics Covered
Types of Attacks Cryptography Traditional methods Symmetric and Public-Key Algorithms Digital Signatures Certificates Cryptography with PHP
![Page 3: Encryption Technique](https://reader034.vdocuments.site/reader034/viewer/2022050804/5464d106b4af9f6d4f8b4c2e/html5/thumbnails/3.jpg)
Types of Threat in Internet
Threat is a set of circumstances that has the potential of causing loss and harm
Interception Interruption Modification Fabrication
![Page 4: Encryption Technique](https://reader034.vdocuments.site/reader034/viewer/2022050804/5464d106b4af9f6d4f8b4c2e/html5/thumbnails/4.jpg)
Cryptography
Encryption is the process of translating information from its original form (called plaintext) into an encoded, incomprehensible form (called ciphertext).
Decryption refers to the process of taking ciphertext and translating it back into plaintext.
![Page 5: Encryption Technique](https://reader034.vdocuments.site/reader034/viewer/2022050804/5464d106b4af9f6d4f8b4c2e/html5/thumbnails/5.jpg)
![Page 6: Encryption Technique](https://reader034.vdocuments.site/reader034/viewer/2022050804/5464d106b4af9f6d4f8b4c2e/html5/thumbnails/6.jpg)
What does it provide ?
Important aspects of computer security Confidentiality Integrity Availability Authenticity of data
![Page 7: Encryption Technique](https://reader034.vdocuments.site/reader034/viewer/2022050804/5464d106b4af9f6d4f8b4c2e/html5/thumbnails/7.jpg)
Traditional Methods
1) Substitution Ciphers
a b c d e fghi j k l mno pqr s t u vwx y z
KEY: QWERTYUIOPASDFGHJKLZXCVBNM
Plaintext : attack
Ciphertext : QZZQEA
![Page 8: Encryption Technique](https://reader034.vdocuments.site/reader034/viewer/2022050804/5464d106b4af9f6d4f8b4c2e/html5/thumbnails/8.jpg)
2)Transposition Cipher
M E G A B U C K (KEY)
7 4 5 1 2 8 3 6
t r a n s f e r
o n e m i l l I
o n t o a c c o
u n t s i x t w
w o t w o Plaintext : transferonemilliontoaccountsixtwotwo Ciphertext : nmoswsiaioelctrnnnoaetttrlowtoouwflcx
![Page 9: Encryption Technique](https://reader034.vdocuments.site/reader034/viewer/2022050804/5464d106b4af9f6d4f8b4c2e/html5/thumbnails/9.jpg)
Symmetric-Key Algorithms
Traditional Vs Symmetric-Key It uses the same key for encryption and
decryption The key is called the secret key. Drawback of Symmetric-key algorithms Examples : Data Encryption Standard
Advanced Encryption Standard
![Page 10: Encryption Technique](https://reader034.vdocuments.site/reader034/viewer/2022050804/5464d106b4af9f6d4f8b4c2e/html5/thumbnails/10.jpg)
Public-Key Algorithms
New kind of cryptosystem where the encryption and the decryption keys are different.
Public Keys used by the entire world for encrypting messages to send it to the user.
Private Keys which the user needs for decrypting messages.
Examples : RSA, Knapsack algorithm
![Page 11: Encryption Technique](https://reader034.vdocuments.site/reader034/viewer/2022050804/5464d106b4af9f6d4f8b4c2e/html5/thumbnails/11.jpg)
Working of Public-Key Algorithms
![Page 12: Encryption Technique](https://reader034.vdocuments.site/reader034/viewer/2022050804/5464d106b4af9f6d4f8b4c2e/html5/thumbnails/12.jpg)
Drawbacks in Public-Key Algorithm
There were some drawbacks in Public-Key Algorithms which led to Digital Signatures.
The receiver could not verify the identity of the sender.
The sender cannot later repudiate the contents of the message.
The receiver could possibly have concocted the message himself.
![Page 13: Encryption Technique](https://reader034.vdocuments.site/reader034/viewer/2022050804/5464d106b4af9f6d4f8b4c2e/html5/thumbnails/13.jpg)
Digital Signatures
Symmetric-Key SignaturesIt has a central authority that knows everything and whom everyone trusts.Drawback is everyone has to believe in the third party and he gets to read all the signed messages.
Public-Key Signatures These drawbacks are solved in this kind of signatures. Any public-key algorithm can be used for digital signatures.
![Page 14: Encryption Technique](https://reader034.vdocuments.site/reader034/viewer/2022050804/5464d106b4af9f6d4f8b4c2e/html5/thumbnails/14.jpg)
Working of Public-Key Signatures
![Page 15: Encryption Technique](https://reader034.vdocuments.site/reader034/viewer/2022050804/5464d106b4af9f6d4f8b4c2e/html5/thumbnails/15.jpg)
Certificates
Public key cryptography makes it possible for people who do not share a common key to communicate securely.
It also makes signing messages possible without the presence of a trusted third party.
An organization that certifies public keys is now called a (Certification Authority) CA.
Used in Credit card payments
![Page 16: Encryption Technique](https://reader034.vdocuments.site/reader034/viewer/2022050804/5464d106b4af9f6d4f8b4c2e/html5/thumbnails/16.jpg)
Example of Certificate
The fundamental job of a certificate is to bind a public key to the name of a principal (individual, company)
![Page 17: Encryption Technique](https://reader034.vdocuments.site/reader034/viewer/2022050804/5464d106b4af9f6d4f8b4c2e/html5/thumbnails/17.jpg)
Encryption in PHP
One Way EncryptionThe algorithms for one-way encryption are called hash algorithms. PHP uses the Message Digest (MD) hash algorithm, MD5, for one-way encryption.Examples: Used for storing user passwords.
![Page 18: Encryption Technique](https://reader034.vdocuments.site/reader034/viewer/2022050804/5464d106b4af9f6d4f8b4c2e/html5/thumbnails/18.jpg)
<?php $msg = " Password "; $encrypted_text = md5 ($msg); echo("<b>Plain Text : </b>"); echo($msg); echo("<p><b>Encrypted Text : </b><br>"); echo($encrypted_text); ?>
![Page 19: Encryption Technique](https://reader034.vdocuments.site/reader034/viewer/2022050804/5464d106b4af9f6d4f8b4c2e/html5/thumbnails/19.jpg)
Output
PlainText : Password
Encrypted Text : 3f13fa96ed14d842519897db6810aa7
![Page 20: Encryption Technique](https://reader034.vdocuments.site/reader034/viewer/2022050804/5464d106b4af9f6d4f8b4c2e/html5/thumbnails/20.jpg)
Symmetric Encryption
PHP provides several algorithms for symmetric encryption in the mcrypt library. It also provides the mcrypt_ecb function to implement the algorithms of the mcrypt library.
Asymmetric Encryption
Complex to implement but very efficient.
![Page 21: Encryption Technique](https://reader034.vdocuments.site/reader034/viewer/2022050804/5464d106b4af9f6d4f8b4c2e/html5/thumbnails/21.jpg)
<?php echo("<h3> Symmetric Encryption </h3>"); $key_value = "KEYVALUE";
$plain_text = "PLAINTEXT"; $encrypted_text = mcrypt_ecb(MCRYPT_DES, $key_value,
$plain_text, MCRYPT_ENCRYPT); echo ("<p><b> Text after encryption : </b>"); echo ( $encrypted_text ); $decrypted_text = mcrypt_ecb(MCRYPT_DES, $key_value,
$encrypted_text, MCRYPT_DECRYPT); echo ("<p><b> Text after decryption : </b>"); echo ( $decrypted_text ); ?>
![Page 22: Encryption Technique](https://reader034.vdocuments.site/reader034/viewer/2022050804/5464d106b4af9f6d4f8b4c2e/html5/thumbnails/22.jpg)
Conclusion
The various algorithms are selected as per the security levels required for the data.
It is the responsibility of the developer to include proper encryption of the data.
These basic cryptographic algorithms are used to implement SSL (Secure Socket Layer) for web security.
![Page 23: Encryption Technique](https://reader034.vdocuments.site/reader034/viewer/2022050804/5464d106b4af9f6d4f8b4c2e/html5/thumbnails/23.jpg)
Thank You