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

Annotation of www/crypto.html, Revision 1.37

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