[BACK]Return to crypto.html CVS log [TXT][DIR] Up to [local] / www

Annotation of www/crypto.html, Revision 1.46

1.10      deraadt     1: <!DOCTYPE HTML PUBLIC  "-//IETF//DTD HTML Strict Level 2//EN//2.0">
1.1       deraadt     2: <html>
                      3: <head>
1.10      deraadt     4: <title>Cryptography in OpenBSD</title>
1.1       deraadt     5: <link rev=made href=mailto:www@openbsd.org>
                      6: <meta name="resource-type" content="document">
1.10      deraadt     7: <meta name="description" content="OpenBSD cryptography">
                      8: <meta name="keywords" content="openbsd,cryptography">
1.1       deraadt     9: <meta name="distribution" content="global">
                     10: <meta name="copyright" content="This document copyright 1997 by OpenBSD.">
                     11: </head>
                     12:
                     13: <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#23238E">
1.45      deraadt    14: <img align=left alt="[OpenBSD]" height=166 width=197 SRC="images/blowfish-notext.jpg">
                     15: <br>
                     16: <br>
                     17: <br>
                     18: "The mantra of any good security engineer is: "Security is a not a
                     19: product, but a process." It's more than designing strong cryptography
                     20: into a system; it's designing the entire system such that all security
                     21: measures, including cryptography, work together."<br>
                     22: <br>
                     23: -- Bruce Schneier, author of "Applied Cryptography".
                     24: <br clear=all>
1.37      deraadt    25: <h2><font color=#e00000>Cryptography</font><hr></h2>
1.32      deraadt    26:
                     27: <strong>Index</strong><br>
1.41      louis      28: <a href=#why>Why do we ship cryptography?</a>.<br>
1.40      deraadt    29: <a href=#ssh>SSH soon built in</a>.<br>
1.32      deraadt    30: <a href=#prng>Pseudo Random Number Generators</a> (PRNG): ARC4, ...<br>
                     31: <a href=#hash>Cryptographic Hash Functions</a>: MD5, SHA1, ...<br>
                     32: <a href=#trans>Cryptographic Transforms</a>: DES, Blowfish, ...<br>
                     33:
                     34: <a href=#people>International Cryptographers wanted</a><br>
1.33      deraadt    35: <a href=#papers>Further Reading</a><br>
1.1       deraadt    36: <p>
1.32      deraadt    37: <hr>
                     38:
                     39: <a name=why></a>
1.42      deraadt    40: <h3><font color=#e00000>Why do we ship cryptography?</font></h3><p>
1.32      deraadt    41:
                     42: In three words:  <strong>because we can</strong>.<p>
                     43:
1.1       deraadt    44: The OpenBSD project is based in Canada.<p>
                     45:
1.23      deraadt    46: The <a href=ECL.html>Export Control List of Canada</a>
                     47: places no significant restriction on the export of
1.5       deraadt    48: cryptographic software, and is even more explicit about the free
                     49: export of freely-available cryptographic software.  Marc Plumb has
                     50: done
1.2       deraadt    51: <a href=http://insight.mcmaster.ca/org/efc/pages/doc/crypto-export.html>
1.31      aaron      52: some research to test the cryptographic laws</a>.
1.2       deraadt    53: <p>
1.1       deraadt    54:
1.3       deraadt    55: Hence the OpenBSD project has embedded cryptography into numerous places
                     56: in the operating system.  We require that the cryptographic software we
                     57: use be <a href=policy.html>freely available and with good licenses</a>.
1.32      deraadt    58: We do not directly use cryptography with nasty patents.
1.13      deraadt    59: We also require that such software is from countries with useful export
1.16      deraadt    60: licenses because we do not wish to break the laws of any country.
                     61: The cryptographic software components which we use currently were
                     62: written in Argentina, Australia, Canada, Germany, Greece, Norway, and
                     63: Sweden.
                     64: <p>
1.7       deraadt    65:
1.15      deraadt    66: When we create OpenBSD releases or snapshots we build our release
                     67: binaries in free countries to assure that the sources and binaries we
                     68: provide to users are free of tainting.  In the past our release binary
                     69: builds have been done in Canada, Sweden, and Germany.<p>
                     70:
1.16      deraadt    71: OpenBSD ships with Kerberos IV included.  The codebase we use is the
1.17      deraadt    72: exportable KTH-based release from Sweden.  Our X11 source has been
                     73: extended to make use of Kerberos IV as well.  Kerberos V support will
1.16      deraadt    74: perhaps appear in 1999, but at present time a freely exportable
                     75: Kerberos V release does not exist.<p>
                     76:
1.15      deraadt    77: Today cryptography is an important means for enhancing the <a
                     78: href=security.html>security</a> of an operating system.  The
1.42      deraadt    79: cryptography utilized in OpenBSD can be classified into various
                     80: aspects, described as follows.<p>
1.10      deraadt    81:
1.39      louis      82: <a name=ssh></a>
1.42      deraadt    83: <h3><font color=#e00000>SSH soon built in</font></h3><p>
1.39      louis      84:
1.40      deraadt    85: What is the first thing most people do after installing OpenBSD?
1.46    ! deraadt    86: They install Secure Shell (
        !            87: <a href=http://www.openbsd.org/cgi-bin/man.cgi?query=ssh>ssh</a>)
        !            88: from the ports tree or the packages on the FTP sites. Until now, that is.<p>
1.39      louis      89:
                     90: This is still very much a work in progress, but we found an innovative way
1.40      deraadt    91: around the RSA patent. We are taking a free license release of ssh and
                     92: OpenBSD-ifying it.  We will get around the USA-based RSA patent by providing
                     93: an easy way to automatically download and install a RSA-enabled package
1.41      louis      94: containing shared library versions of libcrypto and libssl.  These packages
1.40      deraadt    95: are based on OpenSSL.  People living outside the USA can freely use the
                     96: RSA patented code, while people inside the USA can freely use it for
                     97: non-commercial purposes.  It appears as if companies inside the USA can
                     98: use the RSA libraries too, as long as RSA is not used in a profit generating
                     99: role.<p>
1.39      louis     100:
1.40      deraadt   101: But this way almost everyone will get ssh built-in.<p>
1.39      louis     102:
1.18      deraadt   103: <a name=prng></a>
1.42      deraadt   104: <h3><font color=#e00000>Pseudo Random Number Generators</font></h3><p>
1.32      deraadt   105:
1.10      deraadt   106: A Pseudo Random Number Generator (PRNG) provides applications with a stream of
                    107: numbers which have certain important properties for system security:<p>
                    108:
                    109: <ul>
1.11      deraadt   110: <li>It should be impossible for an outsider to predict the output of the
                    111:        random number generator even with knowledge of previous output.
                    112: <li>The generated numbers should not have repeating patterns which means
                    113:        the PRNG should have a very long cycle length.
1.10      deraadt   114: </ul>
1.32      deraadt   115: <p>
1.10      deraadt   116:
1.13      deraadt   117: A PRNG is normally just an algorithm where the same initial starting
                    118: values will yield the same sequence of outputs. On a multiuser
                    119: operating system there are many sources which allow seeding the PRNG
                    120: with random data. The OpenBSD kernel uses the mouse interrupt timing,
                    121: network data interrupt latency, inter-keypress timing and disk IO
                    122: information to fill an entropy pool.  Random numbers are available for
                    123: kernel routines and are exported via devices to userland programs.
1.36      deraadt   124: So far random numbers are used in the following places:<p>
1.13      deraadt   125:
1.10      deraadt   126: <ul>
1.14      deraadt   127: <li>Dynamic sin_port allocation in bind(2).
                    128: <li>PIDs of processes.
1.26      aaron     129: <li>IP datagram IDs.
1.14      deraadt   130: <li>RPC transaction IDs (XID).
                    131: <li>NFS RPC transaction IDs (XID).
                    132: <li>DNS Query-IDs.
                    133: <li>Inode generation numbers, see getfh(2) and fsirand(8).
1.31      aaron     134: <li>Timing perturbance in traceroute(8).
1.14      deraadt   135: <li>Stronger temporary names for mktemp(3) and mkstemp(3)
                    136: <li>Randomness added to the TCP ISS value for protection against
                    137:        spoofing attacks.
1.29      deraadt   138: <li>random padding in IPSEC esp_old packets.
1.14      deraadt   139: <li>To generate salts for the various password algorithms.
                    140: <li>For generating fake S/Key challenges.
1.44      provos    141: <li>In <a href=http://www.physnet.uni-hamburg.de/provos/photuris/>photurisd</a>
1.28      angelos   142:         and <a href=http://www.openbsd.org/cgi-bin/man.cgi?query=isakmpd>isakmpd</a>
                    143:        to provide liveness proof of key exchanges.
1.10      deraadt   144: </ul>
1.1       deraadt   145:
1.10      deraadt   146: <p>
1.18      deraadt   147: <a name=hash></a>
1.42      deraadt   148: <h3><font color=#e00000>Cryptographic Hash Functions</font></h3><p>
1.32      deraadt   149:
1.10      deraadt   150: A Hash Function compresses its input data to a string of
1.36      deraadt   151: constant size. For a Cryptographic Hash Function it is infeasible to find:
                    152:
1.1       deraadt   153: <ul>
1.11      deraadt   154: <li>two inputs which have the same output (collision resistant),
                    155: <li>a different input for a given input with the same output
                    156:        (2nd preimage resistant).
1.1       deraadt   157: </ul>
1.32      deraadt   158: <p>
1.10      deraadt   159:
1.12      millert   160: In OpenBSD MD5, SHA1, and RIPEMD-160 are used as Cryptographic Hash Functions,
1.36      deraadt   161: e.g:<p>
1.10      deraadt   162: <ul>
1.27      deraadt   163: <li>In <a href=http://www.openbsd.org/cgi-bin/man.cgi?query=skey>S/Key</a>
                    164:     to provide one time passwords.
                    165: <li>In <a href=http://www.openbsd.org/cgi-bin/man.cgi?query=ipsec>IPsec</a>,
1.44      provos    166:     <a href=http://www.physnet.uni-hamburg.de/provos/photuris/>photurisd</a>
1.27      deraadt   167:     and
                    168:     <a href=http://www.openbsd.org/cgi-bin/man.cgi?query=isakmpd>isakmpd(8)</a>
                    169:     to authenticate the data origin of packets and to ensure packet integrity.
                    170: <li>For FreeBSD-style MD5 passwords (not enabled by default), see
                    171:     <a href=http://www.openbsd.org/cgi-bin/man.cgi?query=passwd.conf&sektion=5>
                    172:     passwd.conf(5)</a>
                    173: <li>For TCP SYN cookie support (not enabled by default), see
                    174:     <a href=http://www.openbsd.org/cgi-bin/man.cgi?query=options&sektion=4>
                    175:     options(4)</a>
1.24      niklas    176: <li>In libssl for digital signing of messages.
1.10      deraadt   177: </ul>
1.32      deraadt   178: <p>
1.10      deraadt   179:
1.6       deraadt   180: <p>
1.18      deraadt   181: <a name=trans></a>
1.42      deraadt   182: <h3><font color=#e00000>Cryptographic Transforms</font></h3><p>
1.32      deraadt   183:
1.11      deraadt   184: Cryptographic Transforms are used to encrypt and decrypt data. These
                    185: are normally used with an encryption key for data encryption and with
                    186: a decryption key for data decryption. The security of a Cryptographic
                    187: Transform should rely only on the keying material.<p>
1.6       deraadt   188:
1.24      niklas    189: OpenBSD provides transforms like DES, 3DES, Blowfish and Cast for the
1.36      deraadt   190: kernel and userland programs, which are used in many places like:<p>
1.10      deraadt   191: <ul>
1.27      deraadt   192: <li>In libc for creating
                    193:     <a href=http://www.openbsd.org/cgi-bin/man.cgi?query=blf_key>Blowfish</a>
1.33      deraadt   194:     passwords.  See also the <a href=papers/bcrypt-paper.ps>USENIX paper</a>
                    195:     on this topic.
1.27      deraadt   196: <li>In
                    197:     <a href=http://www.openbsd.org/cgi-bin/man.cgi?query=ipsec>IPsec</a>
                    198:     to provide confidentiality for the network layer.
                    199: <li>In Kerberos and a handful of kerberized applications, like
                    200:     <a href=http://www.openbsd.org/cgi-bin/man.cgi?query=telnet>telnet</a>,
                    201:     <a href=http://www.openbsd.org/cgi-bin/man.cgi?query=cvs>cvs</a>,
                    202:     <a href=http://www.openbsd.org/cgi-bin/man.cgi?query=rsh>rsh</a>,
                    203:     <a href=http://www.openbsd.org/cgi-bin/man.cgi?query=rcp>rcp</a>,
                    204:     and
                    205:     <a href=http://www.openbsd.org/cgi-bin/man.cgi?query=rlogin>rlogin</a>.
1.44      provos    206: <li>In <a href=http://www.physnet.uni-hamburg.de/provos/photuris/>
1.27      deraadt   207:     photurisd</a> and
                    208:     <a href=http://www.openbsd.org/cgi-bin/man.cgi?query=isakmpd>isakmpd</a>
                    209:     to protect the exchanges where IPsec key material is negotiated.
1.24      niklas    210: <li>In AFS to protect the messages passing over the network, providing
1.27      deraadt   211:     confidentiality of remote filesystem access.
1.24      niklas    212: <li>In libssl to let applications communicate over the de-facto standard
                    213:        cryptographically secure SSL protocol.
1.10      deraadt   214: </ul>
1.1       deraadt   215:
1.10      deraadt   216: <p>
1.32      deraadt   217: <a name=people></a>
1.42      deraadt   218: <h3><font color=#e00000>International Cryptographers Wanted</font></h3><p>
1.32      deraadt   219:
                    220: Of course, our project needs people to work on these systems.  If any
                    221: non-American cryptographer who meets the constraints listed earlier is
                    222: interested in helping out with embedded cryptography in OpenBSD,
                    223: please contact us.<p>
                    224:
1.33      deraadt   225: <p>
                    226: <a name=papers></a>
1.42      deraadt   227: <h3><font color=#e00000>Further Reading</font></h3><p>
1.33      deraadt   228:
                    229: A number of papers have been written by OpenBSD team members, about
                    230: cryptographic changes they have done in OpenBSD.  The postscript
1.34      deraadt   231: versions of these documents are available as follows.<p>
1.33      deraadt   232:
                    233: <ul>
1.43      deraadt   234: <li>A Future-Adaptable Password Scheme.<br>
                    235:     by <a href=mailto:provos@openbsd.org>Niels Provos<a/>,
                    236:     <a href=mailto:dm@openbsd.org>David Mazieres</a>.<br>
1.33      deraadt   237:     <a href=papers/bcrypt-paper.ps>paper</a> and
                    238:     <a href=papers/bcrypt-slides.ps>slides</a>.
1.43      deraadt   239: <p>
                    240: <li>Cryptography in OpenBSD: An Overview.<br>
                    241:     by <a href=mailto:deraadt@openbsd.org>Theo de Raadt</a>,
                    242:     <a href=mailto:niklas@openbsd.org>Niklas Hallqvist</a>,
                    243:     <a href=mailto:art@openbsd.org>Artur Grabowski</a>,
                    244:     <a href=mailto:angelos@openbsd.org>Angelos D. Keromytis</a>,
                    245:     <a href=mailto:provos@openbsd.org>Niels Provos</a>.<br>
1.33      deraadt   246:     <a href=papers/crypt-paper.ps>paper</a> and
                    247:     <a href=papers/crypt-slides.ps>slides</a>.
                    248: </ul>
                    249:
1.32      deraadt   250: <p>
1.1       deraadt   251: <hr>
1.19      pauls     252: <a href=/index.html><img height=24 width=24 src=back.gif border=0 alt=OpenBSD></a>
1.10      deraadt   253: <a href=mailto:www@openbsd.org>www@openbsd.org</a>
                    254: <br>
1.46    ! deraadt   255: <small>$OpenBSD: crypto.html,v 1.45 1999/10/11 21:04:45 deraadt Exp $</small>
1.1       deraadt   256:
1.10      deraadt   257: </body>
                    258: </html>