Copyright © 2011-2015 Dominik Reichl. Distributed under the terms of the GNU General Public License v2.
OtpKeyProv is a key provider based on one-time passwords. After protecting your database using this plugin, you need to generate and enter one-time passwords in order to open your database.
All generator tokens that follow the OATH HOTP standard (RFC 4226) are supported.
Especially, the plugin has been tested successfully with the following generator tokens:
In order to install OtpKeyProv, copy the files
OtpKeyProv.plgx
and OtpKeyProv_ReadMe.html
into the KeePass application directory (where KeePass.exe
is),
and restart KeePass.
If you wish to uninstall the plugin in the future, simply delete these two files.
After installing OtpKeyProv, you can set up your database to require one-time passwords for opening. To do this, open your database and go 'File' -> 'Change Master Key'. Check 'Key file/provider', select 'One-Time Passwords (OATH HOTP)' in the combo box, and click the [OK] button (do not click the [Create] or [Browse] buttons; these are for key files only). An OTP configuration dialog is now displayed, in which need to provide the generator token's secret key, the current counter, and specify various options; for details see below. When you've filled in everything, click [OK]. After saving the database file, your database now requires entering one-time passwords for opening.
Length of generated OTPs. Here you need to specify of how many characters the OTPs consist that the token generates. According to the OATH HOTP standard, the length must be 6, 7 or 8. If the token allows you to configure the length, it is recommended to choose the maximum length for highest security.
Generator token secret key and counter. Here you need to provide the current secret key and the counter (which is also called 'moving factor') of the generator token. These values can be entered in different formats: Hex, Base64, Base32, UTF-8 and Dec. If you don't know in which format the token displays the values, here are some rules of thumb:
Number of required OTPs. Here you can specify the number of OTPs that need to be entered in order to open the database. The more OTPs, the more secure the database is. See the section 'Security' below for details.
Look-ahead count. OtpKeyProv supports look-ahead windows. When a number n is specified as look-ahead count, n OTPs may be skipped and opening will still work. For example, if the OTP sequence is A B C D E F G H (where each letter represents a multi-digit OTP), 4 OTPs are required and the look-ahead count is 2, then all of the following OTP sequences will open the database: A B C D, B C D E and C D E F.
The default look-ahead count is 0, i.e. only exactly one OTP sequence will work. The higher the look-ahead count is, the less secure the protection of the database is.
Generator token configuration.
In the master key prompt dialog, select 'One-Time Passwords (OATH HOTP)' in the combo box and click [OK]. You're then prompted for the OTP information. There are two modes:
Automation. By default, the KeePass option 'Remember key sources (key file paths, provider names, ...)' is enabled, so the next time you want to open the database the OTP key provider in the combo box will be preselected and you just need to click [OK] (in case you're not combining the OTP lock with a master password or the Windows user account).
If you don't even want to click the [OK] button (i.e. you want to see the
OTP prompt immediately), you can tell KeePass that you're just using the
OTP lock by passing an appropriate command line option.
Create a shortcut to KeePass.exe
or a batch file running
KeePass with the following arguments:
"C:\Path\To\Database.kdbx" -keyfile:"One-Time Passwords (OATH HOTP)"
More information can be found in the KeePass Command Line Options documentation.
Options. On the 'Options' tab of the dialog, the following options are available:
The more OTPs are required to open the database, the more secure it is. The minimum number is 3 (everything below 3 is completely insecure; the database would be crackable within seconds), the maximum number is 6.
The following table summarizes how secure databases are that are protected using OTPs. We assume no other user keys (master password, Windows user account, ...) are used.
The column #OTPs lists the number of one-time passwords required to open a database. The key size can be computed as log2(10OTP Length ⋅ #OTPs) = OTP Length ⋅ #OTPs ⋅ log2(10) ≈ OTP Length ⋅ #OTPs ⋅ 3.322.
OTP Length | #OTPs | Key Size | Rating |
---|---|---|---|
6 | 3 | 60 bits | Very weak |
4 | 80 bits | Moderate | |
5 | 100 bits | Strong | |
6 | 120 bits | Strong | |
7 | 3 | 70 bits | Weak |
4 | 93 bits | Moderate | |
5 | 116 bits | Strong | |
6 | 140 bits | Very strong | |
8 | 3 | 80 bits | Moderate |
4 | 106 bits | Strong | |
5 | 133 bits | Very strong | |
6 | 159 bits | Very strong |
The table assumes a look-ahead count of 0. If a look-ahead count n ≥ 1 is specified, the chance that a brute-force attack enumerating OTPs succeeds is at least n+1 times higher. Thus, it is recommended to keep the look-ahead count as low as possible, ideally 0 (which is the default).
Latest version of OtpKeyProv:
http://keepass.info/plugins.html#otpkeyprov
Support:
https://sourceforge.net/p/keepass/discussion/329221/
Feature Requests & Bug Reports:
https://sourceforge.net/p/keepass/discussion/329220/
Donations:
http://keepass.info/donate.html