PHPackages                             kduma/pkv - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. kduma/pkv

ActiveLibrary

kduma/pkv
=========

Partial Key Verification Library for PHP

v0.0.1(8mo ago)00[5 PRs](https://github.com/kduma-OSS/PHP-Partial-Key-Verification/pulls)MITPHPPHP ^8.4CI passing

Since Sep 4Pushed 1mo agoCompare

[ Source](https://github.com/kduma-OSS/PHP-Partial-Key-Verification)[ Packagist](https://packagist.org/packages/kduma/pkv)[ Docs](https://github.com/kduma-OSS/PHP-Partial-Key-Verification)[ RSS](/packages/kduma-pkv/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (12)Used By (0)

Partial Key Verification Library for PHP
========================================

[](#partial-key-verification-library-for-php)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4ff7e2f3e12adf3fd532866420a232d7c1af53c66fdf0ada27f00f033d9ac6de/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b64756d612f706b762e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kduma/pkv)[![Tests](https://camo.githubusercontent.com/450f4d9f23fbc7ec87e454daed45f3a7e0966d7f29bd7761eeaecbb714399f16/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6b64756d612d4f53532f5048502d5061727469616c2d4b65792d566572696669636174696f6e2f72756e2d74657374732e796d6c3f6272616e63683d6d6173746572266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/kduma-OSS/PHP-Partial-Key-Verification/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/f30302e93969fd38332b17f48967f4bf777a0860da327c02aa9863c16cf4fe3a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b64756d612f706b762e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kduma/pkv)

This is a port of my other C# library [Partial Key Verification Library for Compact Framework](https://opensource.duma.sh/libraries/net/partial-key-verification) into a PHP package.

This library implements Partial Key Verification (PKV). PKV is a cryptographic technique that allows verification of a subset of a key without revealing the entire key, enhancing security and privacy in various applications.

Check full documentation here: [opensource.duma.sh/libraries/php/partial-key-verification](https://opensource.duma.sh/libraries/php/partial-key-verification)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require kduma/pkv
```

Usage
-----

[](#usage)

```
private static function validateKey(string $key): bool {
	$seed = \KDuma\PKV\PartialKeyValidator::getSerialNumberFromKey($key);
	$blacklist = [1518008798, 42];
	if (in_array($seed, $blacklist, true))
		return false;

	// Validation for key with index 1
	if (!\KDuma\PKV\PartialKeyValidator::validateKey(new \KDuma\PKV\Checksum\Adler16(), new \KDuma\PKV\Hash\OneAtATime(), $key, 1, 766109221))
		return false;

	// Validation for key with index 4
	if (!\KDuma\PKV\PartialKeyValidator::validateKey(new \KDuma\PKV\Checksum\Adler16(), new \KDuma\PKV\Hash\Fnv1a(), $key, 4, 4072442218))
		return false;

	return true;
}
```

Testing
-------

[](#testing)

```
composer test
```

Credits
-------

[](#credits)

- [Krystian Duma](https://github.com/kduma)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Packagist
---------

[](#packagist)

View this package on Packagist.org: [kduma/pkv](https://packagist.org/packages/kduma/pkv)

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance77

Regular maintenance activity

Popularity0

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

254d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d09451622719c7efce1a7971b8e5a875859504882ba2b8c279d1015a99e8f12c?d=identicon)[kduma](/maintainers/kduma)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (5 commits)")[![kduma](https://avatars.githubusercontent.com/u/1062582?v=4)](https://github.com/kduma "kduma (5 commits)")

---

Tags

partial-key-verificationphppkvKDumapkvPartial Key Verification

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/kduma-pkv/health.svg)

```
[![Health](https://phpackages.com/badges/kduma-pkv/health.svg)](https://phpackages.com/packages/kduma-pkv)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
