From owner-svn-doc-head@FreeBSD.ORG Thu Mar 20 19:05:41 2014 Return-Path: Delivered-To: svn-doc-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8BA48672; Thu, 20 Mar 2014 19:05:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 76A7720F; Thu, 20 Mar 2014 19:05:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s2KJ5fZS075629; Thu, 20 Mar 2014 19:05:41 GMT (envelope-from dru@svn.freebsd.org) Received: (from dru@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s2KJ5fDk075628; Thu, 20 Mar 2014 19:05:41 GMT (envelope-from dru@svn.freebsd.org) Message-Id: <201403201905.s2KJ5fDk075628@svn.freebsd.org> From: Dru Lavigne Date: Thu, 20 Mar 2014 19:05:41 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r44302 - head/en_US.ISO8859-1/books/handbook/security X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the doc tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Mar 2014 19:05:41 -0000 Author: dru Date: Thu Mar 20 19:05:40 2014 New Revision: 44302 URL: http://svnweb.freebsd.org/changeset/doc/44302 Log: Editorial review of first 1/2 of OPIE chapter. Sponsored by: iXsystems Modified: head/en_US.ISO8859-1/books/handbook/security/chapter.xml Modified: head/en_US.ISO8859-1/books/handbook/security/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/security/chapter.xml Thu Mar 20 17:14:40 2014 (r44301) +++ head/en_US.ISO8859-1/books/handbook/security/chapter.xml Thu Mar 20 19:05:40 2014 (r44302) @@ -620,75 +620,72 @@ Enter new password: By default, &os; includes support for One-time Passwords In - Everything (OPIE), which uses the MD5 hash by + Everything (OPIE). OPIE + is designed to prevent replay attacks, in which an attacker + discovers a user's password and uses it to access a system. + Since a password is only used once in OPIE, a + discovered password is of little use to an attacker. + OPIE uses a secure hash and a + challenge/response system to manage passwords. The &os; + implementation uses the MD5 hash by default. - There are three different types of passwords. The first is - the usual &unix; style or Kerberos password. The second is the - one-time password which is generated by &man.opiekey.1; and - accepted by &man.opiepasswd.1; and the login prompt. The final - type of password is the secret password used by - &man.opiekey.1;, and sometimes &man.opiepasswd.1;, to generate - one-time passwords. - - The secret password has nothing to do with the &unix; - password. They can be the same, but this is not recommended. - OPIE secret passwords are not limited to 8 - characters like old &unix; passwordsUnder &os; - the standard login password may be up to 128 characters in - length.. Passwords of six or seven word - long phrases are fairly common. For the most part, the - OPIE system operates completely independently - of the &unix; password system. + OPIE uses three different types of passwords. The first is + the usual &unix; or Kerberos password. The second is the + one-time password which is generated by opiekey. + The third + type of password is the secret password which is used + to generate + one-time passwords. The secret password has nothing to do with, + and should be different from, the &unix; + password. - Besides the password, there are two other pieces of data + There are two other pieces of data that are important to OPIE. One is the seed or key, consisting of two letters and five digits. The other is the iteration count, a number between 1 and 100. OPIE creates the one-time password by - concatenating the seed and the secret password, applying the MD5 + concatenating the seed and the secret password, applying the MD5 hash as many times as specified by the iteration count, and - turning the result into six short English words. These six - English words are the one-time password. The authentication - system (primarily PAM) keeps track of the last one-time password + turning the result into six short English words which represent + the one-time password. The authentication + system keeps track of the last one-time password used, and the user is authenticated if the hash of the user-provided password is equal to the previous password. Because a one-way hash is used, it is impossible to generate future one-time passwords if a successfully used password is captured. The iteration count is decremented after each successful login to keep the user and the login program in sync. - When the iteration count gets down to 1, + When the iteration count gets down to 1, OPIE must be reinitialized. There are a few programs involved in this process. - &man.opiekey.1; accepts an iteration count, a seed, and a secret - password, and generates a one-time password or a consecutive - list of one-time passwords. In addition to initializing + A one-time password, or a consecutive + list of one-time passwords, is generated by passing an iteration + count, a seed, and a secret + password to &man.opiekey.1;. In addition to initializing OPIE, &man.opiepasswd.1; is used to change - passwords, iteration counts, or seeds. It takes either a secret - passphrase, or an iteration count, seed, and a one-time - password. The relevant credential files in + passwords, iteration counts, or seeds. The relevant credential files in /etc/opiekeys are examined by &man.opieinfo.1; which prints out the invoking user's current iteration count and seed. - There are four different sorts of operations. The first is - to use &man.opiepasswd.1; over a secure connection to set up - one-time-passwords for the first time, or to change the password - or seed. The second operation is to use &man.opiepasswd.1; over - an insecure connection, in conjunction with &man.opiekey.1; over - a secure connection, to do the same. The third is to use - &man.opiekey.1; to log in over an insecure connection. The - fourth is to use &man.opiekey.1; to generate a number of keys - which can be written down or printed out to carry to insecure - locations in order to make a connection to anywhere. + This section describes four different sorts of operations. The first is + how to set up + one-time-passwords for the first time + over a secure connection. The second is how to use opiepasswd over + an insecure connection. The third is how to + log in over an insecure connection. The + fourth is how to generate a number of keys + which can be written down or printed out to use at insecure + locations. - Secure Connection Initialization + Initializing <acronym>OPIE</acronym> To initialize OPIE for the first time, - execute &man.opiepasswd.1;: + run this command from a secure location: &prompt.user; opiepasswd -c [grimreaper] ~ $ opiepasswd -f -c @@ -703,25 +700,38 @@ Again new secret pass phrase: ID unfurl OTP key is 499 to4268 MOS MALL GOAT ARM AVID COED - At the Enter new secret pass phrase: or - Enter secret password: prompt, enter a - password or phrase. This is not the login password as this - password is used to generate the one-time login keys. The - ID line gives the parameters of the instance: - the login name, iteration count, and seed. When logging in, + The sets console mode which assumes + that the command is being run from a secure location, such as + a computer under the user's control or a + SSH session to a computer under the user's + control. + + When prompted, enter the secret + password which will be + used to generate the one-time login keys. This password + should be difficult to guess and should be different than the + password which is associated with the user's login + account. It must be between 10 and 127 characters long. + Remember this password. + + The + ID line lists + the login name (unfurl), default iteration count + (499), and default seed + (to4268). When logging in, the system will remember these parameters and display them, meaning that they do not have to be memorized. The last line - gives the particular one-time password which corresponds to + lists the generated one-time password which corresponds to those parameters and the secret password. At the next login, - this one-time password is the one to use. + use this one-time password. Insecure Connection Initialization - To initialize or change the secret password over an - insecure connection, a secure connection is needed to some - place where &man.opiekey.1; can be run. This might be a shell + To initialize or change the secret password on an + insecure system, a secure connection is needed to some + place where opiekey can be run. This might be a shell prompt on a trusted machine. An iteration count is needed, where 100 is probably a good value, and the seed can either be specified or the randomly-generated one used. On the insecure