table of contents
DACSTOKEN(1) | DACS Commands Manual | DACSTOKEN(1) |
NAME¶
dacstoken - administer hash-based one-time passwords
SYNOPSIS¶
dacstoken [dacsoptions[1]] [-all]
[-base num] [-counter num]
[-digits num]
[-disable | -enable]
[-hotp-window num] [-ignore-key-length]
[-inkeys item_type]
[-issuer name]
[[-key keyval] | [-key-enc enc] |
[-key-file filename] | [-key-prompt]
] [-mode otp-mode] [-nl]
[-outkeys item_type]
[[-pin pinval] |
[-pin-file filename] | [-pin-prompt]]
[-pin-constraints str] [-rnd]
[-seed str]
[-serial str]
[-totp-delta num]
[-totp-drift nwindows]
[-totp-hash alg]
[-totp-time secs]
[-totp-timestep secs]
[-vfs vfs_uri] [op-spec]
[username]
DESCRIPTION¶
This program is part of the DACS suite.
The dacstoken utility administers DACS accounts associated with one-time password (OTP) generating devices (tokens) or software-based clients. Using command line options, it also computes OTP values; token account parameters can be overridden, but accounts are not even required.
Strong, two-factor authentication can be provided when dacs_authenticate[2] is configured to use the local_token_authenticate[3] authentication module or when dacstoken is used as a standalone program to validate passwords. Two kinds of one-time password algorithms are supported: the HMAC-based one-time password mode (HOTP), based on an event counter and specified by RFC 4226[4], and the time-based one-time password mode (TOTP), as specified by RFC 6238[5]. Additional operational modes called OCRA (OATH Challenge-Response Algorithms), described in RFC 6287[6], are not yet fully supported.
Note
This version of dacstoken incorporates many changes that are not backward compatible with release 1.4.24a and earlier. Some command line flags function differently, and the format of the account file has changed. If you have used this command in earlier releases, please make a backup copy of your token account file and review this manual page carefully before proceeding (note the -convert flag[7] in particular).
Important
No vendor-supplied software is required by dacstoken to supply its functionality. The devices currently supported do not need any registration or configuration interaction with vendors and dacstoken does not interact with vendors' servers or use any proprietary software. Vendor-supplied software may be required to perform initialization or configuration for other token devices, however, and dacstoken does not provide such support for them.
Each token device generally corresponds to exactly one account that is managed by dacstoken, although some vendors produce tokens that can support multiple accounts.
To summarize, this utility:
Security
Only the DACS administrator should be able to successfully run this program from the command line. Because DACS keys and configuration files, including the file used to store accounts, must be restricted to the administrator, this will normally be the case, but a careful administrator will set file permissions to deny access to all other users.
Note
The dacs_token(8)[8] web service provides users with limited self-service functionality to set or reset their account PIN and synchronize their token. It also has a demonstration mode to simplify testing and evaluation.
PINs (Account Passwords)¶
A dacstoken account can optionally have a PIN (i.e., a password) associated with it. To authenticate against such an account, a user must provide the one-time password produced by the token and the PIN. The TOKEN_REQUIRES_PIN[9] configuration directive determines whether a PIN must be provided when creating or importing an account. By default, a PIN is required. The directive does not apply in conjunction with the -delpin flag, since only an administrator should be able to perform that function.
A hash of the PIN is stored in the account record. The PIN is not stored. The same method used by dacspasswd(1)[10] and dacs_passwd(8)[11] is applied, and depends on the PASSWORD_DIGEST[12] and PASSWORD_SALT_PREFIX[13] directives in effect. If PASSWORD_DIGEST[12] is configured, that algorithm is used, otherwise a compile-time default (SHA-1) is used. If a user forgets the PIN, the old one cannot be recovered so it must either be deleted or a new one must be set.
Some token devices and client software have a PIN feature. The user must enter a PIN into the device before the device will emit a one-time password. This "device PIN" is completely distinct from the account PIN (a server-side password) that is managed by dacstoken, and this manual is only concerned with the dacstoken PIN. The device PIN should always be used when possible; the dacstoken PIN is strongly recommended and is required for two-factor authentication (unless an additional authentication factor is applied in some other way).
Since only the administrator is allowed to run this command, no restrictions are imposed on the length or quality of the PINs that the administrator supplies; a warning message will be emitted, however, if the password is considered to be weak as determined by the PASSWORD_CONSTRAINTS[14] directive.
One-Time Passwords (OTPs)¶
Both kinds of one-time password device compute a password value by employing a secure keyed hash algorithm (RFC 2104[15], FIPS 198[16]). In the counter-based method, the device and server share a secret key and a counter value which are hashed to yield a numerical value displayed in a certain radix with a certain number of digits. Successful authentication requires the device and server to compute matching passwords. Each time the device produces a password, it increments its counter. When the server receives a matching password, it increments its counter. Because it is possible for the two counters to become unsynchronized, the server's matching algorithm will typically allow a client's password to fall within a "window" of counter values. The time-based method is similar, the main difference being that the current Unix time (as returned by time(3)[17], for instance) is used to establish a "time-step window" that serves as a counter value in the computation of the secure hash. Because the real-time clocks on the device and server may not be sufficiently synchronized, the server's matching algorithm must also allow a client's password to fall within some number of time-step windows for these devices.
Security
A token may be assigned a permanent secret key (sometimes called an OTP seed) by its manufacturer or the key may be programmable. This secret key is used by the token's password generation procedure and it is critical that it be kept private. If the token is not programmable, the key is obtained from the vendor (for a HOTP token, typically by providing the device's serial number and any three consecutive passwords). A record of each mapping from serial number to secret key should be kept in a secure location.
If the secret key is programmable, as it is likely to be with a software client, it is required to be at least 128 bits in length; a minimum of 160 bits is recommended (see RFC 4226[4]) and by default the key is represented as a 16 (or more) character long hexadecimal string. The minimum length requirement can be overridden by the -ignore-key-length flag, and the algorithm used to encode the key can be specified using the -key-enc flag. The key must be syntactically correct for the specified encoding algorithm and should be obtained from a cryptographic-quality source of random bits. Some clients may be capable of generating a suitable key, but you may use dacsexpr(1)[18]:
% dacsexpr -e "random(string, 20)" "bb2504780e8075a49bd88891b228fc7216ac18d9"
Tip
Tokens can be used for authentication purposes other than computer sign on. For example, by providing an account number, PIN, and token value, customers can quickly be authenticated over the phone, reducing or eliminating the need for expensive and time-consuming security questions.
One-time password devices and applications have the following operational parameters. These parameters determine the password sequence that is generated. Some operational parameters may be fixed (by the relevant standard or due to the implementation), while others may be partially or completely configurable by the user. Please refer to the references and manufacturers' documentation for details.
base
counter
digits
key
serial number
time step size
In addition to these parameters, dacstoken employs several per-account (i.e., per-device) parameters:
accept-window
drift
drift-window
sync-otps
username
Authentication based on one-time password devices has the following advantages:
One-time password devices have the following potential disadvantages:
Accounts¶
The accounts managed by dacstoken are completely separate from the accounts used by local_passwd_authenticate[21] or any other DACS authentication module.
Accounts for HOTP and TOTP devices may either be stored together or kept separate. If the virtual filestore item type auth_hotp_token is defined, it is only used for accounts associated with HOTP tokens. Similarly, if the virtual filestore item type auth_totp_token is defined, it is only used for accounts associated with TOTP tokens. If either item type is not defined, accounts are accessed through DACS's virtual filestore using item type auth_token. It is assumed that file permissions on the account databases are such that all access is limited to the administrator and local_token_authenticate.
If accounts for the two device types are combined, because each username for an authentication method must be unique, if an individual has both types of token they must be assigned different usernames. So, for example, if Auggie has one HOTP token and one TOTP token, the former might correspond to the username auggie-hotp and the latter to auggie-totp; the sign-on form might include a device-mode input which would allow Auggie to simply type "auggie" in the username field and JavaScript to automatically append the appropriate suffix based on the select device mode. An obvious disadvantage of this configuration is that it results in two different DACS identities for the same individual; this would have to be remembered if an access control rule needed to identify Auggie explicitly. If both tokens should map to the same DACS identity, the Auth clause could strip the suffix off after successful authentication, but the administrator would then need to beware of the case of two different Auggies, each using a different device type.
Configuring both the auth_hotp_token and auth_totp_token item types (or just one of them and auth_token) keeps the accounts separate and allows the same username to be used for both types of devices. Auggie could therefore have an account record with the same username for both device types. This approach requires the device mode to be specified when an operation is requested so that the correct item type can be used; this means that users must know which type of device they are using (perhaps by afixing a label to it). Refer to important details regarding DACS identities[22].
The -vfs can be used to configure or reconfigure the item types.
Multiple instances of each item type can exist, provided the correct one for dacstoken to use can be determined at run time and specified through a VFS[23] directive or -vfs flag.
Only keys that meet the minimum key length requirement (16 bytes) may be stored with account information (e.g., with -set or -import). In other contexts, the requirement is not enforced.
The secret key is always encrypted and converted to a base-64 representation when it is stored in the account file by dacstoken. The virtual filestore item type auth_token_keys identifies the encryption keys for dacstoken to use; the -inkeys and -outkeys flags specify alternatives (see dacskey(1)[24]). If the encryption keys are lost, the secret keys are practically unrecoverable.
Important
If an attacker discovers a secret key, generating usable passwords without possessing the token will not be difficult. For at least some hardware tokens, the key is burned in to the device and cannot be changed; in this case, if the key is leaked the device should be destroyed. If a token is lost, the corresponding account should be disabled. In the event an attacker finds a lost token or discovers a secret key, having a strong PIN associated with the account will make it difficult for the attacker to gain access.
Important
There are many other free software implementations. Other manufacturers interested in having their products supported by DACS are welcome to contact[35] Dss.
Importing and Exporting OTP Accounts¶
Descriptions of accounts and their tokens can be loaded or dumped (refer to the -import and -export flags). This simplifies provisioning, backup, and portability. The account information can be written in a simple, application-specific (almost) XML format, or Google's KeyUriFormat[37], which is understood by several OTP applications.
The -format flag (see dacsoptions[38]) can be used to select the xml format (the default) or the uri format for export.
Note
At present, the uri format cannot be imported by dacstoken.
Security
Because imported records include the unencrypted secret keys for the OTP devices, the exported file should be kept encrypted (e.g., using openssl) or at least have appropriate file permissions.
Note
An official standard format for OTP device provisioning is being developed. This format may be understood by a future version of dacstoken, or a conversion utility may be written. The standard format is likely to be considerably more complex than the DACS format.
XML Provisioning Format
The XML format understood by dacstoken consists of a root element ("otp_tokens"), followed by zero or more "otp_token" elements, one per line, each with required and optional attributes (described below). The XML declaration must be omitted. Leading whitespace and blank lines are ignored, as are single line XML comments. Additionally, lines having a "#" as the first non-whitespace character are ignored. Optional attributes that are not present are assigned default values. The default digest algorithm is SHA-1. Short attribute names are used to save space. Unrecognized attributes, and attributes irrelevant to the device mode, are ignored. Single or double quote characters (or both) within XML attribute values must be replaced by the corresponding entity reference ("'" and """, respectively), as must the "<" (less than) and "&" (ampersand) characters. A ">" (greater than) character may optionally be replaced by a ">" sequence, but no other entity references are recognized.
Recognized attributes are:
base
-- radix for OTP value
[Optional:
10 (default),
16, or 32]
counter
-- current counter value for HOTP, in hex if preceded
by "0x" (or "0X"), decimal otherwise
[Optional:
default is 0]
OTP device mode
-- "c" (for HOTP)
or "t" (for TOTP)
[Required]
digest-name
-- one of the Secure Hash Algorithms
[Optional:
SHA-1 (default),
SHA224, SHA256,
SHA384, SHA512]
clock-drift
-- clock adjustment, in seconds, for TOTP
[Optional]
encrypted-key
-- encrypted secret key, base-64 encoded
[Required:
OTP account records only]
enabled-status
-- 1 for enabled,
0 for disabled
[Required]
plaintext-key
-- unencrypted secret key
[Required]
last-update
-- Unix time of last record update
[Optional: default is current time]
ndigits
-- number of digits for OTP value
[Optional:
default is 6 for HOTP,
8 for TOTP]
plaintext-PIN
-- plaintext PIN value for the account
[Required:
unless ph is present,
for import only]
hashed-PIN
-- hashed PIN value for the account
[Optional:
generated by dacstoken
for export and OTP account files only]
serial-number
-- unique identifier string for the device
[Required]
time-step
-- time-step value, in seconds, for TOTP
[Optional:
default is 30]
username
-- a valid DACS username associated with this account
[Required]
The following example describes two accounts that might be created using the -import flag:
<otp_tokens> <!-- Staff OTP tokens for DACS authentication --> <otp_token u="ietf" d="t" en="1" s="totp-ietf "draft"" k="3132333435363738393031323334353637383930" dn="SHA1" ts="30"/> <otp_token u="ipod-c" d="c" en="1" s="ipodc-9C841SD4203" k="19c0a3519a89b4a8034c5b9306db" dn="SHA1" c="0" nd="6" b="10"/> </otp_tokens>
KeyUriFormat Provisioning Format
The KeyUriFormat[37] provisioning format is supported by several OTP clients, such as FreeOTP[30] and Google Authenticator[28]. In this format, a URI describes the current state of an account. The URI can be encoded into a QR Code[39] image (a two-dimensional barcode), which these and other OTP clients can recognize and conveniently and correctly import using a device's camera. Also, software such as zbarimg, a component of the ZBar[40] suite, can scan and decode barcodes that it finds in image files.
An account can be created by dacstoken, exported as a KeyUriFormat URI, converted to a QR Code image, sent to a user (e.g., via email or an IM) or displayed on a secure web page, and finally imported by a user's client software. A QR Code generator that has been successfully used for this purpose with the iPhone is qrencode, which is distributed with the libqrencode library[41].
Notes
OPTIONS¶
In addition to the standard dacsoptions[1], a lengthy list of command line flags are recognized. When a username is given, default values associated with that account are used, otherwise recommended or implementation-specific defaults are used. These default values can usually be overridden on the command line. Some flags are only allowed with a particular token mode (e.g., -counter, -totp-show) and their appearance implies that mode, making the -mode flag unnecessary; other flags are mode independent (e.g., -delete, -enable). It is an error to use a mutually incompatible flag combination. Flags that are meaningless with the selected operation are ignored, although they still imply a mode. Hexadecimal values are case insensitive. If a counter value is required but unspecified (e.g., when creating an account), an initial counter value of zero is used.
The op-spec specifies the operation to be performed, together with zero or more modifier flags. If op-spec is missing, the -list operation is performed. An op-spec is one of the following:
-auth otp-value
An exit status of zero indicates successful authentication, while any other value means authentication failed.
-convert filename
-create
-current
-delete
-delpin
-export
% dacstoken -uj EXAMPLE -export | openssl enc -aes-256-cbc > dacstoken-exported.enc
Later, you might do something like:
% openssl enc -d -aes-256-cbc < dacstoken-exported.enc | dacstoken -uj EXAMPLE -import -
-h
-help
-hotp-show num
-import filename
-import-replace filename
-issuer name
-l
-list
-L
-long
Examples:
% dacstoken -uj EXAMPLE -long bobo,hotp,disabled,"foo17",000000000000000a,-PIN,10-Sep-2014@10:57:20 auggie,totp,enabled,"c200-2009234172055",0,-PIN,20-May-2010@14:20:01 % dacstoken -uj EXAMPLE -mode hotp -L bobo,hotp,disabled,"foo17",000000000000000a,-PIN,10-Sep-2014@10:57:20
-rename new-username
-set
-sync password-list
In TOTP mode, attempt to determine how closely synchronized the system clock is with the token's clock and display the result. This information can be used to update the user's token record to compensate for poorly synchronized clocks, or to adjust validation parameters. The token's key and the name of the digest algorithm are obtained for the token record belonging to username, if it is given; otherwise the key is prompted for and the digest algorithm to use is either obtained from the command line or the default. Only the first password in password-list is used. The -totp-timestep, -digits, and -totp-base options are effective during this operation.
-test
-totp-show num
If a username is provided (it must be associated with a TOTP device), the key and other stored parameters from the account are used unless overridden by command line flags. The sequence of passwords for num intervals before and after the current time, together with the password for the current time are printed.
If no username is given, the program prompts for the key (which is echoed) if none has been provided, and uses command line flags or default values for parameters. It then emits the TOTP password for the current time each time Return/Enter is pressed; typing EOF causes immediate termination. If num is zero, however, the program does not wait for user input and prints only one password.
-validate otp-value
The following modifier flags are understood:
-all
-base num
-counter num
-digits num
-disable
-enable
-hotp-window num
-ignore-key-length
-inkeys item_type
-key keyval
Security
Supplying a key on the command line is not secure because it may be visible to other processes.
-key-enc enc
-key-file filename
-key-prompt
-mode otp-mode
-nl
-outkeys item_type
-pin pinval
Security
Supplying a PIN on the command line is not secure because it may be visible to other processes.
-pin-constraints str
Note
Requirements for a PIN apply to PINs obtained via a command line flag and to those obtained through importing (using the "p" attribute). Requirements are not "retroactive", however, so changing the requirements does not affect the PINs of existing accounts or importing accounts that were previously exported (having a "ph" attribute).
-pin-file filename
-pin-prompt
-rnd
-seed str
-serial str
Note
A jurisdiction that allows (or may eventually allow) both hardware tokens and software-generating client applications should consider adopting a formalized naming scheme for its tokens. For example, the administrator might append "-hw" to the vendor's serial number to form the dacstoken serial number. For software tokens, the administrator might create a dacstoken serial number by appending "-sw" to the vendor's serial number for the device.
-totp-delta num
-totp-drift nwindows
Security
Although it compensates for poorly synchronized clocks, increasing the value of nwindows weakens the system by extending the lifetime of a one-time password.
-totp-hash alg
-totp-time secs
-totp-timestep secs
Security
Although it compensates for poorly synchronized clocks, increasing the value of secs weakens the system by extending the lifetime of a one-time password.
-vfs vfs_uri
Apart from error messages, which are printed to the standard error, all output goes to the standard output.
Ordinarily, a dacsoption will be specified to select the jurisdiction on behalf of which accounts are being managed.
EXAMPLES¶
These examples assume that the jurisdiction name to use is EXAMPLE and its federation domain is example.com.
To use this authentication method, a DACS administrator might perform the following steps for each OTP device assigned to a user:
If a software client is being used, install the software on the user's device (or have the user do so), and configure the software.
VFS "[auth_token]dacs-kwv-fs:${Conf::FEDERATIONS_ROOT}/\ ${Conf::FEDERATION_DOMAIN}/${Conf::JURISDICTION_NAME}/auth_tokens"
% cd /usr/local/dacs/federations_root/example.com/EXAMPLE % dacskey -uj EXAMPLE -q auth_token_keys % chgrp www auth_token_keys % chmod 0640 auth_token_keys
If necessary, add a suitable VFS[23] directive to dacs.conf; the default, which is used above, maintains the account information in a file named auth_token_keys within each jurisdiction's default private area:
VFS "[auth_token_keys]dacs-fs:${Conf::FEDERATIONS_ROOT}/\ ${Conf::FEDERATION_DOMAIN}/${Conf::JURISDICTION_NAME}/auth_token_keys"
<Auth id="token">
URL "token"
STYLE "pass"
CONTROL "sufficient" </Auth>
Another method of provisioning a token-based account using a QR barcode might follow steps similar to these for user alice:
% dacstoken -format uri -export -issuer DSS -nl alice > alice.uri % qrencode -o alice.png < alice.uri % chmod 0600 alice.uri alice.png
The exported URI put in alice.uri might look something like this:
% dacstoken -hotp-show 3 alice 0000000000000000: 070440 0000000000000001: 089277 0000000000000002: 253240
Alternatively, a web page might be provided to help users verify correct operation and enable their account.
To create a disabled account for user bobo for a HOTP device:
% dacstoken -uj EXAMPLE -mode hotp -serial 37000752 -key-file bobo.key -create bobo
In this example, the secret key for the account (which must not already exist) is read from the file bobo.key. New accounts are disabled by default. Use -enable to create an enabled account.
Once an account has been created, it can be synchronized with the token. To synchronize the HOTP token for user bobo:
% dacstoken -uj EXAMPLE -sync 433268,894121,615120 bobo
In this example, the particular token produced the three consecutive passwords 433268, 894121, and 615120. Note that the password sequence string that follows the -sync flag is a single argument that cannot have any embedded spaces. If the key for this token is the value 19c0a3519a89b4a8034c5b9306db, supplied as a hex string, the next password generated by this token should be 544323 (with counter value 13). This can be verified using -hotp-show:
% dacstoken -hotp-show 5 -counter 10 -key 19c0a3519a89b4a8034c5b9306db -ignore-key-length 000000000000000a: 433268 000000000000000b: 894121 000000000000000c: 615120 000000000000000d: 544323 000000000000000e: 002442
To enable the account for user bobo:
% dacstoken -uj EXAMPLE -enable -set bobo
To both set the PIN and enable the account for user bobo:
% dacstoken -uj EXAMPLE -enable -pin "CzAy" -set bobo
To list all accounts in detail:
% dacstoken -uj EXAMPLE -long
The -list flag is redundant because it is the default operation. The -counter, etc. modifiers have no effect when listing.
To list only the account for bobo:
% dacstoken -uj EXAMPLE -list bobo
The exit status will be non-zero if this user does not have an account.
To display the account for the device with serial number 37000752:
% dacstoken -uj EXAMPLE -serial 37000752
The serial number, which should uniquely identify a token, is often printed on the token or can be displayed by the token.
To set the counter value for the existing account of bobo:
% dacstoken -uj EXAMPLE -counter 9 -set bobo
This operation might be used for testing or with a software token. The -sync operation is better suited to a hardware token.
To change the PIN for username bobo:
% dacstoken -uj EXAMPLE -pin-prompt -set bobo
The program will prompt for the new PIN.
To use an alternate account file, /secure/auth_tokens:
% dacstoken -uj EXAMPLE -vfs "dacs-kwv-fs:/secure/auth_tokens" -list
To use new keys (making the same assumptions as earlier), add a suitable VFS directive to dacs.conf; the default defines the item type auth_token_keys_prev as follows:
VFS "[auth_token_keys_prev]dacs-fs:${Conf::FEDERATIONS_ROOT}/\ ${Conf::FEDERATION_DOMAIN}/${Conf::JURISDICTION_NAME}/auth_token_keys.prev"
% cd /usr/local/dacs/federations_root/example.com/EXAMPLE % mv auth_token_keys auth_token_keys.prev % dacskey -uj EXAMPLE -q auth_token_keys % chgrp www auth_token_keys % chmod 0640 auth_token_keys % dacstoken -uj EXAMPLE -inkeys auth_token_keys.prev -set
The following examples outline how dacstoken might be used to generate the same output sequence as Google Authenticator[50] (tested with Version 2.1.0.2212). Here, the key is "mfrggzdf", which is the base-32 encoding[42] of the string "abcde". Since this an unsafe, five-byte long key, it must be expressly allowed by using the -ignore-key_length flag. Google Authenticator produces codes composed of six decimal digits. In HOTP (counter-based) mode, Google Authenticator starts a new token with a counter value of one. Using this command, dacstoken displays ten consecutive codes, starting with the code for a counter value of one:
% dacsexpr -e 'encode(base32,"abcde")' "MFRGGZDF" % dacstoken -un -hotp-show 10 -digits 6 -counter 1 -key mfrggzdf -key-enc base32 -ignore-key-length 0000000000000001: 106998 0000000000000002: 421654 0000000000000003: 118157 0000000000000004: 283104 0000000000000005: 848242 0000000000000006: 615855 0000000000000007: 507768 0000000000000008: 063257 0000000000000009: 974271 000000000000000a: 178655
Similarly, for TOTP (time-based) mode, this displays the current time-based code that should match the code produced by Google Authenticator during the same time interval (if you try this your output code will most likely be different):
% dacstoken -un -totp-show 0 -digits 6 -key mfrggzdf -key-enc base32 -ignore-key-length TOTP=525711 [at t=1371760542]
To generate some of the RFC 6238[5], Appendix B test vector values:
% dacstoken -un -totp-show 0 -key 12345678901234567890 -key-enc none -totp-time 59 TOTP=94287082 [at t=59] % dacstoken -un -totp-show 0 -key 12345678901234567890123456789012 -totp-hash sha256 -key-enc none -totp-time 59 TOTP=46119246 [at t=59] % dacstoken -un -totp-show 0 -key 1234567890123456789012345678901234567890123456789012345678901234 \
-totp-hash sha512 -key-enc none -totp-time 59 TOTP=90693936 [at t=59] % dacstoken -un -totp-show 0 -key 12345678901234567890 -key-enc none -totp-time 2000000000 TOTP=69279037 [at t=2000000000]
The dacsexpr(1)[18] base-32 encoding and decoding functions[51] may be helpful.
DIAGNOSTICS¶
The program exits 0, or 1 if an error occurred.
BUGS¶
HOTP should probably be called COTP, but HOTP came before TOTP. WOTP?
Listings may only be sorted by username.
The drift adjustment for TOTP accounts is tied to the real time clocks of a particular client/server pair. If either clock is effectively changed "too much" (e.g., by resetting a very fast server clock or replacing an old token that had a relatively slower clock), then a user will observe the token to suddenly stop working. Resynchronization is required in these cases. Sharing an account file amongst two or more servers should be avoided in general (because locks are unlikely to be visible across hosts), but also if their clocks are not always well synchronized. It is recommended that the Network Time Protocol (RFC 1305[52]) or equivalent be used on any host that runs DACS commands or web services.
The implementation of time-based tokens was originally based on the Internet-Draft available at the time (draft-mraihi-totp-timebased-05.txt) but is expected to conform to RFC 6238[5], TOTP: Time-Based One-Time Password Algorithm, and interoperate with other conformant hardware and software tokens. DACS passes both documents' test vectors.
TOTP password matching windows are symmetrical.
This functionality should probably be available through dacs_admin(8)[53] and dacsauth(1)[54], but it's not.
Mutual authentication using tokens should be implemented.
Although release 1.4.25 introduced many improvements, some cause incompatibilities with earlier versions of dacstoken.
The shared secret keys used to generate one-time passwords are protected on the server side by storing them in encrypted form. But since the decryption key must be readily accessible to DACS at run-time for token generation, a server compromise could make it straightforward for an attacker to obtain both an account file and the symmetric key used to encrypt/decrypt secret keys unless appropriate steps are not taken. One idea is to involve the user-provided PIN or password in the construction or encryption of the symmetric key. Also, all shared secret keys must be kept private on the client side.
SEE ALSO¶
RFC 4226[4], draft-mraihi-totp-timebased-08.txt[55], RFC 6238[5], dacs_authenticate(8)[2], dacs_token(8)[8], dacsgrid(1)[56], dacspasswd(1)[10], opie(4)[57], Mobile One Time Passwords[58], mod_authn_otp[59]
AUTHOR¶
Distributed Systems Software (www.dss.ca[60])
ACKNOWLEDGEMENTS¶
Our sincere thanks to Authenex, Inc.[25] and HyperSecu Information Systems, Inc.[61] for generously providing samples of their products and technical support.
COPYING¶
Copyright © 2003-2018 Distributed Systems Software. See the LICENSE[62] file that accompanies the distribution for licensing information.
NOTES¶
- 1.
- dacsoptions
- 2.
- dacs_authenticate
- 3.
- local_token_authenticate
- 4.
- RFC 4226
- 5.
- RFC 6238
- 6.
- RFC 6287
- 7.
- -convert flag
- 8.
- dacs_token(8)
- 9.
- TOKEN_REQUIRES_PIN
- 10.
- dacspasswd(1)
- 11.
- dacs_passwd(8)
- 12.
- PASSWORD_DIGEST
- 13.
- PASSWORD_SALT_PREFIX
- 14.
- PASSWORD_CONSTRAINTS
- 15.
- RFC 2104
- 16.
- FIPS 198
- 17.
- time(3)
- 18.
- dacsexpr(1)
- 19.
- man-in-the-middle attack
- 20.
- revocation list
- 21.
- local_passwd_authenticate
- 22.
- DACS identities
- 23.
- VFS
- 24.
- dacskey(1)
- 25.
- Authenex A-Key® 3600
- 26.
- Feitian Technologies
- 27.
- HyperSecu Information Systems
- 28.
- Google Authenticator
- 29.
- open source
- 30.
- FreeOTP Authenticator
- 31.
- Red Hat
- 32.
- OATH Token
- 33.
- iPod Touch, iPhone, and iPad
- 34.
- OTP Auth
- 35.
- contact
- 36.
- Photo
- 37.
- KeyUriFormat
- 38.
- dacsoptions
- 39.
- QR Code
- 40.
- ZBar
- 41.
- libqrencode library
- 42.
- base-32 encoded
- 43.
- -validate
- 44.
- -set
- 45.
- RFC 4648
- 46.
- dacs.exprs(5)
- 47.
- Tokens and secret keys
- 48.
- XML record
- 49.
- -import
- 50.
- Google Authenticator
- 51.
- base-32 encoding and decoding functions
- 52.
- RFC 1305
- 53.
- dacs_admin(8)
- 54.
- dacsauth(1)
- 55.
- draft-mraihi-totp-timebased-08.txt
- 56.
- dacsgrid(1)
- 57.
- opie(4)
- 58.
- Mobile One Time Passwords
- 59.
- mod_authn_otp
- 60.
- www.dss.ca
- 61.
- HyperSecu Information Systems, Inc.
- 62.
- LICENSE
08/23/2020 | DACS 1.4.40 |