PHPackages                             genphrase/genphrase - 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. genphrase/genphrase

ActiveLibrary

genphrase/genphrase
===================

Secure passphrase generator for PHP applications

v1.2.1(9y ago)118302.5k↓12.3%9[1 issues](https://github.com/timoh6/GenPhrase/issues)4MITPHPPHP &gt;=5.3.0

Since Jan 27Pushed 1y ago5 watchersCompare

[ Source](https://github.com/timoh6/GenPhrase)[ Packagist](https://packagist.org/packages/genphrase/genphrase)[ Docs](https://github.com/timoh6/GenPhrase)[ RSS](/packages/genphrase-genphrase/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (7)Used By (4)

About
=====

[](#about)

[![Packagist](https://camo.githubusercontent.com/e734c50abd0d086bd72523ef7f1ba20ead1a552756ce2e5171c5b7cd8f0ca429/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67656e7068726173652f67656e7068726173652e737667)](https://packagist.org/packages/genphrase/genphrase)[![License](https://camo.githubusercontent.com/850eae1099d2b05f53383473d7cd51f9bc1ab09b7d0d9e5122f1dd930efdcc6d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d6173686170652f6170697374617475732e737667)](LICENSE)[![Build Status](https://camo.githubusercontent.com/d3acdc62d24aec1e9a6e63b41a9526a408c34a366b168346d3f0939889835e5c/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f74696d6f68362f47656e5068726173652e706e67)](http://travis-ci.org/timoh6/GenPhrase)

Note

Sadly, GenPhrase hasn't had any updates in quite a long while. Future development and maintenance of GenPhrase will be at [Drenso/GenPhrase](https://github.com/Drenso/GenPhrase)

GenPhrase is a secure passphrase generator for PHP applications. GenPhrase is based on passwdqc's pwqgen program. See

GenPhrase can be used to generate secure and easy to memorize random passphrases. For example output, see [examples](#what-kind-of-passphrases-genphrase-generate).

GenPhrase can use arbitrary size wordlists. Words for a passphrase are selected uniformly at random from the wordset.

GenPhrase has a series of small security bug bounties. For more information, see [GenPhrase Security Bug Bounties](http://timoh6.github.io/2014/08/20/GenPhrase-security-bug-bounties.html).

Requirements
------------

[](#requirements)

GenPhrase requires PHP version 5.3 or greater with BC Math (--enable-bcmath). mbstring extension must be available if words are modified (e.g. capitalized).

**HHVM compatibility**

HipHop VM v2.3 and later is confirmed to support GenPhrase. Earlier versions of HHVM may work as well.

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

[](#installation)

GenPhrase supports installation using Composer, but make sure you use at least Composer version 1.0.0-beta1 to install GenPhrase (Composer was vulnerable to MITM attacks before 1.0.0-beta1):

[genphrase/genphrase ](https://packagist.org/packages/genphrase/genphrase)

Passphrase generation with GenPhrase
------------------------------------

[](#passphrase-generation-with-genphrase)

By default, GenPhrase generates passphrases using english words (english.lst). Those passphrases will have at least 50 bits of entropy.

GenPhrase has currently two built-in wordlists: english.lst (default) and diceware.lst. You can add/remove/combine wordlists as you like.

More about the original english wordlist via Openwall: [http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/passwdqc/passwdqc/wordset\_4k.c?rev=1.5;content-type=text%2Fplain](http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/passwdqc/passwdqc/wordset_4k.c?rev=1.5;content-type=text%2Fplain)

The only modification between the GenPhrase english wordlist and the Openwall wordlist is we changed all the words to be lowercase.

Note, the Diceware list bundled with GenPhrase as of 1.1.0 is EFF's "long" version, but without four words which contains "-" character (as this character is a GenPhrase separator character). For more information about EFF's Diceware list, see:

Note, GenPhrase allows you to specify separator characters which may be used between the words. If you want to specify these separator characters, make sure you use only unique single-byte characters. More information about setting separator characters is in the usage examples below.

### What kind of passphrases GenPhrase generate?

[](#what-kind-of-passphrases-genphrase-generate)

A few examples to demonstrate the output:

With default settings, the passphrase would be for example like:

```
Alter Berlin Paint meaning

```

Generating a passphrase having 40 bits of entropy:

```
musica$Menu&Quota

```

A passphrase having 50 bits of entropy and separator characters and word capitalizing disabled:

```
setthenrolegiftdancing

```

Usage
-----

[](#usage)

```
