An open API service indexing awesome lists of open source software.

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

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)