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