pax_global_header 0000666 0000000 0000000 00000000064 14462022215 0014510 g ustar 00root root 0000000 0000000 52 comment=10a249f6e05804a6424fc50cc357498cac1bdc7c
pwdsphinx-1.0.18/ 0000775 0000000 0000000 00000000000 14462022215 0013623 5 ustar 00root root 0000000 0000000 pwdsphinx-1.0.18/.github/ 0000775 0000000 0000000 00000000000 14462022215 0015163 5 ustar 00root root 0000000 0000000 pwdsphinx-1.0.18/.github/workflows/ 0000775 0000000 0000000 00000000000 14462022215 0017220 5 ustar 00root root 0000000 0000000 pwdsphinx-1.0.18/.github/workflows/hcodeql-analysis.yml 0000664 0000000 0000000 00000003215 14462022215 0023204 0 ustar 00root root 0000000 0000000 name: "CodeQL"
on:
push:
branches: [master, ]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: '0 22 * * 2'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
pwdsphinx-1.0.18/GettingStarted.md 0000664 0000000 0000000 00000033424 14462022215 0017103 0 ustar 00root root 0000000 0000000 # Getting started
So you want to start using SPHINX for handling your passwords. Great, Welcome!
First you need to decide if you want to host your own server (we call
it oracle), or you want to use someone elses oracle. It's ok to use
someone elses server, as we say the oracle can be hosted by your worst
nightmare enemy, they will not learn anything about your passwords[1].
It is important to note, that if you want to use sphinx, your client
needs to be able to connect to the oracle.
## Installing the sphinx CLI client
If you are on debian or derivates a simple
```
% sudo apt install pwdsphinx
```
should suffice and you can skip over to the next section to configure the client.
But before skipping you might also want to install these optional dependencies:
```
% apt install pinentry-gtk2 xdotool xinput
```
If you are not on debian derivates, you need to build two dependencies
manually. Let's start with libsphinx:
```
% git clone https://github.com/stef/libsphinx
% cd libsphinx/src
% sudo apt install install python3 libsodium libsodium-dev
% sudo PREFIX=/usr make install
```
We also need libequihash:
```
% git clone https://github.com/stef/equihash
% cd equihash
% sudo PREFIX=/usr make install
```
And finally install the client itself:
```
% pip install pwdsphinx
```
Dependencies might also needed for some things:
```
% apt install pinentry-gtk2 xdotool xinput
```
(replace `apt install` and the package names with whatever equivalent
your distro provides)
## Configuring the sphinx CLI client
Create a config file `~/.sphinxrc` and insert the correct address and
port for the server (oracle) you are going to use:
```
[client]
address = your.sphinx-server.tld
port = 443
timeout = 3
```
Now you should be ready to initialize your sphinx client:
```
% sphinx init
```
This will create a file `~/.sphinx/masterkey`, you should make a
backup of this file, and if you intend to use sphinx on other devices
sharing the same passwords on them, you must copy this file there as
well. If you intend to use `androsphinx` our android sphinx client,
you can also do:
```
sphinx qr key
```
And have this qr-code read by the androsphinx client to use the same
config as you have setup here.
You should be ready to go:
```
echo -n "password" | sphinx create testuser testhost
```
This should give you a long very random password as output. You can
now check if you get the same password back, but since echoing
passwords on the command line is not very smart, let's try with a tool
that comes with pwdsphinx: `getpwd`:
```
getpwd | sphinx get testuser testhost
```
This should pop up a password query window, where you should enter
'password' as the password, the response should be the long random
password that was returned when you used the create command.
And you can now also try to delete this test password, as you surely
don't want to litter around:
```
sphinx delete testuser testhost
```
You might wonder, why you don't need a password for deletion - that
actually depends on the `rwd_keys` setting, read about that in the man
page. However deletion does require that the masterkey in `~/.sphinx/`
is actually correct.
Now if you do again (being lazy and not using `getpwd`):
```
echo -n "password" | sphinx get testuser testhost
```
You should get an error.
Congrats, you just setup sphinx! Read up in the man pages
(https://github.com/stef/pwdsphinx/tree/master/man) more about how to
get the most out of sphinx.
## Setting up a Firefox addon
First install the sphinx CLI client - see the section above on more
info on that.
Then install the addon from the mozilla addons store:
https://addons.mozilla.org/en-US/firefox/addon/websphinx/
The WebSphinx addon also requires the installation of a native
messaging host - which is terminology and it really means backend.
Websphinx consists of two parts, the frontend which is the addon. And the backend which handles everything.
You can install the addon from the [firefox addon store](https://addons.mozilla.org/en-US/firefox/addon/websphinx/).
The WebSphinx addon requires the installation of a native messaging host - which is terminology and it really means backend.
You will need to install a graphical pinentry,
- either sudo apt-get install pinentry-qt
- or sudo apt-get install pinentry-gtk2
- or sudo apt-get install pinentry-gnome3
- or sudo apt-get install pinentry-fltk
(or anything equivalent to apt-get install on your OS)
And set the pinentry variant if it is not invoked with
`/usr/bin/pinentry` in your sphinx config file in the `websphinx`
section
Your sphinx config file can be in a couple of locations:
- globally: `/etc/sphinx/config`
- for your user: `~/.sphinxrc`
- or also:`~/.config/sphinx/config`
- and always in the current directory.
To set the pinentry path, add or modify to have a section like this:
```
[websphinx]
pinentry=/usr/bin/pinentry-gtk-2
```
### Native Messaging Host Manifest
Copy [*websphinx.json*](https://github.com/stef/websphinx-firefox/raw/master/websphinx.json), depending on your browser to finish the installation:
- Linux/BSD
- User only: `~/.mozilla/native-messaging-hosts/websphinx.json`
- System-wide: `/usr/{lib,lib64,share}/mozilla/native-messaging-hosts/websphinx.json`
- MacOS: `/Library/Application Support/Mozilla/NativeMessagingHosts/websphinx.json`
You need to change *%PATH%* in *websphinx.json* so it refers to *websphinx.py* which came with pwdsphinx.
1. `mkdir -p ~/.mozilla/native-messaging-hosts`
2. `curl -Lo ~/.mozilla/native-messaging-hosts/websphinx.json https://github.com/stef/websphinx-firefox/raw/master/websphinx.json`
if you followed this guide, `websphinx` should be installed in `/usr/bin` and you should replace the `%PATH%` in `~/.mozilla/native-messaging-hosts/websphinx.json` to `/usr/bin` so the file looks like this:
```
{
"name": "websphinx",
"description": "Host for communicating with pwdphinx",
"path": "/usr/bin/websphinx",
"type": "stdio",
"allowed_extensions": [
"sphinx@ctrlc.hu"
]
}
```
### Final step
Restart your browser in which the addon is installed and enjoy.
## Setting up a Chrome derivate addon (including ms edge, opera, brave, etc)
Websphinx consists of two parts, the frontend which is the addon. And
the backend which handles everything.
First install the sphinx CLI client, see the above for more information on that.
WebSphinx is not in the Chrome Web Store, if you want to install the addon
follow these steps (this applies to all Operating Systems):
1. Create a directory on your filesystem containing the files in the
websphinx directory.
2. Start your browser if it is not running,
3. open [chrome://extension](chrome://extension) in your browser,
4. enable `Developer Mode`,
5. `Load Unpacked Extension` and provide the directory created in step 1.,
6. If all went well, you should get a yellowyish sphinx button.
The WebSphinx addon requires the installation of a native messaging
host - which is terminology and it really means backend.
You will need to install a graphical pinentry,
- either sudo apt-get install pinentry-qt
- or sudo apt-get install pinentry-gtk2
- or sudo apt-get install pinentry-gnome3
- or sudo apt-get install pinentry-fltk
(or anything equivalent to apt-get install on your OS)
And set the pinentry variant if it is not invoked with
`/usr/bin/pinentry` in your sphinx config file in the `websphinx`
section
Your sphinx config file can be in a couple of locations:
- globally: `/etc/sphinx/config`
- for your user: `~/.sphinxrc`
- or also:`~/.config/sphinx/config`
- and always in the current directory.
To set the pinentry path, add or modify to have a section like this:
```
[websphinx]
pinentry=/usr/bin/pinentry-gtk-2
```
### Native Messaging Host Manifest
Copy [*websphinx.json*](https://github.com/stef/websphinx-firefox/raw/master/websphinx.json), depending on your browser to finish the installation:
- Linux/BSD
- Per-user: `~/.config/{google-chrome,chromium}/NativeMessagingHosts/websphinx.json`
- System: `/etc/{opt/chrome,chromium}/native-messaging-hosts/websphinx.json`
- MacOS
- Per-user: `~/Library/Application Support/{Google/Chrome,Chromium}/NativeMessagingHosts/websphinx.json`
- System-wide: `/Library/{Google/Chrome,Chromium}/NativeMessagingHosts/websphinx.json`
You need to change *%PATH%* in *websphinx.json* so it refers to *websphinx.py* which came with pwdsphinx.
Assuming you have chromium follow these steps (otherwise replace chromium with google-chrome, or even possibly opera?)
1. `mkdir -p ~/.config/chromium/NativeMessagingHosts`
2. `curl -Lo ~/.config/chromium/NativeMessagingHosts/websphinx.json https://github.com/stef/websphinx-chrom/raw/master/websphinx.json`
if you followed this guide, `websphinx` should be installed in `/usr/bin` and you should replace the `%PATH%` in `~/.config/chromium/NativeMessagingHosts/websphinx.json` to `/usr/bin` so the file looks like this:
```
{
"name": "websphinx",
"description": "Host for communicating with Sphinx",
"path": "/usr/bin/websphinx",
"type": "stdio",
"allowed_origins": [
"chrome-extension://ojbhlhidchjkmjmpeonendekpoacahni/"
]
}
```
### Final step
Restart your browser in which the addon is installed and enjoy.
## Hosting your own oracle
Great! You should host your own oracle, and make it available also to
all your friends and family! The recommended way to do so is to
dedicate cheap and small single-board-computer to this task, which
does nothing else. An old Raspberry Pi 1 is enough, the oracle does
not use much resources.
## Installation
You need to install sphinx, either by using `pip`:
```
pip install pwdsphinx
```
or on Debian derivates:
```
apt install pwdsphinx
```
### Getting a TLS certificate using nginx and letsencrypt
First you need to generate an account and a domain key:
```
openssl genrsa 4096 > account.key
openssl genrsa 4096 > domain.key
```
Then you neeed to create a certificate signing request (CSR) for your
domains. For a single domain you can use:
```
openssl req -new -sha256 -key domain.key -subj "/CN=yoursite.com" > domain.csr
```
If you have multiple domains (like www.yoursite.com and yoursite.com) and a new openssl, then:
```
openssl req -new -sha256 -key domain.key -subj "/" -addext "subjectAltName = DNS:yoursite.com, DNS:www.yoursite.com" > domain.csr
```
Or if you have an old openssl < 1.1.1:
```
openssl req -new -sha256 -key domain.key -subj "/" -reqexts SAN -config <(cat /etc/ssl/openssl.cnf <(printf "[SAN]\nsubjectAltName=DNS:yoursite.com,DNS:www.yoursite.com")) > domain.csr
```
Now you need nginx, and a challenges director it can serve:
```
apt install nginx
mkdir -p /var/www/challenges/
```
The configuration of nginx is the following:
```
# Example for nginx
server {
listen 80;
server_name yoursite.com www.yoursite.com;
location /.well-known/acme-challenge/ {
alias /var/www/challenges/;
try_files $uri =404;
}
...the rest of your config
}
```
And finally use acme-tiny to get our signed certificate
```
apt install acme-tiny
acme_tiny --account-key ./account.key --csr ./domain.csr --acme-dir /var/www/challenges/ > ./signed_chain.crt
```
Tada! you should have a file called `signed_chain.crt` which contains
your cert, and the file `domain.key` which you generated at the
beginning is your secret key for the oracle.
## Configuration
When you have a TLS cert and key, you can start configuring the
oracle. A full configuration file for the oracle looks as follows:
```
[server]
# the IP address the server is listening on
#address="127.0.0.1"
# the port on which the server is listening, use 443 if available, so that
# the oracle can be accessed from behind tight firewalls
#port=2355
# ssl key - no default must be specified
ssl_key="server.der"
# ssl cert - no default must be specified
ssl_cert="cert.pem"
# tcp connection timeouts, increase in case you have bad networks, with the
# caveat that this might lead to easier resource exhaustion - blocking all
# workers.
#timeout=3
# how many worker processes can run in parallel
# max_kids=5
# the root directory where all data is stored
#datadir= "/var/lib/sphinx"
# whether to produce some output on the console
#verbose=false
# decay ratelimit after rl_decay seconds
#rl_decay= 1800
# increase hardness after rl_threshold attempts if not decaying
#rl_threshold= 1
# when checking freshness of puzzle solution, allow this extra
# gracetime in addition to the hardness max solution time
#rl_gracetime=10
```
You need to set the `address` to whatever IP address you want the
oracle to be listening on. And you should set the `port` if possible
to 443, that will enable you to have always access to the oracle when
you are on the go, since other ports might very well be firewalled,
but port 443 is very-very rarely. You also need to set the `ssl_key`
to the file `domain.key` , and the `ssl_cert` to the file
`signed_chain.crt` both from the previous section "getting a tls cert..."
The rest of the config settings you don't have to touch. When done,
simply run `oracle`, this will start the server in the foreground.
Use whatever your distro provides to daemonize and log the output of
servers to have the server automatically started at reboot.
Congratulations! Now invite your friends (and enemies!) to use your
instance :) You might also want to setup the whole thing as a tor
hidden service, so you can protect the privacy of your users even
better, but how to do so is left as an exercise to the dear reader.
[1] The only thing they can learn is the frequency how often you
interact with a certain password, and which passwords belong to the
same user and host, for example if you have an admin and a
non-privileged account at the same host the oracle user could find out
that these two are related. Also whoever is hosting the oracle can
mount a denial-of-service against you by not responding or corrupting
their answers. But your passwords would be safe, nevertheless. Even if
their "database" leaks to the internet, or criminals.
pwdsphinx-1.0.18/LICENSE 0000664 0000000 0000000 00000104513 14462022215 0014634 0 ustar 00root root 0000000 0000000 GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Copyright (C)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
.
pwdsphinx-1.0.18/LICENSES/ 0000775 0000000 0000000 00000000000 14462022215 0015030 5 ustar 00root root 0000000 0000000 pwdsphinx-1.0.18/LICENSES/CC-BY-SA-4.0.txt 0000664 0000000 0000000 00000043770 14462022215 0017201 0 ustar 00root root 0000000 0000000
Creative Commons Attribution-ShareAlike 4.0 International
Creative Commons Corporation ("Creative Commons") is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an "as-is" basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor's permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public : wiki.creativecommons.org/Considerations_for_licensees
Creative Commons Attribution-ShareAlike 4.0 International Public License
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
Section 1 – Definitions.
a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
c. BY-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License.
d. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
e. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
f. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
g. License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike.
h. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
i. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
j. Licensor means the individual(s) or entity(ies) granting rights under this Public License.
k. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
l. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
m. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
Section 2 – Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
A. reproduce and Share the Licensed Material, in whole or in part; and
B. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
3. Term. The term of this Public License is specified in Section 6(a).
4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
5. Downstream recipients.
A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
B. Additional offer from the Licensor – Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter's License You apply.
C. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this Public License.
3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties.
Section 3 – License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified form), You must:
A. retain the following if it is supplied by the Licensor with the Licensed Material:
i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of warranties;
v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
b. ShareAlike.In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply.
1. The Adapter's License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License.
2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material.
3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply.
Section 4 – Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database;
b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and
c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
Section 5 – Disclaimer of Warranties and Limitation of Liability.
a. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
b. To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
Section 6 – Term and Termination.
a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
2. upon express reinstatement by the Licensor.
c. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
d. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
Section 7 – Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
Section 8 – Interpretation.
a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the "Licensor." The text of the Creative Commons public licenses is dedicated to the public domain under the CC0 Public Domain Dedication. Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark "Creative Commons" or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
Creative Commons may be contacted at creativecommons.org.
pwdsphinx-1.0.18/LICENSES/GPL-3.0-or-later.txt 0000664 0000000 0000000 00000104513 14462022215 0020240 0 ustar 00root root 0000000 0000000 GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc.
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
Copyright (C)
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
.
pwdsphinx-1.0.18/MANIFEST.in 0000664 0000000 0000000 00000000111 14462022215 0015352 0 ustar 00root root 0000000 0000000 include README.md
include *.py
include man/*.1
include GettingStarted.md
pwdsphinx-1.0.18/README.md 0000664 0000000 0000000 00000026640 14462022215 0015112 0 ustar 00root root 0000000 0000000
sphinx: a password **S**tore that **P**erfectly **H**ides from **I**tself (**N**o **X**aggeration)
pwdsphinx is python wrapper around libsphinx - a cryptographic password storage
as described in https://eprint.iacr.org/2015/1099
## Dependencies
You need [libsphinx](https://github.com/stef/libsphinx) and [libequihash](https://github.com/stef/equihash/) for the python reference frontend.
You need also to install `pysodium` using either your OS package
manager or pip.
If you want to use also the websphinx browser extension you need to
install also an X11 variant of pinentry from the gnupg project:
- either `apt-get install pinentry-qt`
- or `apt-get install pinentry-gtk2`
- or `apt-get install pinentry-gnome3`
- or `apt-get install pinentry-fltk`
(or anything equivalent to `apt-get install` on your OS)
## Installation
`pip3 install pwdsphinx` should get you started.
## API
`sphinxlib` is a `ctypes`-based python wrapper around [libsphinx](https://github.com/stef/libsphinx), so
you can build whatever you fancy immediately in python. The interface
exposed wraps the 3 sphinx functions from the library like this:
```
def challenge(pwd)
```
returns bfac and chal
```
def respond(chal, secret)
```
return the response
```
def finish(pwd, bfac, resp)
```
returns the raw 32 byte password.
## Server/Client
Since the sphinx protocol only makes sense if the "device" is
somewhere else than where you type your password, pwdsphinx
comes with a server implemented in py3 which you can host off-site
from your usual desktop/smartphone. Also a client is supplied which is
able to communicate with the server and manage passwords.
Both the client and the server can be configured by any of the
following files:
- `/etc/sphinx/config`
- `~/.sphinxrc`
- `~/.config/sphinx/config`
- `./sphinx.cfg`
Files are parsed in this order, this means global settings can be
overridden by per-user and per-directory settings.
### oracle - the server
pwdsphinx comes with a python reference implementation of a extended sphinx
server called oracle.
The server can be "configured" by changing the variables in the
`[server]` section of the config file.
The `address` is the IP address on which the server is listening,
default is `localhost` - you might want to change that.
The `port` where the server is listening is by default 2355.
`datadir` specifies the data directory where all the device "secrets"
are stored, this defaults to "data/" in the current directory. You
might want to back up this directory from time to time to an encrypted
medium.
`verbose` enables logging to standard output.
`timeout` sets the timeout for any connection the server keeps open.
`max_kids` sets the number maximum requests handled in parallel. The
`timeout` config variable makes sure that all handlers are recycled in
predictable time.
`rl_decay` specifies the number of seconds after which a ratelimit level
decays to an easier difficulty.
`rl_threshold` increase the difficulty of ratelimit puzzles if not
decaying.
`rl_gracetime` gracetime in seconds added to the expcted time to solve
a rate-limiting puzzle.
Change these settings to fit your needs. Starting the server
can be done simply by:
```
oracle
```
### sphinx - the client
This is the client that connects to the oracle to manage passwords
using the extended sphinx protocol.
#### Client Configuration
Like the server, the client can be configured changing the settings in
the `[client]` section of the config file. The `host` and `port` should
match what you set in the oracle.
The datadir (default: `~/.sphinx`) variable holds the location for your client
parameters. Particularly it contains a masterkey which is used to derive
secrets. The master key - if not available - is generated by issuing an init
command. You **should** back up and encrypt this master key.
`rwd_keys` toggles if the master password is required for
authentication of management operations. If it is False it protects
against offline master password bruteforce attacks - which is also a
security guarantee of the original SPHINX protocol. The drawback is
that for known (host,username) tuples the seeds/blobs can be
changed/deleted by an attacker if the clients masterkey is available
to them. But neither the master nor the account password can leak this
way. This is merely a denial-of-service vector. If rwd_keys is True,
then this eliminates the denial-of-service vector, but instead
eliminates the offline-bruteforce guarantee of the SPHINX
protocol. Note that the oracle is oblivious to this setting, this is
purely a client-side toggle, in theory it is possible to have
different settings for different "records" on the oracle.
`validate_password` Stores a check digit of 5 bits in on the oracle,
this helps to notice most typos of the master password, while
decreasing security slightly.
#### Operations
The client provides the following operations: Create, Get, Change, Commit,
Undo, List and Delete. All operations need a username and a site this
password belongs to, even if they're only empty strings.
#### Create password
Creating a new password for a site is easy, pass your "master"
password on standard input to the client, and provide parameters like
in this example:
```
echo -n 'my master password' | sphinxy create username example.com ulsd 0 ' !"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~'
```
The parameters to the client are `create` for the operation, then `username`
for the username on the site `example.com` then a combination of the
letters `ulsd` and the `0` for the size of the final password. The letters
`ulsd` stand in order for the following character classes: `u` upper-case
letters, `l` lower-case letters, `s` symbols and `d` for digits. The `s` is a
short-cut to allow all of the symbols, if you have a stupid server that limits
some symbols, you can specify the allowed symbols explicitly. Currently these
are the symbols supported (note the leading space char):
```
!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
```
Be careful, if you specify these on the command-line you'll have to
escape the quotes you use for enclosing this list and possibly the
backslash char that is also part of this list. In the `create
username` example above the symbols are correctly escaped, in case you
need to copy/paste them.
If you do not provide password rules, they will be defaulting to 'ulsd' and
length as long as possible.
If the command runs successfully - the resulting new high-entropy password
according to the given rules is printed to the console.
In case for some reason you cannot use random passwords with your
account, or you want to store a "password" that you cannot change,
like a PIN code for example, or a passphrase shared with your
colleagues, you can specify a maximuxm 38 characte long password, that
will be generated by the SPHINX client for you. In that case the
command line looks like this (note the same syntax also works for the
`change` operation)
```
echo -n 'my master password' | sphinx create username example.com "correct_battery-horse#staple"
```
In this case you cannot specify neither the accepted character
classes, nor the size, nor symbols.
Note1, since the master password is not used to encrypt anything, you can
actually use different "master" passwords for different user/site combinations.
Note2, using echo is only for demonstration, you should use something like this
instead (or even directly getpwd from the contrib directory):
```
echo GETPIN | pinentry | grep '^D' | cut -c3- | sphinx create username example.com ulsd 0
```
Using pinentry you can go fancy and do double password input, and even have
something checking password quality for you, check it out, it's quite
versatile.
#### Get password
Getting a password from the sphinx oracle works by running the
following command:
```
echo -n 'my master password' | sphinx get username example.com
```
Here again you supply your master password on standard input, provide
the `get` operation as the first parameter, your `username` as the 2nd
and the `site` as the 3rd parameter. The resulting password is
returned on standard output.
#### Change password
You might want to (or are forced to regularly) change your password, this
is easy while you can keep your master password the unchanged (or you
can change it too, if you want). The command is this:
```
echo -en 'my master password\nnew masterpassword' | sphinx change username example.com 'ulsd' 0 ' !"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~'
```
Here again you supply your master password on standard input, but
separated by a new-line you also provide the new master password. The
new master password can be the same as the old, but can also be a new
password if you want to change also the master password. You provide
the `change` operation as the first parameter to the client, your
`username` as the 2nd and the `site` as the 3rd parameter. You also
can provide similar password generation rule parameters that were also
used to create the original password, in case your account has new
password rules and you want/have to accomodate them. Your new new
password is returned on standard output.
#### Committing a changed password
After changing the password, you will still get the old password when running
`get`. To switch to use the new password you have to commit the changes with
```
echo -n 'my master password' | sphinx commit username example.com
```
#### Undoing a password commit
If you somehow messed up and have to go back to use the old password, you can
undo committing your password using:
```
echo -n 'my master password' | sphinx undo username example.com
```
#### Deleting passwords
In case you want to delete a password, you can do using the following
command:
```
echo -n "my master password" | sphinx delete username example.com
```
You provide the `delete` operation as the first parameter to the
client, your `username` as the 2nd and the `site` as the 3rd
parameter. This command does not provide anything on standard output
in case everything goes well.
#### QR code config
In case you want to use phone with the same sphinx server, you need to export
your config to the phone via a QR code.
```
sphinx qr
```
Will display a QR code containing only public information - like the server
host and port, and if you use rwd_keys. This is mostly useful if you want to
share your setup with a friend or family.
If you want to connect your own phone to the setup used with pwdsphinx, you
also need to export your client secret in the QR code:
```
sphinx qr key
```
This contains your client secret, and you should keep this QR code
confidential. Make sure there is no cameras making copies of this while this QR
code is displayed on your screen.
If for whatever reason you want to display the QR code as an SVG, just append
the `svg` keyword to the end of the `sphinx qr` command.
## X11 frontend
You can find a bunch of shell-scripts that are based on
`pinentry-(gtk|qt)`, `xinput`, `xdotool` and `dmenu`, the top-level
entry to these is the `dmenu-sphinx.sh` script, which stores its
history of entered hostnames in `~/.sphinx-hosts` - if the hosts are
in any way sensitive, you might want to link this file to
`/dev/null`. The `contrib/README.md` should give you an idea of how
else to combine these scripts.
## Credits
This project was funded through the NGI0 PET Fund, a fund established
by NLnet with financial support from the European Commission's Next
Generation Internet programme, under the aegis of DG Communications
Networks, Content and Technology under grant agreement No 825310.
pwdsphinx-1.0.18/configs/ 0000775 0000000 0000000 00000000000 14462022215 0015253 5 ustar 00root root 0000000 0000000 pwdsphinx-1.0.18/configs/chrome/ 0000775 0000000 0000000 00000000000 14462022215 0016530 5 ustar 00root root 0000000 0000000 pwdsphinx-1.0.18/configs/chrome/websphinx.json 0000664 0000000 0000000 00000000333 14462022215 0021431 0 ustar 00root root 0000000 0000000 {
"name": "websphinx",
"description": "Host for communicating with Sphinx",
"path": "/usr/bin/websphinx",
"type": "stdio",
"allowed_origins": [
"chrome-extension://ojbhlhidchjkmjmpeonendekpoacahni/"
]
}
pwdsphinx-1.0.18/configs/config 0000664 0000000 0000000 00000004125 14462022215 0016445 0 ustar 00root root 0000000 0000000 # the client section is only needed if you use the client functionality
[client]
# whether to produce some output on the console
verbose = False
# the ip address or hostname the server is listening on
address = 127.0.0.1
# the port on which the server is listening
port = 2355
# the directory where the client stores its master secret - you might want to
# back this up
datadir = ~/.sphinx/
# master password optional for authentication, if it is False it protects
# against offline master pwd bruteforce attacks. The drawback is that for known
# (host,username) tuples the seeds/blobs can be changed/deleted by an attacker
# if the client masterkey is known
# rwd_keys=False
# stores a check digit of 5 bits in the rule blob, this helps to notice most
# typos of the master password, while decreasing security slightly
validate_password=True
# the server section is only needed if you run the oracle yourself.
[server]
# the ipv4 address the server is listening on
# address="127.0.0.1"
# the port on which the server is listening, use 443 if available, so that
# the oracle can be accessed from behind tight firewalls
port=2355
# ssl key
ssl_key="/etc/ssl/sphinx/server.der"
# ssl cert
ssl_cert="/etc/ssl/sphinx/cert.pem"
# tcp connection timeouts, increase in case you have bad networks, with the
# caveat that this might lead to easier resource exhaustion - blocking all
# workers.
#timeout=3
# how many worker processes can run in parallel
# max_kids=5
# the root directory where all data is stored, default: /var/lib/sphinx
datadir= "/var/lib/sphinx"
# whether to produce some output on the console
verbose=false
# decay ratelimit after rl_decay seconds
rl_decay= 1800
# increase hardness after rl_threshold attempts if not decaying
rl_threshold= 1
# when checking freshness of puzzle solution, allow this extra
# gracetime in addition to the hardness max solution time
rl_gracetime=10
# the websphinx section is only needed if you use the browser webextensions
[websphinx]
# the path of your pinentry program
pinentry=/usr/bin/pinentry
# a file where websphinx logs, this is only for dev/debug purposes
log=
pwdsphinx-1.0.18/configs/firefox/ 0000775 0000000 0000000 00000000000 14462022215 0016715 5 ustar 00root root 0000000 0000000 pwdsphinx-1.0.18/configs/firefox/websphinx.json 0000664 0000000 0000000 00000000273 14462022215 0021621 0 ustar 00root root 0000000 0000000 {
"name": "websphinx",
"description": "Host for communicating with pwdphinx",
"path": "/usr/bin/websphinx",
"type": "stdio",
"allowed_extensions": [
"sphinx@ctrlc.hu"
]
}
pwdsphinx-1.0.18/contrib/ 0000775 0000000 0000000 00000000000 14462022215 0015263 5 ustar 00root root 0000000 0000000 pwdsphinx-1.0.18/contrib/Makefile 0000664 0000000 0000000 00000003167 14462022215 0016732 0 ustar 00root root 0000000 0000000 clean:
install: $(DESTDIR)$(prefix)/usr/bin/dmenu-sphinx $(DESTDIR)$(prefix)/usr/bin/exec-on-click \
$(DESTDIR)$(prefix)/usr/bin/getpwd $(DESTDIR)$(prefix)/usr/bin/type-pwd \
$(DESTDIR)$(prefix)/usr/bin/otp.sphinx $(DESTDIR)$(prefix)/usr/bin/pass.sphinx \
$(DESTDIR)$(prefix)/usr/bin/user-pass-otp.sphinx $(DESTDIR)$(prefix)/usr/bin/user-pass.sphinx \
$(DESTDIR)$(prefix)/usr/bin/getacc-user-pass.sphinx \
$(DESTDIR)$(prefix)/usr/bin/sphinx-x11 $(DESTDIR)$(prefix)/usr/bin/sphage \
$(DESTDIR)$(prefix)/usr/share/doc/pwdsphinx-tools/README.x11.md
$(DESTDIR)$(prefix)/usr/bin/dmenu-sphinx: dmenu-sphinx
install -D -m 0755 $< $@
$(DESTDIR)$(prefix)/usr/bin/exec-on-click: exec-on-click
install -D -m 0755 $< $@
$(DESTDIR)$(prefix)/usr/bin/getpwd: getpwd
install -D -m 0755 $< $@
$(DESTDIR)$(prefix)/usr/bin/type-pwd: type-pwd
install -D -m 0755 $< $@
$(DESTDIR)$(prefix)/usr/bin/sphinx-x11: sphinx-x11
install -D -m 0755 $< $@
$(DESTDIR)$(prefix)/usr/bin/sphage: sphage
install -D -m 0755 $< $@
$(DESTDIR)$(prefix)/usr/bin/otp.sphinx: sphinx-scripts/otp.sphinx
install -D -m 0755 $< $@
$(DESTDIR)$(prefix)/usr/bin/pass.sphinx: sphinx-scripts/pass.sphinx
install -D -m 0755 $< $@
$(DESTDIR)$(prefix)/usr/bin/user-pass-otp.sphinx: sphinx-scripts/user-pass-otp.sphinx
install -D -m 0755 $< $@
$(DESTDIR)$(prefix)/usr/bin/user-pass.sphinx: sphinx-scripts/user-pass.sphinx
install -D -m 0755 $< $@
$(DESTDIR)$(prefix)/usr/bin/getacc-user-pass.sphinx: sphinx-scripts/getacc-user-pass.sphinx
install -D -m 0755 $< $@
$(DESTDIR)$(prefix)/usr/share/doc/pwdsphinx-tools/README.x11.md: README.md
install -D -m 0644 $< $@
.PHONY: clean
pwdsphinx-1.0.18/contrib/README.md 0000664 0000000 0000000 00000007273 14462022215 0016553 0 ustar 00root root 0000000 0000000 # Simple UI tools for using pwdsphinx on X11
This directory contains tools that can be used on their own, or
in concert to interact with pwdsphinx.
## getpwd.sh (depends on pinentry)
This is a simple script which uses `pinentry` from the gnupg project
to query a password and write it out to standard output. Which
`pinentry` variant you use, is up to you, it can be a curses, gtk or
qt interface. This should be safer than echoing a password into
pwdsphinx, since your password will not show up in your process list
nor your command line history. Use it like this:
```
getpwd.sh | sphinx get username hostname
```
## exec-on-click.sh (depends on xinput)
This is a simple shellscript that depends on `xinput`, which waits
until a left-mouse click and then it executes whatever parameters the
script has been called with. For example:
```
echo -n "hello world" | bin/exec-on-click.sh xdotool type --clearmodifiers '$(cat)'
```
Types `hello world` into the current window using xdotool.
## type-pwd.sh (depends on xdotool, exec-on-click and getpwd)
This script combines `getpwd.sh`, `exec-on-click.sh` and the pwdsphinx
client in such a way, that it securely queries for your master
password, and then waits until you click somewhere (hopefully into a
password entry field) and then sends the password as keystrokes. Using
this mechanism you make sure your password is never on your clipboard
where malware might steal it. And also it allows to enter your
password on those braindead stupid sites that disable copy/pasting
into password fields.
Use it as such:
```
type-pwd.sh username hostname
```
and click in the password entry field where you want the password to
be entered.
## dmenu-sphinx.sh (depends on dmenu, type-pwd.sh)
This tool builds on type-pwd.sh, it uses dmenu in order to query a
hostname, then depending if only one username or more are known by the
oracle - if only one then the next step is skipped: provides a choice
which username to use. Then `type-pwd.sh` invoked using the selected
user and hostname.
## sphinx-x11
This is a simple "script" language interpreter that integrates the
SPHINX CLI with X11. In the `sphinx-scripts` directory you can find 3
example scripts:
- pass.sphinx
- user-pass.sphinx
- user-pass-otp.sphinx
each of these scripts waits for the user to click, then they retrieve
the relevant password (and TOTP token) before inserting it into the
form fields, navigating between them with `tab` and `enter`. You are
welcome to contribute adapted sphinx-scripts for websites that have
other login semantics. As an example the `user-pass-otp.sphinx` script
is explained below:
```
#!./sphinx-x11
wait-for-click
user
tab
pwd
tab
enter
wait-for-click
otp
enter
```
The first line specifies `sphinx-x11` as the interpreter. The script
itself then waits for the user to click (line 3), then in line 4
inserts the `user` - which is specified as the first parameter to this
script. Line 5 injects a `tab` so the next form field is
selected. Then pwdsphinx/getpwd is used to get the password for `user`
and `host` - the host being the 2nd parameter to this script. `enter`
is used to submit this form in line 8. Since this is a new form the
script waits (line 9) for the user to click in the field where the
TOTP value needs to be inserted. Then in line 10 the TOTP value is
queried using pwdsphinx/getpwd, and finally in the last line the TOTP
value is submitted by injecting `enter` into the application.
A note on the OTP support, in this interpreter/implementation an TOTP
value is assumed to be stored with a username prefixed with `otp://`,
so the first `pwd` operation uses e.g. `joe` as a username and then
for the TOTP value it uses `otp://joe` as the username.
pwdsphinx-1.0.18/contrib/dmenu-sphinx 0000775 0000000 0000000 00000000520 14462022215 0017625 0 ustar 00root root 0000000 0000000 #!/usr/bin/env sh
host=$(cat ~/.sphinx-hosts 2>/dev/null | dmenu -p hostname)
tmp=$(mktemp)
{ echo $host; cat ~/.sphinx-hosts 2>/dev/null ; } | sort -u >$tmp && mv $tmp ~/.sphinx-hosts
users=$(sphinx list $host)
[[ "$(echo "$users" | wc -l)" -gt 1 ]] && user=$(echo $users | dmenu -p username) || user=$users
type-pwd "$user" "$host"
pwdsphinx-1.0.18/contrib/exec-on-click 0000775 0000000 0000000 00000001002 14462022215 0017623 0 ustar 00root root 0000000 0000000 #!/usr/bin/env sh
# depends on xinput
MOUSEID=$(xinput --list --short | fgrep "Virtual core pointer" | sed 's/.*id=\([0-9]*\).*/\1/')
THIS=$$
# wait until left mouse click
exec 2>/dev/null
xinput --test-xi2 --root $MOUSEID | while true; do
read -t 1 line
case "$line" in
EVENT\ type\ 16\ \(RawButtonRelease\))
read -t 1 line
read -t 1 details;
case "$details" in
detail:\ 1) pkill -P $THIS xinput ; exit ;;
esac
;;
esac
done
eval "${@}" ;
pwdsphinx-1.0.18/contrib/getpwd 0000775 0000000 0000000 00000000242 14462022215 0016501 0 ustar 00root root 0000000 0000000 #!/bin/sh
prompt=${1:-sphinx}
echo -en "SETTITLE sphinx password prompt\nSETPROMPT ${prompt} password\nGETPIN\n" | pinentry | grep '^D' | cut -c3- | tr -d '\n'
pwdsphinx-1.0.18/contrib/sphage 0000775 0000000 0000000 00000012152 14462022215 0016461 0 ustar 00root root 0000000 0000000 #!/usr/bin/env python3
# This file contains a copy of the reference implementation for
# Bech32/Bech32m, which has this (c) notice:
#
# Copyright (c) 2017, 2020 Pieter Wuille
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
import sys, base64, pysodium
from enum import Enum
class Encoding(Enum):
"""Enumeration type to list the various supported encodings."""
BECH32 = 1
BECH32M = 2
CHARSET = "qpzry9x8gf2tvdw0s3jn54khce6mua7l"
BECH32M_CONST = 0x2bc830a3
def bech32_polymod(values):
"""Internal function that computes the Bech32 checksum."""
generator = [0x3b6a57b2, 0x26508e6d, 0x1ea119fa, 0x3d4233dd, 0x2a1462b3]
chk = 1
for value in values:
top = chk >> 25
chk = (chk & 0x1ffffff) << 5 ^ value
for i in range(5):
chk ^= generator[i] if ((top >> i) & 1) else 0
return chk
def bech32_hrp_expand(hrp):
"""Expand the HRP into values for checksum computation."""
return [ord(x) >> 5 for x in hrp] + [0] + [ord(x) & 31 for x in hrp]
def bech32_verify_checksum(hrp, data):
"""Verify a checksum given HRP and converted data characters."""
const = bech32_polymod(bech32_hrp_expand(hrp) + data)
if const == 1:
return Encoding.BECH32
if const == BECH32M_CONST:
return Encoding.BECH32M
return None
def bech32_create_checksum(hrp, data, spec):
"""Compute the checksum values given HRP and data."""
values = bech32_hrp_expand(hrp) + data
const = BECH32M_CONST if spec == Encoding.BECH32M else 1
polymod = bech32_polymod(values + [0, 0, 0, 0, 0, 0]) ^ const
return [(polymod >> 5 * (5 - i)) & 31 for i in range(6)]
def bech32_encode(hrp, data, spec=2):
"""Compute a Bech32 string given HRP and data values."""
combined = data + bech32_create_checksum(hrp, data, spec)
return hrp + '1' + ''.join([CHARSET[d] for d in combined])
def bech32_decode(bech):
"""Validate a Bech32/Bech32m string, and determine HRP and data."""
if ((any(ord(x) < 33 or ord(x) > 126 for x in bech)) or
(bech.lower() != bech and bech.upper() != bech)):
return (None, None, None)
bech = bech.lower()
pos = bech.rfind('1')
if pos < 1 or pos + 7 > len(bech) or len(bech) > 90:
return (None, None, None)
if not all(x in CHARSET for x in bech[pos+1:]):
return (None, None, None)
hrp = bech[:pos]
data = [CHARSET.find(x) for x in bech[pos+1:]]
spec = bech32_verify_checksum(hrp, data)
if spec is None:
return (None, None, None)
return (hrp, data[:-6], spec)
def convertbits(data, frombits, tobits, pad=True):
"""General power-of-2 base conversion."""
acc = 0
bits = 0
ret = []
maxv = (1 << tobits) - 1
max_acc = (1 << (frombits + tobits - 1)) - 1
for value in data:
if value < 0 or (value >> frombits):
return None
acc = ((acc << frombits) | value) & max_acc
bits += frombits
while bits >= tobits:
bits -= tobits
ret.append((acc >> bits) & maxv)
if pad:
if bits:
ret.append((acc << (tobits - bits)) & maxv)
elif bits >= frombits or ((acc << (tobits - bits)) & maxv):
return None
return ret
def decode(hrp, addr):
hrpgot, data, spec = bech32_decode(addr)
if hrpgot != hrp:
return None
decoded = convertbits(data, 5, 8, False)
if decoded is None or len(decoded) < 2 or len(decoded) > 40:
return None
return decoded
def encode(hrp, data):
ret = bech32_encode(hrp, convertbits(data, 8, 5))
if decode(hrp, ret) == None:
return None
return ret
def usage(help=False):
print("usage: sphage.py [] <[32 bytes of cryptographic entropy] >key")
if help: sys.exit(0)
sys.exit(1)
if __name__ == '__main__':
rwd = sys.stdin.buffer.readline().rstrip(b'\n')
if len(sys.argv)!=2:
usage()
op = sys.argv[1]
if op in ('help', '-h', '--help'):
usage(True)
elif op == "pubkey":
pk = pysodium.crypto_scalarmult_base(rwd)
ret = encode("age", pk)
elif op == "privkey":
ret = encode('age-secret-key-', rwd).upper()
else:
usage()
print(ret)
pwdsphinx-1.0.18/contrib/sphage-test.sh 0000775 0000000 0000000 00000000742 14462022215 0020051 0 ustar 00root root 0000000 0000000 #!/bin/sh
set -e
# simulate output from sphinx
rwd=$(echo "asdf" | sha256sum | cut -d' ' -f 1 | rax2 -s)
# convert rwd to age "identity" (privkey)
privkey=$(mktemp)
echo "$rwd" | python3 sphage privkey >"$privkey"
# convert rwd to age "recipient" (pubkey)
pubkey=$(echo -n "$rwd" | python3 sphage pubkey)
# encrypt and decrypt hello world using the above key pair derived from rwd
echo "hello world" | age -r $pubkey | age --decrypt -i "$privkey"
# clean up
rm -rf "$privkey"
pwdsphinx-1.0.18/contrib/sphinx-scripts/ 0000775 0000000 0000000 00000000000 14462022215 0020261 5 ustar 00root root 0000000 0000000 pwdsphinx-1.0.18/contrib/sphinx-scripts/getacc-user-pass.sphinx 0000775 0000000 0000000 00000000115 14462022215 0024662 0 ustar 00root root 0000000 0000000 #!/usr/bin/sphinx-x11
gethost
getuser
wait-for-click
user
tab
pwd
tab
enter
pwdsphinx-1.0.18/contrib/sphinx-scripts/otp.sphinx 0000775 0000000 0000000 00000000060 14462022215 0022315 0 ustar 00root root 0000000 0000000 #!/usr/bin/sphinx-x11
wait-for-click
otp
enter
pwdsphinx-1.0.18/contrib/sphinx-scripts/pass.sphinx 0000775 0000000 0000000 00000000064 14462022215 0022465 0 ustar 00root root 0000000 0000000 #!/usr/bin/sphinx-x11
wait-for-click
pwd
tab
enter
pwdsphinx-1.0.18/contrib/sphinx-scripts/user-pass-otp.sphinx 0000775 0000000 0000000 00000000126 14462022215 0024240 0 ustar 00root root 0000000 0000000 #!/usr/bin/sphinx-x11
wait-for-click
user
tab
pwd
tab
enter
wait-for-click
otp
enter
pwdsphinx-1.0.18/contrib/sphinx-scripts/user-pass.sphinx 0000775 0000000 0000000 00000000075 14462022215 0023443 0 ustar 00root root 0000000 0000000 #!/usr/bin/sphinx-x11
wait-for-click
user
tab
pwd
tab
enter
pwdsphinx-1.0.18/contrib/sphinx-x11 0000775 0000000 0000000 00000006127 14462022215 0017137 0 ustar 00root root 0000000 0000000 #!/bin/sh
set -e
#set -x
script="$1"
user="$2"
host="$3"
MOUSEID=$(xinput --list --short | grep -F "Virtual core pointer" | sed 's/.*id=\([0-9]*\).*/\1/')
x11_type() {
xdotool type --clearmodifiers "$1"
}
wfc() {
# wait until left mouse click
THIS=$(exec sh -c 'echo "$PPID"')
xinput --test-xi2 --root "$MOUSEID" | while true; do
read -t 1 line || continue
echo "$line" | /bin/grep -qs '^EVENT type 16 (RawButtonRelease)$' && {
read -t 1 line
read -t 1 line
read -t 1 details;
echo "$details" | /bin/grep -qs '^\s*detail: 1$' && {
pkill -9 -e -P "$THIS" xinput >/dev/null
break
}
}
done 2>/dev/null
}
wait_for_click() {
# wrapping wfc so that when xinput is killed the message "KILLED" is suppressed
wfc >/dev/null 2>&1
}
getpwd() {
prompt=${1:-sphinx}
printf "SETTITLE sphinx password prompt\nSETPROMPT %s password\nGETPIN\n" "${prompt}" | pinentry | grep '^D' | cut -c3- | tr -d '\n'
}
pwd() {
getpwd "$user@$host" | { sphinx get "$user" "$host" || return ; } | xdotool type --clearmodifiers "$(head -1)"
}
otp() {
getpwd "$user@$host" | { sphinx get "otp://$user" "$host" || return ; } | /usr/bin/oathtool -b --totp - | xdotool type --clearmodifiers "$(head -1)"
}
tab() {
xdotool key --clearmodifiers Tab
}
enter() {
xdotool key --clearmodifiers enter
}
xdoget() {
title="$1"
shift 1
printf '' | /usr/bin/xclip -i
sleep 0.2
/usr/bin/xdotool key --window "$windowid" "$@"
retries=0
while [ $retries -lt 3 ]; do
sleep 0.2
x=$(/usr/bin/xclip -o)
printf "%s" "$x" | /bin/grep -Eqs '^https?:.*' && {
echo "$x" | cut -d'/' -f3
break
}
retries=$((retries+1))
done
#[ $retries -ge 3 ] && { echo "failed to get host" >&2 ; false; }
}
gethost() {
wait_for_click
windowid=$(/usr/bin/xdotool getactivewindow)
title=$(/usr/bin/xdotool getwindowname "$windowid" | /bin/sed -e 's/^ *//g;s/ *$//g')
case "$title" in
#*Pentadactyl|*Vimperator) host="$(xdoget "$title" Escape y)";;
*Iceweasel|*Firefox) host="$(xdoget "$title" Escape ctrl+l ctrl+a ctrl+c Escape Tab)";;
*Chromium) host="$(xdoget "$title" Escape ctrl+l ctrl+a ctrl+c Escape Tab)";;
#*Uzbl\ browser*) host="$(xdoget "title" Escape y u)";;
#luakit*) host="$(xdoget "title" shift+o Home ctrl+Right Right ctrl+shift+End ctrl+c Escape)";;
esac
#echo "$host"
}
getuser() {
[ -z "$host" ] && { echo "no host" >&2; false; }
users=$(sphinx list "$host")
[ "$(echo "$users" | wc -l)" -gt 1 ] && user=$(echo $users | dmenu -p username) || user=$users
#echo "$user"
}
cat "$script" | while read -r line; do
case "$line" in
type\ *) x11_type "${line##type }";;
wait-for-click) wait_for_click;;
user) x11_type "$user";;
host) x11_type "$host";;
pwd) pwd;;
otp) otp;;
tab) tab;;
enter) enter;;
gethost) gethost;;
getuser) getuser;;
esac
done
pwdsphinx-1.0.18/contrib/type-pwd 0000775 0000000 0000000 00000000160 14462022215 0016757 0 ustar 00root root 0000000 0000000 #!/usr/bin/env sh
getpwd "$1@$2" | sphinx get "$1" "$2" | exec-on-click xdotool type --clearmodifiers '$(cat)'
pwdsphinx-1.0.18/man/ 0000775 0000000 0000000 00000000000 14462022215 0014376 5 ustar 00root root 0000000 0000000 pwdsphinx-1.0.18/man/bin2pass.md 0000664 0000000 0000000 00000003337 14462022215 0016447 0 ustar 00root root 0000000 0000000 % bin2pass(1) | converts binary input to passwords
# NAME
bin2pass - converts binary input to passwords
# SYNOPSIS
```
bin2pass [d|u|l] [] [] ?@[\]^_`{}~
```
Please note that is allowed, and also be careful in quoting special
characters that might be interpreted by your shell, such as `"`, `!`, `\`,
etc...
# EXAMPLES
Generate the longest possible random password from /dev/random, with the
resulting password having characters from digits, lower- and upper-case letters
and the and * symbols.
```
dd if=/dev/random bs=1 count=30 | ./pwdsphinx/bin2pass.py " *"
```
# REPORTING BUGS
https://github.com/stef/pwdsphinx/issues/
# AUTHOR
Written by Stefan Marsiske.
# COPYRIGHT
Copyright © 2023 Stefan Marsiske. License GPLv3+: GNU GPL version 3 or later .
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
# SEE ALSO
`sphinx(1)`
pwdsphinx-1.0.18/man/dmenu-sphinx.md 0000664 0000000 0000000 00000002117 14462022215 0017340 0 ustar 00root root 0000000 0000000 % dmenu-sphinx(1) | dmenu-frontend for retrieving and inserting passwords from sphinx(1) into X11 applications
# NAME
dmenu-sphinx - dmenu-frontend for retrieving and inserting passwords from sphinx(1) into X11 applications
# SYNOPSIS
```
type-pwd username hostname
```
# DESCRIPTION
This tool builds on `type-pwd(1)`, it uses `dmenu(1)` in order to
query a hostname, then depending if only one or more usernames are
known by the oracle - if only one then the next step is skipped:
provides a choice which username to use. Then `type-pwd(1)` is invoked
using the selected user and hostname.
This tool cashes the hostnames it was used with in the file
`~/.sphinx-hosts`.
# REPORTING BUGS
https://github.com/stef/pwdsphinx/issues/
# AUTHOR
Written by Stefan Marsiske.
# COPYRIGHT
Copyright © 2023 Stefan Marsiske. License GPLv3+: GNU GPL version 3 or later .
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
# SEE ALSO
`sphinx(1)`, `type-pwd(1)`, `exec-on-click(1)`, `getpwd(1)`
pwdsphinx-1.0.18/man/exec-on-click.md 0000664 0000000 0000000 00000001624 14462022215 0017344 0 ustar 00root root 0000000 0000000 % exec-on-click(1) | simple tool that executes command when a left mouse-click is detected
# NAME
exec-on-click - simple tool that executes command when a left mouse-click is detected
# SYNOPSIS
```
exec-on-click
```
# DESCRIPTION
This is a simple tool which waits until a left-mouse click and then it
executes whatever parameters the script has been called with.
# EXAMPLE
```
echo -n "hello world" | exec-on-click xdotool type --clearmodifiers '$(cat)'
```
Types `hello world` into the current window using xdotool.
# REPORTING BUGS
https://github.com/stef/pwdsphinx/issues/
# AUTHOR
Written by Stefan Marsiske.
# COPYRIGHT
Copyright © 2023 Stefan Marsiske. License GPLv3+: GNU GPL version 3 or later .
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
# SEE ALSO
`sphinx(1)`
pwdsphinx-1.0.18/man/getpwd.md 0000664 0000000 0000000 00000002127 14462022215 0016214 0 ustar 00root root 0000000 0000000 % getpwd(1) | simple tool that queries a password from a user and writes it to standard output
# NAME
getpwd - simple tool that queries a password from a user and writes it to standard output
# SYNOPSIS
```
getpwd ["prompt"] | sphinx get username hostname
```
# DESCRIPTION
This is a simple script which uses `pinentry` from the gnupg project
to query a password and write it out to standard output. Which
`pinentry` variant you use, is up to you, it can be a curses, gtk or
qt interface. This should be safer than echoing a password into
pwdsphinx, since your password will not show up in your process list
nor your command line history.
The only parameter this tool takes is a prompt to display when asking
for the password.
# REPORTING BUGS
https://github.com/stef/pwdsphinx/issues/
# AUTHOR
Written by Stefan Marsiske.
# COPYRIGHT
Copyright © 2023 Stefan Marsiske. License GPLv3+: GNU GPL version 3 or later .
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
# SEE ALSO
`sphinx(1)`
pwdsphinx-1.0.18/man/makefile 0000664 0000000 0000000 00000002037 14462022215 0016100 0 ustar 00root root 0000000 0000000 all: sphinx.1 oracle.1 bin2pass.1 websphinx.1 getpwd.1 exec-on-click.1 type-pwd.1 dmenu-sphinx.1 sphinx-x11.1 sphage.1 \
otp.sphinx.1 pass.sphinx.1 user-pass-otp.sphinx.1 user-pass.sphinx.1 getacc-user-pass.sphinx.1
install: $(PREFIX)/share/man/man1/sphinx.1 $(PREFIX)/share/man/man1/oracle.1 $(PREFIX)/share/man/man1/bin2pass.1 \
$(PREFIX)/share/man/man1/getpwd.1 $(PREFIX)/share/man/man1/exec-on-click.1 $(PREFIX)/share/man/man1/type-pwd.1 \
$(PREFIX)/share/man/man1/dmenu-sphinx.1 $(PREFIX)/share/man/man1/sphinx-x11.1 $(PREFIX)/share/man/man1/sphage.1 \
$(PREFIX)/share/man/man1/websphinx.1 $(PREFIX)/share/man/man1/otp.sphinx.1 $(PREFIX)/share/man/man1/pass.sphinx.1 \
$(PREFIX)/share/man/man1/user-pass-otp.sphinx.1 $(PREFIX)/share/man/man1/user-pass.sphinx.1
clean:
rm -f *.1
otp.sphinx.1: sphinx-x11.1
ln -s $< $@
pass.sphinx.1: sphinx-x11.1
ln -s $< $@
user-pass-otp.sphinx.1: sphinx-x11.1
ln -s $< $@
user-pass.sphinx.1: sphinx-x11.1
ln -s $< $@
getacc-user-pass.sphinx.1: sphinx-x11.1
ln -s $< $@
%.1: %.md
pandoc -s -o $@ $<
pwdsphinx-1.0.18/man/oracle.md 0000664 0000000 0000000 00000007051 14462022215 0016170 0 ustar 00root root 0000000 0000000 % oracle(1) | server for the SPHINX password manager
# NAME
oracle - server for the SPHINX password manager
# SYNOPSIS
`oracle`
# DESCRIPTION
The SPHINX protocol only makes sense if the server (called oracle) is
somewhere else than where you type your password, pwdsphinx comes with
a server implemented in python3 which you can host off-site from your
usual desktop/smartphone.
The server can be started simply by running `oracle` it does not take
any parameters.
# CONFIGURATION
The server can be configured by any of the following files:
- `/etc/sphinx/config`
- `~/.sphinxrc`
- `~/.config/sphinx/config`
- `./sphinx.cfg`
Files are parsed in this order, this means global settings can be
overridden by per-user and per-directory settings.
The server can be configured by changing the variables in the
`[server]` section of the config file.
The `address` is the IP address on which the server is listening,
default is `localhost` - you might want to change that.
The `port` where the server is listening is by default 2355. Another
recommended values is to use port 433 which is allowed by most
firewalls while 2355 is not.
`ssl_key` and `ssl_cert` must be specified, they point at a traditional TLS
certificate and secret key file. It is recommended to not use self-signed
certs, but to use certs that signed by CAs that are recognised widely by
browsers and other TLS clients.
`datadir` specifies the data directory where all the device "secrets"
are stored, this defaults to "data/" in the current directory. You
might want to back up this directory from time to time to an encrypted
medium.
`verbose` enables logging to standard output.
`timeout` sets the timeout for any connection the server keeps open.
`max_kids` sets the number maximum requests handled in parallel. The
`timeout` config variable makes sure that all handlers are recycled in
predictable time.
`rl_decay` specifies the number of seconds after which a ratelimit level
decays to an easier difficulty.
`rl_threshold` increase the difficulty of ratelimit puzzles if not
decaying.
`rl_gracetime` gracetime in seconds added to the expcted time to solve
a rate-limiting puzzle.
# SECURITY CONSIDERATIONS
The configuration values `max_kids` and `timeout` can be used to tune
how many requests are served in parallel and how long each request is
allowed to take before it gets killed. An attacker might be able to
run a denial-of-service attack against your server, by keeping all
`max_kids` connections "occupied".
Since the server does only know about failed authorizations for
management operations, but not about correctness of master passwords
for get requests, there is no way to mitigate master password
bruteforce attempts aside from ratelimiting. By tuning the
configuration variables starting with `rl_` it is possible to
configure this. If you have clients that have less than 1G RAM, it
might be possible to increase the difficulty to the maximum level
where those devices will not be able to solve the ratelimting
puzzles. Rate-limiting in general should not be noticable, only if
dozens of get requests are served to the same record. At the highest
level the solution should take about 20-40 seconds (depending on your
cpu).
# REPORTING BUGS
https://github.com/stef/pwdsphinx/issues/
# AUTHOR
Written by Stefan Marsiske.
# COPYRIGHT
Copyright © 2023 Stefan Marsiske. License GPLv3+: GNU GPL version 3 or later .
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
# SEE ALSO
`sphinx(1)`, `getpwd(1)`
pwdsphinx-1.0.18/man/sphage.md 0000664 0000000 0000000 00000001547 14462022215 0016176 0 ustar 00root root 0000000 0000000 % sphage(1) | converts 32 bytes binary data into an age(1) keypair
# NAME
sphage - converts 32 bytes binary data into an age(1) keypair
# SYNOPSIS
```
echo "32 byte high-entropy string....." | sphage privkey >/tmp/privatekey
echo "32 byte high-entropy string....." | sphage pubkey >/tmp/pubkey
```
# DESCRIPTION
This is a converter that is meant to convert the raw output of
`sphinx(1)` into a key-pair that can be used by `age(1)` allowing for
more sophisticated secrets manager setups.
# REPORTING BUGS
https://github.com/stef/pwdsphinx/issues/
# AUTHOR
Written by Stefan Marsiske.
# COPYRIGHT
Copyright © 2023 Stefan Marsiske. License GPLv3+: GNU GPL version 3 or later .
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
# SEE ALSO
`sphinx(1)`
pwdsphinx-1.0.18/man/sphinx-x11.md 0000664 0000000 0000000 00000011730 14462022215 0016642 0 ustar 00root root 0000000 0000000 % sphinx-x11(1) | simple script interpreter for integrating password managers with X11
# NAME
sphinx-x11 - simple script interpreter for integrating password managers with X11
# DESCRIPTION
`sphinx-x11(1)` is a simple "script" language interpreter that
integrates the SPHINX CLI with X11.
# SPHINX-SCRIPT PARAMETERS
All `sphinx-x11(1)` scripts expect a username and a hostname as the
first and second parameter respectively.
# VOCABULARY
- `type "text..."`: types the text into the currently focused X11 window.
- `wait-for-click`: waits until the user clicks anywhere.
- `user`: types the username - usually given as the first parameter
to the sphinx-script - into the currently focused X11 window.
- `host`: types the hostname - usually given as the second parameter
to the sphinx-script - into the currently focused X11 window.
- `pwd`: gets a password using `getpwd(1)` and `sphinx(1)`, and
types it into the currently focused X11 window.
- `otp`: gets a TOTP secret stored in `sphinx(1)` using `getpwd(1)`
and generates the TOTP pin using `oathtool(1)`, which is then
typed into the currently focused X11 window.
- `tab`: types a tabulator into the current X11 window, possibly
advancing between form-fields.
- `enter`: sends an enter key press to the currently focused X11
window, possibly submitting a form.
- `gethost`: waits for a left mouse-click on a browser window, and
then copies the URL from the urlbar into the clipboard, and then
strips it down to the hostname and sets an internal "$host"
variable that can then be used with `host` or `pwd`.
- `getuser` dispatches a `sphinx list $host` and if more than one
user is returned, offers them in a dmenu widget, if/when one user
is found/selected it is set as an internal `$user` variable which
can then used for verbs like `user` or `pwd`.
Any lines not consisting of these tokens are simply ignored.
# OTP SUPPORT
In this interpreter/implementation a TOTP value is assumed to be
stored with a username prefixed with `otp://`, so that a regular login
name can co-exist with the according TOTP secret in sphinx.
For example in a common 2FA login the first `pwd` operation uses
e.g. `joe` as a username and then for the TOTP value it uses
`otp://joe` as the username, which allows for seamless 2FA login.
# DEFAULT SCRIPTS
`sphinx-x11(1)` comes with 5 default sphinx-scripts (note on debian and
derivates instead of a `.sphinx` extension they have a `sx11-` prefix):
- pass.sphinx : gets a password using `sphinx(1)`, types
it and submits it.
- user-pass.sphinx : gets a password using `sphinx(1)`,
types the user, then the password and submits it.
- user-pass-otp.sphinx : gets a password, and a TOTP pin
code using `sphinx(1)`, first types the username, then the
password, then submits the form, and finally enters the TOTP pin
and submits that as well.
- otp.sphinx : gets a TOTP pin code using `sphinx(1)`
and types and submits it.
- getacc-user-pass.sphinx: waits for a click on a browser window,
from with it gets the target `host` value, then using that uses
`sphinx list` to get the users associated with this host, and if
one is selected, waits for another click in the user input field of
a login form, then gets a password using `sphinx(1)`, types the user,
then the password and submits it.
Each of these scripts waits for the user to click, then they retrieve
the relevant password (and/or TOTP token) before inserting it into the
form fields, navigating between them with `tab` and `enter`. You are
welcome to contribute adapted sphinx-scripts for websites that have
other login semantics.
# EXAMPLE
As an example the `user-pass-otp.sphinx` script
is explained below:
```
#!./sphinx-x11
wait-for-click
user
tab
pwd
tab
enter
wait-for-click
otp
enter
```
The first line specifies `sphinx-x11(1)` as the interpreter. The script
itself then waits for the user to click (line 3), then in line 4
inserts the `user` - which is specified as the first parameter to this
script. Line 5 injects a `tab` so the next form field is
selected. Then pwdsphinx/getpwd is used to get the password for `user`
and `host` - the host being the 2nd parameter to this script. `enter`
is used to submit this form in line 8. Since this is a new form the
script waits (line 9) for the user to click in the field where the
TOTP value needs to be inserted. Then in line 10 the TOTP value is
queried using pwdsphinx/getpwd, and finally in the last line the TOTP
value is submitted by injecting `enter` into the application.
# REPORTING BUGS
https://github.com/stef/pwdsphinx/issues/
# AUTHOR
Written by Stefan Marsiske.
# COPYRIGHT
Copyright © 2023 Stefan Marsiske. License GPLv3+: GNU GPL version 3 or later .
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
# SEE ALSO
`sphinx(1)`, `type-pwd(1)`, `exec-on-click(1)`, `getpwd(1)`
pwdsphinx-1.0.18/man/sphinx.md 0000664 0000000 0000000 00000026541 14462022215 0016241 0 ustar 00root root 0000000 0000000 % sphinx(1) | command-line client for the SPHINX password manager
# NAME
sphinx - command-line client for the SPHINX password manager
# SYNOPSIS
`sphinx` init
echo "password" | `sphinx` create \ \ [\\\\] [\] [\] [\]
echo "password" | `sphinx` get \ \
echo -e "oldpassword\nnewpassword" | `sphinx` change \ \ [\\\\] [\] [\] [\]
[ echo "password" | ] `sphinx` commit \ \
[ echo "password" | ] `sphinx` undo \ \
[ echo "password" | ] `sphinx` delete \ \
`sphinx` list \
`sphinx` qr [\