<?Pub UDT _bookmark _target?><?Pub EntList bsol dash hellip gt lt minus?><?Pub CX solbook(book(title()bookinfo()part(3)part(title()partintro()?><chapter id="scf-1"><?Pub Tag atict:info tracking="off" ref="0" restricted="off"?><?Pub Tag
atict:user user="sharonr" fullname="Sharon Veach"?><title>Solaris Cryptographic
Framework (Overview)</title><indexterm><primary>new features</primary><secondary>cryptographic framework</secondary>
</indexterm><indexterm><primary>new features</primary><secondary>Solaris Cryptographic Framework</secondary>
</indexterm><highlights><itemizedlist><para>This chapter describes the <trademark>Solaris</trademark> Cryptographic
Framework. The following is a list of the information in this chapter.</para><listitem><para><olink targetptr="scf-10" remap="internal">Solaris Cryptographic Framework</olink></para>
</listitem><listitem><para><olink targetptr="scf-18" remap="internal">Terminology in the Solaris Cryptographic
Framework</olink></para>
</listitem><listitem><para><olink targetptr="scf-15" remap="internal">Scope of the Solaris Cryptographic
Framework</olink></para>
</listitem><listitem><para><olink targetptr="scf-14" remap="internal">Administrative Commands in the Solaris
Cryptographic Framework</olink></para>
</listitem><listitem><para><olink targetptr="scf-11" remap="internal">User-Level Commands in the Solaris
Cryptographic Framework</olink></para>
</listitem><listitem><para><olink targetptr="scf-12" remap="internal">Plugins to the Solaris Cryptographic
Framework</olink></para>
</listitem><listitem><para><olink targetptr="scf-17" remap="internal">Cryptographic Services and Zones</olink></para>
</listitem>
</itemizedlist><para>To administer and use the Solaris Cryptographic Framework, see <olink targetptr="scftask-1" remap="internal">Chapter&nbsp;14, Solaris Cryptographic Framework (Tasks)</olink>.</para>
</highlights><sect1 id="scf-10"><title>Solaris Cryptographic Framework</title><indexterm><primary>Cryptoki</primary><see>PKCS #11 library</see>
</indexterm><indexterm><primary>Solaris Cryptographic Framework</primary><see>cryptographic framework</see>
</indexterm><indexterm><primary>cryptographic services</primary><see>cryptographic framework</see>
</indexterm><indexterm><primary>cryptographic framework</primary><secondary>description</secondary>
</indexterm><para>The Solaris Cryptographic Framework provides a common store of algorithms
and PKCS #11 libraries to handle cryptographic requirements. The PKCS #11
libraries are implemented according to the following standard: RSA Security
Inc. PKCS #11 Cryptographic Token Interface (Cryptoki).</para><para>At the kernel level, the framework currently handles cryptographic requirements
for Kerberos and IPsec. User-level consumers include <literal>libsasl</literal> and
IKE.</para><para>Export law in the United States requires that the use of open cryptographic
interfaces be restricted. The Solaris Cryptographic Framework satisfies the
current law by requiring that kernel cryptographic providers and PKCS #11
cryptographic providers be signed. For further discussion, see <olink targetptr="scf-16" remap="internal">Binary Signatures for Third-Party Software</olink>.</para><itemizedlist><para><indexterm><primary>cryptographic framework</primary><secondary>consumers</secondary></indexterm><indexterm><primary>cryptographic framework</primary><secondary>providers</secondary></indexterm><indexterm><primary>providers</primary><secondary>definition as plugins</secondary></indexterm><indexterm><primary>plugins</primary><secondary>in cryptographic framework</secondary></indexterm>The framework enables <firstterm>providers</firstterm> of cryptographic
services to have their services used by many <firstterm>consumers</firstterm> in
the Solaris Operating System. Another name for providers is <firstterm>plugins</firstterm>. The
framework allows three types of plugins:</para><listitem><para><emphasis role="strong">User-level plugins &ndash;</emphasis> Shared
objects that provide services by using PKCS #11 libraries, such as <filename>pkcs11_softtoken.so.1</filename>.</para>
</listitem><listitem><para><emphasis role="strong">Kernel-level plugins &ndash;</emphasis> Kernel
modules that provide implementations of cryptographic algorithms in software,
such as <olink targetptr="glossary-83" remap="internal">AES</olink>.</para><para>Many of the
algorithms in the framework are optimized for x86 with the SSE2 instruction
set and for SPARC hardware.</para>
</listitem><listitem><para><emphasis role="strong">Hardware plugins &ndash;</emphasis> Device
drivers and their associated hardware accelerators. A hardware accelerator
offloads expensive cryptographic functions from the operating system. The Sun Crypto Accelerator 1000 board
is one example.</para>
</listitem>
</itemizedlist><para><indexterm><primary>PKCS #11 library</primary><secondary>in Solaris Cryptographic Framework</secondary></indexterm><indexterm><primary>cryptographic framework</primary><secondary>PKCS #11 library</secondary></indexterm>The framework implements a standard interface, the PKCS #11, v2.11
library, for user-level providers. The library can be used by third-party
applications to reach providers. Third parties can also add signed libraries,
signed kernel algorithm modules, and signed device drivers to the framework.
These plugins are added when the <command>pkgadd</command> utility installs
the third-party software. For a diagram of the major components of the framework,
see <olink targetdoc="gssapipg" targetptr="chapter1-1" remap="external">Chapter 8, <citetitle remap="chapter">Introduction to the Solaris Cryptographic Framework,</citetitle> in <citetitle remap="book">Solaris Security for Developers Guide</citetitle></olink>.</para>
</sect1><sect1 id="scf-18"><title>Terminology in the Solaris Cryptographic Framework</title><para><indexterm><primary>cryptographic framework</primary><secondary>definition of terms</secondary></indexterm><indexterm><primary>cryptographic framework</primary><secondary>providers</secondary></indexterm><indexterm><primary>providers</primary><secondary>definition as plugins</secondary></indexterm>The following list of definitions and examples is useful when
working with the cryptographic framework.</para><itemizedlist><listitem><para><indexterm><primary>algorithms</primary><secondary>definition in cryptographic framework</secondary></indexterm><emphasis role="strong">Algorithms &ndash;</emphasis> Cryptographic
algorithms. These are established, recursive computational procedures that
encrypt or hash input. Encryption algorithms can be symmetric or asymmetric.
Symmetric algorithms use the same key for encryption and decryption. Asymmetric
algorithms, which are used in public-key cryptography, require two keys. Hashing
functions are also algorithms.</para><itemizedlist><para>Examples of algorithms include:</para><listitem><para>Symmetric algorithms, such as AES and ARCFOUR</para>
</listitem><listitem><para>Asymmetric algorithms, such as Diffie-Hellman and RSA</para>
</listitem><listitem><para>Hashing functions, such as MD5</para>
</listitem>
</itemizedlist>
</listitem><listitem><para><indexterm><primary>consumers</primary><secondary>definition in cryptographic framework</secondary></indexterm><emphasis role="strong">Consumers &ndash;</emphasis> Are users
of the cryptographic services that come from providers. Consumers can be applications,
end users, or kernel operations.</para><itemizedlist><para>Examples of consumers include:</para><listitem><para>Applications, such as IKE</para>
</listitem><listitem><para>End users, such as an ordinary user who runs the <command>encrypt</command> command</para>
</listitem><listitem><para>Kernel operations, such as IPsec</para>
</listitem>
</itemizedlist>
</listitem><listitem><para><indexterm><primary>mechanism</primary><secondary>definition in cryptographic framework</secondary></indexterm><emphasis role="strong">Mechanism &ndash;</emphasis> Is the application
of a mode of an algorithm for a particular purpose.</para><para>For example,
a DES mechanism that is applied to authentication, such as CKM_DES_MAC, is
a separate mechanism from a DES mechanism that is applied to encryption, CKM_DES_CBC_PAD.</para>
</listitem><listitem><para><indexterm><primary>metaslot</primary><secondary>definition in cryptographic framework</secondary></indexterm><emphasis role="strong">Metaslot &ndash;</emphasis> Is a single
slot that presents a union of the capabilities of other slots which are loaded
in the framework. The metaslot eases the work of dealing with all of the capabilities
of the providers that are available through the framework. When an application
that uses the metaslot requests an operation, the metaslot figures out which
actual slot should perform the operation. Metaslot capabilities are configurable,
but configuration is not required. The metaslot is on by default. To configure
the metaslot, see the <olink targetdoc="group-refman" targetptr="cryptoadm-1m" remap="external"><citerefentry><refentrytitle>cryptoadm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page.</para>
</listitem><listitem><para><indexterm><primary>mode</primary><secondary>definition in cryptographic framework</secondary></indexterm><emphasis role="strong">Mode &ndash;</emphasis> Is a version of
a cryptographic algorithm. For example, CBC (Cipher Block Chaining) is a different
mode from ECB (Electronic Code Book). The AES algorithm has two modes, CKM_AES_ECB
and CKM_AES_CBC.</para>
</listitem><listitem><para><indexterm><primary>policy</primary><secondary>definition in cryptographic framework</secondary></indexterm><emphasis role="strong">Policy &ndash;</emphasis> Is the choice,
by an administrator, of which mechanisms to make available for use. By default,
all providers and all mechanisms are available for use. The disabling of any
mechanism would be an application of policy. The enabling of a disabled mechanism
would also be an application of policy.</para>
</listitem><listitem><para><indexterm><primary>providers</primary><secondary>definition in cryptographic framework</secondary></indexterm><emphasis role="strong">Providers &ndash;</emphasis> Are cryptographic
services that consumers use. Providers plug in to the framework, so are also
called <emphasis>plugins</emphasis>.</para><itemizedlist><para>Examples of providers include:</para><listitem><para>PKCS #11 libraries, such as <filename>pkcs11_softtoken.so</filename></para>
</listitem><listitem><para>Modules of cryptographic algorithms, such as <literal>aes</literal> and <literal>arcfour</literal></para>
</listitem><listitem><para>Device drivers and their associated hardware accelerators,
such as the <literal>dca/0</literal> accelerator</para>
</listitem>
</itemizedlist>
</listitem><listitem><para><indexterm><primary>slot</primary><secondary>definition in cryptographic framework</secondary></indexterm><emphasis role="strong">Slot &ndash;</emphasis> Is an interface
to one or more cryptographic devices. Each slot, which corresponds to  a physical
reader or other device interface, might contain a token. A token provides
a logical view of a cryptographic device in the framework.</para>
</listitem><listitem><para><indexterm><primary>token</primary><secondary>definition in cryptographic framework</secondary></indexterm><emphasis role="strong">Token &ndash;</emphasis> In a slot, a
token provides a logical view of a cryptographic device in the framework.</para>
</listitem>
</itemizedlist>
</sect1><sect1 id="scf-15"><title>Scope of the Solaris Cryptographic Framework</title><indexterm><primary>cryptographic framework</primary><secondary>interacting with</secondary>
</indexterm><itemizedlist><para>The framework provides commands for administrators, for users, and for
developers who supply providers:</para><listitem><para><indexterm><primary>cryptographic framework</primary><secondary><command>cryptoadm</command> command</secondary></indexterm><indexterm><primary><command>cryptoadm</command> command</primary><secondary>description</secondary></indexterm><indexterm><primary><command>svcadm</command> command</primary><secondary>administering cryptographic framework</secondary></indexterm><emphasis role="strong">Administrative commands &ndash;</emphasis> The <command>cryptoadm</command> command provides a <option role="nodash">list</option> subcommand
to list the available providers and their capabilities. Ordinary users can
run the <command>cryptoadm list</command> and the <command>cryptoadm --help</command> commands.</para><para>All other <command>cryptoadm</command> subcommands require you
to assume a role that includes the Crypto Management rights profile, or to
become superuser. Subcommands such as <option role="nodash">disable</option>, <option role="nodash">install</option>, and <option role="nodash">uninstall</option> are
available for administering the framework. For more information, see the <olink targetdoc="group-refman" targetptr="cryptoadm-1m" remap="external"><citerefentry><refentrytitle>cryptoadm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page.</para><para>The <command>svcadm</command> command is used to manage the <command>kcfd</command> daemon,
and to refresh cryptographic policy in the kernel. For more information, see
the <olink targetdoc="group-refman" targetptr="svcadm-1m" remap="external"><citerefentry><refentrytitle>svcadm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page.</para>
</listitem><listitem><para><emphasis role="strong">User-level commands &ndash;</emphasis> The <command>digest</command> and <command>mac</command> commands provide file integrity
services. The <command>encrypt</command> and <command>decrypt</command> commands
protect files from eavesdropping. To use these commands, see <olink targetptr="scftask-24" remap="internal">Protecting Files With the Solaris Cryptographic Framework
(Task Map)</olink>.</para>
</listitem><listitem><para><indexterm><primary>cryptographic framework</primary><secondary><command>elfsign</command> command</secondary></indexterm><indexterm><primary><command>elfsign</command> command</primary><secondary>description</secondary></indexterm><emphasis role="strong">Binary signatures for third-party providers &ndash;</emphasis> The <command>elfsign</command> command enables third parties to
sign binaries for use within the framework. Binaries that can be added to
the framework are PKCS #11 libraries, kernel algorithm modules, and hardware
device drivers. To use the <command>elfsign</command> command, see <olink targetdoc="gssapipg" targetptr="pkg" remap="external">Appendix F, <citetitle remap="appendix">Packaging and Signing Cryptographic Providers,</citetitle> in <citetitle remap="book">Solaris Security for Developers Guide</citetitle></olink>.</para>
</listitem>
</itemizedlist>
</sect1><sect1 id="scf-14"><title>Administrative Commands in the Solaris Cryptographic
Framework</title><indexterm><primary>cryptographic framework</primary><secondary><command>cryptoadm</command> command</secondary>
</indexterm><indexterm><primary>administering</primary><secondary>cryptographic framework</secondary>
</indexterm><indexterm><primary>commands</primary><secondary>cryptographic framework commands</secondary>
</indexterm><indexterm><primary>administering</primary><secondary>metaslot</secondary>
</indexterm><indexterm><primary>metaslot</primary><secondary>administering</secondary>
</indexterm><itemizedlist><para>The <command>cryptoadm</command> command administers a running cryptographic
framework. The command is part of the Crypto Management rights profile. This
profile can be assigned to a role for secure administration of the cryptographic
framework. The  <command>cryptoadm</command> command manages the following:</para><listitem><para>Displaying cryptographic provider information</para>
</listitem><listitem><para>Disabling or enabling provider mechanisms</para>
</listitem><listitem><para>Solaris 10 1/06: Disabling or enabling the metaslot</para>
</listitem>
</itemizedlist><para><indexterm><primary>daemons</primary><secondary><command>kcfd</command></secondary></indexterm><indexterm><primary><command>svcadm</command> command</primary><secondary>administering cryptographic framework</secondary></indexterm>The <command>svcadm</command> command is used to enable, refresh,
and disable the cryptographic services daemon, <command>kcfd</command>. This
command is part of the Solaris service management facility, <literal>smf</literal>. <literal>svc:/system/cryptosvcs</literal> is the service instance for the cryptographic
framework. For more information, see the <olink targetdoc="group-refman" targetptr="smf-5" remap="external"><citerefentry><refentrytitle>smf</refentrytitle><manvolnum>5</manvolnum></citerefentry></olink> and <olink targetdoc="group-refman" targetptr="svcadm-1m" remap="external"><citerefentry><refentrytitle>svcadm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
pages.</para>
</sect1><sect1 id="scf-11"><title>User-Level Commands in the Solaris Cryptographic
Framework</title><indexterm><primary>cryptographic framework</primary><secondary>user-level commands</secondary>
</indexterm><indexterm><primary>commands</primary><secondary>user-level cryptographic commands</secondary>
</indexterm><indexterm><primary>encrypting</primary><secondary>using user-level commands</secondary>
</indexterm><para>The Solaris Cryptographic Framework provides user-level commands to
check the integrity of files, to encrypt files, and to decrypt files. A separate
command, <command>elfsign</command>, enables providers to sign binaries for
use with the framework.</para><itemizedlist><listitem><para><indexterm><primary><command>digest</command> command</primary><secondary>description</secondary></indexterm><command>digest</command> <emphasis role="strong">command &ndash;</emphasis> Computes
a <olink targetptr="glossary-81" remap="internal">message digest</olink> for one or more files
or for stdin. A digest is useful for verifying the integrity of a file. <olink targetptr="glossary-162" remap="internal">SHA1</olink> and <olink targetptr="glossary-84" remap="internal">MD5</olink> are
examples of digest functions.</para>
</listitem><listitem><para><indexterm><primary><command>mac</command> command</primary><secondary>description</secondary></indexterm><command>mac</command> <emphasis role="strong">command &ndash;</emphasis> Computes
a <olink targetptr="glossary-80" remap="internal">message authentication code (MAC)</olink> for
one or more files or for stdin. A MAC associates data with an authenticated
message. A MAC enables a receiver to verify that the message came from the
sender and that the message has not been tampered with. The <command>sha1_mac</command> and <command>md5_hmac</command> mechanisms can compute a MAC.</para>
</listitem><listitem><para><indexterm><primary><command>encrypt</command> command</primary><secondary>description</secondary></indexterm><command>encrypt</command> <emphasis role="strong">command &ndash;</emphasis> Encrypts
files or stdin with a symmetric cipher. The <command>encrypt -l</command> command
lists the algorithms that are available. Mechanisms that are listed under
a user-level library are available to the <command>encrypt</command> command.
The framework provides AES, DES, 3DES (Triple-DES), and ARCFOUR mechanisms
for user encryption.</para>
</listitem><listitem><para><indexterm><primary><command>decrypt</command> command</primary><secondary>description</secondary></indexterm><command>decrypt</command> <emphasis role="strong">command &ndash;</emphasis> Decrypts
files or stdin that were encrypted with the <command>encrypt</command> command.
The <command>decrypt</command> command uses the identical key and mechanism
that were used to encrypt the original file.</para>
</listitem>
</itemizedlist><sect2 id="scf-16"><title>Binary Signatures for Third-Party Software</title><para><indexterm><primary><command>elfsign</command> command</primary><secondary>description</secondary></indexterm><indexterm><primary>cryptographic framework</primary><secondary><command>elfsign</command> command</secondary></indexterm>The <command>elfsign</command> command provides a means to sign
providers to be used with the Solaris Cryptographic Framework. Typically,
this command is run by the developer of a provider.</para><para>The <command>elfsign</command> command has subcommands to request a
certificate from Sun and to sign binaries. Another subcommand verifies the
signature. Unsigned binaries cannot be used by the Solaris Cryptographic Framework.
To sign one or more providers requires the certificate from Sun and the private
key that was used to request the certificate. For more information, see <olink targetdoc="gssapipg" targetptr="pkg" remap="external">Appendix F, <citetitle remap="appendix">Packaging and Signing Cryptographic Providers,</citetitle> in <citetitle remap="book">Solaris Security for Developers Guide</citetitle></olink>.</para>
</sect2>
</sect1><sect1 id="scf-12"><title>Plugins to the Solaris Cryptographic Framework</title><indexterm><primary>cryptographic framework</primary><secondary>connecting providers</secondary>
</indexterm><itemizedlist><para>Third parties can plug their providers into the Solaris Cryptographic
Framework. A third-party provider can be one of the following objects:</para><listitem><para><indexterm><primary>providers</primary><secondary>connecting to cryptographic framework</secondary></indexterm>PKCS #11 shared library</para>
</listitem><listitem><para>Loadable kernel software module, such as an encryption algorithm,
MAC function, or digest function</para>
</listitem><listitem><para>Kernel device driver for a hardware accelerator</para>
</listitem>
</itemizedlist><para><indexterm><primary>providers</primary><secondary>signing</secondary></indexterm><indexterm><primary>cryptographic framework</primary><secondary>signing providers</secondary></indexterm><indexterm><primary>signing providers</primary><secondary>cryptographic framework</secondary></indexterm>The objects from a provider must be signed with a certificate
from Sun. The certificate request is based on a private key that the third
party selects, and a certificate that Sun provides. The certificate request
is sent to Sun, which registers the third party and then issues the certificate.
The third party then signs its provider object with the certificate from Sun.</para><para><indexterm><primary>providers</primary><secondary>registering</secondary></indexterm><indexterm><primary>cryptographic framework</primary><secondary>registering providers</secondary></indexterm><indexterm><primary>registering providers</primary><secondary>cryptographic framework</secondary></indexterm>The loadable kernel software modules and the kernel device drivers
for hardware accelerators must also register with the kernel. Registration
is through the Solaris Cryptographic Framework SPI (service provider interface).</para><para><indexterm><primary>providers</primary><secondary>installing</secondary></indexterm><indexterm><primary>cryptographic framework</primary><secondary>installing providers</secondary></indexterm><indexterm><primary>installing</primary><secondary>providers in cryptographic framework</secondary></indexterm>To install the provider, the third party provides a package that
installs the signed object and the certificate from Sun. The package must
include the certificate, and enable the administrator to place the certificate
in a secure directory. For more information, see the <olink targetdoc="gssapipg" targetptr="pkg" remap="external">Appendix F, <citetitle remap="appendix">Packaging and Signing Cryptographic Providers,</citetitle> in <citetitle remap="book">Solaris Security for Developers Guide</citetitle></olink>.</para>
</sect1><sect1 id="scf-17"><title>Cryptographic Services and Zones</title><indexterm><primary>cryptographic framework</primary><secondary>zones and</secondary>
</indexterm><indexterm><primary>administering</primary><secondary>cryptographic framework and zones</secondary>
</indexterm><indexterm><primary>zones</primary><secondary>cryptographic framework and</secondary>
</indexterm><para>The global zone and each non-global zone has its own <literal>/system/cryptosvc</literal> service. When the cryptographic service is enabled or refreshed
in the global zone, the <command>kcfd</command> daemon starts in the global
zone, user-level policy for the global zone is set, and kernel policy for
the system is set. When the service is enabled or refreshed in a non-global
zone, the <command>kcfd</command> daemon starts in the zone, and user-level
policy for the zone is set. Kernel policy was set by the global zone.</para><para>For more information on zones, see <olink targetdoc="group-sa" targetptr="zone" remap="external">Part&nbsp;II, <citetitle remap="chapter">Zones,</citetitle> in <citetitle remap="book">System Administration Guide:  Virtualization Using the Solaris Operating System</citetitle></olink>. For more information on the service
management facility that manages persistent applications, see <olink targetdoc="group-sa" targetptr="hbrunlevels-25516" remap="external">Chapter 15, <citetitle remap="chapter">Managing Services (Overview),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink> and
the <olink targetdoc="group-refman" targetptr="smf-5" remap="external"><citerefentry><refentrytitle>smf</refentrytitle><manvolnum>5</manvolnum></citerefentry></olink> man page.</para>
</sect1>
</chapter><?Pub *0000027111 0?>