Download the PHP package sham3r/cipher-bsk without Composer

On this page you can find all versions of the php package sham3r/cipher-bsk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cipher-bsk

Cipher BSK — PHP and Laravel Encryption Package

sham3r/cipher-bsk is the Composer package for Cipher BSK (Bornomala Symmetric Key), developed by Sazzad Hossain Saju. It brings the cipher model, originally implemented in C++, to PHP applications through a reusable API for text encryption and decryption.

The package works in standalone PHP projects and integrates with Laravel through configuration, a service provider, and a facade. Version 1.1.1 added secureHash() and verifyHash(), combining bcrypt password hashing with Cipher BSK encryption while retaining the existing encrypt() and decrypt() methods.

View on Packagist · Try Cipher BSK Web · Read the project story on Medium

Research Background

The underlying cipher model is documented in A Hybrid Cryptographic Scheme of Modified Vigenère Cipher using Randomized Approach for Enhancing Data Security, authored by Sazzad Hossain Saju, Sayed Mahmudul Haque, and Liakot Hossain Lingcon.

Published in the International Journal of Computer Applications, Volume 183, Number 2, May 2021, pages 1–8, the paper explores a modified Vigenère-based symmetric cipher using key generation, substitution, rearrangement, and padding. It combines that cipher with RSA to encrypt the symmetric key for its intended recipient.

DOI: 10.5120/ijca2021921290 · Find the paper on Google Scholar

This Composer package implements the PHP Cipher BSK component and adds application-level helpers and Laravel integration. The password helpers are later package features; RSA and the planned image-steganography integration are separate parts of the wider project.

The paper documents the experimental design and its analysis. Publication and observed output behavior do not establish blanket immunity to cryptographic attacks.

If you use or build on this model in your research, please cite the original paper.

Package at a Glance

Capability API or integration
Text encryption and decryption encrypt($message, $key) and decrypt($ciphertext, $key)
Password protection and verification secureHash($password) and verifyHash($password, $storedValue)
Standalone PHP usage Composer autoloading and the CipherBsk\\CipherBsk class
Laravel usage Auto-discovery, facade, service container, and published configuration
Key configuration for password helpers CIPHER_BSK_KEY with APP_KEY as fallback

🔐 New in v1.1.1

Installation/Launch

Install the package via Composer:

Usage

Basic Encryption/Decryption (Existing functionality)

🆕 Secure Password Hashing (v1.1.1)

Note: You must set an environment variable for secure hashing:

🆕 Laravel Integration (v1.1.1)

Auto-Discovery Setup

The package automatically registers itself in Laravel applications. No manual setup required!

Using the Facade:

Laravel Configuration:

  1. Publish the config file (optional):

  2. Set your environment variables in .env:

  3. Configuration file (config/cipher-bsk.php):

Laravel Service Container:

Features

Important Security Notes

For Secure Hashing Features

Example Environment Setup:

Error Handling:

If no key is configured, the package will throw a RuntimeException with helpful instructions:

Documentation

The Cipher BSK Ecosystem

This package is part of a series of open-source implementations and applications built around the same cipher model:

The planned image-steganography extension would embed both the BSK-encrypted message and the RSA-encrypted symmetric key inside an image. It is not included in this Composer package.

Read how the university experiment developed into this ecosystem on Medium.

Testing

Run All Tests:

Test Specific Features:

Test Coverage:

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Run tests (vendor/bin/phpunit)
  4. Commit your changes (git commit -m 'Add amazing feature')
  5. Push to the branch (git push origin feature/amazing-feature)
  6. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Authors

Acknowledgments


All versions of cipher-bsk with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sham3r/cipher-bsk contains the following files

Loading the files please wait ...