"Heslem jak??hokoliv dobr??ho bezpe??nostn??ho in??en??ra je: "Bezpe??nost nen??
produkt,ale proces."
Je to v??ce ne?? navr??en?? siln?? kryptografie do syst??mu,je to navr??en??
cel??ho syst??mu tak,
??e v??echny stupn?? bezpe??nosti,v??etn?? kryptografie spolupracuj?? dohromady."
-- Bruce Schneier, autor "Applied Cryptography".
Kryptografie
Obsah
Pro?? integrujeme kryptografii?
OpenSSH
Pseudo Random Number gener??tory (PRNG): ARC4, ...
Kryptografick?? hash funkce: MD5, SHA1, ...
Kryptografick?? transformace: DES, Blowfish, ...
Podpora kryptografick??ho hardware
Hled??me kryptografick?? odborn??ky z cel??ho sv??ta
Dal???? informace
Pro?? integrujeme kryptografii?
T??emi slovy: Proto??e my m????eme.
OpenBSD projekt s??dl?? v Kanad??.
Export Control List of Canada
neomezuje export kryptografick??ho software a je dokonce v??ce
otev??en?? pro export voln?? dostupn??ho kryptografick??ho software.
Marc Plumb provedl
v??zkum
k otestov??n?? kryptografick??ch z??kon??.
Z toho d??vodu OpenBSD projekt pou??il kryptografii na n??kolika m??stech
v opera??n??m syst??mu.
Po??adujeme,aby kryptografick?? software,kter?? pou????v??me byl
voln?? dostupn?? a s dobrou licenc??.
Nepou????v??me kryptografii s odporn??mi patenty.Tak?? po??adujeme,??e tento
software je ze zem??
s pou??itelnou exportn?? licenc??,proto??e nechceme poru??ovat z??kony
jak??koliv zem??.
Komponenty kryptografick??ho software,kter?? aktu??ln?? pou????v??me byly
naps??ny v Argentin??,
Austr??lii,Kanad??,N??mecku,??ecku,Norsku a ??v??dsku.
Kdy?? vytv??????me release nebo snapshot,tak sestavujeme jejich bin??rn??
verze ve svobodn??ch
zem??ch abychom zajistili,??e zdroje a bin??rky,kter?? poskytujeme
u??ivatel??m jsou bez poskvrny.
V minulosti byly na??e vydan?? bin??rn?? buildy ud??l??ny v Kanad??,??v??dsku
a N??mecku.
OpenBSD je vyd??v??n s Kerberos V.K??d kter?? pou????v??me je exportovateln??
Heimdal vyd??n?? ze ??v??dska.
Na??e X11 zdroje byly roz??????eny tak,aby mohli tak?? pou????vat Kerberos.
OpenBSD byl prvn?? opera??n?? syst??m distribuovan?? s IPsec stackem.
Poskytujeme IPsec od vyd??n??
OpenBSD 2.1 v roce 1997.N???? pln?? do kernelu integrovan?? IPsec stack
s hardware akcelerac??
pou??itou na n??kolika kart??ch a na????m vlastn??m voln??m ISAKMP daemonem
je pou????v??n jako jeden
z po????ta???? v testu IPsec conformance u
VPNC.
Dne??n?? kryptografie je d??le??itou ????st?? zv????en?? bezpe??nosti opera??n??ho syst??mu.Kryptografie
pou??it??
v OpenBSD m????e b??t pou??ita pro mnoho r??zn??ch ????el?? popsan??ch d??le.
OpenSSH
Od verze 2.6 , OpenBSD obsahuje
OpenSSH, zcela bezplatnou a
patenty nezane??enou verzi ssh.
OpenSSH je
kompatibiln?? s ssh verze 1 a m?? mnoho p??idan??ch vlastnost??,
-
v??echny komponenty s n??j??k??m omezen??m (nap????klad patentov??m,pod??vejte
se na
ssl(8))
byly vy??aty
ze zdrojov??ho k??du;jak??koliv licencovan?? nebo patentovan?? komponenty
u????vaj??c?? extern?? knihovny
-
byl aktualizov??n aby podporoval ssh protokol verze 1.5
-
obsahuje pripadnou podporu pro Kerberos autentikaci a ticket passing
-
podpora one-time password autentizace pomoc??
skey(1)
Zhruba ??e??eno jsme vzali voln?? vydanou verzi ssh a OpenBSD-fikovali
jsme ji.Asi o rok pozd??ji jsme OpenSSH roz??????ili o podporu SSH
protokolu verze 2.V??sledkem je podpora v??ech 3 hlavn??ch
protokol?? pro SSH: 1.3, 1.5, 2.0
Pseudo Random Number gener??tory
Pseudo Random Number gener??tory (PRNG) jsou aplikace s proudy ????sel,
kter?? maj?? d??le??it?? vlastnosti
pro syst??movou bezpe??nost:
- M????e b??t nemo??n?? pro ??to??n??ka uh??dnout v??stup z PRNG dokonce i
se znalost?? p??edchoz??ch v??stup??
- Generovan?? ????sla nemaj?? m??t opakuj??c?? se ????sti,co?? znamen??,??e
PRNG m????e m??t velmi dlouhou d??lku cyklu
PRNG je norm??ln?? pouze algoritmus,kde stejn?? po????te??n?? hodnoty
poskytuj?? stejn?? sekvence v??stupu.
Na v??ceu??ivatelsk??m opera??n??m syst??mu je mnoho zdroj??,kter??
dovoluj?? naplnit PRNG n??hodn??mi daty.
OpenBSD j??dro vyu????v?? p??eru??en?? od my??i,zpo??d??n?? p??i p??enosu
s????ov??ch dat,pauz mezi stisknut??m kl??ves
a I/O informace z disku k vypln??n?? po????te??n??ho z??sobn??ku.N??hodn??
????sla z PRNG jsou k dispozici pro
rutiny j??dra a jsou exportov??ny p??es za????zen?? k u??ivatelsk??m
program??m.Tak??e n??hodn?? ????sla z PRNG
jsou pou????v??na v n??sleduj??c??ch oblastech:
- Dynamick?? p??id??lov??n?? sin_port v bind(2)
- PID ????sla proces??
- IP datagramy;????sla ID
- RPC p??enosy;????sla ID (XID)
- NFS RPC p??enosy;????sla ID (XID)
- DNS Query;????sla ID
- Generov??n?? ????sel inod??, ??t??te getfh(2) a fsirand(8)
- P??eru??en?? ??asova??e v traceroute(8)
- Siln??j???? do??asn?? jm??na pro mktemp(3) a mkstemp(3)
- P??idan?? n??hodnost do TCP ISS hodnoty pro ochranu proti
tzv. spoofing ??tok??m
- N??hodn?? v??pl?? v IPsec esp_old paketech
- Ke generov??n?? salts pro r??zn?? algoritmy hesel
- Pro generov??n?? fale??n??ch S/Key v??zev
- V isakmpd(8)
k vytvo??en?? d??kazu o v??m??n?? kl??????.
Kryptografick?? ha??ovac?? funkce
Ha??ovac?? funkce provede kompresi vstupn??ch dat na ??et??zec
konstantn?? d??lky.Pro kryptografickou ha??ovac?? funkci je
nemo??n?? naj??t:
- dva vstupy,kter?? maj?? stejn?? v??stup (odoln?? proti koliz??m)
- jin?? vstup,pro ji?? definovan?? vstup,kter?? by m??l stejn??
v??stup (2nd preimage resistant)
V OpenBSD jsou pou??ity MD5, SHA1 a RIPEMD-160 pro kryptografick?? ha??ovac?? funkce,
nap??.:
- V S/Key(1)
pro one-time-password
- V IPsec(4)
a
isakmpd(8)
pro ov????en?? p??vodu dat v paketech a kontrolu jejich integrity
- Pro FreeBSD-styl MD5 hesel (nen?? standardn?? povoleno),v??ce v
passwd.conf(5)
- V libssl pro digit??ln?? podepisov??n?? zpr??v
Kryptografick?? transformace
Kryptografick?? transformace jsou pou??ity pro ??ifrov??n?? a de??ifrov??n?? dat.
Tyto jsou b????n?? pou????v??ny
se ??ifrovac??m kl????em pro ??ifrov??n?? dat a de??ifrovac??m kl????em pro
de??ifrov??n?? dat.Bezpe??nost krypto-
grafick?? transformace m?? z??viset pouze na kl??????ch.
OpenBSD poskytuje transformace jako DES, 3DES, Blowfish a Cast pro j??dro
a u??ivatelsk?? programy,je?? jsou pou????v??ny na mnoha m??stech jako:
- V libc pro tvorbu
Blowfish
hesel. Pod??vejte se tak?? na USENIX dokument
o tomto t??matu
- V
IPsec(4)
pro poskytnut?? utajen?? pro s????ovou vrstvu
- V isakmpd(8)
k ochran?? v??m??ny kl?????? p??i vyjedn??v??n?? spojen??
- V AFS k ochran?? zpr??v putuj??ch p??es s????,umo????uj??c?? utajen?? p????stupu
ke vzd??len??mu syst??mu
- V libssl k umo??n??n?? aplikac??m komunikovat defakto p??es standardn??
kryptograficky zabezpe??en?? SSL protokol
Podpora kryptografick??ho hardware
OpenBSD od verze 2.7 za??alo podporovat vybran?? kryptografick?? hardware
jako nap????klad akceler??tory a random number gener??tory.
-
IPsec crypto dequeue
Our IPsec stack has been modified so that cryptographic functions get
done out-of-line. Most simple software IPsec stacks need to do
cryptography when processing each packet. This results in synchronous
performance. To use hardware properly and speedily one needs to separate
these two components, as we have done. Actually, doing this gains some
performance even for the software case.
-
Hifn 7751
Cards using the Hifn 7751 can be used as a symmetric cryptographic
accelerator, i.e., the
Soekris VPN1201 or VPN1211
(to buy)
or
PowerCrypt.
Current performance using a single Hifn 7751 on each end of a tunnel
is 64Mbit/sec for 3DES/SHA1 ESP, nearly a 600% improvement over
using a P3/550 CPU. Further improvements are under way to resolve a
few more issues, but as of April 13, 2000 the code is considered
stable. We wrote our own driver for supporting this chip, rather
than using the (USA-written)
PowerCrypt driver, as well
our driver links in properly to the IPsec stack.
The 7751 is now considered slow by industry standards and many vendors
have faster chips (even Hifn now has a faster but more expensive
chip). Peak performance with 3DES SHA1 ESP is around 64Mbit/sec.
After 2.9 shipped, support was added for the Hifn 7951 chip, a
simplified version of the 7751 which adds a public key accelerator
(unsupported) and a random number generator (supported). Cards
were donated by Soekris Engineering.
After 3.0 shipped, support was added for the Hifn 7811 chip, a
faster version of the 7751 (around 130Mbit/s) with a random number
generator. A card was donated by GTGI.
After 3.2 shipped, support was added for the LZS compression algorithm
used by ipcomp(4).
After 3.4 shipped, support was added for the 7955 and 7956 chips.
In addition to all the features of the previous 7951 chip, these add AES.
Hifn was initially a difficult company to deal with (threatening to sue
us over our non-USA reverse engineering of their crypto unlock algorithm),
but more recently they have been very helpful in providing boards and
support.
-
Hifn 6500
This device is an asymmetric crypto unit. It has support for RSA, DSA,
and DH algorithms, as well as other major big number functions. It also
contains a very high performance random number generator. We have one
device, full documentation, and sample code. As of OpenBSD 3.1,
both the random number generator and big number unit are working.
-
Hifn 7814/7851/7854
This device is a packet processor and asymmetric crypto unit. It has
support for RSA, DSA, and DH algorithms, as well as other major big number
functions and also has a random number generator. Currently, only the
big number engine and the random number generator are supported (no
packet transforms).
-
Broadcom BCM5801/BCM5802/BCM5805/BCM5820/BCM5821/BCM5822/5823/5825/5860/5861/5862
(or beta chip Bluesteelnet 5501/5601)
Just after the OpenBSD 2.7 release, we succeeded at adding preliminary
support for these early release parts provided to us by the vendor,
specifically starting with the test chip 5501.
These devices provide the highest performance symmetric cryptography
we have seen.
Bluesteelnet was bought by Broadcom and started making real parts.
Their new BCM5805 is similar, except that they also add an asymmetric
engine for running DSA, RSA, and other such algorithms. With approximate
performance starting at more than four times as fast as the Hifn,
hopefully this chip will become more common soon.
The Broadcom/Bluesteelnet people have been great to deal with. They gave
us complete documentation and sample code for their chips and a
sufficient number of cards to test with.
Post 2.8, this driver was also modified to generate random numbers on
the BCM5805 and similar versions, and feed that data into the kernel
entropy pool.
Post 2.9, support was added for the BCM5820, which is mostly just a
faster (64bit, higher clock speed) version of the BCM5805. Untested
support for the BCM5821 was also added post 3.0.
As of 3.1, the big num engine is supported, and RSA/DH/DSA operations
can be accelerated.
Support for the BCM5801, BCM5802, BCM5821 and BCM5822 was added before
OpenBSD 3.2 (the untested BCM5821 support in 3.1 was broken because of
some undocumented interrupt handling requirements).
Partial support for BCM5823 was added for 3.4.
Support for the BCM5825, BCM5860, BCM5861, and BCM5862 including support
for AES with the BCM5823 or newer was added after 4.5.
-
Securealink PCC-ISES
The
PCC-ISES is a new chipset from the Netherlands. We have received
sample hardware and documentation, and work on a driver is in progress.
At the moment, the driver is capable of feeding random numbers into
the kernel entropy pool.
-
SafeNet SafeXcel 1141/1741
After 3.4 shipped, support was for added for these two chips (found on various
SafeNet
crypto cards. Supports DES, Triple-DES, AES, MD5, and SHA-1 symmetric crypto
operations, RNG, public key operations, and full IPsec packet processing.
- SafeNet SafeXcel 1840
We have received documentation and sample hardware for the
SafeNet 1840
crypto chip. Work to support at least the RNG and symmetric cryptography of
these devices has started.
- SafeNet SafeXcel 2141
We have received documentation and sample hardware for the
SafeNet 2141
crypto chip. Work to support at least the symmetric cryptography of
these devices has started.
-
3com 3cr990
3com gave us a driver to support the ethernet component of this chipset,
and based on that, we have written our own ethernet driver. This driver
has now been integrated once we were able to get a free license on the
microcode. Due to poor documentation and lack of cooperation (partly
because of the high turnover rates at 3Com), the IPsec functions of the
chip are not supported.... so this turned out to be a less than completely
useful exercise.
- Intel IPsec card
Much like Intel does for all their networking division components, and
completely unlike most other vendors, Intel steadfastly refuses to provide
us with documentation. We have talked to about five technical people who
are involved in the development of those products. They all want us to
have documentation. They commend us on what we have done. But their hands
are tied by management who does not perceive a benefit to themselves for
providing documentation. Forget about Intel. (If you want to buy gigabit
ethernet hardware, we recommend anything else... for the same reason:
most drivers we have for Intel networking hardware were written without
documentation).
-
Intel 82802AB/82802AC Firmware Hub RNG
The 82802 FWH chip (found on i810, i820, i840, i850, and i860 motherboards)
contains a random number generator (RNG). High-performance IPsec
requires more random number entropy. As of April 10, 2000, we support
the RNG. We will add support for other RNGs found on crypto chips.
- VIA C3 RNG
The newer VIA C3 CPU contains a random number generator as an instruction.
As of 3.3 this random number generator is used
inside the kernel to feed the entropy pool.
- VIA C3 AES instructions
VIA C3 CPUs with a step 8 or later Nehemiah core contains an AES
implementation accessible via simple instructions. As of 3.4 the kernel supports them to be used in an
IPsec context and exported by /dev/crypto. As of 3.5 performances have been greatly improved
and OpenSSL now uses the new instruction directly when available
without the need to enter the kernel, resulting in vastly
improved speed (AES-128 measured at 780MByte/sec) for applications
using OpenSSL to perform AES encryption.
- OpenSSL
Years ago, we had a grand scheme to support crypto cards that can do
RSA/DH/DSA automatically via OpenSSL calls. As of OpenBSD 3.2, that
support works, and any card that is supported with such functionality
will automatically use the hardware, including OpenSSH and httpd in
SSL mode. No application changes are required.
Pokud chcete pomoci s psan??m ovlada????,
p??ij??te a pomo??te n??m.
Hled??me kryptografick?? odborn??ky z cel??ho sv??ta
Samoz??ejm??,??e n???? projekt pot??ebuje lidi k pr??ci na t??chto syst??mech.Pokud
je n??j??k?? ne-americk?? odborn??k,kter?? souhlas?? s v????e popsan??m,m?? z??jem o
zapojen?? do projektu a poskytnout pomoc s kryptografi?? v OpenBSD,tak a??
n??s pros??m kontaktuje.
Dal???? informace
Mnoho dokument?? bylo naps??no ??leny OpenBSD t??mu o kryptografick??ch zm??n??ch,
kter?? ud??lali v OpenBSD.Postscript verze t??chto dokument?? jsou k dispozici
n????e.
- A Future-Adaptable Password Scheme.
Usenix 1999,
by Niels Provos,
David Mazieres.
paper and
slides.
- Cryptography in OpenBSD: An Overview.
Usenix 1999,
by Theo de Raadt,
Niklas Hallqvist,
Artur Grabowski,
Angelos D. Keromytis,
Niels Provos.
paper and
slides.
- Implementing Internet Key Exchange (IKE).
Usenix 2000,
by Niklas Hallqvist and
Angelos D. Keromytis.
paper and
slides.
- Encrypting Virtual Memory.
Usenix Security 2000,
Niels Provos.
paper and
slides.
- The Design of the OpenBSD Cryptographic Framework.
Usenix 2003, by
Angelos D. Keromytis,
Jason L. Wright, and
Theo de Raadt.
paper.
- Cryptography As an Operating System Service: A Case Study.
ACM Transactions on Computer Systems,
February 2006, by
Angelos D. Keromytis,
Jason L. Wright, and
Theo de Raadt.
paper.
www@openbsd.org
$OpenBSD: crypto.html,v 1.32 2009/11/07 07:32:54 ajacoutot Exp $