https://github.com/yidas/crypto-sample-php
PHP sample code for symmetric and asymmetric cryptography with encryption and decryption
https://github.com/yidas/crypto-sample-php
aes-cbc aes-ecb aes-encryption aes-gcm crypto-js php
Last synced: 6 months ago
JSON representation
PHP sample code for symmetric and asymmetric cryptography with encryption and decryption
- Host: GitHub
- URL: https://github.com/yidas/crypto-sample-php
- Owner: yidas
- Created: 2018-06-22T08:06:40.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-02-22T10:17:42.000Z (over 1 year ago)
- Last Synced: 2025-03-28T12:51:18.342Z (6 months ago)
- Topics: aes-cbc, aes-ecb, aes-encryption, aes-gcm, crypto-js, php
- Language: PHP
- Homepage:
- Size: 33.2 KB
- Stars: 7
- Watchers: 1
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Crypto Sample for PHP
================PHP sample code for symmetric and asymmetric cryptography with encryption and decryption
FEATURES
--------It's a simple implementation of handing encryption and decryption with AES symmetric-key algorithm between two side, PHP server and Javascript client.
---
INSTALLATION
------------Download repository and run Composer install in your Web directory:
```
$ git clone https://github.com/yidas/crypto-sample-php;
$ cd crypto-sample-php;
$ composer install;
```---
CONCEPTION
----------[Advanced Encryption Standard (AES)](https://en.wikipedia.org/wiki/Advanced_Encryption_Standard), a subset of the Rijndael cipher, which is a symmetric-key algorithm, meaning the same key is used for both encrypting and decrypting the data.
### Block Cipher Mode of Operation
- ECB - Same cipher text with same plain text. No use of IV.
- CBC - Different cipher text with same plain text. Using IV. (The most commonly used mode of operation)
---
REFERENCE
---------[CryptoJS Github](https://github.com/brix/crypto-js)
[CryptoJS Google Documentation](https://code.google.com/archive/p/crypto-js/)
[CryptoJS Library CDN](https://cdnjs.com/libraries/crypto-js)