User Guide NShield Connect 12.60 Windows
User Guide NShield Connect 12.60 Windows
Copyright in this document is the property of nCipher Security Limited. It is not to be reproduced,
modified, adapted, published, translated in any material form (including storage in any medium by
electronic means whether or not transiently or incidentally) in whole or in part nor disclosed to any third
party without the prior written permission of nCipher Security Limited neither shall it be used otherwise
than for the purpose for which it is supplied.
Words and logos marked with ® or ™ are trademarks of nCipher Security Limited or its affiliates in the EU
and other countries.
Mac and OS X are trademarks of Apple Inc., registered in the U.S. and other countries.
Microsoft and Windows are either registered trademarks or trademarks of Microsoft Corporation in the
United States and/or other countries.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
nCipher Security Limited makes no warranty of any kind with regard to this information, including, but not
limited to, the implied warranties of merchantability and fitness for a particular purpose. nCipher Security
Limited shall not be liable for errors contained herein or for incidental or consequential damages
concerned with the furnishing, performance or use of this material.
1.1.1 Terminology 28
1.2 Conventions 28
1.2.4.1.1 Hardserver 30
2 Security Worlds 34
2.1 Security 35
2.4 Flexibility 40
2.5 Scalability 45
2.5.1 Load-sharing 46
2.6 Robustness 46
2.11 Risks 51
3.2.2 Dialogs 55
5 Software installation 68
6 Client configuration 70
6.5.3.1 nethsmenroll 84
6.5.3.2 config-serverstartup 85
6.8.1.1 anonkneti 90
6.8.1.2 rfs-sync 90
6.8.1.2.1 Usage 90
6.8.1.2.2 Options 90
6.9 Routing 92
6.10.1.1 Troubleshooting 97
6.11.1.4 nShield software / API support required to use elliptic curve functions 101
7.6.1 The Remote Administration Service with an nShield Connect or nShield Connect XC 114
7.11.2 Enabling and disabling remote reboot using the module configuration file 118
7.11.3 Enabling and disabling remote reboot using the front panel of the nShield Connect 118
7.11.4.1 Enabling and disabling remote mode changes using the module configuration file 119
7.11.5.1 Enabling and disabling remote upgrade using the module configuration file 119
7.11.5.2 Enabling and disabling remote upgrade using the front panel of the nShield Con-
nect 119
7.11.6 Adjusting card removal detection timers to account for network characteristics 120
7.11.7 Using Remote Administration with applications requiring cards in slot 0 120
7.13.1 Presenting nShield Remote Administration smart cards using the Remote Admin-
istration Client 122
8.1.4 Creating a Security World using the nShield Connect front panel 133
8.1.5.2 Using nethsmadmin to copy a Security World to an nShield Connect and check the
current version 136
8.3.1 Adding an HSM to a Security World using the nShield Connect front panel 145
8.3.2 Adding an HSM to a Security World with the CSP or CNG wizard 145
8.7.1 Deleting the Security World using the nShield Connect front panel 157
9.1.4 Creating an Operator Card Set using the nShield Connect front panel 160
9.1.5 Creating an Operator Card Set using the command line 161
9.1.7 Creating an Operator Card Set with the CSP or CNG wizard 165
9.3.2 Erasing card sets using the nShield Connect front panel 171
9.4.1 Viewing card sets using the nShield Connect front panel 173
9.4.5.1 Verifying the pass phrase of a card using the nShield Connect front panel 176
9.5.1.1 Changing known pass phrase from the unit front panel 178
9.7.1 Replacing an Administrator Card Set using the nShield Connect front panel 192
10.2.3.2 nCipher PKCS #11 library with HSM Pool mode 210
10.7.1.1.1 Registering the CNG CSP with the CNG Configuration Wizard 230
10.7.3.1 Importing a Microsoft CAPI key into the Security World Key Storage Provider 236
10.7.3.2 Importing a Microsoft CNG key into the Security World Key Storage Provider 237
10.7.3.3 Importing a Security World key into the Security World Key Storage Provider 237
11.2.3.1 Configuring slot import and export using the nShield Connect front panel 248
11.3.5 Managing Remote Operator slots using the unit front panel 250
12.6.1 Viewing information about keys on the unit front panel 259
F.3 How data is affected when a module loses power and restarts 334
K.4.1 Changing the mode using the front panel controls of an nShield Connect 402
K.4.2 Changing the mode using remote mode and nopclearfail 402
Appendix L Upgrading the nShield Connect image file and associated firmware 403
L.3 Upgrading the nShield Connect image file and firmware using the front panel 404
L.4 Remotely enabling dynamic feature certificates including nShield Connect client licenses 404
CAST 457
Diffie-Hellman 457
ECDH 457
ECDSA 458
EdDSA 458
Hardserver 458
Module 459
Rijndael 461
Salt: X 461
Contact Us 463
Americas 463
1 Introduction
l An nShield®Connect .
l An associated Security World. nCipher hardware security modules use the Security World
paradigm to provide a secure environment for all your HSM and key management operations.
The nShield Connect is connected to a network by an Ethernet connection. Each HSM is configured to
communicate with one or more client computers on the network. You can also configure clients to make
use of any other network-connected HSMs on the network, as well as locally connected HSMs.
All nCipher HSMs support standard cryptography frameworks and integrate with many standards based
products.
l You are familiar with the basic concepts of cryptography and Public Key Infrastructure (PKI)
l You have read the Installation Guide.
l You have installed your nShield Connect.
Throughout this guide, the term Installation Guide refers to the particular Installation Guide for
your product.
1.1.1 Terminology
The nShield Connect is referred to as the nShield Connect, the hardware security module, or the HSM.
1.2 Conventions
This symbol is used to indicate if there is a danger of loss or exposure of key material (or any
other security risk).
Keyboard keys that you must press are represented like this: Enter, Ctrl-C.
Examples of onscreen text from graphical user interfaces are represented by boldface text. Names of files,
command-line utilities, and other system items are represented in monospace text. Variable text that you
either see onscreen or that you must enter is represented in italic.
Examples of onscreen terminal display, both of data returned and of your input, are represented in a form
similar to the following:
install
In this syntax, user-defined values are shown in italics and enclosed within the < > characters. Optional
elements are shown enclosed within the [ ] characters. Mutually exclusive elements are separated by
the | character.
Many system objects require the inclusion of a user-defined keyword value. For example, the user object
is executed against a user-supplied user_name. Throughout this guide, all user-defined keyword values
are shown in italics.
Each CLI command that you run performs an operation against the internal configuration of the
appliance. The specific type of operation is specified by the first user-defined keyword value in the
command string.
nCipher provides the firmware that runs on the nShield Connect, and software to run on each client
computer. The nShield Connect is supplied with the latest version of the HSM firmware installed. For
more information about:
l Upgrading the firmware, see "Upgrading the nShield Connect image file and associated firmware"
on page 403
l Installing and configuring the software on each client computer, see the Installation Guide and
"Client configuration" on page 70.
l The supplied utilities, see Supplied utilities on page 272
The latest World version is version 3. You can query the version of the World loaded on your system by
using the command kmfile-dump .
1.2.4.1.1 Hardserver
The hardserver software controls communication between the internal security module and applications
on the network.
Separate instances of the hardserver run on the unit and each client that is configured to work with the
unit. There is a secure channel, known as the impath, between the two software instances, which forms a
single secure entity for transferring data between the unit and the clients. See also "Compatibility issues"
on page 37
The unit’s hardserver is configured using the front panel on the unit, or by means of uploaded
configuration data. Configuration data is stored on the unit and in files in a specially configured file system
on each client computer. For more information about using:
l The front panel to configure the unit, see "The nShield Connect user interface" on page 53
l The specially configured file system to configure the unit and the client, see "Client configuration"
on page 70.
Do not copy the master configuration to file systems on other clients. You can copy Security World files
and key data to other clients to allow you to manage the unit from more than one client. To make it
available to the unit, copy to the RFS the data for Security Worlds, cards or keys that you create on a client
that does not contain the RFS.
The nShield Connect is referenced and used by a utility or application in the same way as a local (PCI-
connected) nCipher HSM.
By default, the Windows C:\ProgramData\ directory is a hidden directory. To see this directory
and its contents, you must enable the display of hidden files and directories in the View
settings of the Folder Options.
Dynamic feature certificates must be stored in the directory stated above. The directory shown
for static feature certificates is an example location. You can store those certificates in any
directory and provide the appropriate path when using the Feature Enable Tool. However, you
must not store static feature certificates in the dynamic features certificates directory.
The absolute paths to the Security World Software installation directory and program data directories are
stored in the indicated nShield environment variables at the time of installation. If you are unsure of the
location of any of these directories, check the path set in the environment variable.
The instructions in this guide refer to the locations of the software installation and program data
directories by their names (for example, Key Management Data) or nShield environment variable names
enclosed with percent signs (for example, %NFAST_KMDATA%).
If the software has been installed into a non-default location, ensure that the associated nShield
environment variables are re-set with the correct paths for your installation.
With previous versions of Security World Software, the Key Management Data directory was
located by default in C:\nfast\kmdata , the Feature Certificates directory was located by default
in C:\nfast\fem, and the Log Files directory was located by default in C:\nfast\log .
This is the directory in the nShield installation that contains the nShield command-line utilities and some
DLLs.
This will allow all the nShield command-line utilities to be run without the need to type the full path, e.g.
running enquiry instead of %NFAST_HOME%\bin\enquiry.
%NFAST_HOME%\bin must be set in the PATH in order to use the OpenSSL module in the Python that is
bundled with nShield.
The Python bundled with nShield is located in a separate directory %NFAST_HOME\python\bin (usually
C:\Program Files\nCipher\nfast\python\bin ). If using the nShield Python, you may additionally want to add
this directory to the PATH environment variable so that you can run the nShield python as just the python
command. You may not want to do this if you are also using other Python installations on the same
machine.
If you have installed the Java Developer component, the Java Generic Stub classes, nCipherKM JCA/JCE
provider classes, and Java Key Management classes are supplied with HTML documentation in standard
Javadoc format, which is installed in the appropriate nfast\java directory when you install these classes.
Release notes containing the latest information about your product are available in the release directory
of your installation media.
We strongly recommend familiarizing yourself with the information provided in the release
notes before using any hardware and software related to your product.
The Remote Administration feature supports remote firmware upgrade of nShield Solo,
nShield Solo XC, nShield Connect and remote ACS card presentation.
We recommend that you monitor the "nShield Announcements & Security Notices" section of the nCipher
Security Support Portal, where any announcement of nShield Security Advisories will be made.
2 Security Worlds
This chapter describes the Security World infrastructure we have developed for the secure life-cycle
management of cryptographic keys. The Security World infrastructure gives you control over the
procedures and protocols you need to create, manage, distribute and, in the event of disaster, recover
keys.
l Security
l Application independence
l Platform independence
l Flexibility
l Scalability
l Robustness
l Audit logging
You can add or remove cards, keys, and even hardware security modules at any time. These
components are linked by the Security World key, which is unique to each world. To see how these
components are related to one another, see "Key protection in a Security World" on the next page.
Distributing the keys used for different tasks within the Security World over different storage media
means that the Security World can recover from the loss of any one component. It also increases the
difficulties faced by an attacker, who needs to obtain all the components before gaining any information.
2.1 Security
We have designed the Security World technology to ensure that keys remain secure throughout their life
cycle. Every key in the Security World is always protected by another key, even during recovery and
replacement operations.
Because the Security World is built around nCipher key-management modules, keys are only ever
available in plain text on secure hardware.
All Security Worlds rely on you using the security features of your operating system to control
the users who can access the Security World and, for example, write data to the host.
l An Administrator Card Set (ACS) to control access to recovery and replacement functionality
l Zero or more Operator Card Sets (OCSs) to control access to application keys
In FIPS 140-2 Level 3 Security Worlds, you require a card from either the ACS or an OCS to
authorize most operations, including the creation of keys and OCSs.
Each card set consists of a number of smart cards, N, of which a smaller number, K, is required to
authorize an action. The required number K is known as the quorum.
The value for K should be less than N. We do not recommend creating card sets in which K is
equal to N because an error on one card would render the whole card set unusable. If your
ACS became unusable through such an error, you would have to replace the Security World
and generate new keys. In Common Criteria CMTS Security Worlds the minimum value of K
for the ACS is 2.
An ACS is used to authorize several different actions, each of which can require a different value for K. All
the card sets are distinct: a smart card can only belong to the ACS or to one OCS.
Each user can access the keys protected by the Security World and the keys protected by their OCS.
They cannot access keys that are protected by another OCS.
Operator Cards employ the Security World key to perform a challenge-response protocol with the
hardware security module. This means that Operator Cards are only useable by an HSM that belongs to
the same Security World.
The Remote Operator feature is not available in Common Criteria CMTS Security Worlds.
The Remote Operator feature enables the secure transmission of the contents of a smart card inserted
into the slot of one module (the attended module) to another module (the unattended module). To transmit to a
remote module, you must ensure that:
To achieve secure communication channels between the attended and unattended modules, the
hardserver uses an impath (an abbreviation of intermodule path), a secure protocol for communication over
IP networks. The communication channels between the modules:
The ACS and/or OCS cards must be nShield Remote Administration smart cards. When presenting a
card, a secure channel is formed directly between the Remote Administration smart card and the target
HSM before any token shares are read from or written to the smart card. The secure channel is secure
against both eavesdroppers and active adversaries.
Security World and key data is stored on the file system of the nShield Connect, where it is updated
whenever card or key operations are performed on the HSM. The data is also automatically transferred
to the remote file system (RFS). If required, you can also share the data with client computers that use the
Security World . If the Security World is updated on the nShield Connect, all the copies of the Security
World data are also updated. For more information, see:
You can also use these tools to create keys or cards. If you perform such tasks on a client other than the
computer on which the RFS is installed, you must transfer the updated files to the RFS before they are
available to the HSM.
Security World software installed. In some cases, this change may have an impact on the compatibility of
network-attached HSMs in environments with mixed HSM deployments.
In most cases where versions of Security World software of v11.50 or later are deployed in conjunction
with v11.40 software or lower, no action is required. However, there are two cases in which
communication cannot be established between the HSM and clients or hosts:
l v11.50 or higher clients communicating with a v11.40 or lower nShield Connect, where the HSM
client uses an nToken.
l v11.50 or higher nShield Connect communicating with a Remote File System (RFS) using v11.40 or
lower.
A Security World that complies with the roles and services section of FIPS 140-2 level 2 does not require
any authorization to create an OCS or an application key.
The FIPS 140-2 level 3 option is included for those customers who have a regulatory requirement for
compliance with FIPS 140-2 at level 3.
If you choose to create a Security World that complies with FIPS 140-2 level 3, the nShield HSM initializes
in that mode, conforming with the roles and services, key management, and self-test sections of the FIPS
validation certificate.
Before you can create or erase an OCS in a Security World that complies with FIPS 140-2 level 3, you
must authorize the action with a card from the ACS or an OCS from that Security World.
To configure and operate the module in its evaluated configuration, the separate Common Criteria
guides should be followed. Please contact nCipher Support for these guides, see
https://help.ncipher.com.
l Safely move a Security World between platforms with differing native formats. For example, you
can move a Security World between Windows and Unix-based platforms.
l Include hosts running different operating systems in the same Security World.
When copying host data between computers using different operating systems or disk
formats, use a mechanism that preserves the original data format and line endings (such as
.tar file archives).
l Which applications you intend to use. You can add a key for any supported application at any time.
l How the key is used by an application. A Security World controls the protection for the key; the
application determines how it is used.
Although keys belong to a specific application, OCSs do not. You can protect keys for different
applications using the same OCS (see "Operator Card Sets, keys, and applications" on the facing page).
l Card Set 1 protects multiple keys for use with Application 1 and Application 2
l Card Set 3 protects multiple keys for use with Application 2 and Application 3
l The Security World key protects a single key for use with Application 3.
2.4 Flexibility
Within a Security World, you can choose the level of protection for each application key that you create.
When you create a Security World, a cryptographic key is generated that protects the application keys
and the OCSs in the Security World.
This level of protection is suitable for high-availability Web servers that you want to recover immediately if
the computer resets.
An OCS stores a number of symmetric keys that are used to protect the application keys. These keys are
of the same type as the Security World key.
Each card in an OCS stores only a fragment of the OCS keys. You can only re-create these keys if you
have access to enough of their fragments. Because cards sometimes fail or are lost, the number of
fragments required to re-create the key (K) are usually less than the total number of fragments (N).
To make your OCS more secure, we recommend that you make the value of K relatively large and the
value of N less than twice that of K (for example, the values for K/N being 3/5 or 5/9). This practice ensures
that if you have a set of K cards that you can use to recreate the key, then you can be certain that there is
no other such card set in existence.
If you have a non-persistent OCS, you must leave one of the cards in an appropriate card slot of each
HSM. This should only be done if it is in accordance with the security policies of your organization.
l K to 1
You can then insert single cards from the OCS into the appropriate card slot of each HSM to authorize the
use of that key.
l K to 1
You can then give each user a single card from the OCS, enabling those users to authorize the use of that
key.
If you have created an OCS for extra security (in which K is more than half of N), you can still
share the keys it protects simultaneously amongst multiple modules as long you have enough
unused cards to form a K/N quorum for the additional hardware security modules. For
example, with a 3/5 OCS, you can load keys onto 3 hardware security modules because, after
loading the key on the first device, you still have 4 cards left. After loading the key on a second
device, you still have 3 cards left. After loading the key onto a third device, you have only 2
cards left, which is not enough to create the quorum required to load the key onto a fourth
device.
If a card becomes damaged, you can replace the whole OCS if you have authorization from the ACS
belonging to that Security World.
You can only replace OCSs that were created by Security Worlds that have the OCS/softcard
replacement option enabled. For more information, see "OCS and softcard replacement" on
page 131.
Use the first card as the working card and store the second card in a completely secure environment. If
the working card fails, retrieve the spare second card from storage, and use it until you re-create a new
set of 2 cards (see "Replacing an Operator Card Set or recovering keys to softcards" on page 48).
You can only replace OCSs that were created by Security Worlds that have the OCS/softcard
replacement option enabled. For more information, see "OCS and softcard replacement" on
page 131.
If you create a persistent OCS, the keys protected by a card from that OCS persist after the card is
removed from the smart card reader.
This enables:
l The use of the same smart card in several hardware security modules at the same time
l Several users to load keys onto the same hardware security module at the same time.
The Security World Software maintains strict separation between the keys loaded by each user, and
each user only has access to the keys protected by their OCS.
Keys protected by a persistent card are automatically removed from the hardware security module:
l When the application that loaded the OCS closes the connection to the hardware security module
l After a time limit that is specified when the card set is created
l When an application chooses to remove a key
l When the HSM is cleared. See "Manually removing keys from an HSM" on the next page for more
information
l If there is a power loss to the module, for example, due to power outage.
Some applications automatically remove a key after each use, reloading it only when required.
Such applications do not benefit from persistent OCSs. The only way of sharing keys between
hardware security modules for such applications is by having multiple smart cards in an OCS.
Although the hardware security module stores the key, the key is only available to the application that
loaded it. To use keys protected by this card in another application, you must re-insert the card, and enter
its pass phrase if it has one. Certain applications only permit one user at a time to log in, in which case any
previously loaded persistent OCS used in that application is removed before the user is allowed to log in
with a new OCS.
Any of these processes removes all keys protected by OCSs from the hardware security module. In such
cases, all users of any applications using the hardware security module must log in again.
Persistence is a permanent property of the OCS. You can choose whether or not to make an OCS
persistent at the time of its creation, but you cannot change a persistent OCS into a non-persistent OCS,
or a non-persistent OCS into a persistent OCS.
A Security World can contain a mix of persistent and non-persistent card sets.
You can change the pass phrase for a card at any time provided that you have access to the card, the
existing pass phrase, and a hardware security module that belongs to the Security World to which the
card belongs. For more information, see "Changing card and softcard pass phrase" on page 177.
The maximum pass phrase length limitation is not applicable to software versions before
Security World Software v11.72.
Pass phrases are limited to a maximum length of 254 characters, when using the following commands:
l new-world
l createocs
l cardpp
l ppmk
l racs
You can still use and edit existing pass phrases that are longer than 254 characters.
Prior to Security World Software v11.72, we set no absolute limit on the length of pass phrases, although
individual applications may not accept pass phrases longer than a specific number of characters.
Likewise, the Security World does not impose restrictions on which characters you can use in a pass
phrase, although some applications may not accept certain characters.
nCipher recommends that your password only contains 7-bit ASCII characters:
A-Z, a-z, 0-9, ! @ # $ % ^ & * - _ + = [ ] { } | \ : ' , . ? / ` ~ " < > ( ) ;
The penalty timer has a 14s penalty threshold, the first 3 failed pass phrase verifications do not incur a
penalty delay. Before verifying a pass phrase, the HSM waits for the current penalty timer to be below 14s.
The penalty time decays over time.
A HSM only has a small number of command processing threads, related to the kind of
hardware in use (eg 9 threads on an nShield Solo). Once all of these are waiting for a penalty
to expire, any other submitted commands will be forced to wait. This can mean that even if
penalty time isn't large, the total delay experienced by clients may be substantial.
A softcard is a file containing a logical token that you cannot load without a pass phrase. You must load the
logical token to authorize the loading of any key that is protected by the softcard. Softcard files:
Softcard-protected keys offer better security than module-protected keys and better availability than
OCS-protected keys. However, because softcard-protected keys do not require physical tokens to
authorize key-loading, OCS-protected keys offer better security than softcard-protected keys.
The pass phrase of a softcard is set when you generate it, and you can use a single softcard to protect
multiple keys. Softcards function as persistent 1/1 logical tokens, and after a softcard is loaded, it remains
valid for loading its keys until its KeyID is destroyed.
NVRAM-stored keys are encrypted in exactly the same way as application keys that are protected by the
unit. The encrypted application key on the unit is replaced by a file containing the name of the NVRAM file
that contains the application key. This file allows applications to use NVRAM-stored keys in the same way
as keys stored in the remote file system. You can protect an NVRAM-stored key with either the Security
World or an OCS.
NVRAM-stored keys differ from standard application keys only in their storage location. They
still require protection by the unit or an OCS.
Use of an NVRAM-stored key is the same as for any other key protected by an nShield Security World.
l Offers no additional security benefits above those offered by the standard Security World Software
mechanisms
l Is available for only a limited number of keys
l Reduces a Security World’s ability to offer load-balancing and recovery
l Requires backup and recovery procedures in addition to any that you implement for data stored on
the client computer.
Do not store keys in NVRAM unless you must do so to satisfy regulatory requirements.
NVRAM key storage was introduced only for those users who must store keys within the physical
boundary of a hardware security module (such as an nShield Connect) to comply with regulatory
requirements. NVRAM-stored keys provide no additional security benefits and their use exposes your
ACS to increased risk. Storing keys in nonvolatile memory also reduces load-balancing and recovery
capabilities. Because of these factors, we recommend you always use standard Security World keys
unless explicitly required to use NVRAM-stored keys.
2.5 Scalability
A Security World is scalable. You can add multiple hardware security modules to a server and share a
Security World across multiple servers. You can also add OCSs and application keys at any time. You do
not need to make any decisions about the size of the Security World when you create it.
l Ensure each client has at least one hardware security module configured
l Copy the Security World data to each client
l load the Security World onto the hardware security modules for each client.
If you create cards or keys in a Security World from a client rather than on the hardware security module
(using the command line, the Microsoft CSP wizard or KeySafe), you must transfer the files from the client
to the remote file system, unless the client is already on the same computer as a remote file system.
To provide access to the same keys on every server, you must ensure that all changes to the client data
are propagated to the remaining servers. If your clients are part of a cluster, then the tools provided by
the cluster should synchronize the data.
There is no risk of an attacker obtaining information by snooping on the network, as the data is only ever
decrypted inside a hardware security module. Alternatively, you can maintain copies of the data on
different clients.
If you want to make cards or keys which are normally created from the client available from the front
panel of the hardware security module, we recommend that you use client cooperation to automate the
copying of files to the device.
2.5.1 Load-sharing
If you have more than one hardware security module configured with a client, your applications (that
have been integrated with the Security World Software) can make use of the load-sharing features in the
Security World Software to share the cryptography between them. Two approaches are supported:
HSM Pool mode is supported on all major APIs except Java (i.e. nCipherKM JCA/JCE CSP). When HSM
Pool mode is enabled for an API, the application sees the HSMs in the Security World as a single
resource pool. A significant benefit is that when a failed HSM is restored to the Security World or a new
HSM is added to the Security World, it is automatically added to the resource pool making it available for
cryptographic operations without restarting the application (i.e. failback support). The pool of HSMs can
be viewed as a single resource using the command enquiry --pool.
Module #1: Not Present indicates that there are no HSMs in the pool.
2.6 Robustness
Cryptography must work 24 hours a day, 7 days a week, in a production environment. If something does
go wrong, you must be able to recover without compromising your security. A Security World offers all of
these features.
You should regularly back up the data stored in the Key Management Data directory with your normal
backup procedures. It would not matter if an attacker obtained this data because it is worthless without
the Security World key, stored in your hardware security module, and the Administrator cards for that
Security World.
When you create a Security World, it automatically creates recovery data for the Security World key. As
with all host data, this is encrypted with the same type of key as the Security World key. The
cryptographic keys that protect this data are stored in the ACS. The keys are split among the cards in the
ACS using the same K/N mechanism as for an OCS. The ACS protects several keys that are used for
different operations.
The cards in the ACS are only used for recovery and replacement operations and for adding extra
hardware security modules to a Security World. At all other times, you must store these cards in a secure
environment.
In FIPS 140-2 Level 3 Security Worlds, the ACS or an OCS is needed to control many
operations, including the creation of keys and OCSs.
If you have more than one hardware security module configured with a client and you use one of the
load-sharing modes identified above, then your client application is resilient to the failure of individual
hardware security modules. If you use HSM Pool mode, then an nShield Connect can be replaced and
returned to the HSM pool without restarting the client application.
For information about replacing a hardware security module, see "Adding or restoring an HSM to the
Security World" on page 144.
You should also use the front panel controls of the nShield Connect, racs, or the KeySafe
Replace Administrator Card Set option to migrate the ACS from standard nShield cards to nShield
Remote Administration Cards. Authorization needs to take place using the local slot of an
HSM.
A hardware security module does not store recovery data for the ACS. Provided that K is less than N for
the ACS, and you have at least K cards available, a hardware security module can re-create all the keys
stored on the device even if the information from other cards is missing.
The loss or failure of one of the smart cards in the ACS means that you must replace the ACS. However,
you cannot replace the ACS unless you have:
Although replacing the ACS deletes the copy of the recovery data on your host, you can still
use the old ACS with the old host data, which you may have stored on backup tapes and other
hosts. To eliminate any risk this may pose, we recommend erasing the old ACS as soon as
you create a new ACS.
The ability to replace an OCS is an option that is enabled by default during Security World
creation (see "OCS and softcard replacement" on page 131). You can only disable the OCS
replacement option during the Security World creation process. You cannot restore the OCS
replacement option, or disable this option, after the creation of the Security World.
You can only recover keys protected by an OCS to another OCS, and not to a softcard.
Likewise, you can only recover softcard-protected keys to another softcard, and not to an
OCS.
To create new copies of the keys protected by the recovery key on an OCS, you can use either:
It is not possible to recover PKCS #11 keys using he front panel controls of the nShield
Connect. You must use the rocs command-line utility.
However, there is always some extra risk attached to the storage of any key-recovery or OCS and
softcard replacement data. An attacker with the ACS and a copy of the recovery and replacement data
could re-create your Security World. If you have some keys that are especially important to protect, you
may decide:
l To issue a new key if you lose the OCS that protects the existing key
l Turn off the recovery and replacement functions for the Security World or the recovery feature for
a specific key.
You can only generate recovery and replacement data when you create the Security World or key. If you
choose not to create recovery and replacement data at this point, you cannot add this data later. Similarly,
if you choose to create recovery and replacement data when you generate the Security World or key, you
cannot remove it securely later.
If you have not allowed recovery and replacement functionality for the Security World, then you cannot
recover any key in the Security World (regardless of whether the key itself was created as recoverable).
The recovery data for application keys is kept separate from the recovery data for the Security World key.
The Security World always creates recovery data for the Security World key. It is only the recovery of
application keys that is optional.
Most applications store only their long-term keys in the Security World. Session keys are short
term keys generated by the application which are not normally loaded into the Security World.
When you use KeySafe to create cards or keys, the data is written to the Key Management Data directory
on the computer on which you run KeySafe. An nShield Connect can only use this data when it is
transferred to the remote file system (if it is on a different computer), from where it is loaded automatically
onto the unit. For this reason, you may find it most convenient to run KeySafe on the same computer as
the remote file system.
Although you may use KeySafe to generate keys, it is your chosen application that actually uses them.
You do not need KeySafe to make use of the keys that are protected by the Security World. For example,
if you share a Security World across several hardware security modules, you do not need to install
KeySafe on every computer. To manage the Security World from a single computer, you can install
KeySafe on just that one computer even though you are using the Security World data on other
computers.
l Create a Security World and its ACS, as either FIPS 140-2 level 2, or level 3
This option provides compliance with the roles and services of the FIPS 140-2 level 3
standard. It is included for those customers who have a regaulatory requirement for
compliance.
KeySafe does not provide tools to back up and restore the host data or update hardware security module
firmware, nor does KeySafe provide tools to synchronize host data between servers. These functions can
be performed with your standard system utilities.
In addition to KeySafe, we also supply command-line utilities to manage the Security World; for more
information about the supplied utilities, see "Supplied utilities" on page 272. Current versions of these
tools can be used interchangeably with the current version of KeySafe.
You can also perform all the tasks available from KeySafe using the front panel controls of the unit,
except for adding, importing and deleting keys.
We have produced Integration Guides for many supported applications. The Integration Guides describe
how to install and configure an application so that it works with nCipher hardware security modules and
Security Worlds.
l Visit https://help.ncipher.com
l Contact Support.
Enabling a PKCS #11 based application to use nShield hardware key protection involves configuring the
application to use the nCipher PKCS #11 library.
The nCipher PKCS #11 library treats a smart card from an OCS in the current Security World as a PKCS
#11 token. The current PKCS #11 standard only supports tokens that are part of a 1-of-N card set, however
the nCipher PKCS #11 library has vendor specific extensions that support K/N card sets, see nCipher
PKCS #11 library with the preload utility on page 210.
A Security World does not make any distinction between different applications that use the nCipher
PKCS #11 library. Therefore, you can create a key in one PKCS #11 compliant application and make use of
it in a different PKCS #11 compliant application.
2.11 Risks
Even the best-designed tools cannot offer security against every risk. Although a Security World can
control which user has access to which keys, it cannot prevent a user from using a key fraudulently. For
example, although a Security World can determine if a user is authorized to use a particular key, it cannot
determine whether the message that is sent with that key is accurate.
A Security World can only manage keys that were created inside the Security World. Keys created
outside a Security World, even if they are imported into the Security World, may remain exposed to a
security risk.
Most failures of security systems are not the result of inherent flaws in the system, but result from user
error. The following basic rules apply to any security system:
l Never insert a smart card used with nCipher key management products into a smart card reader
you do not trust.
l Never insert a smart card reader you do not trust into your hardware security module.
l Never tell anyone your pass phrase.
l Never write down your pass phrase.
l Never use a pass phrase that is easy to guess.
If you have any doubts about the security of a key and/or Security World, replace that key
and/or Security World with a newly generated one.
Label Description
A Power button
C Display screen
D Touch wheel
H Select button
J Clear button
K USB connector
When the unit is powered, the display screen displays a menu or a dialog.
Each menu or dialog includes onscreen navigation labels that appear at the bottom of the display screen,
on either side next to the display navigation buttons. Press the button next to the label to perform the
action specified by the label.
To go back to the previous dialog or menu screen, use the navigation button to the left of the screen. To
confirm a dialog value or select a menu option, either:
Use the touch wheel to changes values or move the cursor on the display screen. To confirm a value,
touch the Select button.
Menus are displayed as a list of selectable options. An onscreen arrow points to the currently selectable
option. If the menu has more than four options, an arrow indicates the direction in which more options are
available.
At the top right of the display screen, a number sequence indicates the path to the current option. The last
digit of the sequence shows the location of the menu you are currently viewing. The top level menu has
no numbers, but when you select the System menu, the number 1 is shown.
The preceding digits in the sequence show the position of each option in turn that was selected in
previous menu screens to reach the current menu. For example, the sequence 1-2 shows that the
indicator is on the second option of the menu that was reached by selecting the first option on the top-
level menu.
3.2.2 Dialogs
For some tasks, a dialog is displayed onscreen. When the dialog opens, the cursor is in the first field. To
change and then enter values:
1. Use the touch wheel to change the displayed value of the fields.
2. Touch the Select button to enter the displayed value and move to the next field in the dialog.
l Use the touch wheel to scroll the displayed information in the direction indicated by the onscreen
arrows.
l When an Options label is displayed, press the right-hand navigation button to see a menu of
navigation options. You can normally choose to go to the top, to the bottom, or to a specified line in
the display.
The numbers of the lines currently being displayed onscreen are shown at the left of the screen. They are
followed in parentheses (( )) by the total number of lines available for display.
If the unit is powered down while you are logged in, you are logged out automatically.
There is a series of start-up information topics available. By default, the first displayed topic is the current
System time. Use the touch wheel to view the other start-up information topics.
Tasks Action
Understand and control the Use the Power button to power up the unit.
power status of the unit
If the Power button is not illuminated, the unit is not powered. The
Power button flashes intermittently as the unit powers up. It also
flashes when the unit is in standby mode. For more information
about the Power button, see the Installation Guide.
Control access to the unit You can control access to the menus on the unit and the Power
button on the front panel by using System > System configuration >
Login settings.
When UI Lockout with OCS has been enabled, you must log in with
an authorized Operator Card before you can access the menus.
You can still view information about the unit on the start-up
screen. When you are logged in, you can log out and leave the
unit locked.
When UI Lockout without OCS has been enabled, you cannot access
the menus, but you can still view information about the nShield
Connect on the start-up screen. The only way to disable this
setting (apart from returning the HSM to factory state) is to push
an updated configuration file to the nShield Connect. See About
user privileges on page 70 and ui_lockout on page 342 for more
information.
Unlock the unit When UI Lockout with OCS has been enabled and you have logged
out, the display screen displays the label Login next to the right-
hand navigation button. Press the right-hand navigation button,
then insert an Operator Card that has been authorized for login,
Tasks Action
Put the unit in standby mode Press the Power button or select System > Shutdown/Reboot >
Shutdown.
Restore the unit to its original Select System > System configuration > Default config.
configuration
Restore the unit to its factory Select System > Factory state.
state
Clear the memory of the Use the Clear button or select HSM > HSM reset.
internal hardware security
module
Set the Real-Time Clock on the Select Security World mgmt > Admin operations > Set secure RTC.
unit
This option requires Administrator Card authorization.
Change the mode of the unit Select HSM > Set HSM mode.
Option Description
Option Description
Display tasks Displays the tasks that the system is currently performing.
Component versions Displays the version numbers of the various system software
components.
View h/w diagnostics Displays the following environmental information about the
module:
When you have connected a keyboard and configured the unit for its use, you can enter numbers and
characters directly into the display. You can also control the unit by using the following keystrokes:
Keystroke Use
Esc Same as pressing the left-hand navigation button on the front panel.
Enter Where the Select button is active, same as pressing Select: where Button
B is active, same as pressing Button B.
Keystroke Use
The tamper detection functionality on the nShield Connect provides additional physical security, over and
above that provided by the holographic security seal, and alerts you to tampering in an operational
environment. There is a removable lid on top of the nShield Connect, protected by the security seal and
tamper switches. To prevent the insertion of objects into the nShield Connect, baffles are placed behind
vents.
To optimize their effectiveness, use the physical security measures implemented on the nShield Connect
in association with your security policies and procedures. For more information about creating and
managing security policies, see the Security Policy Guide on the NIST CMVP website.
Currently, the FIPS 140-2 Level 3 boundary is at the internal module. Future software releases
may move the FIPS boundary so that it includes the entire nShield Connect chassis.
** TAMPER DETECTED **
Consult User Guide.
Check physical seals.
Reset to factory state
or disable tamper
detection first?
RESET DISABLE
When you see this message, examine your unit for physical signs of tampering (see "Physical security
checks" on the next page).
If you discover signs of tampering do not attempt to put the unit back into operation. The date and time of
the tamper event are recorded in the log (see "Logging, debugging, and diagnostics" on page 305).
The tamper-responsiveness circuitry has a Real Time Clock that is synchronised to the system
time of the nShield Connect, however the times associated with events in the tamper log may
still have slight offsets to times recorded in other log files.
Or:
l Disable the tamper detection functionality and then reset the nShield Connect to a factory state.
You require a quorum of the Administrator Card Set (ACS) to restore the key data and reconnect the
nShield Connect to the network. If you chose to disable the tamper protection circuitry when you reset
the nShield Connect to a factory state, a cautionary warning is displayed prior to the request for card
authorization. For information about re-enabling disabled tamper detection functionality, see "Disabling
tamper detection functionality" on page 66.
** TAMPER DETECTED **
Unit lid is open
Replace lid or disable
tamper detection.
DISABLE
An open lid indicates that the physical security of the unit is compromised. You may want to examine your
unit for other physical signs of tampering (see "Physical security checks" on the next page). Do not
attempt to put the unit back into operation.
The date and time of the tamper event are recorded in the log files (see "Logging, debugging, and
diagnostics" on page 305). If the tamper event occurred:
If you choose to replace the lid of the nShield Connect, the onscreen message changes to the tamper
alert message that is given when the lid is closed. Closing the lid provides you with the option to reset the
unit to a factory state without disabling tamper detection functionality. If the lid remains open, all button
presses other than those made using the right-hand navigation button are ignored. Pressing the right-
hand navigation button disables tamper responsiveness and resets the nShield Connect to a factory
state.
1. Check that the physical security seal is authentic and intact. Look for the holographic foil bearing
the nCipher logo. Look for cuts, tears and voiding of the seal. The seal is located on the top of the
nShield Connect chassis.
For information about the appearance of intact and damaged security seals, see the Physical
Security Checklist.
2. Check that the metal lid remains flush with the nShield Connect chassis.
3. Check all surfaces — the top, bottom and sides of the nShield Connect — for signs of physical
damage.
4. Check that there are no signs of physical damage to the vents, including attempts to insert objects
into the vents.
Figure 4.4 Front vent (to the right of the front panel controls)
Figure 4.5 Rear vent (to the right of the power supplies)
Should a problem occur with the fan tray module or a PSU, contact Support before taking further action.
For more information about replacing the fan tray module or a PSU, see the Fan Tray Module Installation
Sheet or the Power Supply Unit Installation Sheet.
The fan tray module contains back-up batteries providing reserve capacity (a guaranteed
minimum of 3 years) for tamper detection functionality even when the nShield Connect is in an
unpowered state.
The tamper protection circuitry remains fully operational if the nShield Connect is placed on standby
while a replacement operation is performed (whether you are replacing the fan tray module or one of the
two PSUs, in the case of dual PSU units).
Provided that the nShield Connect is connected to the mains power supply, the nShield
Connect displays an onscreen error message when back-up battery power is low. The Status
LED also displays a low power warning. For more information, see the Installation Guide.
Battery power low Consider replacing fan tray during the next scheduled ser-
vice/maintenance period.
If the error message is Single fan fail, the nShield Connect can continue operating under the specified
operating environment. Although you are advised to contact Support, the limited nature of such a failure
means you can replace the fan tray module at your convenience.
If the error message is Many fans fail, you must replace the fan tray module immediately.
If the error message is Battery Power low, this indicates that one or both of the backup batteries located
on the fan tray module (required only when the nShield Connect is removed from mains power) is
running low.
The Battery Power low indication has no detrimental affect on the nShield Connect performance whilst
the unit remains powered. nCipher recommend customers should consider replacing the fan tray module
during the next service/maintenance.
If two fans fail from a redundant pair, the nShield Connect will display the error message Many fans
have failed for a few seconds and it will then shutdown. On reboot, the nShield Connect will then display
the error messages System Shutdown and Both fans in a pair had failed. In this situation the fan tray
module must be replaced immediately.
continue to operate normally for at least 3 years, as the fan tray module provides back-up capacity for this
circuitry. For more information about replacing the PSU, see the Power Supply Unit Installation Sheet.
In addition to the orange warning LED, an audible warning is given when a PSU fails on an nShield
Connect. The audible warning is turned off when you navigate to the Critical errors screen.
nCipher guarantees a minimum battery life of three years, even if the nShield Connect remains in storage
and is not connected to the mains power supply during this time.
l Bring the management of the nShield Connect into line with your existing operational procedures
l Standardize the management task, if you are managing a mixture of older and newer units.
1. From the main menu select System > System configuration > Tamper config.
You are shown the following dialog:
Figure 4.6 Tamper responsiveness enabled dialog
Tamper responsiveness is disabled and the unit is reset to a factory state. To restore the key data and
reconnect the nShield Connect to the network you must present a quorum of the ACS.
1. From the main menu select System > System configuration > Tamper config.
2. You are shown the following dialog:
Figure 4.7 Tamper responsiveness disabled dialog
Tamper responsiveness is enabled and the unit is reset to a factory state. To restore the key data and
reconnect the nShield Connect to the network you must present a quorum of the ACS. Tamper events
are logged and never erased.
5 Software installation
See the appropriate Installation Guide for your nShield module for more about installing the Security
World software.
After you have installed the software, you must complete further Security World creation, configuration
and setup tasks before you can use your nShield environment to protect and manage your keys.
The Installation Guide provides brief explanations of how to perform all the post-installation
tasks listed in this section. If this is the first time you are installing a unit and the Security World
Software, or you are unfamiliar with the process, we recommend following the steps outlined
in the Installation Guide.
After you have successfully installed the Security World Software, as described in the Installation Guide),
complete the following steps to finish preparing your HSM for use:
1. Ensure that your public firewall is set up correctly. See the Installation Guide for your HSM for more
information about firewall settings.
2. Perform the necessary basic HSM-client configuration tasks, as described in "Basic HSM and
remote file system (RFS) configuration" on page 72.
3. Create and configure a Security World, as described in "Creating a Security World" on page 127.
4. Create an OCS, as described in "Creating Operator Card Sets (OCSs)" on page 159.
5. Complete additional necessary HSM-client configuration tasks:
a. To configure the unit so that it works with the client machine, see "Configuring the nShield
Connect to use the client" on page 77.
b. To configure client computers so that they work with the unit, see "Configuring client
computers to use the nShield Connect" on page 82.
For this release, you must generate a new client configuration file to take
advantage of new functionality. To generate a new client configuration file, back
up your existing configuration file and run the command cfg-mkdefault. This
generates a template for the configuration file into which you can copy the
settings from your old configuration file.
c. To enable the TCP sockets for Java applications (including KeySafe), run the command:
config-serverstartup -sp
When all additional HSM configuration tasks are completed, you can:
1. Stop and then restart the hardserver, as described in "Stopping and restarting the client
hardserver" on page 107.
2. Test the installation and configuration. See the Installation Guide for your HSM for more
information.
6 Client configuration
This chapter describes how to configure the internal security module of the nShield Connect and the
client to communicate with each other, after you have installed the HSM and the Security World Software.
For more information about installing the HSM, see the Installation Guide. If you are configuring an HSM
and client for the first time, or you want to complete a basic installation quickly, see the Installation Guide.
The nShield Connect provides significant performance improvements, and can be deployed
successfully with existing nShield products. Customers wishing to take advantage of these
performance improvements must update their client machines with the latest Security World
Software.
l Administrator access
l Normal
Administrator access (an Administrator on Windows) is required for such tasks as:
Typically, normal users can only carry out read only operations involving Security Worlds, card sets and
keys. For example, encrypted copies of keys are held in Key Management Data
(C:\ProgramData\nCipher\Key Management Data ). The default permissions allow all users to read these
files, enabling them to use keys but not create them. File permissions can be altered to restrict access to
specific keys to specific users/groups.
You should use the nt_privpipe_users option to define the name of the user who can carry out
privileged operations, for example, using the nopclearfail utility. See nt_privpipe_users on
page 347 for more information.
You can add more HSMs to a client and more clients to an HSM at any time.
The HSM and a client communicate by means of the hardserver, which handles secure transactions
between the HSM and applications that run on the client. You must configure:
l Each client hardserver to communicate with the HSM that the client needs to use
l The HSM to communicate with clients that are allowed to use the HSM.
Information about the current configuration of the HSM or a client is stored in configuration files that are
stored in specified file systems on the clients and on the HSM. For more information about the contents of
configuration files, see "nShield Connect and client configuration files" on page 335.
For information about configuring the HSM by importing an edited configuration file, see "About user
privileges" on the previous page.
The RFS normally resides on a client computer, but it can be located on any computer that is accessible
on the network.
For more information about setting up the remote file system, see "Configuring the Remote File System
(RFS)" on page 73.
Each HSM has separate configuration files on the RFS, stored in the directories with names of the form
%NFAST_KMDATA%\hsm-ESN\config , where ESN represents the electronic serial number of the HSM
from which the files were exported. These directories can contain the following files:
Option Description
config The master configuration file. This contains the current configuration for
the HSM. It is always present in the directory.
You normally configure the HSM using the front panel controls. However, in some cases (for example, if
you need to configure an HSM remotely, or if you are importing a number of clients), you may prefer to
edit the exported configuration file and then re-import the file into the HSM. For more information, see:
You must load the configuration file for the configuration to take effect. For information about loading a
client configuration remotely, see "Remote configuration of additional clients" on page 81.
You can configure a client to use multiple HSMs. All the HSMs configured for use by a client can fail over if
the application that uses them is set up appropriately.
For more information about the contents of the client configuration file, see "nShield Connect and client
configuration files" on page 335.
You can also configure the client’s hardserver by setting environment variables, as described
in "Setting environment variables" on page 91. Environment variable settings override settings
in the client configuration files.
To configure the Ethernet interfaces (IPv4 and IPv6), see the nShield Connect Installation Guide.
Ensure that you have configured the Ethernet interfaces on the HSM before attempting to configure the
hardserver. See the Installation Guide for more information about configuring the Ethernet interfaces.
You can configure the following options to specify network interfaces on which the hardserver listens:
Option Description
All interfaces This option (which is the default) specifies that the hardserver listens on all
interfaces.
IP address of interface #1 This option specifies that the hardserver listens only on interface 1. This
option only appears if interface 1 has been configured.
IP address of interface #2 This option specifies that the hardserver listens only on interface 2. This
option only appears if interface 2 has been configured.
Will not listen This option specifies that the hardserver does not listen on any interfaces.
1. From the main menu, select System > System configuration > Hardserver config. The following screen
appears:
Hardserver config
Select network I/F
hardserver listens on:
All interfaces
Select TCP port: 9004
CANCEL 000000000FINISH
For security reasons, do not allow the hardserver to listen on any interface that is to
connect to the public Internet.
3. Press the Select button to move to the TCP port field, and set the port on which the hardserver is to
listen. The default is 9004.
Make sure that your firewall settings are consistent with your port settings. See the
Installation Guide for more about firewall settings.
4. When the network interface and port are correct, press the right-hand navigation button.
5. Press the right-hand navigation button again to continue.
6. You are asked if you wish to reboot the system now or later. Press the right-hand navigation button
to reboot now.
We recommend that you regularly back up the entire contents of the RFS. The %NFAST_
KMDATA% directory is required to restore the HSM, or a replacement, to its current state, in
case of failure.
You can specify a new remote file system, and modify or delete an existing remote file system
configuration. To create or modify a remote file system configuration, specify the IP address of the
computer on which the file system resides.
You must have created an RFS on the client computer before you specify the IP address of the
client.
For more information about the RFS and its contents, see:
The HSM must be able to connect to TCP port 9004 of the RFS. If necessary, modify the firewall
configuration to allow this connection on either the RFS itself or on a router between the RFS and the
HSM.
Obtain the following information about the HSM before you set up an RFS for the first time:
l The IP address
l The electronic serial number (ESN)
l The hash of the KNETI key (HKNETI). The KNETI key authenticates the HSM to clients. It is generated
when the HSM is first initialized from factory state.
If your network is secure and you know the IP address of the HSM, you can use the anonkneti utility to
obtain the ESN and hash of the KNETI key by giving the following command on the client computer:
anonkneti mmm.mmm.mmm.mmm
In this command, mmm.mmm.mmm.mmm is the IP address of the HSM. The command returns output in
the following form:
A285-4F5A-7500 2418ec85c86027eb2d5959fef35edc5e1b3b698f
Alternatively, you can find this information on the HSM startup screen. Use the touch wheel to scroll to the
appropriate information.
1. Prepare the RFS on the client computer (or another appropriate computer) by running the following
command on that computer:
In this command:
l mmm.mmm.mmm.mmm is the IP address of the HSM
l EEEE-SSSS-NNNN is the ESN of the HSM
l keyhash is the hash of the KNETI key.
2. On the HSM display screen, use the right-hand navigation button to select System > System
configuration > Remote file system, and enter the IP address of the client computer on which you set up
the RFS.
To modify or delete an RFS at a later date, select System > System configuration > Remote file system, and then
select the required action.
You can allow non-HSM hardware security modules to access the remote file system and
share Security World and key data that is stored in the %NFAST_KMDATA% directory in the
same way as the HSM. Clients that access data in this way are described as cooperating clients.
To configure client cooperation, you need to know the details of each client including IP
address and ESN.
After you have defined the remote file system, the HSM configuration files are exported automatically to
the remote file system. For more information about configuration files, see "nShield Connect and client
configuration files" on page 335.
To configure log file storage, use the right-hand navigation button to select System > System configuration >
Log config. Then select one of:
We recommend selecting Append because if you select Log you can only view the log file from the nShield
Connect front panel. Moreover, the log file stored on the HSM is cleared every time it is powered down.
You may also additionally configure the logs to be sent to a remote syslog server, see "Configuring
Remote Syslog" on page 87.
1. Use the right-hand navigation button to select and display the System menu:
1-1
System configuration
System information
Login settings
Upgrade system
Factory state
Shutdown/Reboot
BACK000000000SELECT
1-1-1
Network config
Hardserver config
Remote file system
Client config
Resilience config
Config file options
BACK000000000SELECT
3. Use the touch wheel to move the arrow to Date/time setting, and press the right-hand navigation
button to select it. The Set system date screen is displayed:
4. For each date field, use the touch wheel to set the value and move the cursor to the next field.
When you have completed all the fields, press the right-hand navigation button to confirm the date.
The Set system time screen is displayed:
18:08:19
CANCEL0000000FINISH
Setting the time and date of the HSM as UTC does not reset the value of the Real Time Clock
(RTC) on the HSM. The UTC date and time settings are used only in log messages.
You can connect either a US or a UK keyboard. To configure the nShield Connect for your keyboard type,
select System > System configuration > Keyboard layout and then choose the keyboard type you require.
You can configure the connection to use secure client authentication, either with an nToken installed in
the client or with software-based authentication. If a client attempts to connect to the nShield Connect
when secure client authentication is in use, the HSM not only examines the client’s IP address, but also
requires the client to identify itself using a signing key.
If an nToken is installed in a client, it can be used to both generate and protect a key that is
used for the impath communication between the nShield Connect and the client. Thus a
strongly protected key is used at both ends of the impath.
The client configuration process varies slightly depending on whether you are enrolling the client with or
without secure client authentication:
1. On the nShield Connect front panel, use the right-hand navigation button to select System > System
configuration > Client config > New client.
Client configuration
Please enter your
client IP Address
....0. 0. 0. 0
CANCEL ........NEXT
2. Enter the IP address of the first client, and press the right-hand navigation button.
You are asked to choose the permissions for the client:
Client configuration
Please choose the
client permissions
. Unprivileged
BACK .. . .....NEXT
3. Use the touch wheel to display the type of connection between the internal security module of the
nShield Connect and the client. The following options are available:
Option Description
Priv. on low ports Privileged connections are allowed only from ports numbered
less than 1024. These ports are reserved for use by root on
Unix-based systems.
4. When you have selected a connection option, press the right-hand navigation button.
The following screen is displayed:
You must choose whether to disable or enable secure authentication when enrolling the client (i.e.
using an nToken or software-based authentication):
n To enroll the client without secure authentication, select No and press the right-hand
navigation button.
n To enroll the client with nToken authentication, you must first confirm the nToken
authentication key:
a. On the client, open a command line window, and run the command:
ntokenenroll -H
nToken module #1
nToken ESN: .....3138-147F-2D64
nToken key hash: 691be427bb125f38768638a18bfd2eab75623320
You will need to compare the returned key hash with a value reported on
the nShield Connect display in a subsequent step. Write the hash down, or
ensure that you can see the key hash displayed on the nShield Connect as
you work on the client.
b. On the nShield Connect, enter the number of the port on which the client is listening
and press the right-hand navigation button. (The default is 9004.)
You will now be presented with a list of ESN options, including a Software key option if
software-based authentication is provided by the client's Hardserver.
After selecting an ESN the nShield Connect display will show information of the
following form, identifying the selected nToken by its ESN and displaying a key hash:
Client nnnn-nnnn-nnnn
reported the key hash:
691be427bb125f387686
38a18bfd2eab75623320
Is this EXACTLY right?
...Yes... ... No
CANCEL .......FINISH
c. Compare the hash displayed by the nShield Connect with the hash that was
previously reported by ntokenenroll on the client. If there is an exact match, select Yes
and then press the right-hand navigation button to configure the client.
d. The nShield Connect displays a message reporting that the client has been
configured. Press the right-hand navigation button again.
To enroll the client with software-based authentication, you must first confirm the software
authentication key.
a. On the client, open a command line window, and run the command:
d4c3d757a67416cb9ba31f33febd6ead688629e5
You will need to compare the returned key hash with a value reported on the
nShield Connect display in a subsequent step. Write the hash down, or ensure
that you can see the key hash displayed on the nShield Connect as you work on
the client.
b. On the nShield Connect, enter the number of the port on which the client is listening and
press the right-hand navigation button. (The default is 9004.)
You will now be presented with a list of ESN options, including a Software key option if
software-based authentication is provided by the client's Hardserver.
After selecting the Software key option, the nShield Connect display will show information of
the following form, displaying the software key hash:
c. Compare the hash displayed by the nShield Connect with the hash that was previously
reported by anonkneti on the client. If there is an exact match, select Yes and then press the
right-hand navigation button to configure the client.
d. The nShield Connect displays a message reporting that the client has been configured.
Press the right-hand navigation button again.
To modify or delete an existing client, select System > System configuration > Client config and perform the
appropriate procedure.
If you want to use multiple clients with the nShield Connect, you must enable additional client licenses
(see "Enabling optional features on the unit" on page 99). When you have additional client licenses
enabled, to configure more clients, repeat the appropriate steps of the procedure described in this
section for each client.
Before you can use multiple clients with the nShield Connect, you must enable the additional
clients as described in "Enabling optional features on the unit" on page 99.
addr=client_IP
clientperm=permission_type
Where client_IP is the IP address of the client you are adding and permission_type is what type of
commands the client can issue (unpriv, priv or priv_lowport).
a. If the client is using an nToken, two addtional entries will need to be added to the
configuration file:
esn=nToken_ESN
keyhash=nToken_keyhash
Where nToken_ESN is the ESN of the client's nToken and nToken_keyhash is the hash of
the key that the client's nToken should authenticate itself with.
b. If the client is using software-based authentication, one additional entry will need to be
added to the configuration file:
keyhash=software_keyhash
Where software_keyhash is the hash of the software generated key that the client should
authenticate itself with. The esn entry must be blank or omitted for software-based
authentication.
Each client entry after the first must be introduced by a line consisting of one or
more hyphens.
3. Load the updated configuration file on to the nShield Connect. To do this, run the following
command:
In this command, module_IP_address is the IP address of the nShield Connect and new_config_
file is the location of the updated configuration file (config.new).
With auto push enabled, you can load the configuration file using the nShield Connect front panel.
The configuration file (config.new) must be in the directory %NFAST_KMDATA%\hsm-ESN\config on
the remote file system. To do this, select System > System configuration > Config file options > Fetch
configuration.
An SEE machine cannot be installed or configured using the fetch configuration option
from the front panel. The auto push feature must be used for this. See Remotely loading
and updating SEE machines on page 224 for more information.
For this release, you must generate a new client configuration file to take advantage of the
new functionality. To generate a new client configuration file, back up your existing
configuration file and run the command cfg-mkdefault. This generates a template for the
configuration file into which you can copy the settings from your old configuration file.
The nethsm_imports section defines the network HSMs that the client imports ("nethsm_imports" on
page 351). It can also be set up by the nethsmenroll utility.
l Edit the following mandatory fields: local_module , remote_ip , remote_esn , remote_keyhash and
privileged . The default value for remote_keyhash (40 zeros) specifies that no authentication should
occur.
l The ESN and hash of the HSM to import can be retrieved by running the command
anonkneti remote_ip
l If the client is to be enrolled with an nToken, open a command line window, and run the command:
ntokenenroll --H. This command produces output of the form:
nToken module #1
nToken ESN: 3138-147F-2D64
nToken key hash: 691be427bb125f3876838a18bfd2eab75623320
l Enter the nToken’s ESN in the field ntoken_esn in the config file.
l Each HSM entry after the first must be introduced by a line consisting of one or more hyphens, i.e.
"--- ".
l At the command line run the command cfg-reread , to reload the hardserver’s configuration.
l Verify that the client can use the nShield Connect by running enquiry, which reports the HSM’s
status.
For information about configuration file contents, see "nShield Connect and client configuration files" on
page 335.
nethsmenroll --help
To retrieve the nShield Connect’s ESN and HKNETI, run the command
3138-147F-2D64 691be427bb125f38768638a18bfd2eab75623320
If the nShield Connect’s ESN and HKNETI are not specified, nethsmenroll attempts to contact the HSM to
determine what they are, and requests confirmation.
1. If you are enrolling the client with an nToken, run the command:
nethsmenroll --ntoken-esn <nToken ESN> [Options] --privileged <Unit IP> <Unit ESN> <Unit KNETI HASH>
2. If you are enrolling the client without an nToken, i.e. software-based authentication or no
authentication, run the command:
nethsmenroll [Options] --privileged <Unit IP> <Unit ESN> <Unit KNETI HASH>
Utility Description
nethsmenroll This utility is used to configure the client to communicate with the
nShield Connect.
6.5.3.1 nethsmenroll
The nethsmenroll command-line utility edits the client hardserver’s configuration file to add the specified
nShield Connect. If the nShield Connect’s ESN and HKNETI are not specified, nethsmenroll attempts to
contact the nShield Connect to determine what they are, and requests confirmation.
Usage:
nethsmenroll [Options] --privileged <nShield Connect IP> <nShield Connect ESN> <nShield Connect KNETI HASH>
Options Description
-m, --module=MODULE Specifies the local HSM number to use (default is 0 for dynamic
configuration by hardserver).
Options Description
the nShield Connect's ESN and HKNETI
-V, --verify-nethsm-details When the ESN and HKNETI have been provided on the com-
mand line, verifies that the selected HSM is alive, reachable and
matches those details.
-P, --port=PORT Specifies the port to use when connecting to the given nShield
Connect (default 9004).
6.5.3.2 config-serverstartup
The config-serverstartup command-line utility automatically edits the [server_startup] section in the local
hardserver configuration file in order to enable TCP ports for Java and KeySafe. Any fields for which
values are not specified remain unchanged. After making any changes you are prompted to restart the
hardserver.
config-serverstartup [OPTIONS]
For more information about the options available to use with config-serverstartup , run the command:
config-serverstartup --help
nCipher recommends that the NTP Server(s) are trusted servers within your local network, not
internet time servers. Only IPv4 addresses are supported.
After configuring NTP the Connect has to be re-started for the configuration to take effect. When starting
up after being configured, the NTP client can make a step change to the system time to bring it into line
with that of the NTP server(s). At all other times, the NTP client will only slew (gradually change) the
system time. When using NTP there should be no need to set the system time by setting time and date
from the front panel of the nShield Connect.
l auto push is enabled for the client computer you wish to use for configuring NTP, see Configuring
auto push on page 116.
l The client computer enabled for auto push is configured for Privileged connections, see
"Configuring the nShield Connect to use the client" on page 77, so that the nShield Connect can be
rebooted from the client computer.
Utility Description
cfg-pushntp This tool enables or disables NTP time synchronisation on the specified
nShield Connect. When enabling NTP synchronisation, the IP addresses of up
to 3 NTP servers may be specified.
The new NTP settings will take effect the next time the target
nShield Connect is restarted.
Usage:
cfg-pushntp -a ADDR [-p PORT -k -m MODULE] -1 ADDR [-2 ADDR -3 ADDR] enable
Options:
Field Description
-m, --module=MODULE Set the HSM to use for KNETI authentication. The default is HSM 1.
This option can only be used with the --use-kneti option
-1, --ntp1=ADDR IP address of NTP server.
-2, --ntp2=ADDR IP address of NTP server.
Returns:
The requested NTP configuration changes have been uploaded and will take effect when the target nShield Connect is
restarted.
This behaviour can be configured in addition to storing the log files on the RFS (i.e. you can configure the
logs to be sent to a remote syslog server regardless of whether the nShield Connect logs are configured
to be stored on the HSM or the RFS). For further information see "Configuring log file storage" on
page 75.
There is no additional formatting of log messages (the logs sent are the same log messages that will
appear on the unit or the RFS). It is the responsibility of the remote syslog server / SIEM application to
format, sort and aggregate the incoming log messages.
1. In the remote_sys_log section of the config file for the remote module, add the following settings:
If your config file pre-dates the functionality to send logs to a remote syslog server you
will need to manually create a new config file section called remote_sys_log .
remote_sys_log_ip=REMOTE_SYSLOG_SERVER_IP
remote_sys_log_port=REMOTE_SYSLOG_SERVER_PORT
2. Run the following command to push the new config file to the module:
cfg-pushnethsm
If you are using an older version of the Security World software with an nShield Connect
image that supports remote syslog, you will see this error message: unrecognized section
name: 'remote_sys_log'. Use the following command to push the updated configuration file:
cfgpushnethsm --force
If you are using a version of the Security World software that supports remote syslog
with an nShield Connect image that does not support remote syslog, the configuration
file will be pushed to the nShield Connect but will be rejected by the nShield Connect.
You will see that the updated configuration file on the RFS is unchanged.
To turn off sending logs to a remote syslog server, remove the entries from the remote_sys_log section of
the configuration file and push the updated configuration file.
In this command:
o client_IP_address is the IP address of the client
o EEEE-SSSS-NNNN is the ESN of the unit
o keyhash is the hash of the KNETI key on the unit.
l For every unauthenticated client (with write access but without KNETI authorization), run the
command:
The --write-noauth option should be used only if you believe your network is
secure. This option allows the client you are configuring to access the RFS
without KNETI authorization.
2. On each client that is to be a cooperating client, you must run the rfs-sync command-line utility with
appropriate options:
l for clients that use a local KNETI for authorization (which is generated when the HSM is first
initialized from factory state) and which are to be given write access to the RFS, run the
command:
l for clients that do not have a local KNETI and require write access, run the command:
The rfs-sync utility uses lock files to ensure that updates are made in a consistent fashion. If
an rfs-sync --commit operation (the operation that writes data to the remote file system) fails
due to a crash or other problem, it is possible for a lock file to be left behind. This would
cause all subsequent operations to fail with a lock time-out error.
The rfs-sync utility has options for querying the current state of the lock file, and for deleting
the lock file; however, we recommend that you do not use these options unless they are
necessary to resolve this problem. Clients without write access cannot delete the lock file.
For more information about the rfs-sync utility, see "rfs-sync" on the facing page.
3. To remove a cooperating client so the RFS no longer recognizes it, you must:
l Know the IP address of the cooperating client that you want to remove
l Manually update the remote_file_system section of the hardserver configuration file by
removing the following entries for that particular client:
remote_ip=client_IP_address
remote_esn=keyhash=0000000000000000000000000000000000000000
native_path=%NFAST_KMDATA%\local
volume=kmdata-local
allow_read=yes
allow_write=yes
allow_list=yes
is_directory=yes
is_text=no
and:
remote_ip=client_IP_address
remote_esn=keyhash=0000000000000000000000000000000000000000
native_path=%NFAST_KMDATA%\localsync-store
volume=kmdata-backup
allow_read=yes
allow_write=yes
allow_list=yes
is_directory=yes
is_text=no
6.8.1.1 anonkneti
To find out the ESN and the hash of the KNETI key for a given IP address, use the anonkneti command-
line utility. A manual double-check is recommended for security.
6.8.1.2 rfs-sync
This utility synchronises the kmdata between a cooperating client and the remote file system it is
configured to access. It should be run when a cooperating client is initialised in order to retrieve data from
the remote file system and also whenever a client needs to update its local copy of the data or, if the client
has write access, to commit changes to the data.
6.8.1.2.1 Usage
6.8.1.2.2 Options
-U, --update
These options update local key-management data from the remote file system.
If a cooperating client has keys in its kmdata\local directory that are also on the remote file
system, if these keys are deleted from the remote file system and then rfs-sync --update is run
on the client, these keys remain on the client they are until manually removed.
-c, --commit
These options commit local key-management data changes to the remote file system.
-s, --show
--setup
This option sets up a new synchronisation configuration. Specifics of the configuration can be
altered using setup_options as follows:
-a , --authenticate
These set-up options specify use of KNETI authentication. This is the default.
--no-authenticate
This set-up option specifies that KNETI authentication should not be used.
-m, --module=module
These options select which HSM to use for KNETI authorisation. The default is HSM 1. This option
can only be used with the --authenticate option.
-p , --port=port
These options specify the port on which to connect to the remote file system. The default is 9004.
ip_address
--remove
A client can use rfs-sync --show to display the current configuration, or rfs-sync --remove to revert to a
standalone configuration. Reverting to a standalone configuration leaves the current contents of the Key
Management Data directory in place.
The rfs-sync command also has additional administrative options for examining and removing lock files
that have been left behind by failed rfs-sync --commit operations. Using the --who-has-lock option
displays the task ID of the lock owner. As a last resort, you can use the rfs-sync command-line utility to
remove lock files. In such a case, the --kill-lock option forcibly removes the lock file.
The lock file can also be removed via menu item 3-3-2, Remove RFS Lock: this executes the rfs-
sync --kill-lock command.
1. Open the System dialog by clicking System in the control panel menu.
2. Select the Advanced tab and click the Environment Variables button.
3. To add a variable, click New. Alternatively, to edit an existing variable select an entry in the System
Variables list and click Edit.
4. In the Variable Name field, type or edit the name of the environment variable (for example, NFAST_
HOME).
The Security World Software generates logging information that is configured through a set of four
environment variables:
l NFLOG_FILE
l NFLOG_SEVERITY
l NFLOG_DETAIL
l NFLOG_CATEGORIES
If none of these logging environment variables are set, the default behavior is to log nothing,
unless this is overridden by any individual library. If any of the four logging variables are set, all
unset variables are given default values.
Detailed information about controlling logging information by means of these environment variables is
supplied in "Logging, debugging, and diagnostics" on page 305.
Some components of the Security World Software generate separate debugging information which you
can manage differently. Debugging information for applications is handled on the client. If you are setting
up the unit to develop software that uses it, you should configure debugging before commencing
software development.
6.9 Routing
If you have configured only one network interface, you do not need to configure a static route for the unit,
although you can do so if you wish. If you have configured a second network interface, you can choose to
configure a static route.
If the unit is to connect to a remote host or network that is unreachable through the default gateway, you
must set up extra static routes in the system routing table.
To set up the Ethernet interfaces (IPv4 and IPv6), see the nShield Connect Installation Guide.
After you have defined static routes, you should test them as described in "Testing routes" on the next
page.
If you define, edit, or delete a route, you must reboot the unit before the route can be used and
the routing table is updated.
You can also use the method described in this section to test the route between the client and a remote
computer.
To test the route from the client to the unit, issue a ping command from the client for the IP address that
you specified for the unit. (The format of the command and results may vary according to the platform that
you are using.)
ping xxx.xxx.xxx.xxx
You can also use this method to test the connection between the unit and the client.
1. Select System > System configuration > Network config > Ping remote host. The following screen appears:
4. After a short wait, a display similar to the following should appear, showing that the unit has
managed to communicate with the host:
Ping xxx.xxx.xxx.xxx:
#0: rtt=0.0503 ms
#1: rtt=0.0503 ms
#2: rtt=0.0503 ms
#3: rtt=0.0503 ms
4 of 4 packets back.
min avg max SD
0.29 0.36 0.50 0.09 ms
If not all of the information is visible onscreen, use the touch wheel to scroll up and down the page.
5. Press the left-hand navigation button to return to the Network config menu.
1. Select System > System configuration > Network config > Trace route to host. The following screen appears:
Trace route
Select IP address:
0. 0. 0. 0
CANCEL FINISH
2. Press the right-hand navigation button to issue the traceroute . The following message appears:
3. After a short wait, a display similar to the following should appear, showing the IP addresses
encountered along the route:
1: xxx.xx.xxx.x
0.40 ms
2: *
3: xx.xxx.xx.xxx
3.1 ms
4: xxx.xx.xxx.xxx
2.4 ms
BACK
If not all of the information is visible onscreen, use the touch wheel to scroll up and down the page.
4. Press the left-hand navigation button to return to the Network config menu.
To trace the route from the client to the unit, issue a traceroute command from the client for the IP
address of the unit. (The format of the command, and results, may vary depending upon the platform that
you are using.)
tracert xxx.xxx.xxx.xxx
After a short wait, a display similar to the following should appear, showing the IP addresses
encountered along the route:
1. Select System > System configuration > Network config > Show routing table. A display similar to the
following appears:
If not all of the information is visible on the unit display screen, use the touch wheel to scroll up and
down the page.
2. Press the left-hand navigation button to return to the Network config menu.
This functionality can help provide separation of duty between the data center technician installing the
Connect and the administrator configuring and using the HSM. The only required local activity is to
connect the nShield Connect to power and to serial and Ethernet ports. Everything that can be configured
using the front panel can then be configured remotely either over the serial interface, by using the
nethsmadmin utility (see nethsmadmin on page 281) or by pushing an updated configuration file to the
nShield Connect (see Configuring the nShield Connect with configuration files on page 122).
To access the serial console command line interface, first determine the device name of the serial
connection once it is connected to your client machine. Then configure the serial port connection in your
serial port communication software with the following parameters:
Once the connection is established, press Return until a login prompt is displayed. The login prompt
should look like:
nethsm login:
6.10.1.1 Troubleshooting
Error Action
Make sure that the RJ45 connector is properly connected and that
remote configuration is enabled on the nShield Connect, see
Enabling and disabling the serial console on page 98.
Miscellaneous characters dis- Make sure the serial port connection is configured correctly, see
played on the screen Serial port configuration on page 97.
On first login you will be prompted to change the password for the cli user. The minimum length of the
new password is 5 characters. For guidance on selecting a password, see the nShield Security Manual.
Once you are successfully logged in to a serial console session you will see the welcome message:
Welcome to the nShield Connect Serial Console. Type help or ? to list commands.
(cli)
The serial console session will automatically logout after 180 seconds of inactivity. To manually end a
session, use the logout command.
l To enable the serial console interface, navigate to System > System configuration > Remote
config options > Serial Console and set to On.
l To disable the serial console interface, set Serial Console to Off.
The serial interface is enabled by default and will turn back on with the default password if the unit is
reset to its factory state. This means if you do not want the serial console enabled you will need to disable
it after each factory state.
If you do not see the menu option System > System configuration > Remote config options > Serial
Console on the front panel then this means that your nShield Connect does not support the serial
console feature (the hardware does not support serial access).
The availability of the serial console feature can also be checked remotely from an enrolled client by
running the enquiry utility.
...
...
Command Description
Command Description
help or ? List available commands with help or detailed help with help cmd
kneti Show the (hash of) Kneti (used for enrolling the HSM with clients)
netlink Get/set network interface link, Get network interface MAC address
uptime Show how long the nShield Connect has been running (since last boot)
For additional help on a command, run help command to see additional guidance on command usage,
syntax and parameter documentation.
The unit firmware checks to confirm whether any features that it attempts to use are enabled. It normally
does this when it authorizes the commands or command options that relate to a specific feature.
Most features are static; that is, they are enabled by means of a switch in the EEPROM of the unit. A static
feature remains enabled when the module is reinitialized.
Some optional features are dynamic; that is, they are enabled by means of a software switch in the volatile
memory of the unit. A dynamic feature must be enabled again if the unit is reinitialized.
If you are enabling the Remote Operator feature, you must enable it on the unit that is to be
used as the unattended unit. For information about Remote Operator, see "Remote Operator "
on page 246.
Elliptic curve cryptography is endorsed by the US National Security Agency and NIST (the National
Institute of Standards and Technology), and by standardization bodies including ANSI, IEEE and ISO.
nCipher modules incorporate hardware that supports elliptic curve operations for ECDH (Elliptic curve
Diffie-Hellman) and ECDSA (Elliptic Curve Digital Signature Algorithm) keys.
nCipher modules with elliptic curve activation support MQV (Menezes-Qu-Vanstone) modes.
HSM module type Elliptic Curve support Elliptic Curve offload acceleration3
HSM module type Elliptic Curve support Elliptic Curve offload acceleration3
nShield Solo 500+, Yes Yes Yes, Prime curves and Yes
6000+ twisted Brainpool
curves are
nShield Connect
accelerated4.
6000+
2Both Prime and Binary named curves are supported. Refer to "Named Curves" below, below, which lists
hardware acceleration.
4Binary curves are supported, but are not hardware offload accelerated.
5Brainpool curves are supported as named curves via nCore, PKCS#11 and JCE only.
6.11.1.4 nShield software / API support required to use elliptic curve functions
Security World Software for
CodeSafe
nShield
Elliptic curve supported / API Microsoft CNG, PKCS#11, Java Microsoft CNG, PKCS#11, Java
Cryptographic Engine (JCE)1. Cryptographic Engine (JCE)1.
1Java elliptic curve functionality is fully supported by the nCipher security provider, nCipherKM. There is
also the option to use the Sun/IBM PKCS #11 Provider with nCipherKM configured to use the nCipher
PKCS#11 library.
BrainpoolP192r1 NISTP256
BrainpoolP192t1 NISTP384
BrainpoolP224r1 NISTP521
BrainpoolP224t1 NISTB163
BrainpoolP256r1 NISTB233
BrainpoolP256t1 NISTB283
BrainpoolP320r1 NISTB409
BrainpoolP320t1 NISTB571
BrainpoolP384r1 NISTK163
BrainpoolP384t1 NISTK233
BrainpoolP512r1 NISTK283
BrainpoolP512t1 NISTK409
NISTK571
l PKCS #11:
l Mechanisms supported by PKCS #11: "Mechanisms" on page 208
l CNG:
l Supported algorithms for CNG: "Supported algorithms for CNG" on page 233
l Key exchange for CNG: "Key exchange" on page 235
l Symmetric and asymmetric algorithms: "Cryptographic algorithms" on page 354
l Using generatekey options and parameters to generate ECDH and ECDSA keys: "Key generation
options and parameters" on page 391
Java elliptic curve functionality is fully supported by the nCipher security provider, nCipherKM.
There is also the option to use the Sun/IBM PKCS #11 Provider with nCipherKM configured to
use the nCipher PKCS#11 library.
SEE Activation (EU+10) This SEE feature is provided with the CodeSafe
developer product to enable you to develop
and run SEE applications. The CodeSafe
developer product is only available to
customers in the Community General Export
Area (CGEA, also known as EU+10). Contact
nCipher to find out whether your country is
currently within the CGEA.
For more information about the SEE, see the CodeSafe Developer Guide.
The Remote Operator feature must be enabled on the module installed in the remote server. Remote
Operator cannot be enabled remotely on an unattended module.
For more information about using Remote Operator, see "Remote Operator " on page 246.
For v12 and later, nCipher recommends that you use Remote Administration, which is more flexible than
the Remote Operator functionality.
The faster performance, comparable with V12.40 performance, is achieved by the RNG part of ECDSA
being done on the NXP C291 Crypto Coprocessor.
This implementation of ECDSA uses an RNG that is not within scope for the nShield certifications and for
this reason it will not be used when the HSM is in a fips-140-2-level-3 or common-criteria-cmts Security
World (regardless of the feature bit setting)
l If possible, make a note of the unit serial number. This can be found on the base of the unit.
l Make a note of the Electronic Serial Number of the unit. You can find this from the front panel
menu, by going to HSM > HSM information > Display details.
When your order has been processed, you receive a Feature Enabling Certificate in one of the following
ways:
The Feature Enabling Certificate contains the information that you need to enable the features you have
ordered.
For more information, including pricing of features, telephone or email your nearest Sales representative
using the contact details from this guide, or the nCipher web site (https://help.ncipher.com).
When enabling static feature(s) from the front panel, either using a card or a file, the module is
cleared without warning. This will cause the HSM to drop or restart any SEE machine, and lose
all the application keys that were loaded. In some cases, applications may need to be
restarted.
To print this list to a file on the unit, select HSM > HSM feature enable > Write state to file. The resulting file is
transferred when the unit configuration is pushed to the remote file system. You can find it in %NFAST_
KMDATA%\hsm-ESN\features\fet.txt.
1. Insert the Feature Enabling smart card into the unit’s slot.
2. From the front panel, select HSM > HSM feature enable > Read FEM from card.
A message is displayed if the features are enabled successfully. If you do not see this message
confirming a successful upgrade, see "Enabling features without a smart card" below.
1. Put the file that contains the feature enabling certificate in %NFAST_KMDATA%\hsm-ESN\features
on the remote file system. In this path, ESN is the ESN of the module.
You can give the file any name that you wish. You must enter the file name on the unit’s front panel,
so you may prefer to use a short name.
2. From the front panel, select HSM > HSM feature enable > Read from a file.
3. Specify the name of the file that contains the certificate.
If your application is multi-threaded, you can add additional modules and expect performance to increase
proportionally until you reach the point where cryptography no longer forms a bottleneck in the system.
l By serial number
l By ModuleID.
You can obtain the ModuleIDs and serial numbers of all your modules by running the enquiry command-
line utility.
6.11.4.1.2 ModuleID
The ModuleID is an integer assigned to the module by the server when it starts. The first module it finds is
given a ModuleID of 1, the next is given a ModuleID of 2, and this pattern of assigning ModuleID numbers
continues for additional modules.
The order in which buses are searched and the order of modules on a bus depends on the exact
configuration of the host. If you add or remove a module, this can change the allocation of ModuleIDs to
all the modules on your system.
You can use the enquiry command-line utility to identify the PCI bus and slot number associated with a
module.
All commands sent to nShield modules require a ModuleID. Many Security World Software commands,
including all acceleration-only commands, can be called with a ModuleID of 0. Such a call causes the
hardserver to send the command to the first available module. If you purchased a developer kit, you can
refer to the developer documentation for information about the commands that are available on nShield
modules.
In general, the hardserver determines which modules can perform a given command. If no module
contains all the objects that are referred to in a given command, the server returns an error status.
However, some key-management operations must be performed together on the same module. In such
cases, your application must specify the ModuleID.
To be able to share OCSs and keys between modules, the modules must be in the same Security World.
However, we recommend that you always upgrade to the latest server software and upgrade the
firmware in existing modules to the latest firmware.
Before you install new hardware, check the release notes on the installation media supplied
with your new module for information about specific compatibility issues, new features, and
bug fixes.
1. Install the module hardware. Refer to the Installation Guide for information on installing nCipher
hardware.
2. Add the module to the Security World. Refer to "Adding or restoring an HSM to the Security World"
on page 144.
To maximize uptime, we recommend that you fit any additional nShield modules for failover on a bus that
is physically separate from that of the primary modules.
If the Remote Administration Service is running, you will be warned and given the option of continuing or
not.
Similarly, you can restart the hardserver on the client, and where applicable the Remote Administration
Service, by running the following commands in a command window with administrative privileges:
You can also stop, start, or restart the hardserver, and where applicable the Remote Administration
Service, from the Windows Control Panel:
1. From the Windows Start menu, open the Windows Control Panel.
2. Double-click Administrative Tools.
3. Double-click Services.
4. Locate nFast Server or nFast Remote Administration Service in the list of services, and from the
Action menu, select Stop, Start, or Restart as required.
The nFast Remote Administration Service, where applicable, is dependent on the nFast
Server so should be started or restarted after the nFast Server.
This removes the configuration of the module but does not change its KNETI.
This gives a new KNETI to the unit, which means that you must update the keyhash field of the unit’s entry
in the nethsm_imports section of the configuration file of all the clients that use it.
l The contents of the configuration files, see "nShield Connect and client configuration files" on
page 335
l Configuring a new remote file system for the unit, see "Configuring the Remote File System (RFS)"
on page 73.
1. Log in on the client computer as a regular user, and open a command window.
2. Run the command:
enquiry
Server: enquiry reply flags none enquiry reply level Six serial number ####-####-#### mode operational
version #-#-# speed index ###### rec. queue ####..#### --- version serial # remote server port #### Module
##: enquiry reply flags none enquiry reply level Six serial number ####-####-#### mode operational version #-
#-# speed index ##### rec. queue ##..### --- rec. LongJobs queue ## SEE machine type PowerPCELF
supported KML types DSAp1024s160 DSAp3072s256 hardware status O
When presenting a card, a secure channel is formed directly between the Remote Administration smart
card and the target HSM before any token shares are read from or written to the smart card.
Remote Administration enables Administrators to use their remote access solution to perform
administration operations and extends the operations that can be performed in this way.
l Card holders to present smart cards to an HSM without being physically present at the HSM (e.g.
the card holder may be in an office, while the HSM is in a datacenter)
l All Administrator and Operator card operations to be carried out remotely
l Security World programs and utilities to be run remotely when used in combination with a standard
remote access solution
l Full remote administration of Security Worlds and their HSMs including:
l Remote mode change
l Create/load/unload Security World
l Firmware upgrade
l Module status (SOS) reporting
l nShield Connect reboot
l nShield Connect front panel lock out.
Once the software has been installed and the hardware security modules have been configured, Remote
Administration enables full remote administration of Security Worlds and their HSMs.
The Remote Administration Service should be installed on a client machine of the HSMs in your
Security World that you can make accessible to Remote Administration Clients.
When a card is inserted in a reader that is associated with an HSM, the nShield Remote Administration
Client and the Remote Administration Service convey messages between the card and the HSM,
allowing a secure channel of communications to be established.
The nethsmadmin tool provides many of the Remote Administration capabilities for an nShield Connect
without accessing the front panel.
l Storage and retrieval of logical token fragments, similar to the smart cards used with previous
releases
l Security mechanisms to ensure authentication and confidentiality of data transferred between
itself and the HSM
The nShield Remote Administration smart cards are FIPS 140-2 Level 3 certified devices, supporting
execution of a custom Java Applet developed by nCipher. The smart cards used with previous versions
of Security World software and nShield HSMs are still useable but, as previously, only in an HSM's local
slot. Remote Administration smart cards can be used both remotely and in an HSM's local slot.
The use of nShield Remote Administration Cards is controlled by an Authorized Card List. If a card does
not appear in the list, it cannot be used. See Authorized Card List on page 121 for more information.
Existing Administrator smart cards can be migrated to new Remote Administration smart cards using the
racs (replace administrator card set) utility. Similarly existing OCS can be migrated using the rocs (replace
operator card set) utility, provided the Security World has recovery enabled and the keys protected by
that OCS are recovery enabled.
Figure 7.2 Migrating existing card sets to Remote Administration card sets using rocs or racs
By default, the Authorized Card List is empty following software installation. The serial numbers of
Remote Administration smart cards must be added to the list using a text editor before they can be used.
For more information on the Authorized Card List, see "Authorized Card List" on page 121.
When administrative operations involving Remote Administration smart cards are initiated
from an nShield Connect Front Panel, the nShield Connect fetches the Authorized Card List
from the RFS.
It is necessary to keep the Authorized Card List in sync by copying the file between the RFS
and clients manually.
The RAC GUI (usually running on a laptop or workstation) communicates with the RAS (in a datacenter)
over a standard TCP/IP connection. If the RAC computer is not on the same local network as the RAS
computer, nCipher recommend that the connection is made over a VPN.
Figure 7.3 Sample screen from the Remote Administration client GUI
In the example screen shown in "Sample screen from the Remote Administration client GUI" above, an
HSM will not be Remote Administration (RA) Ready until it has the appropriate firmware, has a P521
based warrant and has one or more dynamic Slots configured.
For users who want to script the card presentation process, there is also a command line utility, raccmd .
See the nShield Remote Administration Client User Guide for more information on deploying and using
the Remote Administration GUI or command line utility.
The RAS participates as a crypto client of the HSMs. As such, the server used to host this software
component must be a licensed client of the nShield Connects being remotely administered. If your
Remote File System (RFS) is already a licensed client, the RAS can be collocated on the RFS server
without needing to purchase an additional client license.
For more information, see the Trusted Verification Device (TVD) User Guide.
7.6.1 The Remote Administration Service with an nShield Connect or nShield Con-
nect XC
Figure 7.1 Deploying the Remote Administration Service with an nShield Connect and nShield Connect
XC
The Remote Access Server can be on a different client to the one where the Remote
Administration Service is installed.
To use Remote Administration with an nShield Connect or nShield Connect XC, the Remote
Administration Service must be installed on a client, which may also be the RFS. The client must allow
privileged connections.
A privileged connection is required to carry out privileged operations, such as, for example, changing the
mode of the nShield Connect or nShield Connect XC.
For information on installing the Remote Administration Service bundle, see the installation guide for your
HSM.
For more information on the Remote Administration Client, see the nShield Remote Administration Client
user guide.
7.6.4 TVD
A nShield Remote Administration Client can connect to one nShield TVD during a session.
For information on installing the TVD driver and confirming the HSM Electronic Serial Number (ESN) using
the nShield TVD, see the nShield Remote Administration Client user guide.
Enabling the auto push feature allows any client computer to change the HSM configuration
file and gives the client the power to make configuration changes that are otherwise only
available through the HSM secure user interface.
The auto push feature must be enabled if you want to use NTP time synchronisation on the
HSM, see Configuring NTP in the nShield Connect on page 85.
To enable auto push, on the nShield Connect display, use the right-hand navigation button to select
System > System configuration > Config file options > Setup auto push > Auto push mode > IPv4 and then select
CONFIRM. A confirmation message will be displayed.
Once auto push has been enabled, you must specify the IP address of the client from which to push the
configuration from. On the nShield Connect display, use the right-hand navigation button to select System
> System configuration > Config file options > Setup auto push > IPv4 address. Enter the IP address and select
CONFIRM. A message will be displayed confirming your chosen IP address. Select CONTINUE.
Once auto push is enabled, you can complete the configuration steps by editing the configuration files,
rather than by using the front panel of the nShield Connect. See Configuring the nShield Connect with
configuration files on page 122 for more about configuration files.
If you do not want to enable auto push, you can fetch the updated configuration file manually
from the HSM, select System > System configuration > Config file options > Fetch configuration. An SEE
machine cannot be installed or configured using the fetch configuration option from the front
panel. The auto push feature must be used for this.
The default number of slots is 0. This disables Remote Administration on the relevant HSM.
configuration files, dynamic_slots on page 349 for more about the dynamic_slots section
and "Configuring the nShield Connect with configuration files" on page 122 for more about
editing the module configuration file.
or:
b. Use the front panel controls to navigate to Security World mgmt > Set up dynamic slots > Dynamic
Slots and follow the instructions on the screen.
You can check that the HSM has Dynamic Slots by:
slotinfo -m 1
For example, if four Dynamic Slots have been configured, the output from this command includes
the lines:
l The D in the Flags column indicates that slots #2 to #5 are Dynamic Slots.
Depending upon your system configuration, it can take up to 30 seconds for the
Dynamic Slots to appear.
or:
l Using the front panel controls to navigate to Security World mgmt > Display World.
l Configuring the nShield Connect to accept privileged connections from a particular client, see
Configuring the nShield Connect to use the client on page 77
l Enrolling the client as privileged, see Configuring the nShield Connect to use the client on page 77
and Configuring client computers to use the nShield Connect in the nShield Connect Installation
Guide.
In this command:
--module=MODULE
7.11.2 Enabling and disabling remote reboot using the module configuration file
See "Configuring the nShield Connect with configuration files" on page 122 for more about editing the
module configuration file.
Do the following:
l To enable remote reboot, locate the server_settings section of the module configuration file, and
set the enable_remote_reboot field to yes.
l To disable remote reboot, set the enable_remote_reboot field to no . See server_settings on page
342 for more about the enable_remote_reboot field.
7.11.3 Enabling and disabling remote reboot using the front panel of the nShield Con-
nect
Do the following:
l To enable remote reboot, navigate to System > System configuration > Remote config options > Remote
Reboot and set to on .
Once you have enabled remote reboot, you can reboot an nShield Connect from a computer using the
nethsmadmin command, without accessing the unit itself.
7.11.4.1 Enabling and disabling remote mode changes using the module configuration file
See "Configuring the nShield Connect with configuration files" on page 122 for more about editing the
module configuration file.
Do the following:
l To enable mode change using nopclearfail, locate the server_settings section of the module
configuration file, and set the enable_remote_mode field to yes.
l To disable mode change using nopclearfail, set the enable_remote_mode field to no . See server_
settings on page 342 for more about the enable_remote_mode field.
7.11.4.2 Enabling and disabling remote mode changes using the front panel of the nShield Con-
nect
Do the following:
l To enable remote mode change, navigate to System > System configuration > Remote config options >
Remote mode changes and set to on .
Once you have enabled remote mode change, you can change the mode of an nShield Connect from a
computer using the nopclearfail command, without accessing the unit itself.
7.11.5.1 Enabling and disabling remote upgrade using the module configuration file
See "Configuring the nShield Connect with configuration files" on page 122 for more about editing the
module configuration file.
Do the following:
l To enable remote upgrade, locate the server_settings section of the module configuration file, and
set the enable_remote_upgrade field to yes.
l To disable remote upgrade, set the enable_remote_upgrade field to no . See server_settings on
page 342 for more about the enable_remote_upgrade field.
7.11.5.2 Enabling and disabling remote upgrade using the front panel of the nShield Connect
Do the following:
l To enable remote upgrade, navigate to System > System configuration > Remote config options > Remote
Upgrade and set to on .
Once you have enabled remote upgrade, you can upgrade an nShield Connect from a computer using
the nethsmadmin command, without accessing the unit itself.
7.11.6 Adjusting card removal detection timers to account for network char-
acteristics
Depending upon the characteristics of the network between nShield Remote Administration Clients and
HSMs, you may need to adjust the timers that determine how long the system waits for a response,
before it regards a card as having been removed. This enables you to balance the assured card removal
detection time and network traffic.
Do the following:
l Use The dynamic_slot_timeouts section in the module configuration file to define the round trip
(HSM to smartcard and back) time limit (the default is 10 seconds), and the card removal detection
timeout (the default is 30 seconds).
l Push the updated configuration file to the nShield Connect.
See dynamic_slot_timeouts on page 350 and "Configuring the nShield Connect with configuration
files" on page 122 for more information.
b. Use the front panel controls to navigate to Security World mgmt > Set up dynamic slots > Slot
mapping and follow the instructions on the screen.
slotinfo -m 1
For example, if dynamic slot #2 has been mapped to slot #0, the output from this command
includes the lines:
l The D in the Flags column indicates that slot #0 is now a Dynamic Slot
or:
l Using the front panel controls to navigate to Security World mgmt > Display World.
By default, the Authorized Card List is empty following software installation. The serial numbers of
Remote Administration Cards must be added to the list before they can be used.
The Authorized Card List is a text file %NFAST_KMDATA%\config\cardlist on the RFS and each client
computer. The file is read from the RFS by associated nShield Connects as and when required for front
panel operations. The list applies to all Connects associated with the RFS, regardless of the Security
World to which a Connect may belong, including when creating a Security World from the front panel. For
client initiated card operations the Authorized Card List file on that client computer is used. The RFS and
client copies of the Authorized Card List have to be kept in step manually.
There is an option to allow any Remote Administration Card to be used, by including a wildcard
(*) in the Authorized Card List. nCipher recommends that you do not use this option, except
under controlled circumstances, as it effectively disables the Authorized Card List control.
l Enable and disable remote mode of an nShield Connect using nopclearfail -O/-I, see Changing the
mode on page 402
l Reboot an nShield Connect using the nethsmadmin utility, utility nethsmadmin --module=
[MODULE] –-reboot, see Using nethsmadmin to reboot an nShield Connect on page 118
l Upgrade nShield Connect firmware using the nethsmadmin utility, nethsmadmin --
module=MODULE--upgrade-image=image_name , see Upgrading the nShield Connect image file
and firmware from a privileged client on page 406
l Update a Security World using the nethsmadmin utility, nethsmadmin --module =[ModuleID] --
update-world , see Creating a Security World using new-world on page 136Creating a Security
World using new-world on page 136
l Check if Security World files have been copied to an nShield Connect using the nethsmadmin
utility, nethsmadmin –module=[ModuleID] --check-world , see Creating a Security World using new-
world on page 136Creating a Security World using new-world on page 136
7.13.1 Presenting nShield Remote Administration smart cards using the Remote
Administration Client
With Remote Administration, you present a smartcard in a remote work station or laptop rather than
locally at the nShield HSM. Remote Administration creates a separate secure connection from the
Remote Administration smart card to the nShield HSM enabling remote card presentation.
For information on presenting nShield Remote Administration smart cards, see the nShield® Remote
Administration Client user guide.
There are two ways to configure the nShield Connect by importing edited configuration files.
If you need to configure the nShield Connect regularly, but do not require physical access to it every time
you configure it, follow these steps:
1. Ensure that the nShield Connect is configured to accept a configuration from a remote computer,
see Configuring auto push on page 116.
2. Create a copy of the configuration file from the remote file system in the %NFAST_KMDATA%\hsm-
ESN\config directory on the remote computer.
3. Edit the file so that it contains the required configuration. For information about the contents of the
nShield Connect configuration file, see "nShield Connect and client configuration files" on
page 335.
4. Run the cfg-pushnethsm utility on the updated configuration file, specifying the updated file and the
IP address of the nShield Connect to load the new configuration. To do this, use a command similar
to the following:
In this command, module_IP_address is the nShield Connect on which to load the configuration and
config_file is the path to, and name of the updated configuration file.
5. Check that the configuration file on the RFS has been updated with the required changes.
The nShield Connect checks that it is able to update the configuration file on the RFS before
applying changes to its own configuration. If you want the nShield Connect to apply the
configuration changes even if it cannot update the configuration file on the RFS, for example,
because the RFS is going to be moved to a new IP address, use the --no-rfs-check command
line option:
You will have to copy the configuration file to the RFS manually.
To permit nShield Connect configuration remotely from the RFS computer without enabling the auto push
option:
1. Save the file %NFAST_KMDATA%\hsm-ESN\config as config.new in the same directory and edit it to
contain the configuration you require. For more information about the contents of the configuration
file, see "nShield Connect and client configuration files" on page 335.
2. On the nShield Connect, from the main menu select System > System configuration > Config file options >
Fetch configuration.
An SEE machine cannot be installed or configured using the fetch configuration option from
the front panel. The auto push feature must be used for this. See Remotely loading and
updating SEE machines on page 224 for more information.
Whichever method you use, the updated configuration file becomes the new nShield Connect
configuration. It is automatically copied back to the file %NFAST_KMDATA%\hsm-ESN\config on the remote
file system.
7.13.3.1 [server_settings]
7.13.3.2 [dynamic_slot_timeouts]
The dynamic_slot_timeout section is in the Module configuration file for nShield Connect
HSMs.
7.13.3.3 [dynamic_slots]
The dynamic_slots section is in the Module configuration file for nShield Connect HSMs.
7.13.3.4 [slot_mapping]
The slot_mapping section is in the Module configuration file for nShield Connect HSMs.
Mapping a Dynamic Slot to slot 0 is needed if you want to use Remote Administration with
applications that are not aware of slot numbers greater than zero. This applies to KeySafe and
CNG Wizard but may also apply to your own applications.
7.13.3.5 [remote_administration_service_startup]
7.13.3.6 [ui_lockout]
The ui_lockout section is relevant for nShield Connect only. It does not apply to nShield Solo,
nShield Solo XC or nShield Edge HSMs.
To update an existing hardserver configuration file, edit and insert the sections above. Alternatively
factory resetting an nShield Connect will generate a new configuration file including the new Remote
Administration relevant sections listed above. See the appropriate User Guide for more information on
editing and loading configuration files.
You normally create a Security World after installing and configuring the module and its software. For
more information, see:
l The Installation Guide for more about installing the module and software.
l "Client configuration" on page 70
You create a Security World with a single HSM. If you have more than one module, select one module
with which to create the Security World, then add additional modules to the Security World after its
creation. For more information, see "Adding or restoring an HSM to the Security World" on page 144. If
you create a Security World with the audit logging feature enabled, all additional HSMs added to this
Security World will also have audit logging enabled.
To use the module to protect a different set of keys, you can replace an existing Security World
with a new Security World.
For more information about the type of user that is required for different operations, see "About user
privileges" on page 70.
All Security Worlds rely on you using the security features of your operating system to control
the users who can access the Security World and, for example, write data to the host. See
server_startup on page 346 for more about configuring users for Remote Administration.
If you want to re-use the physical cards created in a previous Security World,you must
erase all Operator Cards, except for nShield Remote Administration Cards, while the
previous Security World still exists. See "Erasing cards and softcards" on page 170.
We recommend that you regularly back up the entire contents of the RFS. Either the
%NFAST_KMDATA%directory under Windows, or the kmdata directory under Unix, is
required to restore an nShield Connect or its replacement, to the current state in case of
failure.
Other nCipher modules can also use a Security World created on an nShield Connect using client
cooperation. For more information, see "Setting up client cooperation" on page 88.
If the Security World operation is done on a client machine (for example, Operator Card Set and key
operations), files are created or updated in the %NFAST_KMDATA%\local, or the directory specified by
the NFAST_KMLOCAL environment variable, on the client machine only.
The %NFAST_KMDATA%\local directory on the remote file system is updated automatically when an
operation is done on the module.
If you want to make cards or keys which are normally created from the client available from the module’s
front panel, we recommend that you use client co-operation to automate the copying of files to the
module. For information about configuring client co-operation, see "Setting up client cooperation" on
page 88.
If you do not use client cooperation, you must manually copy the appropriate card and key files from the
client or host on which the card set or key was created to the %NFAST_KMDATA%\local’s remote file
system. These files must then be updated on the module by selecting Security World mgmt > RFS operations >
Update World files from the main menu.
To be able to create Operator Cards or keys, the user on the client must have write permission for this
directory. All other valid users must have read permission.
By default, the Key Management Data directory, and sub-directories, inherit permissions from
the user that creates them. Installation of the Security World Software must be performed by a
user with Administrator rights that allow read and write operations, and the starting and
stopping of applications.
Load a Security World creates or (for each module in the Security World)
modifies module_ESN
cards_HASH_NUMBER
In this table:
l ESN is the electronic serial number of the module on which the Security World is created
l IDENT is the identifier given to the card set or key when it is created
l APPNAME is the name of the application by which the key was created.
The IDENT of a card set is a 40-character string that represents the hash of the card set’s logical token.
The IDENT of a key is either user supplied or a hash of the key’s logical token, depending on the
application that created the key.
l world
l A module_ESN file for each module that this host uses
l A cards_ IDENT file for each card set that is to be loaded from this host
l A card_ IDENT_ NUMBER file for each card in each card set that is to be loaded from this host
l A key_ APPNAME_ IDENT file for each key that is to be loaded from this host.
These files are not updated automatically. You must ensure that they are synchronized whenever the
Security World is updated on the module.
l Recovery and replacement options, which must be configured if the Security World, keys, or pass
phrases are to be recoverable or replaceable
l SEE options, which only need be configured if you are using CodeSafe
l Options relating to the replacement of an existing Security World with a new Security World.
Security World options are highly configurable at the time of creation but, so that they will remain secure,
not afterwards. For this reason, we recommend that you familiarize yourself with Security World options,
especially those required by your particular situation, before you begin to create a Security World.
8.1.3.1.2 ACS quorum
You must decide the total number of cards (N) in a Security World’s ACS and must have that many blank
cards available before you start to create the Security World. You must also decide how many cards from
the ACS must be present (K) when performing administrative functions on the Security World.
We recommend that you do not create ACSs for which K is equal to N, because you cannot
replace such an ACS if even 1 card is lost or damaged.
In Common Criteria CMTS Security Worlds the minimum value of K for the ACS is 2.
In many cases, it is desirable to make K greater than half the value of N (for example, if N is 7, to make K 4
or more). Such a policy makes it harder for a potential attacker to obtain enough cards to access the
Security World. Choose values of K and N that are appropriate to your situation.
The total number of cards used in the ACS must be a value in the range 1 – 64.
This option provides compliance with the roles and services of the FIPS 140- 2 level 3
standard. It is included for those customers who have a regulatory requirement for
compliance.
If you enable compliance with FIPS 140-2 level 3 roles and services, authorization is required for the
following actions:
In addition, you cannot import or export private or symmetric keys in plain text.
When this option is selected RSA key lengths must be a multiple of 256 bits.
By default, modules are initialized into Security Worlds with remote card set reading enabled. If you add a
module for which remote card reading is disabled to a Security World for which remote card reading is
enabled, the module remains disabled.
You can replace an OCS with another OCS, or a softcard with another softcard, but you
cannot replace an OCS with a softcard or a softcard with an OCS. Likewise, you can transfer
keys from an OCS to another OCS, or from a softcard to another softcard, but you cannot
transfer keys from an OCS to a softcard or from a softcard to an OCS.
You can choose to disable OCS and softcard replacement for a Security World when you create it.
However, in a Security World without this feature, you can never replace lost or damaged OCSs;
therefore, you could never recover the keys protected by lost or damaged OCSs, even if the keys
themselves were generated as recoverable (which is the default for key generation).
OCS and softcard replacement cannot be enabled after Security World creation without
reinitializing the Security World and discarding all the existing keys within it.
For an overview of Security World robustness and OCS or softcard replacement, see "Replacing an
Operator Card Set or recovering keys to softcards" on page 48. For details about performing OCS and
softcard replacement operations, see "Replacing Operator Card Sets" on page 181 and "Replacing the
Administrator Card Set" on page 191.
However, you can choose to enable pass phrase replacement at the time you create a Security World.
This option makes it possible to replace a the pass phrase of a card or softcard even if you do not know
the existing pass phrase. Performing such an operation requires authorization from the Security World’s
ACS.
For details about performing pass phrase replacement operations, see "Changing unknown or lost pass
phrase" on page 180.
When the amount of information to be stored in the NVRAM exceeds the available capacity,
you can instead store this data in a blob encrypted with a much smaller key that is itself then
stored in the NVRAM. This functionality allows the amount of secure storage to be limited only
by the capacity of the host computer.
If you replace an existing Security World, its %NFAST_KMDATA%\local directory is not overwritten but
renamed %NFAST_KMDATA%\local_N (where N is an integer assigned depending on how many
Security Worlds have been previously saved during overwrites). A new Key Management Data directory
is created for the new Security World. If you do not wish to retain the %NFAST_KMDATA%\local_N
directory from the old Security World, you must delete it manually.
8.1.4 Creating a Security World using the nShield Connect front panel
When initiated from the nShield Connect front panel, while a Security World is being created
the nShield Connect disconnects itself from the network to ensure that the operation is not
interrupted. This means that the Remote Administration feature cannot be used to present
cards from a remote location when creating a Security World from the front panel.
l The directory %NFAST_KMDATA%\local on the remote file system must exist and be empty.
l Before configuring the Security World, you should know:
l The security policy for the HSM
l The number and quorum of Administrator Cards and Operator Cards to be used.
To help you decide on the Security World you require, see "Security World options" on page 130.
l You must have enough smart cards to form the Security World’s card sets.
In order to Create a Security World, the firmware version must be 12.50 or higher.
1. From the main menu, select Security World mgmt > Module initialization > New Security World.
2. Specify the Security World mode:
a. FIPS 140-2 Level 3 creates a Security World compliant with FIPS 140-2 requirements for
roles and services at level 3.
b. Common Criteria CMTS creates a Security World supporting Common Criteria Protection
Profile EN 419 221-5.
c. Unrestricted creates a Security World which doesn't impose any particular conformance.
With appropriate environmental constraints, an unrestricted Security World can be
compliant with FIPS 140-2 level 2.
3. Select the Cipher suite for the Security World. Currently only one option is available for the Security
World key, AES (SP800-131AR1).
4. Enter the default quorum for the ACS. This consists of:
a. The maximum number of cards from the ACS required by default for an operation. This
number must be less than or equal to the total number of cards in the set.
b. The total number of cards to be used in the ACS. This must be a value in the range 1 – 64
except for the Common Criteria CMTS Security World mode, for which the range is 2 – 64.
We recommend that you do not create an ACS for which the required number of
cards is equal to the total number of cards because you cannot replace such an
ACS if even a single card is lost or damaged.
RTC access Updating the real time clock. You can choose to
authorize this operation with KNSO, see Real-
time clock (RTC) options on page 133.
In Common Criteria CMTS mode, audit logging is automatically enabled and cannot be
disabled.
8. Specify whether the HSM is a valid target for remote shares (that is, whether it can import slots),
see Remote Operator on page 246. This option is disabled for Common Criteria CMTS mode.
9. For Common Criteria CMTS mode only, choose whether to specify the maximum number of times
an Assigned key can be used since it was authorized. A use limit compatible with the specified
maximum will be imposed at key creation time and can be verified for Assigned keys. If you
choose to specify a maximum key usage limit:
a. Enter the key usages allowed, up to a maximum of 9999.
10. For Common Criteria CMTS mode only, choose whether to specify a maximum timeout for
Assigned keys since key authorization. A time limit compatible with the specified maximum will be
imposed when the key is created, and can be verified for Assigned keys. If you choose to specify a
key timeout:
a. Select the units from Seconds, Minutes, Hours, or Days.
b. Enter a value up to a maximum of 9999 in your selected unit.
11. Format a card for the ACS as follows:
a. Insert a card for the ACS and confirm that you want to use it.
b. If the card is not blank, choose whether to overwrite it or to use a different card .
c. Choose whether to specify a pass phrase for the card. If you choose to specify a pass
phrase:
i. Enter the pass phrase.
ii. Enter the pass phrase again to confirm it. If the two pass phrases do not match, you
must enter the correct pass phrase twice.
d. When prompted, remove the card.
12. Repeat the previous step to format additional cards for the ACS, setting their pass phrases as
described, until the ACS is complete. Each prompt screen shows how many cards are required
and how many have been used.
13. At completion, a message confirms that the Security World has been created.
l The HSM must be in pre-initialization mode. See Checking and changing the mode on an nShield
Connect on page 399 for more about changing the mode.
l You must be logged in to the computer that is running the RFS. The RFS should be a privileged
client that has the client tools installed. For more information, see server_settings on page 342.
l You must have set the NFAST_HOME environment variable.
When you have finished creating a Security World, you must restart the HSM in operational mode.
8.1.5.2 Using nethsmadmin to copy a Security World to an nShield Connect and check the cur-
rent version
If a Security World is created using new-world, the nethsmadmin command-line utility enables you to copy
the resultant files to an nShield Connect. Run the command:
nethsmadmin can also be used to check if the Security World files have been copied to the nShield
Connect. Run the command:
In these commands:
--module=MODULE
Follow the directions in this section to create a Security World from the command line with the new-world
utility.
The example below will create a Security World supporting FIPS140-2 level 3 with a ACS quorum of 3/5
and with audit logging enabled.
In this command:
Option Description
--initialize This option tells new-world to create a new Security World, replacing any
existing %NFAST_KMDATA%\local directory.
--factory This option tells new-world to erase an HSM, restoring it to factory state.
--no-remoteshare-cert This option tells new-world not to make the HSM a target for remote
shares.
--no-strict-rsa-keygen If you have not specified a mode parameter you can use the -no-strict-
rsa-keygen flag to disable the UseStrongPrimes setting. Otherwise it will
be enabled by default. See 8.1.3.1.4 UseStrongPrimes Security World set-
ting on page 131.
--mode=MODE FIPS-140-2-level-3 creates a Security World compliant with FIPS140-2
level 3.
Omitting this option will create a default Security World compliant with
FIPS 140-2 level 2.
Option Description
--no-recovery This option tells new-world to disable the ability to recovery or replace
OCSs and softcard (which is otherwise enabled by default). This is
equivalent to setting !r , where the ! operator instructs the system to turn
off the specified feature (r ).
If you set the --no-recovery option, you can never replace lost
or damaged OCSs generated for that Security World.
Therefore, you could never recover any keys protected by lost
or damaged OCSs, even if the keys themselves were
generated as recoverable (which is the default for key
generation).
--cipher-suite=CIPHER- This option specifies the Cipher suite and type of key that is used to
SUITE protect the new Security World. CIPHER-SUITE should be set to
DLf3072s256mAEScSP800131Ar1 .
--nso-timeout=TIMEOUT This option allows you to specify the time-out (TIMEOUT) for new Security
Worlds. By default, an integer given for TIMEOUT is interpreted in seconds,
but you can supply values for TIMEOUT in the form Ns, Nh , or Nd where N is
an integer and s specifies second, h specifies hours, and d specifies days.
--module=MODULE This option specifies the module to use (by its ModuleID). If you have
multiple modules, new-world initializes them all together.
--acs-quorum=K/N In this option, K specifies the minimum number of smart cards needed
from the ACS to authorize a feature. You can specify lower K values for a
particular feature. All the K values must be less than or equal to the total
number of cards in the set. If a value for K is not specified, new-world
creates an ACS that requires a single card for authorization.
Option Description
N specifies the total number of smart cards to be used in the ACS. This
must be a value in the range 1 – 64. If a value for this option is not
specified, new-world creates an ACS that contains a single card.
This option only takes effect if you are creating a new Security World.
--reduced-features This option instructs new-world to use a reduced default feature set when
creating a Security World. A Security World created with the --reduced-
features option has no pass phrase recovery; no NVRAM, RTC, or FTO;
and no NSO delegate keys. However, such a reduced-features Security
World can perform many operations faster than more fully featured
Security Worlds.
--disablepkcs1pad This option disables the use of PKCS#1 v1.5 padding. All attempts to use
PKCS#1 v1.5 padding for encryption or decryption operations will be
rejected.
--pp-min=LENGTH This option enables a minimum pass phrase length check for the Admin-
istrator Card Set (ACS) the Operator Card Set (OCS) and any associated
softcards when you create a Security World. The minimum pass phrase
length check is then applied after the Security World is created.
When enabled and you attempt to create a card pass phrase with fewer
characters than the specified minimum length, the following warning
message displays:
Option Description
Example:
–-pp-strength This option enables pass phrases to have at least one uppercase,
lowercase, number, and symbol.
--audit-logging This option configures the Security World and the HSM on which it is
being created for audit logging, creating a log signing key for each HSM.
If you set the !fto flag, that is, turn off FTO, you will not be able to use smart cards to import
keys.
To use extended debugging for the HSM, you must set the dseeall flag.
m This feature makes it possible to add new HSMs into the Security World.
This feature cannot be disabled.
r This feature enables OCS and softcard replacement; see "OCS and
softcard replacement" on page 131 and "Replacing Operator Card Sets" on
page 181.
rtc This feature specifies that ACS authorization is needed to set the real-time
clock (RTC); (see "Real-time clock (RTC) options" on page 133).
dsee This feature specifies that that ACS authorization is needed to enable SEE
World debugging.
dseeall This feature enables SEE World debugging for all users.
fto This feature specifies that ACS authorization is needed to enable foreign
token operations (FTO).
The following features remain available for use on presentation of the standard ACS quorum, even if
turned off using the ! operator:
l nvram
l rtc
l fto
Setting the quorum of one these features to 0 has the same effect as turning it off using the ! operator.
The pass phrase replacement (p ) and dseeall features are turned off by default; the other options are
turned on by default.
The nonvolatile memory and SEE world debugging options are relevant only if you are using
the Secure Execution Engine. If you have bought the CodeSafe Developer Kit, refer to the
CodeSafe Developer Guide for more information.
To use extended debugging for the HSM, you must set the dseeall flag.
The dseeall option is designed for testing purposes only. Do not enable this feature on
production Security Worlds as it may enable SEE applications to leak security information.
If you attempt to set a quorum for a feature that you have disabled or if you attempt to set a quorum too
high, new-world displays an error and exits.
If the HSM is not in the pre-initialization mode, new-world advises you that you must put the HSM in this
mode and waits until you have changed the HSM mode before continuing. See Checking and changing
the mode on an nShield Connect on page 399 for more about changing the mode.
If the HSM is in the pre-initialization mode, new-world prompts you for smart cards and pass
phrases as required.
If you lose more than N minus K of these Administrator Cards you cannot restore the Security
World or lost Operator Cards. For example, if you have a 2/3 ACS and you lose more than one
card, you cannot restore the Security World. If you have created an Administrator card set
where K = N, then the loss of one card stops you from being able to restore the Security World.
To prevent this situation from occurring, replace lost or damaged cards from the ACS as soon as you
discover the loss or damage. For more information, see "Replacing the Administrator Card Set" on
page 191.
The security of the keys that you create within this Security World is wholly dependent on the
security of these smart cards.
The Security World data is stored on the HSM and on the RFS. For more information, see "Security World
files" on page 128.
The HSM can now be used to create Operator Cards and keys for the new Security World.
l Select Security World mgmt> Display World info from the main menu
l Run the nfkminfo command-line utility. See "Displaying information about a Security World with
nfkminfo" below.
l Run the kmfile-dump command-line utility. See Displaying information about a Security World with
nfkminfo on page 143.
l Run the nethsmadmin command-line utility. See Using nethsmadmin to copy a Security World to an
nShield Connect and check the current version on page 136.
You can also use Keysafe to view a summarized description of the Security World.
In this command, the -w|--world-info option specifies that you want to display general information about
the Security World. This option is set by default, so you do not need to include it explicitly.
Option Description
-r |--repeat This option repeats the information displayed. There is a pause at the end
of each set of information. The information is displayed again when you
press Enter.
To output a detailed list of Security World information, run nfkminfo with the -w|--world-info option (with or
without the other options). For a description of the fields in this list, and more information about using
nfkminfo , see "nfkminfo: information utility" on page 315.
kmfile-dump [worldfile]
where worldfile is the file storing the World data, usually /opt/nfast/kmdata/local/world
If no WorldVersion is received as a result of the command then the World is either version 1 or version 2.
You can also restore an HSM to a Security World to continue using existing keys and Operator Cards:
l Have installed the additional HSM hardware, as described in the Installation Guide.
l Have a copy of the Security World data on the HSM’s remote file system in the Key Management
Data directory.
l Possess a sufficient number of cards from the ACS and the appropriate pass phrases.
l Erases the Security World data on the HSM’s internal file system
l Reads the required number of cards (K) from the ACS so that it can re-create the secret
l Reads the Security World data from the remote file system
l Uses the secret from the ACS to decrypt the Security World key
l Stores the Security World key in the HSM’s nonvolatile memory
l Configures the HSM for audit logging if the Security World was created with audit logging selected.
After adding an HSM to a Security World, you cannot access any keys that were protected by a previous
Security World that contained that HSM.
It is not possible to program an HSM into two separate Security Worlds simultaneously.
8.3.1 Adding an HSM to a Security World using the nShield Connect front panel
To add an HSM to a Security World:
1. If the HSM already belongs to a Security World, erase it from the Security World to which it belongs,
as described in "Erasing a module from a Security World" on page 154.
2. From the main menu, select Security World mgmt > Module initialization > Load Security World.
3. Specify whether the HSM can use the Remote Operator feature import slots. For more information,
see "Remote Operator " on page 246.
4. At the prompt, insert an Administrator Card, and enter its pass phrase if required.
5. Continue to insert Administrator Cards when prompted until you have inserted the number
required to authorize HSM reprogramming.
8.3.2 Adding an HSM to a Security World with the CSP or CNG wizard
To add an HSM to an existing Security World:
1. Ensure the HSM is in initialization mode and run the wizard by double-clicking its shortcut in the
Start menu under All Programs > nCipher.
2. Click the Next button. The wizard allows you to configure HSM Pool mode for CAPI/CNG.
3. Click the Next button.
If the wizard finds an existing Security World, it prompts you to specify whether you want to use the
existing Security World or create a new Security World.
If the wizard displays any other windows:
a. Cancel the operation.
b. Check that you have correctly set the environment variable NFAST_KMDATA.
c. Copy the local sub-directory from the Key Management Data of another computer in the
same Security World or from a backup tape of this computer to the Key Management Data
directory of this computer.
d. Run the wizard again.
4. Ensure that the Use the existing security world option is selected, and click the Next button.
You can then proceed to add HSMs in the same manner that you add multiple HSMs when you
create a Security World.
In this command:
l -l|--program
This option tells new-world to add an HSM to an existing Security World (in the Key
Management Data directory). If you have multiple HSMs available, you can use the -m|--
module=MODULE option to specify an HSM. If you do not specify an HSM new-world adds all
available HSMs to the Security World.
l -S|--no-remoteshare-cert
These options tell new-world not to make the HSM a target for remote shares.
l -m|--module=MODULE
This option specifies the HSM to use (by its ModuleID). If you have multiple HSMs and do not
specify an HSM, new-world adds all available HSMs to the existing Security World.
If new-world cannot find the key-management data, it displays the message:
If you intend to initialize the HSM into a new Security World, run new-world with the -i option.
If the HSM is not in the pre-initialization state, new-world displays an error and exits. See Checking
and changing the mode on an nShield Connect on page 399 for more about changing the mode.
If the HSM is in the pre-initialization state, new-world prompts you for cards from the Security
World’s ACS and to enter their pass phrases as required.
2. After new-world has reprogrammed the HSM, restart the HSM in the operational state. See
Checking and changing the mode on an nShield Connect on page 399 for more about changing
the mode.
3. Store the ACS in a safe place.
If any error occurs (for example, if you do not enter the correct pass phrases), the HSM is reset
to the factory state. The HSM does not form part of the Security World unless you run new-
world again.
We recommend that where compliance with the specifications above is required, you create a new World
and create new keys within that World. However, the software also includes a migrate-world command-
line utility that you can use for migrating existing keys into the new World. This is provided as a
convenience for customers who require compliance with the specifications, and who need to continue
using existing keys.
In the case of a Common Criteria World the specification prohibits the importing of assigned keys. Only
general keys can be imported into a common-criteria-cmts World.
Throughout the following sections, the terms Source World refers to the World from which you
want to migrate keys, and Destination World refers to the World to which you want to migrate
keys.
The utility requires the use of two modules. One module is referred to as the source module.
The other module is referred to as the destination module.
l Two HSMs. These can be any of the hardware variants Solo, Solo+, Solo-XC, Connect, Connect+,
Connect-XC and do not need to be of the same type.
l A quorum of ACS cards for the source World
l A quorum of ACS cards for the destination World
l Sufficient blank cards to create new OCS cards for any keys that are OCS protected. Alternatively
it is possible to overwrite the existing OCS cards and reuse them.
l Remote mode switching must be enabled on both HSMs used for the migration. For instructions,
see Enabling and disabling remote mode changes on page 118.
Note that if the destination World is fips-140-2-level-3 then some keys that were usable in the
source World may not be usable in the destination World due to those algorithms or key
lengths being restricted. The migration tool will successfully migrate the keys but they will be
restricted at the point of use.
If the destination world does not support audit logging the migration tool will automatically
remove LogKeyUsage from the ACL of any migrated key during the migration process.
l Plan mode: Returns a list of steps for migration and the required card sets and pass phrases but
does not migrate any keys.
l Perform mode: Runs the plan mode prior to presenting the option to proceed and migrate keys
according to the plan.
-k KEYS Migrate no more than this number of keys per ACS loading.This is
--keys-at-once=KEYS useful to prevent ACS time-outs if you have a large number of
keys to migrate. (0=unlimited, default=0). It is recommended to
limit the number of keys to be migrated at any one time to no more
than 100.
-h, --help Obtain information about the options you can use with the utility.
--src-warrant=src-warrantfile Specify the location of the warrant file of the source module.
--source=SOURCE Specify the path to the folder that contains the source World data.
--dst-warrant=dst-warrantfile Specify the location of the warrant file of the destination module.
--key-logging This option will enable key usage logging on all migrated keys. If
the destination World does not support audit logging the keys will
still be migrated but LogKeyUsage logging will not be set in the
ACL of the migrated keys.
Do not terminate path names in the command parameters with a backslash character. If this is
not possible then either terminate with a double backslash or insert a blank space between
the backslash and the terminating quotation mark.
l Install the latest version of the Security World Software from the installation media. See the
Installation Guide for more information.
l Ensure that the warrant files for the source and destination modules are stored in their default
locations. For Solo, Solo+, or SoloXC modules, the default location is NFAST_KMDATA\warrants\.
For Connect, Connect+, or ConnectXC modules, the default location is NFAST_
KMDATA\<ESN>\warrants\. If you do not want to do this you must specify the location of the
warrant files by using the --src-warrant and --dst-warrant parameters in the migrate-world
command.
l Copy the source World data to a location defined by the --source =SOURCE parameter of the
migration tool.
l If the destination World does not exist already, create a new destination World. For instructions,
see Creating a Security World on page 127
l Run the utility in the plan mode. The utility returns a list of steps for migration along with the details
of the required card sets and pass phrases. Ensure that you have:
l The required ACS cards and, if any keys are OCS protected, sufficient blank cards to create
new OCSs in the destination world or alternatively you can overwrite the existing OCS cards
and reuse them.
You must enable all your features on the destination module before migration. Otherwise, the
migration will fail.
If you have a large number of keys to migrate, the migration may fail due to card timeouts. It is
therefore recommended to use the --cardsets-at-once or --keys-at-once options to split the
keys into a number of batches, each of which can be completed without a card timeout. The
ACS card timeout period is configured by the --nso-timeout parameter when the Security
World was created and is not changeable after creation. The default is 10 minutes. It is not
possible to give exact guidance on how many cardsets or keys can be migrated within the
timeout period because it depends on a number of factors. It is therefore recommended to
start with a low number of keys or cardsets to establish some timings for your particular
system and then increase the numbers slowly.
If the destination World supports audit logging you can choose whether the migrated keys will
have key usage logging enabled or not by use of the --key-logging command line switch. If you
only wish key usage logging to be enabled on a subset of the keys then you must separate the
source keys into two groups and run the migrate-world command separately for each group.
1. Run the migration utility in the perform mode with the required options. For information about the
usage and options you can use, see About the migration utility on page 148.
2. Ensure that the data for the destination World is in the standard location for World data, derived
from one of the following:
3. If the module is not configured to use the destination World, the utility prompts you to program the
module and supply the ACS of the destination World.
4. The utility guides you through specific steps, prompting you to supply the required card sets and
pass phrases.
5. At the end of the migration both the source and destination modules are cleared. If you wish to use
the modules then you must reload them with an appropriate Security World.
The utility will attempt to automatically change the module mode when needed. Should the
automatic change of mode fail for any reason, then the utility will prompt you to change the
module state to either initialization or operational at various points during the procedure. See
Checking and changing the mode on an nShield Connect on page 399 for more about
changing the mode.
l If the keys are module-protected, run the utility with one of the following options:
l -L option, which checks the ACL of a loaded key instead of the generation certificate.
l -R option, which checks the ACL of a key loaded from a recovery blob.
l If the keys are protected by cardsets or softcards, run the nfkmverify utility with the -R option in
combination with the preload utility.
Example:
Do not use the nfkmverify utility with the default -C option. If you use this option, the utility
returns errors because the certificate in the old World and the certificate in the new World are
different.
Note that if the destination World is fips-140-2-level-3 then some keys that were usable in the
source World may not be usable in the destination World due to those algorithms or key
lengths being restricted. The migration tool will successfully migrate the keys but they will be
restricted at the point of use.
8.4.7 Troubleshooting
If you encounter any errors that are not listed in the following table, contact Support.
There are no keys requiring Any migrate-able keys found in the None
migration source World already exist in the
destination World. The migration utility
returns this error if:
Source module must be This utility requires you to specify both a Specify the correct mod-
specified. source and destination module which ules
must be different modules and both
Destination module must be must be usable.
specified.
Destination World has There are problems with one of the Contact Support
indistinguishable cardsets or Worlds.
softcards.
Source World not recoverable. The source World is not recoverable If the source World is not
and the keys therefore cannot be recoverable, you cannot
migrated. use the migration utility to
migrate keys. Contact Sup-
port.Support.
Missing security World at PATH. The path for the source World is wrong. Supply the correct path to
the source World. If you
Source world must be specified. There is no World data at the location have supplied the correct
that was specified when running the path to the directory that
migration utility. contains the source World
data, the migration utility
has not found a destination
World. Ensure that the des-
tination World is the current
World
Source World is the same as the An incorrect path was supplied for the Run the utility with the
destination World. source World data when running the correct path to the source
The destination World data does not Move the source World
exist in the default location defined by data to a different location
the environment variable NFAST_ and then copy the
KMLOCAL or NFAST_KMDATA. destination World data to
the default location.
Cannot find <NAME> utility, The software installation is partially Reinstall the software.
needed by this utility. completed.
<NAME> utility is too old, need at The path (in the environment variable Ensure that the path points
least version <VERSION for the operating system) might be to the latest version of the
NUMBER>. pointing to an old version of the software.
software.
nFast error: TimeLimitExceeded; The ACS time-out limit has expired. Restart the key migration
in response to SetKM... process; see "Security
World migration" on
page 146
Destination world does not sup- You have specified the --key-logging None. The keys will be
port audit logging option but the destination world does migrated but LogKeyUsage
not support audit logging. will not be set in the ACL of
migrated keys.
Failed to load warrant file <FILE> There is a problem reading the warrant Check that your warrant
file. files are in the correct loc-
ation and have not been
edited in any way.
Erasing a module removes any data stored in its nonvolatile memory (for example, data for an SEE
program or NVRAM-stored keys). To preserve this data, you must back it up before erasing the module.
We provide the nvram-backup utility to enable data stored in nonvolatile memory to be backed up and
restored.
You do not need the ACS to erase a module. However, unless you have a valid ACS and the
host data for this Security World, you cannot restore the Security World after you have erased
it.
After you have erased a module, it is in the same state as when it left nCipher (that is, it has a random
module key and a known KNSO).
When you erase a Security World in this way, the Security World files remain on the remote file system.
Delete these files if you wish to remove Security World completely. For more information, see "Security
World files" on page 128.
In this command:
Option Description
-e , --factory These options tell new-world to restore a module to its factory state.
-m, --module=MODULE These options specify the ModuleID to use. new-world erases only one
module at a time. To erase multiple modules, you must run new-world
once for every module that you want to erase.
8.5.2.1 Output
If new-world successfully erased a module, it does not display any messages. Otherwise, new-world
returns an error message.
1. Start KeySafe. (For an introduction to KeySafe and information on starting the software, see "Using
KeySafe" on page 264.)
2. Click the World menu button, or select World from the Manage menu. KeySafe takes you to the World
Operations panel.
3. Click the Erase Module button. KeySafe takes you to the Erase Module panel.
4. Select the module that you want to erase by clicking its listing on the Security world status tree, then
click the Commit command button.
5. KeySafe erases all secrets from the module, returning it to its factory state.
If you have any keys that were protected by an erased module, you cannot access them
unless you restore these secrets. You cannot restore these secrets unless you have the
appropriate ACS.
In this command, --module=MODULE specifies the ID of the module you want to erase. If you do not
specify this option, all modules in the pre-initialization state are erased. --strong-kml specifies that the
module generates an AES (SP800-131A) module signing key, rather than the default key.
8.5.4.1 Output
If initunit is successful, for each module that is in the pre-initialization state, it returns a message similar to
this:
Initialising Unit
># Setting dummy HKNSO Module Key Info:
HKNSO
>################### HKM
>###################
This operation does not remove any files from the remote file system or client machines. You should
remove the files manually from the %NFAST_KMDATA%\local directory on the remote file system and
any client computers to which the Security World was copied.
Any Operator Cards created in a previous Security World cannot be used in the new Security
World. If you are replacing a Security World, you must erase all the Operator Cards created in
the previous Security World before you create the new Security World. See "Erasing cards and
softcards" on page 170.
l You are not able to access any keys that you previously used in a deleted Security World
l It is recommended that you reformat any standard nShield cards that were used as Operator
Cards within this Security World before you delete it. For more information about reformatting (or
erasing) Operator Cards, see "Erasing cards and softcards" on page 170.
Except for nShield Remote Administration Cards, if you do not reformat the smart cards used
as Operator Cards before you delete your Security World, you must throw them away
because they cannot be used, erased, or reformatted without the old Security World key.
You can, and should, reuse the smart cards from a deleted Security World’s ACS. If you do not
reuse or destroy these cards, then an attacker with these smart cards, a copy of your data (for
example, a weekly backup) and access to any nCipher key management HSM can access
your old keys.
There may be copies of the Security World data archive saved on your backup media. If you
have not reused or destroyed the old ACS, an attacker in possession of these cards could
access your old keys using this backup media.
If audit logging was enabled for the Security World then audit logs can still be verified provided
that the audit log data is maintained as this contains all the information needed to verify the
logs. For further information see "Audit Logging" on page 357.
8.7.1 Deleting the Security World using the nShield Connect front panel
When you erase a Security World using the unit front panel, all long-term key material is deleted from the
HSM's memory and all Security World data is removed from the HSM's internal file system.
l You will not be able to access any of the keys that you have previously used
l Before you remove an old Security World, you must reformat any smart cards that were used
previously as Operator Cards within this Security World.
If you do not reformat the smart cards used as Operator Cards before you reinitialize your
HSM, you must throw them away because they cannot be used, erased, or reformatted
without the old Security World key.
You can, and should, reuse the smart cards from the old ACS. If you do not reuse or destroy these cards,
then an attacker with these smart cards, a copy of your data (for example, a weekly backup) and access
to any nCipher key management HSM, can access your old keys.
To erase a Security World using the front panel of the unit, from the main menu select Security World mgmt >
Module initialization > Erase Security World.
This operation does not remove any files from the RFS or client machines. You should remove the files
manually from the %NFAST_KMDATA%\local directory on the RFS and any client computers to which the
Security World was copied.
When you create a Security World, an Administrator Card Set (ACS) is created at the same time. You use
the ACS to:
The Security World is used to create and manage keys, and the Operator Card Sets (OCSs) and
softcards you create with the Security World are used to protect those keys.
Direct protection Keys that are directly protected by the Security World are usable at any
time without further authorization.
Softcard Keys that are protected by a softcard can only be used by the operator
who possesses the relevant pass phrases.
OCS Keys that are protected by an OCS can only be used by the operator who
possesses the OCS and any relevant pass phrases (if set).
For more information about creating a Security World, see "Creating and managing a Security World" on
page 127.
For more information about key management, see "Working with keys" on page 252.
After a Security World has been created, you can use it to create and manage OCSs and softcards (as
described in this chapter), as well as to create and manage the keys it protects (see "Working with keys"
on page 252).
To perform the tasks described in this chapter, we recommend using the unit front panel or a
client on the same computer that contains the RFS. To perform these tasks on a different
client, you must transfer the card data to the RFS.
If you are sharing the Security World across several client computers, you must ensure that
the changes are propagated to all your computers. One way to achieve this is to use client
cooperation. For more information, see "Setting up client cooperation" on page 88.
If you want to use the Remote Operator feature to configure smart cards for use with a remote unit, see
"Remote Operator " on page 246.
l Names for individual cards, as well as a name for the whole card set
l Specific K/N policies
l Optional pass phrases for any card within a given set
l Formal FIPS 140-2 level 3 compliance.
Some third-party applications impose restrictions on the OCS smart card quorums (K/N) or the
use of smart card pass phrases. For more information, see the appropriate integration guide
for the application. Integration guides for third-party applications are available from the
nCipher web site: https://help.ncipher.com.
OCSs belong to the Security World in which they are created. When you create an OCS, the smart cards
in that set can only be read by hardware security modules belonging to the same Security World.
Creating (and managing) OCSs can be done with the unit front panel, as described in "Creating an
Operator Card Set using the nShield Connect front panel" on the next page. However, you can also use
the following tools to create an OCS:
l The createocs command-line utility, as described in "Creating an Operator Card Set using the
command line" on page 161
l KeySafe, as described in "Creating an Operator Card Set with KeySafe" on page 163
l The nShield CSP wizard, as described in "Creating an Operator Card Set with the CSP or CNG
wizard" on page 165
l The nShield CNG wizard, as described in "Microsoft Cryptography API: Next Generation (CNG)" on
page 229.
Keys protected by a persistent card set can be used for as long as the application that loaded the OCS
remains connected to the hardware security module (unless that application removes the keys).
For more information about persistent OCSs, see "Using persistent Operator Card Sets" on page 42.
An OCS to be used to authorize login on a unit must be persistent and not loadable remotely. It is
recommended that such an OCS is not used to protect sensitive keys.
9.1.2 Time-outs
OCSs can be created with a time-out, so that they can only be used for limited time after the OCS is
loaded. An OCS is loaded by most applications at start up or when the user supplies the final required
pass phrase. After an OCS has timed out, it is not loadable by another application unless it is removed
and reinserted. Time-outs operate independently of OCS persistence.
9.1.4 Creating an Operator Card Set using the nShield Connect front panel
To create an OCS, follow these steps:
1. From the main menu, select Security World mgmt > Cardset operations > Create OCS.
You are prompted to enter the name of the OCS.
2. Enter a name and press right-hand navigation button.
3. Enter the quorum for the OCS, using the touch wheel to move from one field to the other. The
quorum consists of:
l The maximum number of cards from the OCS required by default for an operation. This
number must be less than or equal to the total number of cards in the set.
l The total number of cards to be used in the OCS. This must be a value in the range 1 – 64.
4. Press the right-hand navigation button to move to the next screen.
5. If you wish to specify a time out for the card set, enter the time out in seconds.
6. Choose whether to create a persistent card set. You can select:
l Not persistent (which is the default)
l Persistent
l Remoteable/Persistent
7. Choose whether to name individual cards and enable pass phrase replacement by answering Yes
or No to each question and then pressing the right-hand navigation button.
8. Insert a smart card to be formatted for the OCS.
If the card is not blank, choose whether to overwrite it or to use a different card. (If the card is an
Operator Card from another Security World, you cannot overwrite it and are prompted to enter a
different card.)
9. If you have chosen to name individual cards, you are prompted to enter the name for the card.
10. You are asked whether you wish to specify a pass phrase for the card. If you choose Yes, you are
prompted to enter the pass phrase twice.
While the Operator Card is being created, the screen displays the message Processing.
If there are further cards from this OCS to be processed, the screen changes to Waiting. Remove
the card, and repeat steps 8 through 10 for each of the remaining cards.
When all the cards in the set have been processed, you are told that the card set has been created
successfully.
Option Description
-mMODULE, -- This option specifies the number of the hardware security module to be
module=MODULE used to create the token. If you only have one hardware security
module, MODULE is 1.
-Q |--ocs-quorum=K/N In this option, K is the minimum required number of cards. If you do not
specify the value K, the default is 1.
N is the total number of cards. If you do not specify the value N, the
default is 1.
-N|--name=NAME This option specifies a name for the card set. The card set must be
named with this option before individual cards can be named using the -
M/--name-cards=NAME options.
-M|--name-cards Specifying this option allows you to name individual cards within the
card set. You can only use this option after the card set has been named
by using the --name=NAME option. createocs prompts for the names of
the cards as they are created. Not all applications can display individual
card names.
Option Description
-R|--no-pp-recovery This option specifies that pass phrase replacement for this OCS is
disabled. Setting this option overrides the default setting, which is that
the card pass phrases are replaceable. You can specify the enablement
of pass phrase replacement explicitly by setting the --pp-recovery
option.
-q |--remotely-readable This option allows this card set to be read remotely. For information on
configuring Remote OCSs, see "Remote Operator " on page 246.
-T|--timeout=TIME This option sets the time-out for the card set. Use the suffix s to specify
seconds, m for minutes, h for hours, and d for days. If the time-out is set
to 0, the OCS never times out. Otherwise, the hardware security module
automatically unloads the OCS when the amount of time specified by
TIME has passed since the OCS was loaded.
-e |--erase Specifying this option erases a card (instead of creating a card set). You
can specify this option twice in the form -ee to repeatedly erase cards.
With Security World Software v11.72 and later, pass phrases are limited to a maximum length
of 254 characters, when using createocs. See "Maximum pass phrase length" on page 43 for
more information.
If you have created a FIPS 140-2 level 3 compliant Security World, you must provide authorization
to create new Operator Cards; createocs prompts you to insert a card that contains this
authorization. Insert any card from the Administrator Card Set or any Operator Card from the
current Security World.
When createocs has obtained the authorization from a valid card, or if no authorization is required,
it prompts you to insert a card.
2. Insert the smart card to use.
If you insert an Administrator Card from another Security World or an Operator Card that you have
just created, createocs displays the following message:
where x is the hardware security module number and N is the slot number. If you insert an
Operator Card from another Security World, createocs displays the following message:
When you insert a valid card, createocs prompts you to type a pass phrase.
The nCipher PKCS #11 library requires Operator Cards with pass phrases.
Some applications do not have mechanisms for entering pass phrases. Do not give
pass phrases to Operator Cards that are to be used with these applications.
3. Type a pass phrase and press Enter. Alternatively, press Enter if you do not want this card to
have a pass phrase.
A pass phrase can be of any length and can contain any character that you can type.
If you entered a pass phrase, createocs prompts you to confirm it.
4. Type the pass phrase again and press Enter.
If the pass phrases do not match, createocs prompts you to input and confirm the pass phrase
again.
5. When the new card has been created, if you are creating a card set with more than one card in it,
createocs prompts you to insert another card.
6. For each additional card in the OCS, follow the instructions from step 2 through 4.
1. Start KeySafe. (For an introduction to KeySafe and information on starting the software, see "Using
KeySafe" on page 264.)
2. Click the Card sets menu button, or select Card sets from the menu. The List Operator Card Sets panel is
displayed.
3. Select an HSM within the Security World from the Security World status pane.
4. Click the Create new card set button to open the Create Operator Card Set panel. You can specify the
following options:
a. A name for the card set.
b. Whether pass phrase recovery will be enabled for the OCS. (Only available if the Security
World has pass phrase recovery enabled.)
c. Whether the card set can be used remotely. (Only available if the Security World has remote
sharing available.) For more information, see "Remote Operator " on page 246.
d. Whether this OCS will be persistent.
e. Whether this OCS will have a time-out (a period after which the card set must be inserted
again).
f. The value for the time-out, in seconds.
g. The total number of Operator Cards (N) that you want this OCS to have. This must be a value
in the range 1 – 64.
h. The number of Operator Cards needed to re-create a key (K). K must be less than or equal to
N.
5. When you have entered all the details, click Commit. KeySafe takes you to a new Create Operator
Card Set panel.
The total number of cards is equal to the required number of cards. – If the total and required
number of cards are equal, losing one card will render any nonrecoverable keys unusable. Is this
what you want?
Click Yes to confirm the values for K and N, or No to change them.
If you are creating the card set in a FIPS 140-2 level 3 Security World, insert an
Administrator Card or an existing Operator Card when prompted.
If you insert a card from another OCS, KeySafe asks whether you want to erase it. If you
insert an Administrator Card from the current Security World, KeySafe prevents you
from accidentally erasing it.
If you insert an OCS card from another Security World you will get the message:
Error. Unreadable card - may be incorrectly inserted or be from another Security
World's operator card set. Please check.
To overcome this you must replace the card you have inserted with another card that is
readable (or blank).
When creating a card set, KeySafe recognizes cards that already belong to the set
before the card set is complete. If you accidentally insert a card to be written again after
it has already been written, you receive a warning.
7. Select whether or not you want to set a pass phrase for the currently inserted card. Each card in a
set can have an individual pass phrase, and you can also create a set in which some cards have
pass phrases and others do not.
8. If setting a pass phrase for the currently inserted card, enter the same pass phrase in both text
fields. A pass phrase can contain any characters you can type except for tabs or carriage returns
(because these keys are used to move between data fields).
You can change a pass phrase at any time. If you do not set a pass phrase now, you can
use the KeySafe Change Pass Phrase option (on the Examine/Change Card panel) to add
one later. Likewise, if you later decide that you do not need a pass phrase on a card, you
can use this option to remove it.
9. After entering your desired pass phrase (if any) in both text fields, click the OK button. Unless you
have entered details for the last card in the set, KeySafe returns you to the Create Operator Card Set
panel and prompts you to enter the next card in the set to be written.
10. After KeySafe has written the details of the last smart card in the set, it displays a dialog indicating
that the OCS has been successfully created. Click the OK button, and KeySafe returns you to the
Create Operator Card Set panel, where you can create another OCS or choose a different
operation by clicking one of the menu buttons.
9.1.7 Creating an Operator Card Set with the CSP or CNG wizard
You can use the nShield CSP or CNG wizard to create a K/N OCS that is suitable for use with the nShield
Cryptographic Service Provider (CSP) or Cryptography API: Next Generation (CNG), as appropriate. You
can only create an OCS using the CSP or CNG wizard if you already have a Security World and have an
ACS available for that Security World.
To create an OCS using the CSP or CNG wizard, follow these steps:
1. Ensure that you have created the Security World and that at least one HSM is in the operational
state.
2. Run the wizard by double-clicking its shortcut in the Start menu under All Programs > nCipher.
3. The wizard displays the welcome screen.
4. Click the Next button. The wizard allows you to configure HSM Pool mode for CAPI/CNG.
Do not enable HSM Pool mode when creating an Operator Card Set because HSM Pool
mode only supports module-protected keys.
n Copy the local sub-directory from the Key Management Data directory of another
computer in the same Security World or from a backup tape of this computer to the
Key Management Data directory of this computer.
n run the wizard again.
l If there is an existing Security World, the wizard gives you the option of using the existing
Security World, creating a new Security World or installing cryptographic acceleration only.
n In order to use the existing Security World, ensure that the Use the existing security world
option is selected, and click the Next button.
n If there are any HSMs in the pre-initialization state, the wizard adds them to the
Security World; see "Adding or restoring an HSM to the Security World" on page 144.
6. When at least one hardware security module is in the operational state, the wizard prompts you to
select a method to protect private keys generated by the CSPs.
7. Ensure that the Operator Card Set option is enabled. If you are running the CNG wizard (not the
CSP wizard) click the Next button. Then select the Create a new Operator Card Set option.
If you want the OCS to be persistent, select the Persistent option. Persistence is described in
"Persistent Operator Card Sets" on page 159.
8. Click the Next button, and if you have a FIPS world, the wizard prompts you to insert a card created
with the current Security World.
This shows that your Security World is compliant with the roles and services of the FIPS
140-2 level 3 standard. It is included for those customers who have a regulatory
requirement for compliance.
Under the constraints of level 3 of the FIPS 140-2 standard, Operator Cards cannot be created
without authorization. To obtain authorization, insert any card from the ACS or any Operator Card
belonging to the current Security World.
The wizard does not enable the Next world, the wizard warns you and prompts you for another
card.
9. Click the Next button.
The wizard prompts you for a smart card to use as the first card in the OCS.
10. Insert a blank smart card to be used as the Operator Card, and click the Next button.
11. When you have inserted an appropriate card, the wizard prompts you for the name of the card and,
if required, a pass phrase.
If you want to protect this card with a pass phrase, turn on the Card will require a pass phrase option,
and enter the pass phrase. You must enter the pass phrase in both fields to ensure that you have
typed it correctly.
Operator Cards with pass phrases are required by the nCipher PKCS #11 library.
12. If you have not yet written all the smart cards in the OCS, the wizard prompts you for another card.
Repeat the appropriate preceding steps of the OCS creation process for all smart cards in the set.
13. When the wizard has finished creating the OCS, it displays a screen telling you this. If you want to
create another OCS, click the Back button on this screen.
When you have created all the OCSs that you require, click the Next button to install the CAPI CSP
or register the CNG CSP. For more information, see "Installing the CAPI CSP" on page 226 or
"Registering the CNG CSP" on page 230.
A softcard is a file containing a logical token that cannot be loaded without a pass phrase; its logical token
must be loaded in order to authorize the loading of any key that is protected by the softcard. Softcard files
are stored in the Key Management Data directory and have names of the form softcard_ hash (where hash
is the hash of the logical token share). Softcards belong to the Security World in which they are created.
A softcard’s pass phrase is set when you generate it, and you can use a single softcard to protect multiple
keys. Softcards are persistent; after a softcard is loaded, it remains valid for loading the keys it protects
until its KeyID is destroyed.
It is possible to generate multiple softcards with the same name or pass phrase. For this
reason, the hash of each softcard is made unique (unrelated to the hash of its pass phrase).
Softcards are not supported for use with the nCipherKM JCA/JCE CSP in Security Worlds that
are compliant with FIPS 140-2 level 3.
To use softcards with PKCS #11, you must have CKNFAST_LOADSHARING set to a nonzero
value. When using pre-loaded softcards or other objects, the PKCS #11 library automatically
sets CKNFAST_LOADSHARING =1 (load-sharing mode on) unless it has been explicitly set to 0
(load-sharing mode off).
As with OCSs, if debugging is enabled, a softcard’s pass phrase hash is available in the debug
output (as a parameter to a ReadShare command).
1. Decide whether you want the new softcard’s pass phrase to be replaceable or non-replaceable. To
create a softcard with a replaceable pass phrase, run the command:
In these commands, NAME specifies the name of the new softcard to be created.
2. When prompted, type a pass phrase for the new softcard, and press Enter.
A pass phrase can be of any length and contain any characters that you can type except for tabs or
carriage returns (because these keys are used to move between data fields).
3. When prompted, type the pass phrase again to confirm it, and press Enter.
If the pass phrases do not match, ppmk prompts you to input and confirm the pass phrase again.
After you have confirmed the pass phrase, ppmk completes creation of the new softcard.
1. Start KeySafe. (For an introduction to KeySafe and information on starting the software, see "Using
KeySafe" on page 264.)
2. Click the Softcards menu button, or select Softcards from the Manage menu. KeySafe takes you to the
List Softcards panel.
In a Security World with pass phrase recovery enabled the Yes radio button is
selected as default and the selection can be changed between Yes and No. In a
Security World with pass phrase recovery disabled the No button is selected, and
cannot be changed to Yes.
5. Click Commit.
If you are creating the softcard in a FIPS 140-2 level 3 Security World, insert an
Administrator Card or an existing Operator Card when prompted.
A pass phrase can contain any characters you can type except for tabs or carriage returns
(because these keys are used to move between data fields) and can be up to 1024 characters
long. You can change a pass phrase at any time. You must provide a pass phrase for each card.
7. After entering your desired pass phrase in both text fields, click the OK button.
KeySafe displays a dialog indicating that the softcard has been successfully created.
8. Click the OK button.
KeySafe returns you to the Create Softcard panel, where you can create another softcard or choose
a different operation by clicking one of the menu buttons.
1. Ensure that you have created the Security World and that at least one HSM is in the operational
state.
2. Run the wizard by double-clicking its shortcut in the Start menu under All Programs > nCipher.
3. The wizard displays the welcome screen.
4. Click the Next button. The wizard allows you to configure HSM Pool mode for CAPI/CNG.
Do not enable HSM Pool mode when creating anSoftcard because HSM Pool mode
only supports module-protected keys.
n If there are any hardware security modules in the pre-initialization state, the wizard
adds them to the Security World; see "Adding or restoring an HSM to the Security
World" on page 144.
6. When at least one hardware security module is in the operational state, the wizard prompts you to
select a method to protect private keys generated by the CSPs.
7. Ensure that the Softcard option is enabled. Click the Next button. Then select the Create a new
Softcard option, and enter the name and pass phrase of the Softcard in the boxes provided.
8. Click the Next button, and if you have a FIPS world, the wizard prompts you to insert a card created
with the current Security World.
This shows that your Security World is compliant with the roles and services of the FIPS
140-2 level 3 standard. It is included for those customers who have a regulatory
requirement for compliance.
Under the constraints of level 3 of the FIPS 140-2 standard, Softcards cannot be created without
authorization. To obtain authorization, insert any card from the ACS or any OCS belonging to the
current Security World.
9. On the Software Installation screen when you are informed You now have a valid security world
and key protection mechanism, click the Back button if you want to create another Softcard, or if
you want to change the default protection for new CNG keys to a different protection option. When
you have created all the Softcards that you require, click the Next button on this screen to register
the CNG providers. For more information, see "Registering the CNG CSP" on page 230.
In the case of an OCS that uses nShield Remote Administration Cards, it is possible to
reformat the cards at any time using slotinfo --ignoreauth . In the case of an OCS that uses
standard nShield cards, it is only possible to erase or format the cards within the Security
World in which they were created.
You can erase Operator Cards using the unit front panel, KeySafe or the createocs utility. You can also
use these methods to erase Administrator Cards other than those in the current Security World’s ACS
(for example, you could use these methods to erase the remaining Administrator Cards from an
incomplete set that has been replaced or Administrator Cards from another Security World).
None of these tools erases cards from the current Security World’s ACS.
If you erase an Operator Card that is the only card in an OCS, information about the card set is deleted.
However, if you erase one card from an OCS of multiple cards, you must remove the card information
from the %NFAST_KMDATA\local% directory after you have erased the last card.
You can erase an entire card set at one time with the KeySafe Remove OCS! feature. For more
information, see "List an Operator Card Set" on page 174.
9.3.2 Erasing card sets using the nShield Connect front panel
To erase a card set using the front panel, follow this procedure:
1. From the main menu select: Security World mgmt > Card operations > Erase card
2. Insert the card set that you want to erase. The card is read.
3. You are asked to confirm that you want to erase this card from the card set.
4. To confirm, press the right-hand navigation button.
5. You are asked once again if you want to erase this card.
6. To confirm, press the right-hand navigation button.
1. Start KeySafe. (For an introduction to KeySafe and information on starting the software, see "Using
KeySafe" on page 264.)
2. Click the Card Sets menu button. KeySafe takes you to the Card Operations panel.
3. Click the Examine/Change Card navigation button. KeySafe takes you to the Examine/Change Card
panel.
4. Insert the card that you want to erase into the reader.
5. Click the Erase Card button. You do not need to supply the pass phrase (if there is one) to erase an
Operator Card.
6. KeySafe asks you to confirm that you want to erase this card. If you are sure that you want to erase
it, click the Yes button.
Erasing a card does not erase the keys protected by that card. The keys are still listed
on the keys panel but are unusable.
If you erase an Operator Card that is the only card in an OCS, KeySafe deletes information about
that card set. However, if you erase one card from an OCS of multiple cards, you must remove the
card information from the %NFAST_KMDATA\local% after you have erased the last card.
7. After erasing a card, KeySafe displays a dialog to confirm that the card has been erased. Click OK
You can erase an entire card set at one time with the KeySafe Discard Card Set(s) feature.
Option Description
-m|--module =MODULE These options specify the module number of the module. If you only have
one module, MODULE is 1.
-e |--erase These options specify that you want to erase a card (rather than create an
OCS).
If you have more than one card reader and there is more than one card available, createocs
prompts you to confirm which card you wish to erase. Use [Ctrl][X] to switch between
cards.
If you have created a FIPS 140-2 level 3 compliant Security World, you must provide authorization in
order to erase or create Operator Cards. You can obtain this authorization from any card in the ACS or
from any Operator Card in the current Security World, including cards that are to be erased. After you
insert a card containing this authorization, createocs prompts you to insert the card to be erased.
1. Start KeySafe.
2. Click the Softcards menu button. KeySafe takes you to the Softcard Operations panel.
3. Select the softcard you want to erase from the list.
4. Click the Discard Softcard button.
5. KeySafe asks you to confirm that you want to erase this card. Click Yes to confirm.
6. After erasing a softcard, KeySafe displays a dialog box to confirm that the card has been erased.
Click OK to continue using KeySafe.
In this command, you can identify the softcard to be erased either by its name (NAME) or by its logical
token hash as listed by nfkminfo (IDENT).
If you are working within a FIPS 140-2 level 3 compliant Security World, you must provide authorization to
erase softcards; ppmk prompts you to insert a card that contains this authorization. Insert any card from
the ACS or any Operator Card from the current Security World.
If you insert an Administrator Card from another Security World or an Operator Card that you have just
created, ppmk displays an error message and prompts you to insert a card with valid authorization. When
ppmk has obtained the authorization from a valid card or if no authorization is required, it completes the
process of erasing the softcard.
To view details of all the Operator Cards in a Security World or details of an individual Operator Card, you
can use the front panel, KeySafe or the nfkminfo command-line utility. To check which pass phrase is
associated with a card, you can use the front panel or the cardpp command-line utility.
To list all softcards in a Security World or to show details of an individual softcard, you can use the ppmk
or nfkminfo command-line utilities. To check which pass phrase is associated with a softcard, you can use
the ppmk command-line utility.
9.4.1 Viewing card sets using the nShield Connect front panel
You can use the unit front panel to view details of all the Operator Cards in a Security World or to view
details of an individual Operator Card.
To view a list of all the card sets in the Security World, from the front panel select Security World mgmt >
Cardset operations > List cardsets.
1. Start KeySafe. (For an introduction to KeySafe and information on starting the software, see "Using
KeySafe" on page 264.)
2. Click the Card Sets menu button, or select the Card sets menu item from the Manage menu. KeySafe
takes you to the List Operator Card Sets panel.
3. Click Examine/Change Cardto open the Examine/Change Card panel.
4. Insert a card into the appropriate smart card slot. KeySafe displays information about the smart
card currently in the slot. If there is no smart card in the slot, KeySafe displays a message Card slot
empty - please insert the card that you want to examine.
1. Start KeySafe. (For an introduction to KeySafe and information on starting the software, see "Using
KeySafe" on page 264.)
2. Click the Card Sets menu button, or select the Card sets menu item from the Manage menu. KeySafe
takes you to the List Operator Card Sets panel, which displays information about all OCSs in the
current Security World.
From the List Operator Card Sets panel, you can also:
To list the OCSs in the current Security World from the command line, open a command window, and give
the command:
nfkminfo --cardset-list
In this command, --cardset-list specifies that you want to list the operator card sets in the current Security
World.
nfkminfo TOKENHASH
In this command, TOKENHASH is the Operator logical token hash of the card (as listed when the command
nfkminfo --cardset-list is run).
name "name"
k-out-of-n 1/1
flags NotPersistent
timeout none
card names ""
hkltu 794ada39038fa8c4e9ea46a24136bbb2b8b337f2
1. Start KeySafe.
2. Click the Softcards menu button. KeySafe takes you to the Softcard Operations panel.
3. Click the List Softcards navigation button. KeySafe takes you to the List Softcards panel, which
displays information about all softcards in the current Security World.
From the List Softcards panel, you can also choose to remove a softcard from the Security World. For
more information about this procedure, see "Erasing cards and softcards" on page 170.
nfkminfo --softcard-list
In this command --softcard-list specifies that you want to list the softcards in the current Security World.
To show information for a specific softcard using the nfkminfo command-line utility, give the command:
In this command IDENT is the softcard’s logical token hash (as given by running the command nfkminfo --
softcard-list). This command displays output information similar to the following:
SoftCard
name "mysoftcard"
hkltu 7fb95888ea2850d4e3ffcc8f0c22100937344308
Keys protected by softcard 7fb95888ea2850d4e3ffcc8f0c22100937344308:
AppName simple Ident mykey
AppName simple Ident myotherkey
ppmk --list
In this command --list specifies that you want to list the softcards in the current Security World.
In order to view the details of a particular softcard using the ppmk command-line utility, give the
command:
In this command, you can identify the softcard whose details you want to view either by its name (NAME)
or by its logical token hash (as given by running the command nfkminfo --softcard-list).
9.4.5.1 Verifying the pass phrase of a card using the nShield Connect front panel
To verify the pass phrase associated with a card using the unit front panel:
Option Description
--module=MODULE This option specifies the number of the module to use. If you only have
one module, MODULE is 1. If you do not specify a module number, cardpp
uses all modules by default.
The cardpp utility polls all available slots; if there is no card inserted, it prompts you to insert one. If the
card belongs to this Security World, cardpp either tells you if no pass phrase is set or prompts you to enter
the pass phrase and checks to see if it is correct.
In this command, you can identify the softcard whose pass phrase you want to verify either by its name
(NAME) or by its logical token hash (as given by running the command nfkminfo --softcard-list).
ppmk prompts you to enter the pass phrase and then tells you whether the pass phrase you entered is
correct for the specified softcard.
Normally, in order to change the pass phrase of a card or softcard, you need the card or softcard and the
existing pass phrase. Known card pass phrase can be changed using the front panel, KeySafe or the
cardpp command-line utility; softcard pass phrase can be changed using KeySafe or the ppmk command-
line utility. You can also add a pass phrase to a card or softcard that currently does not have one or
remove a pass phrase from a card that does currently have one.
If you generated your Security World with the pass phrase replacement option, you can also replace the
pass phrase of a card or softcard even if you do not know the existing pass phrase. Such a pass phrase
replacement operation requires authorization from the ACS.
Each card in a set can have its own individual pass phrase. You can even have a set in which some cards
have a pass phrase and others do not.
Prior to Security World Software v11.72, we set no absolute limit on the length of a pass phrase.
However, some applications may not accept a pass phrase longer than 255 characters.
Likewise, the Security World does not impose restrictions on which characters you can use,
although some applications may not accept certain characters. nCipher recommends that
your password only contains 7-bit ASCII characters:
A-Z, a-z, 0-9, ! @ # $ % ^ & * - _ + = [ ] { } | \ : ' , . ? / ` ~ " < > ( ) ;
See Maximum pass phrase length on page 43 for more about pass phrase length when using
Security World Software v11.72.
9.5.1.1 Changing known pass phrase from the unit front panel
To change the pass phrase of a card using the unit front panel:
1. Start KeySafe. (For an introduction to KeySafe and information on starting the software, see "Using
KeySafe" on page 264.)
2. Click Card sets, or select Card sets from the Manage menu. The List Operator Card Sets panel is
displayed.
3. Click Examine / change card to open the Examine / Change Card panel.
4. Click Change pass phrase. The Set Card Protection pass phrase panel is displayed.
5. Enter the old pass phrase, and click the OK button.
6. A screen is displayed asking Do you want to set a pass phrase?. Select Yes.
7. Enter your new pass phrase, and enter it again in the second box as confirmation of the change.
8. Click OK.
1. Start KeySafe. (For an introduction to KeySafe and information on starting the software, see "Using
KeySafe" on page 264.)
2. Click the Softcards menu button, or select Softcards from the Manage menu. KeySafe takes you to the
List Softcards panel.
3. Select the softcard for which you want to change the pass phrase, and click the Change Pass phrase
button. KeySafe takes you to the Change/Recover Softcard Pass phrase panel.
If a softcard is listed as PIN Recovery Enabled = No, then you will be unable to change
the pass phrase.
4. Select the softcard whose pass phrase you want to change, and click the Change Pass phrase
button. KeySafe takes you to the Get Softcard Protection pass phrase panel.
5. Enter the old pass phrase, and click the OK button.
KeySafe either displays an error dialog (if the pass phrase is not correct) or takes you to the Set
Softcard Protection pass phrase panel.
6. Enter your new pass phrase, and enter it again in the second field to confirm the pass phrase is
correct.
7. Click the OK button.
After changing a pass phrase, KeySafe displays a dialog to confirm that the pass phrase has been
successfully changes.
8. Click the OK button to continue using KeySafe.
With Security World Software v11.72 and later, pass phrases are limited to a maximum length
of 254 characters, when using cardpp . See "Maximum pass phrase length" on page 43 for
more information.
To change a known card’s pass phrase with the cardpp command-line utility, take the following steps:
If you only have one HSM, MODULE is 1. If you do not specify an HSM number, cardpp uses all
HSMs by default.
2. If prompted, insert the card whose pass phrase you want to change. (If there is a card already in
the slot, you are not prompted.)
3. If prompted, enter the existing pass phrase for the card (If the card has no current pass phrase you
are not prompted.) If you enter the pass phrase correctly, cardpp prompts you to enter the new
pass phrase.
4. Enter a new pass phrase, and then enter it again to confirm it.
After you have confirmed the new pass phrase, cardpp changes the card’s pass phrase.
With Security World Software v11.72 and later, pass phrases are limited to a maximum length
of 254 characters, when using ppmk. See "Maximum pass phrase length" on page 43 for more
information.
To change a known softcard’s pass phrase when you know the pass phrase, follow these steps:
In this command, you can identify the softcard whose pass phrase you want to change either by its
name (NAME) or by its logical token hash as listed by nfkminfo (IDENT).
ppmk prompts you to enter the old pass phrase.
2. Type the old pass phrase, and press Enter. If you enter the old pass phrase correctly, ppmk
prompts you to enter the new pass phrase.
3. Type the old pass phrase, and press Enter. Type the new pass phrase again, and press Enter to
confirm it.
After you have confirmed the new pass phrase, ppmk then changes the softcard’s pass phrase.
To change an unknown card pass phrase with the cardpp command-line utility:
In this command, MODULE specifies the number of the hardware security module to use. If you only
have one hardware security module, MODULE is 1. If you do not specify a number, cardpp uses all
hardware security modules by default.
l As prompted, insert the appropriate number of cards from the ACS required to authorize pass
phrase replacement.
l When prompted, insert the Operator Card whose pass phrase you want to replace. To replace its
pass phrase:
a. When prompted, type the new pass phrase, and then press Enter.
b. When prompted, type the new pass phrase again to confirm it, and then press Enter.
cardpp sets the new pass phrase, and then prompts you for another Operator Card.
l Repeat the process in the previous step to change the pass phrase on further cards, or press Q to
quit.
Only insert Administrator Cards into a hardware security module that is connected to a trusted
server.
To change an unknown softcard pass phrase with the ppmk command-line utility:
In this command, you can identify the softcard by its NAME or by its IDENT (its logical token hash as
shown in output from the nfkminfo command-line utility).
2. As prompted, insert the appropriate number of cards from the ACS required to authorize pass
phrase replacement.
3. When prompted, type the new pass phrase, and then press Enter.
4. When prompted, type the new pass phrase again to confirm it, and then press Enter.
If the pass phrase does not match, ppmk prompts you to input and confirm the pass phrase again.
After you successfully confirm the new pass phrase, ppmk finishes configuring the softcard to use the
new pass phrase.
Only insert Administrator Cards into a hardware security module that is connected to a trusted
server.
Replacing an OCS requires authorization from the ACS of the Security World to which it
belongs. You cannot replace an OCS unless you have the required number of cards from the
appropriate ACS.
If you have lost a card from a card set, or you want to migrate from standard nShield cards to nShield
Remote Administration Cards, you should use one of the following:
You cannot mix standard nShield cards with nShield Remote Administration Cards. in the
same set.
We recommend that after you have replaced an OCS, you then erase the remaining cards in the old card
set and remove the old card set from the Security World. For more information, see "Erasing cards and
softcards" on page 170.
Deleting the information about an OCS from the client does not remove the data for keys protected by
that card set. On the KeySafe List Keys panel (reachable from the Key Operations panel), such keys are
listed as being protected by Deleted Card Set.
To prevent you from losing access to your keys if the smart card you are using as the Operator Card is
lost or damaged, nCipher supplies several utilities that can recover the keys protected by the lost
Operator Card to another OCS.
Replacing one OCS with another OCS also transfers the keys protected by the first OCS to the protection
of the new OCS.
When you replace an OCS or softcard and recover its keys to a different OCS or softcard, the key
material is not changed by the process. The process deletes the original Security World data (that is, the
encrypted version of the key or keys and the smart card or softcard data file) and replaces this data with
host data protected by the new OCS or softcard.
l Have enabled OCS and softcard replacement when you created the Security World
If you did not enable OCS and softcard replacement, you cannot recover keys from lost
or damaged smart cards or softcards.
l Have created the original OCS using the front panel of the unit, createocs, createocs-simple ,
KeySafe, or the nCipher PKCS #11 library version 1.6 or later
If you initialized the token using ckinittoken from the nCipher PKCS #11 library version
1.5 or earlier, you must contact Support to arrange for them to convert the token to the
new format while you still possess a valid card.
l Have a sufficient number of cards from the ACS to authorize recovery and replacement
All recovery and replacement operations require authorization from the ACS. If any of
the smart cards in the ACS are lost or damaged, immediately replace the entire ACS.
l Have initialized a second OCS using the front panel of the unit, createocs, createocs-simple ,
KeySafe, or the nCipher PKCS #11 library version 1.6 or later.
The new OCS need not have the same K/N policy as the old set.
If you are sharing the Security World across several client computers, you must ensure that the changes
to the host data are propagated to all your computers. One way to achieve this is to use client
cooperation. For more information, see "Setting up client cooperation" on page 88.
1. From the main menu, select Security World mgmt > Admin operations > Recover keys.
2. Select all to recover all keys in the Security World, or select the application for which you want to
recover the keys.
3. If you selected an application, select the keys that you want to recover.
4. Insert the required number of Administrator Cards to recover keys, and enter their pass phrases if
required.
5. Insert the required number of Operator Cards, and enter their pass phrases if required.
When you have inserted the required number of cards, details of the recovered key are displayed.
6. Check the key details are correct and then scroll down and select Recover key.
You can also select More info to see more information about the keys.
When you have a second OCS ready, follow these steps in order to replace the first OCS:
1. Start KeySafe. (For an introduction to KeySafe and information on starting the software, see "Using
KeySafe" on page 264.)
2. Click the Card Sets menu button, or select Card Sets from the Manage menu. KeySafe takes you to
the List Operator Card Sets panel.
3. Click Replace card set. KeySafe takes you to the Replace card set panel.
This panel lists existing OCSs in tabular form. For each card set it displays:
Attribute Description
Attribute Description
Recoverable Key Count The number of private keys protected by this card set that are
recoverable.
Nonrecoverable Key The number of private keys protected by this card set that are not
Count recoverable.
You can click and drag with your mouse in order to resize the column widths and to rearrange the
column order of this table. Clicking a column heading sorts the rows in ascending order based on
that column heading.
4. Select an OCS that you want to replace, and click Replace card set.
5. KeySafe takes you to the Load Administrator Card Set panel, where it prompts you to insert cards from
the ACS in order to authorize the action. Each time you insert an Administrator Card into the smart
card of the hardware security module slot, you must click the OK button to load the card.
Only insert your ACS into a module that is connected to a trusted server.
6. When you have loaded enough cards from the ACS to authorize the procedure, KeySafe takes you
to the Load Operator Card Set panel, where it prompts you to insert the OCS that is to protect the
recoverable keys (this is the OCS onto which you are copying data from the OCS you are
replacing). Each time you insert a card from the new OCS into the smart card slot of the hardware
security module, you must click the OK button.
When you have loaded enough cards from the new OCS, KeySafe creates new working versions
of the recoverable keys that are protected by this card set.
KeySafe deletes the original host data for all recovered keys and replaces this data with host data
that is protected by the new OCS. If there are no nonrecoverable keys protected by the card set,
KeySafe also removes the old card set from the Security World. However, if the OCS has
nonrecoverable keys, the host data for the original card set and for the nonrecoverable keys is not
deleted. These keys can only be accessed with the original OCS. If you want to delete these files,
use the Remove OCS option.
7. When the process is complete, KeySafe displays a dialog indicating that the OCS has been
successfully replaced. Click the OK button. KeySafe returns you the Replace Operator Card Set
panel, where you may replace another OCS or choose a different operation.
rocs
In order to use rocs to replace an OCS or recover keys to a softcard, take the following steps:
1. You must select a hardware security module to use by using the module command, which is
described in the section "module number" on page 188.
2. List the OCSs and softcards in the current Security World by using the list cardsets command,
which is described in the section "list cardsets" on the next page.
3. Select the OCS or softcard to which you want to transfer the keys by using the target command,
which is described in the section "target cardset-spec" on page 189.
Keys protected by an OCS can only be recovered to another OCS, and not to a softcard.
Likewise, softcard-protected keys can only be recovered to another softcard, and not to
an OCS.
4. List the keys in the current Security World using the list keys command, which is described in the
section "list keys" on page 187.
5. Select the keys that are to be recovered (from a different OCS or softcard than the one you
selected for key transfer) by using the mark command, which is described in the section "mark key-
spec" on page 188.
6. If you have selected any keys by mistake, deselect them by using the unmark command, which is
described in the section "unmark key-spec" on page 189.
7. After you have selected the keys that are to be recovered, transfer these keys by using the recover
command, which is described in the section "recover" on page 188.
rocs prompts you to insert a card from the ACS.
8. Insert a card from the ACS.
rocs prompts you for the pass phrase for this card. This action is repeated until you have loaded
the required number of cards from the ACS.
If you do not have the required number of cards from the ACS, press Q and then Enter. The rocs
utility returns you to the rocs > prompt without processing any keys.
Only insert Administrator Cards into a hardware security module that is connected to a
trusted server.
c. rocs prompts you for the pass phrase for this card. This action is repeated until you have
loaded the required number of cards from the OCS.
If you are recovering keys to a softcard, rocs prompts you for the pass phrase for the softcard that
you have selected as the target.
If you decide that you do not want to transfer the keys to the selected card set or softcard, press Q
and then Enter (to quit. rocs returns you to the rocs > prompt and does not process any further
OCSs or softcards.
When you have loaded the target softcard or the required number of cards from the target OCS,
rocs transfers the selected keys to the target OCS or softcard.
If you have selected other target OCSs or softcards, rocs prompts for a card from the next OCS.
10. Repeat step 9 for each selected target.
11. If you have transferred the correct keys, write the key blobs to disk by using the save function
(described in the section "save key-spec" on page 189). If you have transferred a key by mistake,
you can restore it to its original protection by using the revert command (described in the section
"revert key-spec" on page 189).
l help topic
l help intro
l list cardsets
l list keys
l mark key-spec
l module number
l quit
l recover
l rescan
l revert key-spec
l save key-spec
l status
l target cardset-spec
l unmark key-spec
You can specify a command by typing enough characters to identify the command uniquely.
For example, for the status command, you can type st and then press Enter.
9.6.3.1.1 help
With no arguments specified, help shows a list of available commands with brief usage messages and a
list of other help topics. With an argument, help shows detailed help information about a given topic.
In this output:
Output Description
No. The card set or softcard number, which you can use to identify this card
set in rocs commands.
persistent The OCS is persistent and does not have a time-out set.
### minute timeout The OCS is persistent and has a time-out set.
In this output:
Output Description
No. The key number, which you can use in mark and unmark commands.
Method Description
Method Description
name-->name2 Key protected by the OCS or softcard name1 marked for recovery to OCS
or softcard name2.
module (name) PKCS #11 public object. These are protected by the Security World but
associated with a specific OCS or softcard.
To mark more than one key at a time, ensure that each key-spec is separated from the other by spaces, as
in the following example:
If you have not selected a target OCS or softcard, or if rocs cannot parse the key-spec, then rocs displays
an error message.
You can mark and remark the keys to be recovered to various target OCSs or softcards. Remarking a
key displaces the first target in favor of the second target.
Keys protected by an OCS can only be recovered to another OCS, and not to a softcard.
Likewise, softcard-protected keys can only be recovered to another softcard, and not to an
OCS.
9.6.3.1.6 quit
This command allows you to leave rocs. If you attempt to quit when you have recovered keys but have
not saved them, rocs displays a warning.
9.6.3.1.7 recover
This command transfers the marked keys to their target OCSs or softcards. This operation is not
permanent until you save these keys by using the save command.
9.6.3.1.8 rescan
This command updates the card set and key information.
9.6.3.1.11 status
This command lists the currently selected hardware security module and target OCS or softcard.
In this command:
Option Description
-m, --module=MODULE These options specify the number of the hardware security module to use.
-t, --target=CARDSET- These options specify the OCS or softcard to be used to protect the keys.
SPEC For more information, see "Specifying card sets" on the next page.
-k, --keys=KEYS-SPEC These options select the keys to be recovered. For more information, see
"Specifying keys" on the next page.
-c, --cardset=CARDSET- These options select all keys that are protected by the given OCS or
SPEC softcard. For more information, see "Specifying card sets" on the next
page.
-i, --interactive These options force rocs to start interactively even if you have already
selected keys.
You can specify multiple targets on one command line by including separate --keys=KEYS-SPEC or
--cardset=CARDSET-SPEC options for each target. If a key is defined by --keys=KEYS-SPEC or
--cardset=CARDSET-SPEC options for more than one target, it is transferred to the last target for which it is
defined.
If you have selected a hardware security module, a target OCS or softcard, and keys to recover but have
not specified the --interactive option, rocs automatically recovers the keys. rocs prompts you for the ACS
and OCS or softcard. For more information, see "Using rocs interactively" on page 184.
If you use rocs from the command line, all keys are recovered and saved automatically. You
cannot revert the keys unless you still have cards from the original OCS.
If you do not specify the target and keys to recover, or if you specify the --interactive option, rocs starts in
interactive mode with the selections you have made. You can then use further rocs commands to modify
your selection before using the recover and save commands to transfer the keys.
Value Description
[number] cardset-number A value of this form selects the OCS or softcard with the given number
from the list produced by the list cardsets command.
[name] cardset-name A value of this form selects card sets or softcards by their names (the card
set or softcard name may be a wildcard pattern in order to select all
matching OCSs or softcards).
hash cardset-hash A value of this form selects the OCS or softcard with the given hash.
In order to specify multiple OCSs or softcards, include several CARDSET-SPECs using the command line.
Keys protected by an OCS can only be recovered to another OCS, and not to a softcard.
Likewise, softcard-protected keys can only be recovered to another softcard, and not to an
OCS.
Value Description
mark key-number A value of this form selects the key with the given number from the list
produced by the list keys command. Examples of usage are:
and
Value Description
appname:keyident A value of this form selects keys by their internal application name and
ident. You must supply at least one of appname or keyident, but you can
use wildcard patterns for either or both in order to select all matching
keys. An example of usage is:
hash keyhash A value of this form selects the key with the given key hash. An example
of usage is:
--cardset cardset-spec A value of this form selects all keys protected by a given card set.
1. loading the secret information that is to be used to protect the archived copy of the Security World
key.
2. creating a new secret that is to be shared between a new set of cards
3. creating a new archive that is to be protected by this secret.
If you discover that one of the cards in the current ACS has been damaged or lost, or you want to migrate
from standard nShield cards to nShield Remote Administration Cards, you should use one of the
following to create a new set:
If further cards are damaged, you may not be able to re-create your Security World.
You cannot mix standard nShield cards with nShield Remote Administration Cards. in the
same set.
Replacing the ACS modifies the world file. In order to use the new ACS on other machines in
the Security World, you must copy the updated world file to all the machines in the Security
World after replacing the ACS. Failure to do so could result in loss of administrative access to
the Security World.
We recommend that you erase your old Administrator Cards as soon as you have created the
new ACS. An attacker with the old ACS and a copy of the old host data could still re-create all
your keys. With a copy of a current backup, they could even access keys that were created
after you replaced the ACS.
Before you start to replace an ACS, you must ensure that you have enough blank cards to
create a complete new ACS. If you start the procedure without enough cards, you will have to
cancel the procedure part way through.
9.7.1 Replacing an Administrator Card Set using the nShield Connect front panel
To replace an ACS:
1. From the main menu, select Security World mgmt > Admin operations > Replace ACS.
2. Insert one of the remaining cards from the card set that you want to replace and press the right-
hand navigation button.
Continue to insert cards until you have inserted the number of cards required to authorize the
process.
3. When prompted, insert a card for the replacement card set and press the right-hand navigation
button.
4. If required, specify a pass phrase for the card.
5. Insert cards until the card set is complete. A message confirms that the card set has been created.
6. At this point the modified world file has been pushed to the RFS, so make a backup of the modified
world file on the RFS, preferably in a way that distinguishes it from previous backups.
7. Copy the world file to any other Connects in the same Security World, either using the Security World
mgmt > RFS operations > Update World files option on the Connect concerned or using the
nethsmadmin utility, see Using nethsmadmin to copy a Security World to an nShield Connect and
check the current version on page 136.
8. If client cooperation is not enabled, copy the modified world file onto any client machines where it is
needed.
9. Check that the new Administrator Cards are usable and that their pass phrases have been set as
intended, see Verifying the pass phrase of a card or softcard on page 176
10. Erase the Administrator Cards from the old card set. For more information, see "Erasing cards and
softcards" on page 170.
1. Start KeySafe. (For an introduction to KeySafe and information on starting the software, see "Using
KeySafe" on page 264).
2. Click the Card sets menu button, or select Card sets from the Manage menu. KeySafe takes you to the
List Operator Card Sets panel.
3. Click the Replace ACS navigation button, and KeySafe takes you to the Replace Administrator Card Set
panel.
4. If you are sure that you want to replace the ACS, click the Replace ACS command button
5. KeySafe takes you to the Load Administrator Card Set panel, where it prompts you to insert cards from
the ACS in order to authorize the action. Each time you insert an Administrator Card into the
module’s smart card slot, you must click the OK button to load the card.
Only insert cards from your ACS into a module that is connected to a trusted server.
6. When you have loaded enough Administrator Cards to authorize the action, KeySafe takes you to
the Create Administrator Card Set panel, where it prompts you to insert the cards that are to form
the ACS. These must be blank cards or cards that KeySafe can erase. KeySafe will not let you use
cards from the existing ACS. If you do not have enough cards to form a complete new ACS, cancel
the operation now.
When creating a card set, KeySafe recognizes cards that belongs to the set even before
the card set is complete. If you accidentally insert a card to be written again after it has
already been written, KeySafe displays a warning.
7. When you insert a blank card, KeySafe takes you to the Set Card Protection Pass Phrase panel.
8. If you want to set a pass phrase for this Administrator Card:
a. Select the Yes option.
b. Enter the same pass phrase in both text fields.
c. Click the OK button.
KeySafe then prompts you for the next card (if any). A given pass phrase is associated with a
specific card, so each card can have a different pass phrase. You can change these pass phrases
at any time by using the KeySafe Examine/Change Card option (available from the List Operator Card
Sets panel) or the cardpp command-line utility.
9. If you do not want to set a pass phrase for this Administrator Card:
a. Select the No option.
b. Click the OK button.
10. After you have created all the Administrator Cards, KeySafe displays a message confirming that
the ACS has been successfully replaced.
11. Click the OK button, and KeySafe returns you to its introduction panel.
1. If you ran KeySafe on a client machine, ensure that there is a copy of the modified world file on the
RFS.
2. Make a backup of the world file, preferably in a way that distinguishes it from previous backups.
3. Copy the world file to any other Connects in the same Security World, for example using the
nethsmadmin utility, see Using nethsmadmin to copy a Security World to an nShield Connect and
check the current version on page 136.
4. If client cooperation is not enabled, copy the modified world file onto any other client machines
where it is needed.
5. Check that the new Administrator Cards are usable and that their pass phrases have been set as
intended, see Verifying the pass phrase of a card or softcard on page 176.
6. Erase the old Administrator Cards; for more information, see Erasing cards and softcards on page
170.
racs [-m|--module=MODULE]
In this command, the -m| --module =MODULE option specifies the ModuleID (MODULE) of the module
to use.
3. When prompted, insert the appropriate quorum of Administrator Cards to authorize the
replacement.
4. When prompted that racs is writing the new ACS, insert blank cards as necessary on which to
write the replacement Administrator Cards.
5. If you ran racs on a client machine, ensure that there is a copy of the modified world file on the RFS.
6. Make a backup of the world file, preferably in a way that distinguishes it from previous backups.
7. Copy the world file to any other Connects in the same Security World, for example using the
nethsmadmin utility, see Using nethsmadmin to copy a Security World to an nShield Connect and
check the current version on page 136.
8. If client cooperation is not enabled, copy the modified world file onto any other client machines
where it is needed.
9. Check that the new Administrator Cards are usable and that their pass phrases have been set as
intended, see Verifying the pass phrase of a card or softcard on page 176.
10. Erase the old Administrator Cards; for more information, see Erasing cards and softcards on page
170.
10 Application interfaces
This chapter explains how to use an HSM with various types of application:
For information about using the Microsoft Cryptographic API, see the appropriate third-party
integration guide at: https://help.ncipher.com.
You can use KeySafe or the generatekey utility to generate or import keys for use with your applications
(see "Working with keys" on page 252). By default, KeySafe uses the same mechanisms and supports
the same applications as the generatekey utility.
By default, any user is allowed to use any application that uses an nShield HSM.
If you create keys on a client that is not on the same computer as the RFS, you must copy the
key data to the RFS before the nShield HSM can use these keys.
l the nShield Java package which includes the nShield Java jars and Keysafe.
For more information about the bundles and components supplied on your Security World Software
installation media, see the User Guide.
The following versions of Java have been tested to work with, and are supported by, your nCipher
Security World Software:
We recommed that you ensure Java is installed before you install the Security World Software. The Java
executable must be on your system path
If you can do so, please use the latest Java version currently supported by nCipher that is compatible with
your requirements. Java versions before those shown are no longer supported. If you are maintaining
older Java versions for legacy reasons, and need compatibility with current nCipher software, please
contact nCipher support.
To install Java you may need installation packages specific to your operating system, which may depend
on other pre-installed packages to be able to work.
Suggested links from which you may download Java software as appropriate for your operating system
are:
various http://www.oracle.com/technetwork/java/index.html
various http://www.oracle.com/technetwork/java/all-142825.html
Detailed documentation for the JCE interface can be found on the Oracle Technology web
page https://docs.oracle.com/en/java/javase/11/security/java-cryptography-architecture-jca-
reference-guide.html.
Softcards are not supported for use with the nCipherKM JCA/JCE CSP in Security Worlds that
are compliant with FIPS 140-2 level 3.
2. For Java 7 and 8 only. Copy the nCipherKM.jar file to the extensions folder of your local Java
Virtual Machine installation from the following directory:
l Windows: %NFAST_HOME%\java\classes
l Unix-based: /opt/nfast/java/classes
The location of the extensions folder depends on the type of your local Java Virtual Machine (JVM)
installation:
In these paths, %JAVA_HOME% is the home directory of the Java installation (commonly specified in
the JAVA_HOME environment variable).
If you are using Java11 you do not need to copy the jar file.
3. Add %JAVA_HOME%/bin to your PATH system variable.
4. For Java 7 and 8 only. Install the unlimited strength JCE jurisdiction policy files that are appropriate
to your version of Java. JDK 9 and later ship with, and use by default, the unlimited policy files.
The Java Virtual Machine imposes limits on the cryptographic strength that may be used by default
with JCE providers. Replace the default policy configuration files with the unlimited strength policy
files.
To install the unlimited strength JCE jurisdiction policy files:
a. If necessary, download the archive containing the Java Cryptography Extension (JCE)
Unlimited Strength Jurisdiction Policy Files from the Web site of your Java Virtual Machine
vendor.
b. Extract the files local_policy.jar and US_export_policy.jar from Java Virtual Machine
vendor’s Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy File
archive.
c. Copy the extracted files local_policy.jar and US_export_policy.jar into the security directory
for your local Java Virtual Machine (JVM) installation:
In these paths, %JAVA_HOME% is the home directory of the Java installation (commonly
specified in the JAVA_HOME environment variable).
5. Add the nCipherKM provider to the Java security configuration file java.security (located in the
security directory for your local Java Virtual Machine (JVM) installation).
The java.security file contains a list of providers in preference order that is used by the Java Virtual
Machine to decide from which provider to request a mechanism instance. Ensure that the
nCipherKM provider is registered in the first position in this list, as shown in the following example:
#
# List of providers and their preference orders (see above):
#
security.provider.1=com.ncipher.provider.km.nCipherKM
security.provider.2=sun.security.provider.Sun
security.provider.3=sun.security.rsa.SunRsaSign
security.provider.4=com.sun.net.ssl.internal.ssl.Provider
security.provider.5=com.sun.crypto.provider.SunJCE
security.provider.6=sun.security.jgss.SunProvider
security.provider.7=com.sun.security.sasl.Provider
For Java 11 you do not need to specify the fully qualified class name for the provider. Instead you
can just use the provider name.
security.provider.1=nCipherKM
Placing the nCipherKM provider first in the list permits the nCipherKM provider’s algorithms to
override the algorithms that would be implemented by any other providers (except in cases where
you explicitly request another provider name).
The nCipherKM provider cannot serve requests required for the SSL classes unless it is
in the first position in the list of providers.
Do not change the relative order of the other providers in the list.
If you add the nCipherKM provider as security.provider.1 , ensure that the subsequent
providers are re-numbered correctly. Ensure you do not list multiple providers with the
same number (for example, ensure your list of providers does not include two instances
of security.provider.1 , both com.ncipher.provider.km.nCipherKM and another provider).
If you have a Java Enterprise Edition Application Server running, you must restart it
before the installed nCipherKM provider is loaded into the Application Server virtual
machine and ready for use.
java com.ncipher.provider.InstallationTest
Windows
Unix-based systems
For this command to work, you must have added %JAVA_HOME% to your PATH system
variable.
If the nCipherKM JCA/JCE CSP is functioning correctly, output from this command has the following form:
Installed providers:
1: nCipherKM
2: SUN
3: SunRsaSign
4: SunJSSE
5: SunJCE
6: SunJGSS
7: SunSASL
Unlimited strength jurisdiction files are installed.
The nCipher provider is correctly installed.
nCipher JCE services:
Alg.Alias.Cipher.1.2.840.113549.1.1.1
Alg.Alias.Cipher.1.2.840.113549.3.4
Alg.Alias.Cipher.AES
Alg.Alias.Cipher.DES3
....
If the nCipherKM provider is installed but is not registered at the top of the providers list in the
java.security file, the InstallationTest command produces output that includes the message:
In such a case, edit the java.security file (located in the security directory for your local JVM installation)
so that the nCipherKM provider is registered in the first position in that file’s list of providers. For more
information about the java.security file, see "Installing the nCipherKM JCA/JCE CSP" on page 196.
If the nCipherKM provider is not installed at all, or you have not created a Security World, or if you have
not configured ports correctly in the hardserver configuration file, the InstallationTest command produces
output that includes the message:
In such case:
l Check that you have configured ports correctly, as described in "Installing the nCipherKM JCA/JCE
CSP" on page 196. For more information about hardserver configuration file settings, see "server_
startup" on page 346.
l Check that you have created a Security World. If you have not created a Security World, create a
Security World. For more information, see "Creating a Security World" on page 127.
l If you have already created a Security World, repeat the nCipherKM JCA/JCE CSP installation
process as described in "Installing the nCipherKM JCA/JCE CSP" on page 196.
After making any changes to the nCipherKM JCA/JCE CSP installation, run the InstallationTest command
again and check the output.
Whether or not the nCipherKM provider is correctly installed, if the unlimited strength jurisdiction files are
not installed or (not correctly installed), the InstallationTest command produces output that includes the
message:
This message means that, because the Java Virtual Machine imposes limits on the cryptographic
strength that you can use by default with JCE providers, you must replace the default policy configuration
files with the unlimited strength policy files. For information about how to install the unlimited strength
jurisdiction files, see "Installing the nCipherKM JCA/JCE CSP" on page 196.
Alternatively, you can specify the location of the nCipherKM jar on the classpath:
10.1.3 keytool
You can use either the Oracle keytool utility or the IBM keytool utility to read and edit an nShield KeyStore.
These utilities are shipped with the Oracle and IBM JVMs. You must specify the correct nCipher.sworld
KeyStore type when you run the keytool utility, and you must specify the correct package name for the
Oracle or IBM keytool utility.
To generate a new key in an OCS-protected KeyStore with the Oracle or IBM keytool utility, run the
appropriate command:
In these example commands, KeyStore_passphrase is the pass phrase for the OCS that protects the
KeyStore and KeyStore_path is the path to that KeyStore.
To generate a new key in a module-protected KeyStore with the Oracle or IBM keytool utility, run the
appropriate command:
By default, the keytool utilities use the MD5withRSA signature algorithm to sign certificates used with a
KeyStore. This signature mechanism is unavailable on modules with firmware version 2.33.60 or later.
You can always store nShield keys in an nShield KeyStore. You can also store keys generated by a third-
party provider into an nShield KeyStore if both of the following conditions apply:
When you generate an nShield key (or create it from imported key material), that key is associated with
an ACL (Access Control List). This ACL prevents the key from being used for operations for which it is
unsuited and enforces requirements that certain tokens be presented; for example, the ACL can specify
that signing key cannot be used for encryption.
In this example command, property represents any system property, value represents the value set for
that property, and MyJavaApplication is the name of the Java application you are starting. You can set
multiple system properties in a single command, for example:
The available system properties and their functions as controlled by setting different values for a property
are described in the following table:
JCECSP_DEBUG This property is a bit mask for which different values specify
different debugging functions; the default value is 0 . For
details about the effects of setting different values for this
property, see "JCECSP_DEBUG property values" on the
next page.
module This property lets you override the default HSM and select a
specific HSM to use for HSM and OCS protection. Set the
value of this property as the ESN of the HSM you want to
use.
slot This property lets you override the default slot for OCS-
protection and select a specific slot to use. Set this the value
of this property as the number of the slot you want to use.
ignorepass phrase If the value of this property is set to true , the nCipherKM
provider ignores the pass phrase provided in its KeyStore
implementation. This feature is included to allow the Oracle
or IBM keytool utilities to be used with module-protected
keys. The keytool utilities require a pass phrase be
provided; setting this property allows a dummy pass phrase
to be used.
com.ncipher.provider.announcemode The default value for this property is auto , which uses
firmware auto-detection to disable algorithms in the
provider that cannot be supported across all installed
HSMs. Setting the value of this property to on forces the
provider to advertise all mechanisms at start-up. Setting the
value of this property to off forces the provider to advertise
no mechanisms at start-up.
1 If this property has the bit 1 set, minimal debugging information (for
example, version information and critical errors) is reported.
8 If this property has the bit 4 set, debugFunc and debugFuncEnd generate
debugging information for functions that call them.
16 If this property has the bit 5 set, debugFunc and debugFuncEnd display
the values for all the arguments that are passed in to them.
32 If this property has the bit 6 set, context information is reported with each
debugging message (for example, the ThreadID and the current time.
64 If this property has the bit 7 set, the time elapsed during each logged
function is calculated, and information on the number of times a function
is called and by which function it was called is reported.
128 If this property has the bit 8 set, debugging information for NFJAVA is
reported in the debugging file.
256 If this property has the bit 9 set, the call stack is printed for every debug
message.
To set multiple logging functions, add up the JCECSP_DEBUG values for the debugging functions you
want to set, and specify the total as the value for JCECSP_DEBUG . For example, if you want to set the
debugging to use both function tracing (bit 4) and function tracing with parameters (bit 5), add the
JCECSP_DEBUG values shown in the table for these debugging functions (8 + 16 = 24) and specify this
total (24 ) as the value to use for JCECSP_DEBUG .
10.1.6 Compatibility
The nCipherKM JCA/JCE CSP supports both module-protected keys and OCS-protected keys. The CSP
currently supports 1/N OCSs and a single protection type for each nCipherKM JCE KeyStore.
You can use the nCipherKM JCA/JCE CSP with Security Worlds that comply with FIPS 140-2 at either
level 2 or level 3.
In a Security World that complies with FIPS 140-2 level 3, it is not possible to import keys
generated by other JCE providers.
The nCipherKM JCA/JCE CSP supports load-sharing for keys that are stored in the nCipherKM KeyStore.
This feature allows a server to spread the load of cryptographic operations across multiple connected
HSMs, providing greater scalability.
We recommend that you use load-sharing unless you have existing code that is designed to
run with multiple HSMs. To share keys with load-sharing, you must create a 1/N OCS with at
least as many cards as you have HSMs. All the cards in the OCS must have the same pass
phrase.
The nCipherKM JCA/JCE CSP does not support HSM Pool mode. If you want to use HSM Pool
mode with a Java application that only uses module protected keys, one option may be to use
the Sun PKCS #11 provider to access the nCipher PKCS #11 library instead of using nCipherKM
JCA/JCE CSP.
Keys generated or imported by the nCipherKM JCA/JCE CSP are not recorded into the Security World
until:
1. The key is added to an nCipherKM KeyStore (by using a call to setKeyEntry() or setCertificateEntry
() ).
2. That nCipherKM KeyStore is then stored (by using a call to store() ).
The pass phrase used with the KeyStore must be the pass phrase of the card from the OCS that protects
the keys in the KeyStore.
Instructions for using the nCipher PKCS #11 library with specific applications are available from the
nCipher Web site: https://help.ncipher.com. Alternatively, contact Support.
Depending on the application, you may need to set the path and library name %NFAST_
HOME%\toolkits\pkcs11\cknfast.dll in a dialog or configuration file.
The nCipher PKCS #11 library has security options which you must configure before you use the
PKCS #11 library. For more information, see "PKCS #11 library with Security Assurance Mechanism" on
page 208.
From version 1.7, the nCipher PKCS #11 library can be used with FIPS 140-2 level 3 compliant
Security Worlds. This version of the library also introduces load-sharing mode. This feature provides
support for multiple hardware security modules that are connected to a single server, spreading the load
of cryptographic operations between the HSMs in order to provide scalability in terms of performance.
To share OCS protected keys with load-sharing mode, you must create a 1/N OCS that contains at least
as many cards as you have HSMs. All the cards on the OCS must have the same pass phrase.
With module firmware version 2.65.2 or later, if your application only uses module protected keys, you
can use HSM Pool mode as an alternative to using load-sharing mode. HSM Pool mode supports
returning or adding a hardware security module to the pool without restarting the system.
If you are using the preload command-line utility in conjunction with the nCipher PKCS #11
library, you can create K/N OCSs.
The following paragraphs in this section describe the functions that an nShield HSM can provide.
l DSA
l RSA
l DES3_MAC
l AES
l ECDSA (if the appropriate feature is enabled)
an nCipher hardware security module is specifically optimized for public key algorithms, and therefore it
will provide significant acceleration for DSA, RSA and ECDSA signature generation and verification. You
should always choose to perform asymmetric signature generation and verification with an nShield HSM.
The nShield HSM is specifically optimized for asymmetric algorithms, so you should always choose to
perform asymmetric operations with the nShield HSM.
l DES
l Triple DES
l AES
Because of limitations on throughput, these operations can be slower on the nShield HSM than on the
host computer. However, although the nShield HSM may be slower than the host under a light load, you
may find that under a heavy load the advantage gained from off-loading the symmetric cryptography
(which frees the host CPU for other tasks) means that you achieve better overall performance.
10.2.1.6 Mechanisms
The mechanisms currently supported by the nCipher PKCS #11 library, including some vendor-supplied
mechanisms, are listed in the Cryptographic API Integration Guide.
The PKCS #11 library with the Security Assurance Mechanism (SAM), libcknfast, can help users to identify
potential weaknesses, and help developers create secure PKCS #11 applications more easily.
The SAM in the PKCS #11 library is intended to detect operations that reveal questionable behavior by the
application. If these occur, the application fails with an explanation of the cause of failure.
After a review of your security policy and the way the application uses the PKCS #11 library with the SAM,
if there are questionable operations that are considered to be acceptable and pose no security risk, the
PKCS #11 library can be configured to permit some, or all, of them by means of the CKNFAST_
OVERRIDE_SECURITY_ASSURANCES environment variable (described in "CKNFAST_OVERRIDE_
SECURITY_ASSURANCES" on page 215).
To ensure the security of your keys, you must review any messages returned by the PKCS #11
library before changing the settings of the CKNFAST_OVERRIDE_SECURITY_ASSURANCES
environment variable.
For more information about parameters and diagnostic warnings, see "CKNFAST_OVERRIDE_
SECURITY_ASSURANCES" on page 215.
An explicitly insecure PKCS #11 key is one where CKA_SENSITIVE is set to false. If an application uses a
key that is insecure but CKA_SENSITIVE is not set to false, it is possible that the application is using an
inadequate concept of key security, and that the library disallows use of that key by default. Use of
insecure keys should, by default, be restricted to short-term session keys, and applications should
explicitly recognize the insecurity.
Whether or not the library uses load-sharing mode depends on the value of the CKNFAST_
LOADSHARING environment variable, described in "CKNFAST_LOADSHARING" on page 214. Whether
or not the library uses HSM Pool mode depends on the value of the CKNFAST_HSM_POOL environment
variable, described in "CKNFAST_HSM_POOL" on page 214.
An additional virtual slot may be returned (with the label of accelerator ), depending on the value given to
the variable CKNFAST_NO_ACCELERATOR_SLOTS (described in "CKNFAST_NO_ACCELERATOR_
SLOTS" on page 214). Accelerator slots can:
When you insert a smart card from an OCS in the current Security World, the nCipher PKCS #11 library
treats this card as a PKCS #11 token that is present in the virtual slot for that OCS.
After the PKCS #11 token is present, you can open a session to that token. Until you log in, a session can
only access public objects that belong to that PKCS #11 token.
The PKCS #11 token is present until you remove the last card belonging to the OCS. When you remove
the token, the nCipher PKCS #11 library closes any open sessions.
Logging in gives access to the private objects that are protected by the PKCS #11 token. Logging in
requires the pass phrase for the OCS. The exact mechanism for supplying the pass phrase depends on
the application that you are running.
The PKCS #11 token is shared across all the HSMs that have a smart card from the OCS in the reader at
the point that you log in. After you have logged in, inserting additional cards from this OCS has no effect.
If you remove a smart card that belongs to a logged-in token, the nCipher PKCS #11 library closes any
open sessions and marks the token as being not present (unless the OCS is persistent). Removing a card
from a persistent OCS has no effect, and the PKCS #11 token remains present until you log out.
The entry called accelerator cannot be used to create private objects. It can be used to create
module-protected keys.
Use the second of the two entries (which has the same name as the Operator Card that is currently in a
smart card reader) to protect your keys or token objects.
PKCS #11 does not allow two tokens to be present in the same slot. Therefore, when you insert a smart
card into a reader, the nCipher PKCS #11 library logs out any previously logged-in token from the slot and
closes any open sessions.
You must provide any required pass phrase for the tokens when using preload to load the card set.
However, because the application is not aware that the card set has been preloaded, the application
operates normally when handling the login activity (including prompting for a pass phrase), but the PKCS
#11 library will not actually check the supplied pass phrase.
Normally, preload uses environment variables to pass information to the program using the preloaded
objects, including the PKCS #11 library. Therefore, if the application you are using is one that clears its
environment before the PKCS #11 library is loaded, you must set the appropriate values in the cknfastrc
file (see "nCipher PKCS #11 library environment variables" on the facing page). The current environment
variables remain usable. The default setting for the CKNFAST_LOADSHARING environment variable
changes from specifying load-sharing as disabled to specifying load-sharing as enabled. Moreover, in
load-sharing mode, the loaded card set is used to set the environment variable CKNFAST_CARDSET_
HASH so that only the loaded card set is visible as a slot.
The NFAST_NFKM_TOKENSFILE environment variable must also be set in the cknfastrc file to the
location of the preload file (see "Environment variables" on page 301).
A logical token preloaded by preload for use with the nCipher PKCS #11 library is the only such token
available to the application for the complete invocation of the library. You can use more than one HSM
with the same card set.
If the loaded card set is non-persistent, then a card must be left in each HSM on which the set has been
loaded during the start-up sequence. After a non-persistent card has been removed, the token is not
present even if the card is reinserted.
If load-sharing has been specifically switched off, you see multiple slots with the same label.
l CKNFAST_ASSUME_SINGLE_PROCESS
l CKNFAST_ASSURANCE_LOG
l CKNFAST_CARDSET_HASH
l CKNFAST_CONCATENATIONKDF_X963_COMPLIANCE
l CKNFAST_DEBUG
l CKNFAST_DEBUGDIR
l CKNFAST_DEBUGFILE
l CKNFAST_FAKE_ACCELERATOR_LOGIN
l CKNFAST_HSM_POOL
l CKNFAST_LOADSHARING
l CKNFAST_NO_ACCELERATOR_SLOTS
l CKNFAST_NO_SYMMETRIC
l CKNFAST_NO_UNWRAP
l CKNFAST_NONREMOVABLE
l CKNFAST_NVRAM_KEY_STORAGE
l CKNFAST_OVERRIDE_SECURITY_ASSURANCES
l CKNFAST_SEED_MAC_ZERO
l CKNFAST_SESSION_THREADSAFE
l CKNFAST_TOKENS_PERSISTENT
l CKNFAST_USE_THREAD_UPCALLS
l CKNFAST_LOAD_KEYS
l CKNFAST_WRITE_PROTECTED
If you used the default values in the installation script, you should not need to change any of these
environment variables.
You can set environment variables in the file cknfastrc. If the NFAST_HOME environment variable is not
set, or if environment variables are cleared by your application, the file cknfastrc must be in the %NFAST_
HOME% directory of the client.
The cknfastrc file should be saved without any suffix (such as .txt).
variable=value
Variables set in the environment are used in preference to those set in the resource file.
Changing the values of these variables after you start your application has no effect until you restart the
application.
If the description of a variable does not explicitly state what values you can set, the values you set are
normally 1 or 0 , Y or N.
For more information concerning Security World Software environment variables that are not
specific to PKCS #11 and which are used to configure the behavior of your nShield installation,
see the Security World Software installation instructions.
10.2.4.1 CKNFAST_ASSUME_SINGLE_PROCESS
By default, this variable is set to 1 . This specifies that only token objects that are loaded at the time C_
Initialize is called are visible.
Setting this variable to 0 means that token objects created in one process become visible in another
process when it calls C_FindObjects. Existing objects are also checked for modification on disc; if the key
file has been modified, then the key is reloaded. Calling C_SetAttributeValues or C_GetAttributeValues
also checks whether the object to be changed has been modified in another process and reloads it to
ensure the most recent copy is changed.
Setting the variable to 0 can slow the library down because of the additional checking needed if a large
number of keys are being changed and a large number of existing objects must be reloaded.
10.2.4.2 CKNFAST_ASSURANCE_LOG
This variable is used to direct all warnings from the Security Assurance Mechanism to a specific log file.
10.2.4.3 CKNFAST_CARDSET_HASH
This variable enables you to specify a specific card set to be used in load-sharing mode. If this variable is
set, only the virtual smart card slot that matches the specified hash is present (plus the accelerator slot).
The hash that you use to identify the card set in CKNFAST_CARDSET_HASH is the SHA-1 hash of the
secret on the card. Use the nfkminfo command-line utility to identify this hash for the card set that you
want to use: it is listed as hkltu . For more information about using nfkminfo , see "nfkminfo: information
utility" on page 315.
10.2.4.4 CKNFAST_CONCATENATIONKDF_X963_COMPLIANCE
Sets the correct use of ECDH derive with concatenate KDF using the ANSI X9.63 specification as per the
PKCS#11 standard.
10.2.4.5 CKNFAST_DEBUG
This variable is set to enable PKCS #11 debugging. The values you can set are in the range 0 - 11 . If you
are using NFLOG_* for debugging, you must set CKNFAST_DEBUG to 1 .
Value Description
1 Fatal error
2 General error
3 Fix-up error
4 Warnings
5 Application errors
10 Details
10.2.4.6 CKNFAST_DEBUGDIR
If this variable is set to the name of a writeable directory, log files are written to the specified directory.
The name of each log file contains a process ID. This can make debugging easier for applications that
fork a lot of child processes.
10.2.4.7 CKNFAST_DEBUGFILE
You can use this variable to write the output for CKNFAST_DEBUG (Path name > file name ).
10.2.4.8 CKNFAST_FAKE_ACCELERATOR_LOGIN
If this variable is set, the nCipher PKCS #11 library accepts a PIN for a module-protected key, as required
by Sun Java Enterprise System (JES), but then discards it. This means that a Sun JES user requesting a
certificate protected by a load-shared HSM can enter an arbitrary PIN and obtain the certificate.
10.2.4.9 CKNFAST_HSM_POOL
HSM Pool mode is determined by the state of the CKNFAST_HSM_POOL environment variable.
Set the environment variable to 1, y or Y to enable HSM Pool mode for the PKCS #11 application, or set to
0, n or N to explicitly disable HSM Pool mode for the PKCS #11 application.
HSM Pool mode takes precedence over load-sharing mode. HSM Pool mode only supports module
protected keys so do not use CKNFAST_NO_ACCELERATOR_SLOTS to disable the accelerator slot.
10.2.4.10 CKNFAST_LOADSHARING
Load-sharing mode is determined by the state of the CKNFAST_LOADSHARING environment variable.
To enable load-sharing mode, set the environment variable CKNFAST_LOADSHARING to a value that
starts with something other than 0 , n, or N and ensure that the CKNFAST_HSM_POOL environment
variable is not set. The virtual slot behavior then operates.
To use softcards with PKCS #11, you must have CKNFAST_LOADSHARING set to a nonzero
value. When using pre-loaded softcards or other objects, the PKCS #11 library automatically
sets CKNFAST_LOADSHARING =1 (load-sharing mode on) unless it has been explicitly set to 0
(load-sharing mode off).
10.2.4.11 CKNFAST_NO_ACCELERATOR_SLOTS
If this variable is set, the nCipher PKCS #11 library does not create the accelerator slot, and thus the
library only presents the smart card slots (real or virtual, depending on whether load-sharing is in use).
Do not set this environment variable if you want to use the accelerator slot to create or load module-
protected keys.
Setting this environment variable has no effect on ckcheckinst because ckcheckinst needs to
list accelerator slots.
10.2.4.12 CKNFAST_NO_SYMMETRIC
If this variable is set, the nCipher PKCS #11 library does not advertise any symmetric key operations.
10.2.4.13 CKNFAST_NO_UNWRAP
If this variable is set, the nCipher PKCS #11 library does not advertise the c_wrap and c_unwrap
commands. You should set this variable if you are using Sun Java Enterprise System (JES) or Netscape
Certificate Management Server as it ensures that a standard SSL handshake is carried out. If this
variable is not set, Sun JES or Netscape Certificate Management Server make extra calls, which reduces
the speed of the library.
10.2.4.14 CKNFAST_NONREMOVABLE
When this environment variable is set, the state changes of the inserted card set are ignored by the
nCipher PKCS #11 library.
Since protection by non-persistent cards is enforced by the HSM, not the library, this variable
does not make it possible to use keys after a non-persistent card is removed, or after a timeout
expires.
10.2.4.15 CKNFAST_NVRAM_KEY_STORAGE
When this environment variable is set, the PKCS #11 library generates only keys in nonvolatile memory
(NVRAM). You must also ensure this environment variable is set in order to delete NVRAM-stored keys.
10.2.4.16 CKNFAST_OVERRIDE_SECURITY_ASSURANCES
This variable can be assigned one or more of the following parameters, with an associated value where
appropriate, to override the specified security assurances in key operations where this is deemed
acceptable:
l all
l none
l tokenkeys
l longterm [=days]
l explicitness
l import
l unwrap_mech
l unwrap_kek
l derive_kek
l derive_xor
l derive_concatenate
l weak_ algorithm
l shortkey_ algorithm=bitlength
l silent.
Each parameter specified is separated by a semicolon. Using the command line, enter the following to set
the variable:
set CKNFAST_OVERRIDE_SECURITY_ASSURANCES=token1;token2=value3
CKNFAST_OVERRIDE_SECURITY_ASSURANCES=token1;token2=value3
Unknown parameters generate a warning; see "Diagnostic warnings about questionable operations" on
page 219.
10.2.4.16.1 all
The all parameter overrides all security checks and has the same effect as supplying all the other
CKNFAST_OVERRIDE_SECURITY_ASSURANCES parameters except the none parameter. Using the
all parameter prevents the library from performing any of the security checks and allows the library to
perform potentially insecure operations. This parameter cannot be used with any other parameters.
10.2.4.16.2 none
The none parameter does not override any of the security checks and has the same effect as supplying
no parameters. Using the none parameter allows the library to perform all security checks and warn
about potentially insecure operations without performing them. This parameter cannot be used with any
other parameters.
10.2.4.16.3 tokenkeys
The tokenkeys parameter permits applications to request that insecure keys are stored long-term by the
cryptographic hardware and library.
Some PKCS #11 applications create short-term session keys as long-term objects in the cryptographic
provider, for which strong protection by the HSM is not important. Therefore, provided that you intend to
create long-term keys, the need to set this token does not always indicate a potential problem because
the longterm keys restriction is triggered automatically. If you set the tokenkeys parameter, ensure that
your Quality Assurance process tests all of your installation’s functionality at least 48 hours after the
system was set up to check that the key lifetimes are as expected.
When the tokenkeys parameter is set, the effect on the PKCS #11 library is to permit insecure Token keys.
By default, any attempts to create, generate, or unwrap insecure keys with CKA_TOKEN=true fails with
CKR_TEMPLATE_INCONSISTENT and a log message that explains the insecurity. When tokenkeys is
included as a parameter for CKNFAST_OVERRIDE_SECURITY_ASSURANCES, attempts to create,
generate, or unwrap insecure keys with CKA_TOKEN=true are allowed.
10.2.4.16.4 longterm[=days]
The longterm parameter permits an insecure key to be used for days after it was created. Usually
insecure keys may not be used more than 48 hours after their creation. If days is not specified, there is no
time limit.
A need to set this variable usually means that some important keys that should be protected
by the HSM’s security are not secure.
When the longterm parameter is set, the PKCS #11 API permits the use of the following functions with an
insecure key up to the specified number of days after its creation:
When the longterm parameter is set, the functions C_SignInit, C_VerifyInit, C_EncryptInit, and C_
DecryptInit check the CKA_CREATION_DATE against the current time.
10.2.4.16.5 explicitness
The explicitness parameter permits applications to create insecure keys without explicitly recognizing
that they are insecure by setting the flag which allows export as plain text. An insecure key is one whose
plain text is available to an attacker on the host; thus it makes no sense to restrict legitimate users’
access to the plain text of the key value.
A need to set the explicitness parameter does not necessarily indicate a problem, but does
usually indicate that a review of the application’s security policies and use of the PKCS #11 API
should be carried out.
Unless the explicitness parameter is set, attempts to create, generate, or unwrap insecure keys with
CKA_SENSITIVE=true , or to set CKA_SENSITIVE=true on an existing key, fail by default with CKR_
TEMPLATE_INCONSISTENT and a log message explaining the insecurity. However, when the
explicitness parameter is set, these operations are allowed.
10.2.4.16.6 import
The import parameter allows keys that are to be imported into the HSM’s protection from insecure
external sources to be treated as secure, provided that the application requests security for them.
Usually, the library treats imported keys as insecure for the purposes of checking the security policy of
the application. Even though the imported copy may be secure, insecure copies of the key may still exist
on the host and elsewhere.
If you are migrating from software storage to hardware protection of keys, you must enable the import
parameter at the time of migration. You can disable import again after migrating the keys.
Setting this variable at any other time indicates that the library regards the key as secure, even
though it is not always kept within a secure environment.
When the import parameter is set, the PKCS #11 API treats keys that are imported through C_
CreateObject or C_UnwrapKey as secure (provided there is no other reason to treat them as insecure).
By default, keys which are imported through C_CreateObject or C_UnwrapKey without this option in
effect are marked as being insecure. Only the setting of the parameter at the time of import is relevant.
10.2.4.16.7 unwrap_mech
The unwrap_mech parameter allows keys transferred into the HSM in an insecurely encrypted form to be
treated as if the encryption had been secure. This parameter allows you to use key-decryption keys for
insecure decryption mechanisms as well as for raw decryption.
There are no key decryption or wrapping mechanisms that are both secure and suitable for long keys.
Set the unwrap_mech parameter to use PKCS #11 unwrap to create keys that are treated as secure. Set
the unwrap_mech parameter at the time that the wrapping key is created or imported.
When the unwrap_mech parameter is set, the PKCS #11 API adds the CKA_DECRYPT permission on
decryption, even if the template has CKA_DECRYPT=false . By default, trying to create a key with CKA_
UNWRAP=true and CKA_DECRYPT=false fails with CKR_TEMPLATE_INCONSISTENT. If unwrap_mech
is supplied as a parameter for CKNFAST_OVERRIDE_SECURITY_ASSURANCES, then when the CKA_
UNWRAP permission is requested on a key, the library automatically adds the CKA_DECRYPT
permission, even if the template has CKA_DECRYPT false, because abuse of the decryption
mechanisms would allow a program to use the library to decrypt with the key.
10.2.4.16.8 unwrap_kek
When a key is transferred into the HSM in encrypted form, the key is usually treated as insecure unless
the key that was used for the decryption only allows the import and export of keys and not the decryption
of arbitrary messages. This behavior is necessary to prevent an unauthorized application from simply
decrypting the encrypted key instead of importing it. However, because PKCS #11 wrapping mechanisms
are insecure, all unwrapping keys have CKA_DECRYPT=true .
By default, keys that are unwrapped with a key that has CKA_DECRYPT permission are considered
insecure. When the unwrap_kek parameter is set, the PKCS #11 API considers keys that are unwrapped
with a key that also has CKA_DECRYPT permission as secure (provided there is no other reason to treat
them as insecure).
10.2.4.16.9 derive_kek
By default, keys that have been derived by using CKM_DES3_ECB_ENCRYPT_DATA with a key that has
CKA_ENCRYPT permission are considered insecure. However, when the derive_kek parameter is set,
the PKCS #11 API considers keys that are derived with a key that has CKA_ENCRYPT permission as
secure (provided that there is no other reason to treat them as insecure).
10.2.4.16.10 derive_xor
Normally, you can only use only extractable keys with CKM_XOR_BASE_AND_DATA and, on
unextractable keys, only CKM_DES3_ECB_ENCRYPT_DATA is allowed by CKA_DERIVE. However,
when the derive_xor parameter is set, the PKCS #11 API also allows such functions with keys that are not
extractable and treats them as secure (provided that there is no other reason to treat them as insecure).
10.2.4.16.11 derive_concatenate
Normally, you can only use session keys with CKM_CONCATENATE_BASE_AND_KEY for use with the
operation C_DeriveKey. However, when the derive_concatenate parameter is set, the PKCS#11 API also
allows such functions with keys that are long term (token) keys. The PKCS#11 API treats these keys as
secure, provided there is no other reason to treat them as insecure. Even if the all parameter is set, if you
do not include the CKA_ALLOWED_MECHANISMS with CKM_CONCATENATE_BASE_AND_KEY, this
C_DeriveKey operation will not be allowed.
10.2.4.16.12 weak_algorithm
The weak_ algorithm parameter allows you to treat keys used with a weak algorithm as secure. For
example, DES is not secure, but setting the parameter weak_des means that such keys are considered
secure. You can apply the weak_ algorithm parameter to all keys that have a short fixed key length or
whose algorithms have other security problems. As a guide, weak algorithms are those whose work
factor to break is less than approximately 80 bits.
10.2.4.16.13 shortkey_algorithm=bitlength
The shortkey_ algorithm=bitlength parameter permits excessively short keys for the specified algorithm to be
treated as secure. The parameter bitlength specifies the minimum length, in bits, that is to be considered
secure. For example, RSA keys must usually be at least 1024 bits long in order to be treated as secure,
but shortkey_rsa=768 would allow 768-bit RSA keys to be treated as secure.
10.2.4.16.14 silent
The silent parameter turns off the warning output. Checks are still performed and still return failures
correctly according to the other variables that are set.
If the problem is not that a questionable operation has been permitted because of a setting in CKNFAST_
OVERRIDE_SECURITY_ASSURANCES it could be that an operation has failed. In such a case, the
setting required to authorize the operation is noted.
By default, these messages are sent to stderr . On Windows platforms, they are also always sent to the
Event Viewer. If a file name has been specified in the CKNFAST_ASSURANCE_LOG environment
variable, diagnostic messages are also written to this file.
10.2.4.17 CKNFAST_SEED_MAC_ZERO
Set this variable to use zero padding for the Korean SEED MAC mechanisms (CK_SEED_MAC and CKM_
SEED_MAC_GENERAL ). If this variable is not set, or is set to n , then the SEED MAC mechanisms will use
the default PKCS#5 padding scheme.
10.2.4.18 CKNFAST_SESSION_THREADSAFE
You must set this environment variable to yes if you are using the Sun PKCS #11 provider when running
nCipherKM JCA/JCE code.
10.2.4.19 CKNFAST_TOKENS_PERSISTENT
This variable controls whether or not the Operator Cards that are created by your PKCS #11 application
are persistent. If this variable is set when your application calls the PKCS #11 function that creates tokens,
the Operator Card created is persistent.
Use of the nCipher PKCS #11 library to create tokens is deprecated, because it can only create
1/1 tokens in FIPS 140-2 level 2 Security Worlds. Use KeySafe or one of the command-line
utilities to create OCSs.
10.2.4.20 CKNFAST_USE_THREAD_UPCALLS
If this variable is set and CKF_OS_LOCKING_OK is passed to C_Initialize , NFastApp_SetThreadUpcalls
is called by means of nfast_usencthreads and only a single NFastApp_Connection is used, shared
between all threads.
If this variable is set and mutex callbacks are passed to C_Initialize but CKF_OS_LOCKING_OK is not
passed, C_Initialize fails with CKR_FUNCTION_FAILED. (NFastApp_SetThreadUpcalls requires more
callbacks than just the mutex ones that PKCS #11 supports.)
If neither mutex callbacks nor CKF_OS_LOCKING_OK is passed, this variable is ignored. Only a single
connection is used because the application must be single threaded in this case.
10.2.4.21 CKNFAST_LOAD_KEYS
This variable will load private objects at C_Login time, rather than at the first cryptographic operation.
10.2.4.22 CKNFAST_WRITE_PROTECTED
Set this variable to make your OCS or softcard (token) write-protected. If a token is write-protected, you
cannot:
This environment variable does not prevent you from deleting an object from your token.
To verify the installation of the nCipher PKCS #11 library, follow these steps:
If your Security World is valid, ckcheckinst displays information similar to the following:
If you are using the preload command-line utility in conjunction with the nCipher
PKCS #11 library, you can only see the token that you loaded with the preload utility. In
load-sharing mode, the loaded card set is used to set the environment variable
CKNFAST_CARDSET_HASH, so only this card set is visible as a slot.
If there is no card in a slot, ckcheckinst displays No token present beside the relevant slot numbers.
ckcheckinst gives you the following choices:
2. If there are no available slots with cards in them, you can choose one of the following actions:
l Insert a valid Operator Card, and press R
l choose a fixed token slot
l Press E to quit, then create an OCS, and run ckcheckinst again.
When there is at least one slot with a valid token, input a slot number, and press Enter. In a FIPS
140-2 level 3 compliant Security World, ckcheckinst prompts you to enter the pass phrase for the
selected Operator Card.
3. Type the pass phrase, and press Enter.
ckcheckinst displays the results of the tests:
Test Pass/Failed
---- -----------
1 Generate RSA key pair Pass
2 Generate DSA key pair Pass
3 Encryption/Decryption Pass
4 Signing/Verify Pass
Deleted test keys ok
PKCS11 Library test successful.
If any tests fail, ckcheckinst displays a message indicating the failure and quits. It does not run any
subsequent tests.
If ckcheckinst fails:
l Check that the hardserver is running
l Use the enquiry and nfkminfo world.
If all seems in order, reinstall the nCipher library.
Public key well known HSM key well known HSM key
The object is stored as an nShield key blob encrypted by the OCS key. You must log in to this OCS before
you can load this object.
security world
The object is stored as an nShield key blob encrypted by the Security World key. This object can be
loaded on to any HSM in the Security World. The nCipher PKCS #11 library only allows access if a card
from this OCS is present.
Public keys are encrypted under a well-known HSM key. This encryption is for programming
convenience only and does not provide security. These keys can be loaded on any nShield HSM.
Use the custom external application option for applications that were written using nShield key
management software and that expect their keys to be in standalone files.
KeySafe does not place any restrictions on the OCS that is used to protect nShield native or
custom application keys. You must make sure that your application is capable of loading the
card set.
If you wish to use the SEE to run applications, it must have been ordered and enabled as
described in "Enabling optional features on the unit" on page 99.
An SEE application is typically a standalone SEE machine that is loaded automatically by the hardserver
(for example, a CodeSafe C application).
Check the documentation that your application vendor supplies for information about any signatures that
you may require to set up and use the application, as well as for any other installation and configuration
information.
CodeSafe applications are standalone applications, but each CodeSafe C application can consist of
multiple parts, and its installation can include several configuration steps. For instructions on installing
and configuring each application, see your application vendor’s documentation.
1. Ensure that the SEE machine for the application is in the directory %NFAST_HOME%\custom-
seemachines on the remote file system.
If an SEE machine has previously been loaded on the HSM, press the Clear button on
the front of the unit before proceeding to the next step. This clears the current SEE
machine from memory.
2. From the main menu on the front panel of the HSM, select CodeSafe .
3. To enable the HSM to publish the SEE World for multiple clients, enter the following information
when prompted:
l The name of the SEE machine file.
l The name of the user data file, if required.
l The type of custom SEE machine you are using (select SEElib or BSDlib sockserv).
This option is only available if you have provided a valid user data file in step 2. If
BSDlib sockserv is selected, worldid_pubname, postload_prog, and postload_
args will be passed to load_seemachine . For detailed descriptions of the options
in this section, see "load_seemachine" on page 347.
This option is only available if you have selected the SEElib option in the previous
step.
Before configuring a module to autonomously run an SEE machine and accept updates using the RFS,
that module must first be set up to accept remotely-pushed configurations, see Configuring auto push on
page 116
For more information about configuring log file storage options, see "Configuring log file storage" on
page 75.
To configure an nShield Connect module to autonomously run an SEE machine and accept updates
using the RFS:
pull_rfs=true
machine_file=mymachinename.sar
userdata=myuserdata.sar
worldid_pubname=publ_name
These settings specify the type, name and user data of the SEE machine you wish to
load. For more information about each setting, see "load_seemachine" on page 347.
For CodeSafe Direct, the userdata file must be packed as a SAR file.
The remote module will load the new SEE machine in place of any existing SEE
machine. If no machine_file value is set, then pushing the config file will remove any
existing machines on the unit.
3. In the sys_log section of the config.new file for the remote module, add or amend the following
settings:
behaviour=push
push_interval=1
These settings control how and where log messages are written. Using the example
above, messages will be written to the system.log and hardserver.log files of the
module, which are accessible using the remote file system.
You may wish to revise the push_interval to a higher value once the nShield Connect
has successfully loaded the new SEE machine.
4. Run nopclearfail to clear the module, followed by enquiry to check that the module is ready.
5. Run cfg-pushnethsm to push the new config file to the module.
To load a new SEE machine to multiple nShield Connect modules, we recommend scheduling down time
for each HSM, upgrading them on a per HSM basis. Each nShield Connect configuration file is specific to
an individual HSM and each configuration file should be updated separately to load the new SEE
machine.
You can also use the CSP installation wizard to load existing Security Worlds, see Adding an HSM to a
Security World with the CSP or CNG wizard on page 145, generate new Operator Card Sets, see
"Creating an Operator Card Set with the CSP or CNG wizard" on page 165, and configure the set-up
parameters of the CAPI CSP including HSM Pool mode.
With module firmware version 2.65.2 or later, if your application only uses module protected keys, you
can use HSM Pool mode with multiple hardware security modules. HSM Pool mode exposes a single
pool of HSMs and supports returning or adding a hardware security module to the pool without restarting
the system. With a FIPS 140-2 level 3 Security World, keys cannot be created in HSM Pool mode,
however keys created outside HSM Pool mode can be used in HSM Pool mode.
The CSP installation wizard is not suitable for creating complex Security World setups. When
creating such Security Worlds, or if you require more flexibility than the CSP installation wizard
provides, we recommend following the instructions in "Creating a Security World using new-
world" on page 136.
Use the standard Security World utility nfkmverify to check the security of all stored keys in the Security
World; nfkminfo , nfkmcheck and other standard utilities can also be used to assist in this process.
The CSP installation wizard registers the CAPI CSP as a key provider on your system.
In addition, the Enhanced SChannel Cryptographic Provider and the Enhanced DSS and Diffie-Hellman
SChannel Cryptographic Provider support all the internal algorithm types necessary for SSL3 and TLS1
support.
Versions of the CSP later than 1.11.0 have an updated container storage mechanism. CSP
containers are now stored as part of the Security World instead of in the Windows registry file.
Versions of the CSP later than 1.11.0 use a non-backwards-compatible container and key
storage format. If you are installing version 1.11.0 or later of the CSP over older versions, you
must run the cspmigrate utility in order to convert containers and keys from the old system to
the new system.
CSP versions 1.11.0 and later have a number of advantages over older versions:
l The CSP state is easily mirrored between multiple machines simply by copying the contents of the
Key Management Data directory or by sharing the Key Management Data directory across a
network.
l The CSP key files can have arbitrary names (previously, the names of key files were linked to their
key type and their container name). This new method facilitates the importation of existing Security
World keys into the CSP.
l Every different container is now guaranteed to have a distinct storage location. There were
circumstances in CSP versions older than 1.11.0 in which two containers with similar names could
have shared the same keys wrongly.
However, there are some points to bear in mind concerning CSP versions 1.11.10 and later:
l If you want to share the same key between multiple computers, we supply the cspimport utility for
transferring keys between containers.
l Any existing containers with older versions of the CSP must be migrated to the new format. We
provide a utility, cspmigrate , to migrate containers from the old to the new system.
Utility Description
cspcheck This utility checks that CSP container files are intact and uncorrupted, and
also that referenced key files exist. Use cspcheck in conjunction with
nfkmcheck, but run nfkmcheck first in order to test the integrity of your
Security World files.
cspimport This utility allows you to insert keys manually into existing CSP containers.
This utility has two modes that either allow you to change a container’s
key association to that of an arbitrary Security World key or to copy CSP
keys between containers.
cspmigrate This utility moves the CSP container information from the registry into the
Security World. If a new container already exists and has a key in it, and
an identically-named old container exists with the same key, the utility
asks you which key to keep. You can either:
cspnvfix Regenerate the NVRAM key counter area for a specified nShield CSP
key.
csputils This utility lists CSP containers and provides detailed information about
Utility Description
them. It can also be used to delete container files if the current user has
administrative privileges.
configure-csp- The --mscapi option allows HSM Pool mode to be enabled or disabled for
poolmode the nCipher CAPI CSP without using the CSP wizard.
keytst This utility displays information about existing CSP key containers by
using the Microsoft CryptoAPI. If you have the appropriate permissions,
keytst also allows you to create containers and their keys, as well as
delete containers.
Each of these commands has an -h option that displays the usage message for the command.
The Security World Software implementation of Microsoft CNG is supported on Microsoft Windows
Windows Server 2008 (for both x86 and x64 architectures) and later releases, including Windows
Server 2012. The nCipher CNG CSP provides the benefits of hardware-based encryption accessed
through the standard Microsoft API, and supports the National Security Agency (NSA) classified Suite B
algorithms.
You can unregister the nCipher CNG CSP without removing the provider DLL files from your system. After
unregistering, you can reregister the nCipher CNG CSP at any time as long as the files have not been
uninstalled from your system. For more information, see "Unregistering or reregistering the CNG CSP" on
page 231.
You can completely uninstall the nCipher CNG CSP, removing the files from your system. After
uninstalling, you must reinstall the files and then reregister the nCipher CNG CSP before you can use it.
For more information, see "Unregistering or reregistering the CNG CSP" on page 231
To register the nCipher CNG CSP, the hardserver must be running and able to communicate with at least
one module. This requirement is normally fulfilled during the product installation process. You can check
that this requirement is fulfilled by running the enquiry command-line utility and checking the output for
details about the module.
10.7.1.1.1 Registering the CNG CSP with the CNG Configuration Wizard
We recommend using the CNG Configuration Wizard to register the nCipher CNG CSP. The product
installation process places a shortcut to the CNG Configuration Wizard in the Start menu under All
Programs > nCipher.
You can also use the CNG Configuration Wizard to load existing Security Worlds, see "Adding
an HSM to a Security World with the CSP or CNG wizard" on page 145, generate new OCSs,
see "Creating an Operator Card Set with the CSP or CNG wizard" on page 165, and configure
the set-up parameters of the CNG CSP including HSM Pool mode.
With module firmware version 2.65.2 or later, if your application only uses module protected keys, you
can use HSM Pool mode with multiple hardware security modules. HSM Pool mode exposes a single
pool of HSMs and supports returning or adding a hardware security module to the pool without restarting
the system. With a FIPS 140-2 level 3 Security World, keys cannot be created in HSM Pool mode,
however keys created outside HSM Pool mode can be used in HSM Pool mode.
To register the CNG CSP with the CNG Configuration Wizard, you must have already created a Security
World and chosen a key protection method, either module-protection or OCS-protection. If you chose
OCS-protection, you must also have already created an OCS before you can register the nCipher CNG
CSP with the CNG Configuration Wizard.
The CNG Configuration Wizard is not suitable for creating complex Security World setups.
When creating such Security Worlds, or if you require more flexibility than the CNG
configuration wizard provides, we recommend following the instructions in "Creating a
Security World using new-world" on page 136.
If you use the CNG Configuration Wizard to create a Security World (and, if appropriate, an OCS), the
wizard automatically prompts you to register the CNG CSP after you have fulfilled the necessary
prerequisites.
You can also use the CNG Configuration Wizard to change an existing configuration at any time by
running the wizard as usual and choosing the Use the existing security world option on the Initial setup screen.
To register the CNG CSP with the CNG Configuration Wizard after the necessary key-protection
prerequisites have been fulfilled:
If you chose module-protection for your keys, the wizard does not confirm that an
OCS has been created.
2. When the wizard has confirmed that it is ready to register the nCipher CNG providers, click the Next
button.
The wizard registers the nCipher CNG CSP.
You cannot use the CNG Configuration Wizard to configure the nCipher CNG providers
for use as defaults. We recommend that you always use the nCipher CNG providers by
selecting them directly with the application that is using CNG.
When configuration of your nCipher CNG CSP is complete, the wizard displays a confirmation
screen.
To register the nCipher CNG CSP with the cngregister command-line utility, run the command without
specifying any options:
cngregister
You cannot use the cngregister command-line utility to configure the nCipher CNG providers
for use as defaults. we recommend that you always use the nCipher CNG providers by
selecting them directly with the application that is using CNG.
For more information about the cngregister command-line utility, see "cngregister" on page 240.
cngregister -U
This command unregisters the CNG CSP, but does not remove the provider DLL files from your system.
For information about removing these files, see "Uninstalling or reinstalling the CNG CSP" below.
If any applications or services are using the nCipher CNG providers for key storage or
cryptography, unregistering the nCipher CNG CSP can cause system instability.
After unregistering the nCipher CNG CSP, you can reregister it at any time as long as the files have not
been uninstalled from your system. To reregister the nCipher CNG CSP on your system, run the
command:
cngregister
You cannot use the cngregister command-line utility to configure the nCipher CNG providers
for use as defaults. We recommend that you always use the nCipher CNG providers by
selecting them directly with the application that is using CNG.
For more information about these command-line utilities, see "Utilities for CNG" on page 239.
1. To remove any and all dependencies that you have set, run the command:
ncsvcdep -x
2. Unregister the nCipher CNG CSP on your system by running the command:
cngregister -U
This command unregisters the CNG CSP, but does not remove the provider DLL files from your
system.
3. Uninstall the nCipher CNG DLLs from your system:
l On 32-bit versions of Windows, run the command:
cnginstall -U
cnginstall64 -U
To reinstall the nCipher CNG CSP after you have previously uninstalled it:
cnginstall -i
cnginstall64 -i
2. Reregister the nCipher CNG CSP on your system by running the command:
cngregister
For more information about these command-line utilities, see "Utilities for CNG" on page 239.
DSA Hardware
ECDSA_P224 Hardware
ECDSA_P256 Hardware
ECDSA_P384 Hardware
ECDSA_P521 Hardware
Hashes used with ECDSA must be of the same length or shorter than the curve itself. If you
attempt to use a hash longer than the curve the operation returns NOT_SUPPORTED. In FIPS
140-2 level 3 Security Worlds ECDSA signing is only supported where the length of the curve is
approximately the length of the hash.
10.7.2.2 Hashes
Hash name Type of support
DH Hardware
ECDH_P224 Hardware
ECDH_P256 Hardware
ECDH_P348 Hardware
ECDH_P521 Hardware
Elliptic curve cryptography algorithms must be enabled before use. Use the fet command-line
utility with an appropriate certificate to enable a purchased feature. If you enable the elliptic
curve feature on your modules after you first register the CNG providers, you must run the
configuration wizard again for the elliptic curve algorithm providers to be registered.
RNG Hardware
cnglist --list-providers
To identify the keys that are available from a particular provider, run the command:
The following command provides an example of identifying keys from the Security World Key Storage
Provider:
To list the keys available from the Security World Key Storage Provider, run the command
cnglist --list-keys (without specifying the --provider option) .
10.7.3.1 Importing a Microsoft CAPI key into the Security World Key Storage Provider
To import a Microsoft CAPI key into the Security World Key Storage Provider, first run the CAPI utility
csputils to identify the existing CAPI containers and their key contents.
CAPI containers can contain either a signing key or a key exchange key, or both. The following example
shows how to import both a signing key and a key exchange key from a Microsoft CAPI container:
To check the success of the import, list the keys present in the Security World Key Storage Provider:
cnglist --list-keys
EXAMPLE_IMPORTED_SIGNATURE_CAPICONTAINER: RSA
EXAMPLE_IMPORTED_KEYEXCHANGE_CAPICONTAINER: DH
The following example command shows how to import a single signing key:
Run the cnglist command with the --list-keys option to check the success of the key import:
cnglist --list-keys
EXAMPLE_IMPORTED_SIGNATURE_ONLY_CAPICONTAINER: RSA
The cngimport option -m/--migrate cannot be used to migrate nCipher CAPI container keys to
CNG. For information about importing nCipher CAPI container keys into CNG, see "Importing a
Security World key into the Security World Key Storage Provider" on the facing page.
10.7.3.2 Importing a Microsoft CNG key into the Security World Key Storage Provider
To import a Microsoft CNG key into the Security World Key Storage Provider, run the cngimport command
as shown in the following example:
cngimport -m
-k "EXAMPLE_RSA_1024"
"IMPORTED_RSA_1024"
Run the cnglist command with the --list-keys option to check the success of the key import:
cnglist --list-keys
IMPORTED_RSA_1024: RSA
The original key is not deleted from the provider from which it was imported:
Certain applications, such as Certificate Services, create keys using the Microsoft Software
Key Storage Provider which cannot be exported. Attempting to import such a key into the
nCipher provider results in the following message:
10.7.3.3 Importing a Security World key into the Security World Key Storage Provider
To import a Security World key into the Security World Key Storage Provider, run the cngimport utility as
shown in the following example:
Run cnglist with the --list-keys option to confirm that the key has been successfully imported:
cnglist --list-keys
nfkmsimple1: RSA
To import an nCipher CAPI container into the Security World Key Storage Provider, run the csputils
command to identify the container name:
csputils -l
File ID Container name Container owner DLL name S X
========= =================== =================== ========= = =
31e994f07 CONTAINER2 SYWELL\Administrato ncsp **
3a2b082a8 CAPICONTAINER SYWELL\Administrato ncsp **
2 containers and 4 keys found.
Run the csputils command with the -l and -m options to migrate an nCipher CAPI machine
container.
Identify the Security World key names of the keys in the container by running the csputils command as
follows:
csputils -d -n CAPICONTAINER
Detailed report for container ID #3a2b082a8f2ee1a5acb756d5e95b09817072807a
Filename: key_mscapi_container-3a2b082a8f2ee1a5acb756d5e95b09817072807a
Container name: CAPICONTAINER
User name: SYWELL\Administrator
User SID: s-1-5-21-352906761-2625708315-3490211485-500
CSP DLL name: ncsp.dll
Filename for signature key is key_mscapi_ce51a0ee0ea164b993d1edcbf639f2be62c53222
Key was generated by the CSP
Key hash: ce51a0ee0ea164b993d1edcbf639f2be62c53222
Key is recoverable.
Key is cardset protected.
Cardset name: nopin
Sharing parameters: 1 of 1 shares required.
Cardset hash: d45b30e7b60cb226f5ade5b54f536bc1cc465fa4
Cardset is non-persistent.
Filename for key exchange key is key_mscapi_dbd84e8155e144c59cf8797d16e7f8bd19ac446a
Key was generated by the CSP
Key hash: dbd84e8155e144c59cf8797d16e7f8bd19ac446a
Key is recoverable.
Key is cardset protected.
Cardset name: nopin
Sharing parameters: 1 of 1 shares required.
Cardset hash: d45b30e7b60cb226f5ade5b54f536bc1cc465fa4
Cardset is non-persistent.
1 container and 2 keys found.
The key name to pass to the cngimport command --key option is the part of the key name that follows
key_mscapi_ in the output line that starts Filename for signature key is key_mscapi_ .
For example, the signature key file name for CAPICONTAINER in the example shown above is key_
mscapi_ce51a0ee0ea164b993d1edcbf639f2be62c53222 , so
ce51a0ee0ea164b993d1edcbf639f2be62c53222 is the key name that should be passed to cngimport:
Run cnglist with the --list-keys option to confirm that the key has been successfully imported:
cnglist --list-keys
Signature_Key_Imported_From_nCipher_CAPI: RSA
cngsoak: ECDH_P256
Follow the same procedure for importing the key exchange key from the nCipher CAPI container.
The CNG application has to be written such that it calls NCryptOpenKey to open a CAPI key explicitly.
The following table lists the utilities specific to the nCipher CNG CSP:
cngimport.exe cngimport.exe This key migration utility is used to migrate Security World,
CAPI, and CNG keys to the Security World Key Storage
Provider.
cnginstall.exe cnginstall64.exe This utility is the nCipher CNG CSP installer. Only use this utility
to remove or reinstall the provider DLLs and associated registry
entries manually.
cngregister.exe cngregister.exe This is the nCipher CNG CSP registration utility. You can use it to
unregister and re-register the nCipher providers manually.
cngsoak.exe cngsoak64.exe This utility is the nCipher CNG soak tool. You can use it to
evaluate the performance of signing, key exchange, and key
generation using a user-defined number of threads.
ncsvcdep.exe ncsvcdep.exe This utility is the service dependency tool. You can configure
some service based applications, such as Microsoft Certificate
Services and IIS, to use the nCipher CNG CSP. The nCipher
Service dependency tool allows you to add the nFast Server to
the dependency list of such services.
configure-csp- configure-csp- This utility allows HSM Pool mode to be enabled or disabled for
poolmode poolmode64 the nCipher CNG CSP without using the CNG wizard.
These utilities are located in the bin directory of your Security World Software installation (for example,
%NFAST_HOME%\bin ).
On 64-bit versions of Windows, both the 32-bit and 64-bit versions of the listed utilities are
installed. When working on an 64-bit version of Windows, always ensure that you use the 64-
bit version of the utility (if one is available).
10.7.5.1 cngimport
Use cngimport to migrate keys to the Security World Key Storage Provider. For more information, see
"Migrating keys for CNG" on page 235.
10.7.5.2 cnginstall
The cnginstall utility is used by the Security World Software installation wizard. You can also use this utility
to manually uninstall (or reinstall) the nCipher CNG DLLs and registry entries.
cnginstall -U
This command removes the provider DLL files from your system. It produces output of the form:
ncksppt.dll removed.
nckspsw.dll removed.
ncpp.dll removed.
Before you uninstall the nCipher CNG DLL files, ensure that you unregister the nCipher CNG CSP. For
more information, see:
l "cngregister" below
l "Unregistering or reregistering the CNG CSP" on page 231.
After unregistering the nCipher CNG CSP, you can reregister it at any time as long as the files have not
been uninstalled from your system. To reregister the nCipher CNG CSP on your system, run the
command:
cngregister
For more information about uninstalling and reinstalling the nCipher CNG CSP with cnginstall, see
"Uninstalling or reinstalling the CNG CSP" on page 232.
10.7.5.3 cngregister
Use cngregister to unregister the nCipher CNG CSP manually.
cngregister -U
This command unregisters the CNG CSP, but does not remove the provider DLL files from your system.
For information about removing these files, see:
If any applications or services are using the nCipher CNG CSP for key storage or
cryptography, unregistering it can cause system instability.
After unregistering the nCipher CNG CSP, you can reregister it at any time as long as the files have not
been uninstalled from your system. To reregister the nCipher CNG CSP on your system, run the
command:
cngregister
You cannot use the cngregister command-line utility to configure the nCipher CNG providers
for use as defaults. We recommend that you always use the nCipher CNG providers by
selecting them directly with the application that is using CNG.
10.7.5.4 cngsoak
Use cngsoak to obtain statistics about the performance of the nCipher CNG CSP. Specifically, use
cngsoak to determine the speed of:
The output from cngsoak displays information as columns of information. From left to right, these columns
display:
10.7.5.5 ncsvcdep
Use the ncsvcdep utility to ensure that the nShield nFast Server service is running before certain services
are enabled. For example, Active Directory Certificate Services or Internet Information Services require
that the hardserver is running in order to use the nCipher CNG CSP. Failure to set this dependency can
lead to system instability.
To list installed services, run the ncsvcdep command with the -l option:
ncsvcdep -l
ncsvcdep -a "DependentService"
In this command, DependentService is the service that has the dependency. The following example shows
how to make the Active Directory Certificate Services dependent on the nFast Server:
ncsvcdep -a "CertSvc"
Dependency change succeeded.
To remove a specific dependency relationship, run ncsvcdep with the -r option, for example:
ncsvcdep -r "CertSvc"
Dependency change succeeded.
ncsvcdep -x
Microsoft Certificate Services require that the certsvc service is made dependent on the
hardserver.
Microsoft Internet Information Services require that the http service is made dependent on the
hardserver.
10.7.5.6 cnglist
Use cnglist to display details of CNG providers, keys, and algorithms.
To list details of the CNG providers, run the cnglist command with the --list-providers option:
cnglist --list-providers
To list details of the algorithms, run the cnglist command with the --list-algorithms option:
cnglist --list-algorithms
BCryptEnumAlgorithms(BCRYPT_CIPHER_OPERATION):
Name Class Flags
AES 0x00000001 0x0
RC4 0x00000001 0x0
DES 0x00000001 0x0
DESX 0x00000001 0x0
3DES 0x00000001 0x0
3DES_112 0x00000001 0x0
BCryptEnumAlgorithms(BCRYPT_HASH_OPERATION):
Name Class Flags
SHA1 0x00000002 0x0
MD2 0x00000002 0x0
MD4 0x00000002 0x0
MD5 0x00000002 0x0
SHA256 0x00000002 0x0
SHA384 0x00000002 0x0
SHA512 0x00000002 0x0
AES-GMAC 0x00000002 0x0
SHA224 0x00000002 0x0
BCryptEnumAlgorithms(BCRYPT_ASYMMETRIC_ENCRYPTION_OPERATION):
Name Class Flags
RSA 0x00000003 0x0
To list details of the algorithms for the Security World Key Storage Provider, run the cnglist command with
the --list-algorithms, --keystorage , and --nc options:
To list details of the algorithms for a specific named key storage provider, run the cnglist command with
the --list-algorithms and --provider ="ProviderName" options:
10.7.5.7 configure-csp-poolmode
The configure-csp-poolmode utility allows HSM Pool mode to be enabled or disabled for the nCipher
CNG CSP without using the CNG wizard.
To remove HSM Pool mode setting for CNG from the registry, use the command:
11 Remote Operator
This chapter explains:
If you wish to use the Remote Operator feature, you must have enabled it as described in
"Enabling optional features on the unit" on page 99. The Remote Operator feature must have
been ordered for, and enabled on, the nShield module that you intend to use as the remote,
unattended module.
For Remote Operator to work, the modules must be in the same Security World. You insert the required
cards from the OCS into a slot in the attended module. From this module, the contents of the OCS are
transmitted over secure channels to the unattended module, which then loads them. You do not need
physical access to the unattended module in order to load the OCS onto it.
You can export a slot from an attended module and import a slot to any (unattended) module in the
Security World. Before you can import a slot to one module, you must first export it from another module.
Both the attended and the unattended HSM must be in operational mode before they can import or
export slots. See Checking and changing the mode on an nShield Connect on page 399 for more
about changing the mode.
2. Configure the HSMs for slot import and export, as appropriate.
After the initial configuration is complete, to use Remote Operator you must:
1. Create a Remote OCS (that is, an OCS with the correct permissions for Remote Operator).
2. Generate keys that are protected by the Remote OCS.
3. Ensure your application is configured to use keys protected by the Remote OCS.
By default, HSMs are initialized with remote card-set reading enabled. If you do not want
an HSM to be able to read remote card sets, you can initialize it by running the
new-world with the -S MODULE (where MODULE is the HSM’s ID number).
Module #1
generation 2
state 0x2 Usable
flags 0x10000 ShareTarget
n_slots 3
esn 8851-43DF-3795
hkml 391eb12cf98c112094c1d3ca06c54bfe3c07a103
This information can also be output by running the nfkminfo command-line utility.
Ensure that your network firewall settings are correct. See the Installation Guide for more about firewall
settings.
11.2.3.1 Configuring slot import and export using the nShield Connect front panel
When the HSMs have been configured, follow these steps to configure slot import and export:
You can check that the slot was imported successfully by, on the unattended machine, running the
command:
slotinfo -m 1
If slot importation was successful, the output from this command includes the line:
The R in the Flags column indicates that slot #2 is a Remote Operator slot.
Applications running on the unattended machine can now use slot #2 to load OCSs that are presented to
slot #0 on the attended machine. If any of the cards require a pass phrase, the application must pass this
to the unattended HSM in the usual way.
For the application to be able to load the OCS onto the unattended HSM, it must be able to read the card
set files associated with the OCS from the local Key Management Data directory. If the OCS was created
on a different machine, you must copy the card set files in the Key Management Data directory onto the
unattended machine (either manually or by using client cooperation; for more information, see "Setting up
client cooperation" on page 88).
The same applies for any keys that an application on an unattended HSM needs to load but that were not
generated on that machine.
For the most part, card sets and keys intended to be used with Remote Operator are similar to their
ordinary, non-Remote counterparts.
To check whether the card in a slot is from a Remote OCS, select Security World mgmt > Display World info
from the main menu or run the nfkminfo command-line utility. The output displays slot section information
similar to the following:
Module #1 Slot #0 IC 1
generation 1
phystype SmartCard
slotlistflags 0x2
state 0x5
Operator flags 0x20000 RemoteEnabled
shareno 1
shares LTU(Remote)
error OK
In this example output, the RemoteEnabled flag indicates the card in the slot is from a Remote OCS.
If you create a Remote OCS on the attended machine, then you must copy the Key
Management Data files on the attended machine to the unattended machine.
Both the attended and unattended HSMs must be in the same Security World before you
generate a Remote OCS. If you are not using client cooperation, the Key Management Data
directories must be manually synchronized after you generate the Remote OCS.
If you already have recoverable keys protected by a non-Remote OCS, you can transfer them
to a new Remote OCS by using KeySafe or the replaceocs command-line utility.
After an OCS has been inserted into a Remote Operator slot, for each time a given card is
inserted, the module only allows each share on that card to be read one time. If there is a
second attempt to read shares from that card before the card is reinserted, the operation fails
with a UseLimitsUnavailable error.
If you generate keys protected by a Remote OCS on the attended module, then you must copy
the files in the Key Management Data directory on the attended machine to the unattended
module.
If you already have an OCS-protected key that you want to use, but the protecting OCS is not a Remote
OCS, you can use KeySafe to protect the key under a new Remote OCS if the key was originally
generated with the key recovery option enabled.
However, if the key was not generated with key recovery enabled, you cannot protect it under a different
OCS. In such a case, you must generate a new key to be protected by a Remote OCS.
After you have configured the application, start it remotely from the attended machine. Insert cards from
the OCS into the attended machine’s exported slot as prompted.
11.3.5 Managing Remote Operator slots using the unit front panel
11.3.5.1 Editing Remote Operator slots
You can change the details of a Remote Operator slot. You must always update the details of both the
exported slot on the local module and the imported slot on the remote module.
1. From the main menu, select Security World mgmt > Set up remote slots > Edit exported slot.
2. Select the exported slot that you want to update. Slots are identified by the IP address of the
remote module.
3. Update the details of the slot.
1. From the main menu, select Security World mgmt > Set up remote slots > Edit imported slot.
2. Select the imported slot that you want to update. Slots are identified by the IP address of the
remote module.
3. Update the details of the slot.
To delete an exported slot, from the main menu, select Security World mgmt > Set up remote slots > Delete
exported slot and select the slot you want to delete.
To delete an imported slot, from the main menu, select Security World mgmt > Set up remote slots > Delete
imported slot and select the slot you want to delete.
l KeySafe
l generatekey and related utilities
l The unit front panel.
You cannot generate keys from the front panel on the unit. You can generate keys on the client using the
methods described in this chapter and view them on the module.
Assigned Keys provide for more restrictive controls which are enforced with ACLs. An Assigned Key is a
secret key with a Key Generation Certificate and with the ACL configuration defined in nShield Solo XC
Common Criteria Evaluated Configuration Guide, specifically:
These properties of an Assigned Key enable the sole control that's required for a secret key used to
create a digital signature.
A General Key is one that does not meet the criteria for an Assigned Key.
For both Assigned and General Keys in a Common Criteria CMTS Security World it is not possible to
export or import as plain text. This is enforced by the HSM.
The ACL configuration defining an Assigned Key is described in the nShield Solo XC Common Criteria
Evaluated Configuration Guide. Determination of the Assigned status of a key uses the nfkmverify utility
and the Key Generation certificate recorded in the key when it was created.
The generatekey and mkaclx utilities have been enhanced to offer support for generating Assigned Keys,
see Key generation options and parameters on page 391 for generatekey and the online help for mkaclx.
When you attempt to generate keys for a Security World that complies with FIPS 140-2 level 3, you are
prompted to insert an Administrator Card or Operator Card. You may need to specify to the application,
the slot you are going to use to insert the card. You need to insert the card only once in a session.
For softcard protected key generation, you must use an Operator Card Set.
Generating a key creates both a key and a certificate request for the following application types:
l embed (OpenSSL)
l kpm
l seessl
These requests are generated in PKCS #10 format with base-64 encoding.
When you generate a key with generatekey, choose a new identifier for the key and use whichever
application type is appropriate. The key identifier can only contain digits and lowercase letters; it cannot
contain spaces, underscores (_ ), or hyphens (- ).
l In interactive mode, by issuing commands without parameters and supplying the required
information when prompted by the utility
l In batch mode, by supplying some or all of the required parameters using the command line
(generatekey prompts interactively for any missing but required parameters).
In interactive mode, you can input abort at any prompt to terminate the process.
Batch mode is useful for scripting. In batch mode, if any required parameters are omitted, generatekey
does not prompt for the missing information but instead will either use available defaults or fail. If you
specify one or more parameters incorrectly, an error is displayed and the command fails.
If the Security World was created with audit logging selected then you can request that the usage of a
key for cryptographic operations is logged in the audit log. By default only key generation and destruction
is logged. For further information see "Audit Logging" on page 357.
In this command:
l --generate option specifies that this instance of generatekey is generating a key. Other options can
be specified to perform tasks such as importing or retargeting keys. To see a list of options run the
command generatekey --help .
l the APPNAME parameter specifies the name of the application for which the key is to be generated.
For details of the available application types (APPNAME), see "Key application type (APPNAME)" on
page 391 in "Key generation options and parameters" on page 391.
l The NAME=VALUE syntax is used to specify the properties of the key being generated. For details of
the available application types (APPNAME), see "Key properties (NAME=VALUE)" on page 392 in
"Key generation options and parameters" on page 391.
For details of the available application types (APPNAME) and parameters that control other key
properties (NAME=VALUE), see "Key generation options and parameters" on page 391.
In interactive mode, generatekey prompts you for any required parameters or actions that have not been
included in the command. When you give the command:
1. Enter parameters for the command, as requested. If you enter a parameter incorrectly, the request
for that information is repeated and you can re-enter the parameter.
2. When all the parameters have been collected, generatekey displays the final settings. In a FIPS
140-2 level 3 compliant Security World, you are prompted to insert a card for FIPS authorization if
no such card is present.
3. If prompted, insert an Administrator Card or an Operator Card from the current Security World.
4. If you want to protect the key with an OCS, you are prompted to insert the relevant cards and input
pass phrases, as required.
The generatekey utility prompts you to insert a quorum of Operator Cards from the operatorone OCS.
After you have inserted the appropriate number of cards, generatekey generates the key.
Although it is not explicitly specified, the created key is recoverable by default if OCS and softcard
replacement is enabled for the Security World.
1. Start KeySafe. (For an introduction to KeySafe and for information on starting the software, see
"Using KeySafe" on page 264.)
2. Click the Keys menu button, or select Keys from the Manage menu. KeySafe takes you to the Keys
panel, which shows the keys in the Security World.
3. Click the Create button to open the Generate Key panel.
4. Select an application with which you want to use your key from the list, and then click the Next
button. KeySafe takes you to the Key Generation Parameters panel.
5. Select and enter your desired parameters for key generation.
The types of information that you need to provide on the Key Generation Parameters panel differs
slightly depending on the application you selected on the Generate Key panel.
6. When you have supplied your desired key generation parameters, click the Commit button.
7. If you choose to generate a key that is protected by a smart card or softcard, KeySafe takes you to
a panel from which you can load the protecting card or softcard. Follow the onscreen instructions,
inserting any necessary Operator Cards and supplying any pass phrases as needed.
8. KeySafe displays a message indicating that the key has been successfully generated. Click the OK
button.
9. KeySafe returns you to the Generate Key panel, from which you can generate another key or
choose another operation.
We recommend that you do not store keys in NVRAM unless you must do so to satisfy
regulatory requirements. NVRAM key storage was introduced only for users who must store
keys within the physical boundary of a module to comply with regulatory requirements.
NVRAM-stored keys provide no additional security benefits and their use exposes your ACS
to increased risk. Storing keys in nonvolatile memory also reduces load-balancing and
recovery capabilities. Because of these factors, we recommend you always use standard
Security World keys unless explicitly required to use NVRAM-stored keys.
When you generate an NVRAM-stored key, you must have sufficient nonvolatile memory available in the
module or the command fails.
You need backup and recovery procedures, which must be consistent with regulatory
requirements, to protect your NVRAM-stored keys. Do NOT use Remote Administration to
back-up keys to a smart card, as, in transit, the keys would not be physically protected from
access by the host system.
An NVRAM-stored key can only be loaded successfully by using the preload command-line
utility on the generating module. Attempts to load such a key on other modules that have
NVRAM fail with UnknownID errors.
We provide the nvram-backup utility to enable the copying of files, including NVRAM-stored keys,
between a module’s nonvolatile memory and a smart card.
We recommend generating a new key (or retargeting a key from within the Security World)
instead of importing an existing key whenever possible. The import operation does not delete
any copies of the key material from the host, and because existing keys have been stored in a
known format on your hard disk (and key material can persist on backup media), there is a
risk that an existing key has been compromised. It is your responsibility to ensure any
unprotected key material is deleted. If a key was compromised before importation, then
importing it does not make it secure again.
l RSA keys in PEM-encoded PKCS #1 format (from a file). The PEM key that contains the key to
import must not require a pass phrase.
l DES, DES2 and Triple DES keys (entered in hex).
You cannot import keys into a Security World that complies with FIPS 140-2 level 3. Attempting
to import keys into a FIPS 140-2 Level 3 Security World returns an error.
Option Description
OPTIONS You can specify particular options when running generatekey that control
details of key importation.
Option Description
APPNAME This option specifies the name of the application for which the key is to be
imported. This must be an application for which generatekey can generate
keys.
For RSA keys, you can include pemreadfile=filename in the command to specify the file name of the PEM
file that contains the key. Otherwise, you are prompted for this information during import.
In interactive mode, you are prompted for any required parameters or actions that have not been
included in the command:
l Enter parameters, as requested. If you enter a parameter incorrectly, the request for that
information is repeated and you can re-enter the parameter.
l If you want to protect the key with an OCS, you are prompted to insert the relevant cards and input
pass phrases, as required.
l If prompted, insert an Administrator Card or an Operator Card from the current Security World.
In this example, generatekey requires you to input RSA for the key type.
Although not explicitly specified, this key is, by default, recoverable if OCS and softcard replacement is
enabled for the Security World.
1. Start KeySafe. (For an introduction to KeySafe and for information on starting the software, see
"Using KeySafe" on page 264.)
2. Click the Keys menu button, or select Keys from the Manage menu. KeySafe takes you to the Keys
panel.
3. Click Import to open the Import Key panel.
4. Select the application associated with the key that you want to import, and then click the Next
button. KeySafe takes you to the Key Import Parameters panel.
5. Select and enter the desired parameters for the key that you want to import.
The types of information that you need to provide on the Key Import Parameters panel will differ
slightly depending on the application you selected on the Import Key panel.
6. When you have supplied parameters for the key that you want to import, click the Commit button.
7. If you choose to import a key that is protected by a smart card, KeySafe takes you to the Load
Operator Card Set panel. Follow the onscreen instructions, inserting the required number of Operator
Cards and supplying any pass phrases as needed.
8. KeySafe displays a message indicating that the key has been successfully imported. Click the OK
button.
9. KeySafe returns you to the Import Key panel, from which you can import another key or choose
another operation.
generatekey --list-apps
When you retarget a key, generatekey does not remove the original key from the Security
World. If required, you can use KeySafe to discard the original key.
When you retarget a key, you cannot change its protection method. You cannot change the key from
module-protected to card-protected, or from card-protected to module-protected.
In this command:
Option Description
OPTIONS This option specifies any options to include when the command is run. Run
the command generatekey --help for details about the available options.
APPNAME This option specifies the name of the application for which the key is to be
Option Description
from- This option specifies the name of the application with which the key is
application =appname currently associated.
from-ident=keyident This option specifies the identifier of the key to be retargeted. You can find
this identifier by using the nfkminfo command-line utility.
If generatekey cannot identify the key type for retargeting, you are prompted to specify the key type.
Input the key type and press Enter.
To view keys:
1. From the main menu, select Security World mgmt > Keys > List keys.
2. Select the application to which the key belongs.
3. Select a key to view its full details.
4. If you wish, select Verify key ACLs to verify the key’s ACL.
1. Start KeySafe. (For an introduction to KeySafe and for information on starting the software, see
"Using KeySafe" on page 264.)
2. Click the Keys menu button, or select Keys from the Manage menu. KeySafe takes you to the Keys
panel, which lists all the keys in the Security World on this client computer. It displays the name of
the key, the application for which it was created, the protection method that was used and whether
the key is stored in NVRAM.
If you click a key’s listing, KeySafe displays additional information about that key, for example, the
application with which the key is used, whether or not the key is recoverable, and the key’s name,
creation date, hash, instance, and copy ID.
nfkminfo -k [APPNAME[IDENT]]
nfkminfo -l [APPNAME[APPNAME...]]
The -k|--key-list option lists keys only. The -l|--name-list option lists keys and their names.
With either option, APPNAME is an optional application name. If you specify an application name, nfkminfo
lists only the keys for that application. Commonly, APPNAME is often one of:
l custom
l embed (currently only usable with your own provider or provider from a previous nShield release)
l pkcs11
l kpm
l kps
l mscapi
l seeconf
l seeinteg
l simple
You can also specify your own application names for APPNAME as appropriate to your system.
For example, user-defined application names can be created by using the nfkm library to
generate arbitrary keys.
To list information about a specific key, specify the --key-list option with an application and key identifier:
To list keys and names, specify the --name-list option. The command nfkminfo --name-list returns output
of the form:
The nfkmverify utility compares the details in the ACL of the key and those of the card set that currently
protects the key.
A key that has been recovered to a different card set shows a discrepancy for every respect that the new
card set differs from the old one. For example, a key recovered from a 2-of-1 card set to a 1-of-1 card set
has a different card-set hash and a different number of cards, so two discrepancies are reported. The
discrepancy is between the card set mentioned in the ACL of the key and the card set by which the key is
currently protected (that is, the card set mentioned in the key blobs).
A key that has been transferred from another Security World shows discrepancies and fails to be verified.
nCipher recommends that you verify keys in their original Security World at their time of generation.
If you must replace your Security World or card set, nCipher recommends that you generate
new keys whenever possible. If you must transfer a key, perform key verification immediately
before transferring the key; it is not always possible to verify a key after transferring it to a new
Security World or changing the card set that protects it.
12.7.1 Usage
To verify the key generation certificates from the command line, run the command:
nfkmverify [-f|--force] [-v|--verbose] [-U|--unverifiable] [-m|--module=MODULE] [appname ident [appname ident [...]]]
Option Description
-h|--help This option displays help for nfkmverify.
-V|--version This option displays the version number for nfkmverify.
-u|--usage This option displays a brief usage summary for nfkmverify.
-m|--module=MODULE This option performs checks with module MODULE.
-f|--force This option forces display of an output report that might be wrong.
-U|--unverifiable This option permits operations to proceed even if the Security World is
unverifiable.
-v|--verbose This option prints full public keys and generation parameters.
-C|--certificate This option checks the original ACL for the key using the key generation
certificate. This is the default.
-L|--loaded These options check the ACL of a loaded key instead of the generation
certificate.
-R|--recov This option checks the ACL of the key loaded from the recovery blob.
--allow-dh-unknown-sg- This option allows an operation to proceed even if a Diffie-Hellman key is
group using an unrecognized Sophie-Germain group.
-A|--assigned In a common-criteria-cmts Security World nfkmverify will identify keys as
Assigned or General, see Common Criteria CMTS Mode Assigned Keys
on page 252 based on the criteria in the nShield Solo XC Common
Option Description
If you have backup media, you can restore the information and the key becomes usable again. Likewise,
if you have copies of the Security World data on several computers, erasing the data on one computer
does not remove it from any other computer.
To destroy a key permanently you must either erase the OCS that is used to protect it or erase the
Security World completely. There are no other ways to destroy a key permanently.
If you have NVRAM-stored keys, you must additionally ensure you have a backup of the key
data stored on the relevant modules.
l Starting KeySafe
l Using the graphical user interface (GUI) for KeySafe
l Using buttons to select and run operations
l Using the keyboard to navigate KeySafe
l KeySafe error reporting.
To perform Security World management, card-set management, and key management tasks using
KeySafe, see the relevant chapters of this guide.
By default, KeySafe uses the same mechanisms and supports the same features and
applications as the generatekey utility.
After you have set up the path, check that you are using the correct Java version by
running java with the -version option.
Example:
>>java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
nonpriv_port=9000
priv_port=9001
See the Installation Guide for more about ports and firewall settings.
The Windows KeySafe launcher checks that the components required to run KeySafe are installed. You
will be prompted to install any missing components.
A.3.1 Sidebar
The sidebar provides access to different parts of the KeySafe application (with the menu buttons) and
also displays information about both the current Security World and your module or modules (with the
Module Status tree).
The options listed below are also available from the Manage menu.
Introduction Clicking the Introduction menu button opens the introductory panel that
KeySafe displays at startup.
World Clicking the World menu button opens the World Operations panel, from
Card Sets Clicking the Card Sets menu button opens the List Operator Card Sets
panel, from which you can:
Softcards Clicking the Softcards menu button opens the List Softcards panel, from
which you can:
Keys Clicking the Keys menu button opens the Keys panel, from which you
can:
l Create a key
l Import a key
l Discard a key
l View details of a key.
While KeySafe is executing a command, the menu buttons are disabled. Their normal functionality
returns when the command is completed.
A.3.3 Menus
Three menu options are available from the menu bar at the top of the screen:
l File
l Exit - displays a dialog asking whether you are sure you wish to quit KeySafe. Click Yes (or
press the Enter key) to close KeySafe. Click No to close the dialog and return to your
KeySafe session.
l Manage
l Card sets - opens the List Operator Card Sets panel. See "Card Sets" on the previous page.
l Softcards - opens the List Softcards panel. See "Softcards" on the previous page.
l Keys - opens the Keys panel. See "Keys" on the previous page.
l Help
l About KeySafe - opens the About KeySafe panel, which displays current version numbers for
KeySafe, kmjava and nfjava. You will need to quote these version numbers if you contact
Support about KeySafe.
At the top of the Module Status tree is an icon representing the computer on which the running copy of
KeySafe is installed. The name of this computer is shown to the right of the icon.
Below the computer icon in the Module Status tree are icons and text identifiers representing the current
Security World and your module(s). To the left of each icon is an expand/collapse toggle, or node. By
default, when KeySafe starts, these nodes are collapsed and show a minus sign. Click the node to display
expanded information about the Security World or module. Click the node again to collapse this
information.
l Strict FIPS 140-2 Level 3 — whether the Security World is operating at FIPS 140-2 level 3 (Yes or No)
l pass phrase Recovery — whether pass phrase recovery is enabled (Yes or No). For more information,
see "Pass phrase replacement" on page 132
When the Advanced node is expanded, the following additional information is displayed:
l RTC Key — whether a real-time clock authorization key has been generated (Yes or No)
l NVRAM Key — whether a non-volatile memory authorization key has been generated (Yes or No)
l Open SEE Debugging — whether Open SEE debugging has been enabled (Yes or No)
l FTO Key — whether a foreign token key has been generated (Yes or No)
At the top level of the Module tree, the following information is displayed:
Mode Description
Operational:Useable The module is in the current Security World and useable for key
operations.
Operational:Uninitialized The module key is set and the module must be initialized before
use.
For FIPS 140-2 level 3 Security Worlds, a FIPS Auth Loaded entry shows if an
Administrator Card or Operator Card has been inserted to authorize an operation that
requires a FIPS key.
The Module status tree has an Advanced folder that shows the following details when expanded:
l ESN— the module’s electronic serial number (ESN), which is a unique identifier. You must quote a
module’s ESN if you need to contact Support. Keep a record of the ESN(s) associated with your
module(s).
l the HSM type and model number
l Firmware version — the version of the module’s firmware
l Has RTC — whether the module has a Real Time Clock (RTC)
l Has NVRAM — whether the module has nonvolatile memory (NVRAM).
l RO Compatible —
l RO Permitted —
On the next panel, the Commit button executes an operation, while the Back button returns to the previous
panel. For example, on the Erase Module panel, clicking the Commit button will erase the module, while
clicking the Back button will return to the World Operations panel.
Clicking the Commit button tells KeySafe to write or delete data: it is not necessarily possible to
reverse such changes even if you subsequently cancel the operation. In some cases, clicking
the Commit button causes KeySafe to display a dialog asking you to confirm your command.
Such features help prevent you from accidentally destroying your data or keys.
Some panels require that you select options by means of radio buttons or that you enter data into text
fields before clicking the Commit button. For example, if you click the Reprogram Module button on the World
Operations panel, the next panel prompts you to choose whether the module can receive remote operator
card shares.
Input may be in the form of radio buttons (allowing several options, one of which — the default — will be
already selected) or text boxes (allowing you to enter text: no default value is set). If you click the Commit
button without having entered data into a mandatory text field, or if KeySafe detects that the information
you provided is inconsistent or invalid, KeySafe displays an error message. Click the message’s OK
button, and then provide or correct the necessary information.
After you successfully issue a command by clicking the Commit button, the menu buttons are disabled
until the requested command is completed.
A.4 Errors
If KeySafe detects an error from which it cannot recover, it may display a Fatal Error message.
if you receive any error message titled Unexpected Error, contact Support with details of what you were
doing, and the exact error message.
These utilities exist in the bin subdirectory of your Security World Software installation. Unless noted, all
utilities have the following standard help options:
To view the status of features, run the tool without a smart card. If
a FEM card is not present, or if any of the features are not enabled
successfully, the utility prompts you to indicate what to do next.
ncdate View, set, and update the time on a module’s real-time clock.
ncversions Obtain and verify the versions of the Security World Software
components that are installed. This utility lists the following
information:
nfdiag Obtain information about the module and the host on which it is
installed. This diagnostic utility can save information to either a
ZIP file or a text file.
nopclearfail Clear an HSM, put an HSM into the error state, retry a failed HSM,
or change the HSM mode.
nfloadmon Upgrade the module monitor and firmware of nShield Edge and
nShield Solo modules.
All the listed utilities, except the floodtest utility, are supported only on FIPS 140-2 level 2
Security Worlds.
ncthread-test Stress test modules and test nCore API concurrent connection
support.
Ensure that you run the mkaclx utility with the options
that are appropriate for your security infrastructure. If
the appropriate options are not chosen, the security of
existing keys might potentially be compromised.
postrocs Transfer PKCS #11 keys to a new card set in the new Security
World. When transferring keys by using either the key-xfer-im
utility or the migrate-world utility, run the postrocs utility if there are
any PKCS #11 keys that are protected by OCSs.
elftool Convert ELF format executables into a format suitable for loading
as an SEE machine.
see-stdioesock-serv
see-stdoe-serv
tct2 (Trusted Code Tool) Sign, pack, and encrypt file archives so that they can be loaded
onto an SEE-ready nShield module.
ckimportbackend Generate keys for use with PKCS #11 applications. When you run
the generatekey utility to generate PKCS #11 keys, the
ckimportbackend utility is executed in the background.
If you have installed Cipher Tools, you can use the following additional PKCS #11 utilities. For more
information about these utilities, see the Cryptographic API Integration Guide.
ckinfo View PKCS #11 library, slot and token information. Use this utility
to verify that the library is functioning correctly.
cklist View details of objects on all slots. If invoked with a PIN argument,
the utility lists public and private objects. If invoked with the -n (--
ckrsagen Test RSA key generation. You can use specific PKCS #11
attributes for generating RSA keys.
anonkneti View the ESN and HKNETI key hash from a module identified by its
IP address.
cfg-pushnethsm Copy a specified configuration file from a remote file system to the
file system on a specified module.
config-serverstartup Edit the [server_startup] section of the configuration file for the
client's hardserver to enable or disable TCP sockets.
nethsmenroll Edit the local hardserver configuration file to add the specified
nShield Connect unit. As an alternative to hand-editing a client’s
configuration file, you can run this utility on a client to configure it
to access an nShield Connect.
l "nethsm_imports" on page 351.
l "Configuring the nShield Connect to use the client" on
page 77.
l "nethsmenroll" on page 84.
For more information about these utilities, see "Utilities for the CAPI CSP" on page 228.
Utility names that end with 64 run only on 64-bit version of Microsoft Windows. All other utilities
run on both 32-bit and 64-bit versions of Microsoft Windows.
cspcheck Check that CSP container files and keys in the kmdata directory
are intact and uncorrupted and that the referenced key files exist.
cspcheck64
cspimport64
cspnvfix Regenerate the NVRAM key counter area for a specified nShield
CSP key.
cspnvfix64
csptest64
csputils64
You must have Administrator privileges to view or
delete machine containers or containers that belong to
other users.
keytst Create, test, and display information about keys and CSP key
containers.
keytst64
configure-csp-poolmode Configure HSM Pool mode for the nCipher CAPI CSP.
configure-csp-poolmode64
B.9 CNG
Use the following helper utilities to manage keys and the interfaces between the CNG library and the
HSM. For a list of utilities specific to the nCipher CNG CSP, see "Utilities for CNG" on page 239.
Utility names that end with 64 run only on 64-bit version of Microsoft Windows. All other utilities
run on both 32-bit and 64-bit versions of Microsoft Windows.
cngimport Migrate Security World, CAPI and CNG keys to the Security World
Key Storage Provider.
cngregister (nCipher CNG Unregister and re-register the nCipher providers manually.
provider registration utility)
For more information, see:
configure-csp-poolmode Configure HSM Pool mode for the nCipher CNG CSP.
trial Test the nCore API commands. You can use this utility
interactively or from a script file.
When you follow the standard installation instructions for Security World Software, the setup.msi installer
runs automatically when you place the Security World Software installation media in the optical disc drive.
You then follow the on-screen instructions from the installer to configure your installation.
However, if you run the setup.msi installer from the command line, you have the option to define the
components you want to install via the Windows command prompt. This allows your installations to run
'silently', without the need for further interaction with the installer.
See the Installation Guide for more information about installing Security World Software.
This will install the nShield Security Software to the default installation directory
%PROGRAMFILES%\nCipher\nfast\ and generate an install log called installLog.txt in the current
working directory.
/forcerestart can be appended to the end of these commands to restart the machine
after an install or uninstall operation if required.
This will uninstall the nShield Security Software packages and generate an uninstall log called
uninstallLog.txt in the current working directory.
/forcerestart can be appended to the end of these commands to restart the machine
after an install or uninstall operation if required.
D.1 Overview
The preload utility loads persistent cryptographic objects (keys/OCS/softcards) onto a chosen set of
modules, then makes those objects available for use by applications. This removes the need for
applications to load keys/cards themselves, and allows for easy sharing of keys/cards between multiple
applications. Additionally preload can manage keys, such that they are reloaded/maintained on modules
to provide high availability.
Preloading is achieved via keys/cardsets being loaded, then once loaded the IDs of these objects are
recorded persistently to a file (the preload file), which can be read via another application sharing the
same session, and subsequently used.
Keys/cardsets must have previously been created before they can be preloaded, and all modules
participating in a preload session must be in the same security world.
The preload binary can be found in '%NFAST_HOME%\bin' . This binary calls the preload.py script found
in '%NFAST_HOME%\python\scripts'
The purpose of this command is to decide what needs to be done after preload has found and loaded all
its crypto objects (OCS/softcards/keys).
1. pause - continue to run the preload process forever. This is useful to load keys in one session and
use them in another.
2. exit - exit preload gracefully. This is useful to add keys to the preload session. Not available in
combination with high availability mode.
3. subprocess- execute this subprocess and exit once the subprocess has finished
The only exception to this is the --list-admin option that doesn't require a command.
The preload session remains open, and thus the preloaded keys remain loaded, as long as at least one
instance of preload continues to run. If/when the final preload instance terminates, all loaded objects will
be cleaned up.
Example showing a single key, of type simple, being loaded and then an application being launched:
Argument Effect
--version show program's version number and exit
Argument Effect
-c IDENT, --cardset=IDENT Load all cardsets matching IDENT. If IDENT looks like a hash it
will be interpreted as that, otherwise it will be interpreted as a
name. If it's definitely a name, use --cardset-name.
--cardset-name=NAME Load cardset(s) named NAME.
-s IDENT, --softcard=IDENT Load all softcards matching IDENT. If IDENT looks like a hash it
will be interpreted as that, otherwise it will be interpreted as a
name.
--softcard-name=NAME Load softcard(s) named NAME.
-N, --no-fips Do not record FIPS auth, even if available. (overrides -F).
-R, --reload-everything Reload keys and tokens that are already loaded.
Argument Effect
--log-level=LOG_LEVEL The log level to log, options: DEBUG , INFO , WARNING , ERROR.
Default is INFO , if unrecognised option it will fallback to default.
Wildcard Definition
* matches everything
It is advised that all arguments that using wildcards are surrounded by quotations to ensure that they are
passed to preload as intended. For example, to load all keys whose names start with 'keyname' the
following pattern could be used:
Element Description
generation ....
c29da3ac0d99a7c01477831ac31a4bebe283c4f8 2 0xac57be2d 1
1080cca2be9588e6e47bcd870ebcbb133ea0561b 1 0xac57be2c 1
1080cca2be9588e6e47bcd870ebcbb133ea0561b 2 0xac57be13 1
'%NFAST_KMDATA%\tmp\nfpriv_<username>/default'
This location can be changed by using the command line option '-f PRELOAD_FILE, --preload-
file=PRELOAD_FILE'
In order to preload a softcard and the corresponding keys being protected by said softcard the '-s' or '--
softcard-name' arguments can be used.
The -s option can be used with the softcard name or the hash of the softcard:
$> nfkminfo -s
...
Operator logical token hash name
3768b8efb7c7324dd8a1edbe2650c2015281c877 test
This shows the softcard is loaded on modules 1 and 2. It additionally shows that the key protected by the
softcard has been loaded on both modules.
This command line option will ensure that only the softcard is preloaded, and no keys protected by that
cardset:
The command line '-F' will ensure FIPS auth is preloaded everywhere.
The command line '-N' will ensure FIPS auth is not recorded, and will negate '-F' .
FIPS auth is also an admin key, see Admin Key section for more information.
D.6.1 Listing
Admin keys can be listed using the --list-admin command line option.
Available admin keys are NSO , M, RA, P, NV, RTC, FIPS, MC, RE, DSEE, FTO .
D.6.2 Loading
Admin keys can be loaded using the --admin=KEYS command line option, supplying the value --
admin=ALL to load all available admin keys. Note that admin key loading will require an ACS card being
present in a slot of each module that is to be used.
Also note that the logical token of the admin key is preloaded alongside the key itself. E.G. kfips and ltfips.
Preloaded keys are not only available to one application, but to any/all applications that share the preload
session.
When preload is invoked with the "--high-availability" or "-H" option, it does the following differently:
1. Whenever preload loads a key onto the HSMs, it creates a Merged Key to represent the set of
(HSM, key ID) pairs. Applications will then use these merged IDs to address the keys.•As
discussed below, this in itself provides failback, resilience and increased availability: the Merged
Key ID remains usable even if some HSMs fail or are removed from the security world.
2. For as long as preload is running, it does the following repeatedly, once per polling
interval:•Consult the hardserver to get a list of operational HSMs which are in the relevant security
world.
l For each Merged Key that was loaded by this instance of preload:
l Ensure there is a valid current entry for each usable HSM.
l To achieve this, check HSMs and load (or re-load) keys onto them as necessary, and update
Merged Key contents.
l Ensure that the individual key IDs within each Merged Key are valid:•Remove any that are no
longer valid and usable (e.g. those for a removed HSM).
l Update the preload file to reflect changes, if any.
l When finished, sleep for an interval of time, then repeat.
In summary, this mode attempts to keep preloaded crypto objects present on all usable modules in a
security world (or a set of modules if requested via the -m argument) for as long as preload is running,
with a keyID that remains constant, so that keys are available for use by any applications sharing the
preload session.
The automatic loading/reloading of keys onto usable modules is not to be confused with
forced reloading of keys provided by the -R option.
Due to the fact that in high availability mode keys are represented as MergedKeys, which do not
correspond to any one particular module, the module element of the preload file is no longer relevant for
keys. However, for cardsets, the module field is still utilised.
For symmetric and private halves of asymmetric keys the module number is represented as a '-1' and for
public halves of asymmetric keys the module number is represented as a '-2'.
This is evident in the output from nfkminfo. (Note that nfkminfo ignores the 32-bit two's-complement
representation, thus displaying -1 and -2 as (232 - 1) and (232 - 2) respectively: 4294967295 and
4294967294):
To make nfkminfo show the preloaded objects, run it as a 'subprocess' as part of the preload command.
(see above section on using preload)
Merged Key IDs (just like single-key IDs) are shared between multiple instances of preload
that are invoked by the same client (i.e. using the same ClientID). As such, applications must
ensure that they perform no operations that delete or replace the merged key ID, or alter the
keys that are part of that merged key ID.
Once per interval, if preload detects modules (new or existing) without the relevant crypto objects
(keys/cards) present, it will attempt to load those missing objects.
This polling interval is configurable via the command line option --polling-interval=SECONDS
In high availability mode, there are situations where OCS/keys that have previously timed out, or reached
maximum use limits, may be reloaded (and thus their limits reset) without user interaction. In general
within high availability mode keys that have timed out or reached their use limits will be left in place,
unusable, respecting the limits. However if the module containing those keys reboots or resets then,
upon the module's return, preload will notice that the keys are not loaded and will load them. This
reloading of keys will necessarily reset timeouts and use limits. If the timeout on an OCS has reached its
limit, any keys protected by that OCS will not be reloaded on newly-indoctrinated modules in the security
world.
Therefore when preload is invoked with exit (or a short-lived 'subprocess' command) it will load the
specified keys but then exit, leaving those keys unmaintained.
If a preload process is already running under high availability mode, any new preload process (with the
same preload file) will gain access to the preloaded keys. As such that later instance must also be run in
high availability mode (and preload will reject an attempt to run it in plain mode in this situation).
The pause command may be useful for setting up availability of keys for subsequent use by multiple
applications:
First, a long-running preload instance to load keys and maintain them indefinitely:
This would load the softcard softcard1 on all modules as well as the key simple_softcard1 :
The evidence that the first preload process is still managing the key simple_softcard1 , even though the
second preload process could have loaded it, is in the objectid .
However, note that fips auth is represented differently, in comparison to other high availability mode keys,
within the preload file.
The FIPS auth key is represented in the preload file multiple times: once for each module it is loaded on,
and one extra time with a negative module ID as with other merged IDs. However the objectid is still a
Mergedkey so will remain the same across those entries. This duplication of entries is to maintain
compatibility with legacy behaviour/applications.
The following shows the pre-loaded FIPS auth objects on an estate of 3 modules - note there are 4
entries, each with the same objectid :
l -o --any-one
l -i --interactive
l exit
l --admin
l --reload-everything
D.8 Logging
By default preload logs to stderr .
e.g.
Preload can also log to a file, this behaviour is separate from stderr logging. Therefore we can disable
logging or log to stderr and/or a file.
To disable stderr logging, use the command line option -S. To enable file logging use the command line
option -l.
To change the file location, use the command line option --log-file=FILE
l DEBUG
l INFO
l WARNING
l ERROR
l CRITICAL
The log level is by default: INFO and can be changed via the command line option --log–level=LEVEL
Python:
import nfkm
If the existingobjects argument is the empty string, the connection will use the file from the default
location.
Python:
world_info = nfkm.getinfo(conn)
This results in a data structure with all the preloaded objects (this list is static and created at the time of
connection creation):
Python:
import nfkm
conn = nfkm.connection(existingobjects="")
world_info = nfkm.getinfo(conn)
print world_info.existingobjects
Result:
[
ExistingObjectInfo
.module= 2
.hash= 84749a62 d0f71db7 f80c5df6 469c1168 5f7f1b78
.change= 1
.id= 0xffffffff88afd208,
ExistingObjectInfo
.module= 1
.hash= 84749a62 d0f71db7 f80c5df6 469c1168 5f7f1b78
.change= 1
.id= 0xffffffff88afd20b
]
Once an application has the M_KeyID references, it can use those cryptographic objects:
objid = world_info.existingobjects[0].id
print conn.transact(cmd)
Result:
Reply.cmd= GetLogicalTokenInfo
.status= OK
.flags= 0x0
.reply.state= Present
.hkt= 84749a62 d0f71db7 f80c5df6 469c1168 5f7f1b78
.shares= empty
.sharesneeded= 0
Variable Description
NFAST_DEBUG This variable enables debug logging for the PKCS #11
library. You must set NFAST_DEBUG equal to a value
in the range 1 – 7 for debug messages to be logged
(see "Logging, debugging, and diagnostics" on
page 305). For more information, see also "Logging
and debugging information for PKCS #11" on
page 310 .
Variable Description
NFAST_USER_LOGDIR This variable specifies the location of log files that are
specific to each user.
NFAST_NFKM_TOKENSFILE This variable sets the default values for a file in which
ClientID and KeyIDs are stored by the preload com-
NFAST_NFKM_TOKENSSELECT mand-line utility.
NFAST_SEE_MACHINEENCKEY_ module This variable is the name of the SEEConf key needed
to decrypt the SEE-machine image targeted for the
specified module. It overrides NFAST_SEE_
MACHINEENCKEY_DEFAULT for the specified
module. Running the command loadmache --
encryptionkey=IDENT (or loadmache --unencrypted )
overrides any value set by this variable.
NFAST_SEE_MACHINEIMAGE_ module This variable is the path of the SEE machine image to
load on to the specified module. If set, this variable
overrides the use of NFAST_SEE_MACHINEIMAGE_
DEFAULT for the specified module. Supplying the
machine-filename parameter when running the
loadmache command-line utility overrides the
NFAST_SEE_MACHINEIMAGE_ module variable. This
variable is not affected when running the loadsee-
setup or hsc_loadseemachine utilities.
Variable Description
NFAST_SEE_MACHINESIGHASH_ module This variable is the key hash of the vendor signing
key (seeinteg ) that signs SEE machine images for the
specified module. It overrides NFAST_SEE_
MACHINESIGHASH_DEFAULT for the specified
module. This variable is only required if you are using
a dynamic SEE feature with an encrypted SEE
machine. Running the command loadmache --
sighash=HASH any value set in this variable.
Variable Description
When using these environment variables to configure nShield services such as the hardserver
(nFast Server service), these must be set as System variables only; not as User Variables. Any
service for which the environment variable changes are intended must be restarted for the
change to take effect.
The current release of Security World Software uses controls for logging and debugging that
differ from those used in previous releases. However, settings you made in previous releases
to control logging and debugging are still generally supported in the current release, although
in some situations the output is now formatted differently.
Some text editors, such as Notepad, can cause NFLOG to stop working if the NFLOG file is
open at the same time as the hardserver is writing the logs.
NFLOG_FILE
This environment variable specifies the name of a file (or a file descriptor, if prefixed with the &
character) to which logging information is written. The default is stderr (the equivalent of &2 ).
Ensure that you have permissions to write to the file specified by NFLOG_FILE.
NFLOG_SEVERITY
This environment variable specifies a minimum severity level for logging messages to be written
(all log messages less severe than the specified level are ignored). The level can be one of (in
order of greatest to least severity):
1. FATAL
2. SEVERE
3. ERROR
4. WARNING
5. NOTIFICATION
6. DEBUG N (where N can be an integer from 1 to 10 inclusive that specifies increasing levels of
debugging detail, with 10 representing the greatest level of detail, although the type of output is
depends on the application being debugged.
The increasingly detailed information provided by different levels of DEBUG N is only likely to
be useful during debugging, and we recommend not setting the severity level to DEBUG N
unless you are directed to do so by Support.
NFLOG_DETAIL
This environment variable takes a hexadecimal value from a bitmask of detail flags as described
in the following table (the logdetail flags are also used in the hardserver configuration file to
control hardserver logging; see "server_settings" on page 342):
0x00000001 This flag shows the external time (that is, the external_time
time according to your machine’s local clock)
with the log entry. It is on by default.
0x00000002 This flag shows the external date (that is, the external_date
date according to your machine’s local clock)
with the log entry.
0x00000004 This flag shows the external process ID with the external_pid
log entry.
0x00000008 This flag shows the external thread ID with the external_tid
log entry.
0x00000010 This flag shows the external time_t (that is, the external_time_t
time in machine clock ticks rather than local
time) with the log entry.
0x00000020 This flag shows the stack backtrace with the log stack_backtrace
entry.
0x00000040 This flag shows the stack file with the log entry. stack_file
0x00000080 This flag shows the stack line number with the stack_line
log entry.
0x00000800 This flag shows the message file in the original msg_file
library. This flag is likely to be most useful in
conjunction with Security World Software-
supplied example code that has been written to
take advantage of this flag.
0x00001000 This flag shows the message line number in the msg_line
original library. This flag is likely to be most
useful in conjunction with example code we
have supplied that has been written to take
advantage of this flag.
0x00002000 This flag shows the date and time in UTC options_utc
(Coordinated Universal Time) instead of local
time.
0x00004000 This flag shows the full path to the file that issued options_fullpath
the log messages.
NFLOG_CATEGORIES
This environment variable takes a colon-separated list of categories on which to filter log
messages (categories may contain the wild-card characters * and ? ). If you do not supply any
values, then all categories of messages are logged. This table lists the available categories:
Category Description
gs-stub Logs general generic stub messages. (Setting this category works like
using the dbg_stub flag with the logging functionality found in previous
Security World Software releases.)
gs-stubbignum Logs bignum printing messages. (Setting this category works like using
Category Description
gs-stubinit Logs generic stub initialization routines. (Setting this category works like
using the dbg_stubinit flag with the logging functionality found in previous
Security World Software releases.)
gs-dumpenv Logs environment variable dumps. (Setting this category works like using
the dbg_dumpenv flag with the logging functionality found in previous
Security World Software releases.)
pkcs11-sam Logs all security assurance messages from the PKCS #11 library.
Category Description
pkcs11 Logs all other messages from the PKCS #11 library.
rqcard-core Logs all card-loading library operations that involve standard message
passing (including slot polling).
rqcard-ui Logs all card-loading library messages from the current user interface.
You can set a minimum level of hardserver logging by supplying one of the values for the NFLOG_
SEVERITY environment variable in the hardserver configuration file, and you can likewise specify one or
more values for the NFLOG_CATEGORIES environment variable. For detailed information about the
hardserver configuration file settings that control logging, see "server_settings" on page 342.
If none of the four environment variables are set, the default behavior is to log nothing, unless
this is overridden by any individual library. If any of the four variables are set, all unset
variables are given default values.
Depending on whether the program you wish to debug is 64-bit or 32-bit based, you will have to create
respective registry keys if they do not already exist.
For a 64-bit program on a 64-bit OS, or a 32-bit program on a 32-bit OS, create the following registry key
if it does not already exist: HKEY_LOCAL_MACHINE\Software\nCipher\CryptoNG
Open the registry at the required Cryptography key as described above, and under the key create the
following variables.
Value Output
2 Function calls and error messages are sent to the log file.
Do not set this value to 3 unless either you are asked to do so by Support or you are
debugging your own code. At this level of logging, a single SSL connection generates
approximately 30 kilobytes of log messages. In addition, sensitive information may
appear in the log file.
If LogLevel is not set, then the provider only logs messages of warning severity or
greater (equivalent to setting NFLOG_SEVERITY=warning ).
If neither PathName nor LogLevel are set for the CSP or CNG, logging remains disabled.
If logging is successfully enabled, the log file(s) should appear at the location specified in PathName , and
will have names similar to:
l nfdebug.txt
l ncspdddebug.txt
l nckspswdebug.txt
In order to get PKCS #11 logging and debugging output, you must set the CKNFAST_DEBUG variable. A
debug output file (with path) can also be set using the CKNFAST_DEBUGFILE variable. These variables
can be set in the environment or %NFAST_HOME%\cknfastrc file. Normally settings in the environment
should override the same settings (if any) in the cknfastrc file. You can specify any appropriate PKCS #11
categories using the NFLOG_CATEGORIES environment variable.
To produce PKCS #11 debug output, the CKNFAST_DEBUG variable can be a given value from 1 through
to 11, where the greater the value the more detailed debug information is provided. A value of 7 is a
reasonable compromise between too little and too much debug information. A value of 0 switches the
debug output off.
This environment variable takes a colon-separated list of categories on which to filter log messages
(categories may contain the wildcards characters * and ? ).
The following table maps PKCS #11 debug level numbers to the corresponding NFLOG_SEVERITY value:
0 DL_None NONE
You set the debugging level as a decimal number. To determine this number:
1. Select the debugging information that you want from the following list:
2. Add together the hexadecimal value associated with each type of debugging information.
For example, to set NFJAVA_DEBUGGING and MESS_NOTIFICATIONS, add 0x00000080 and
0x00000001 to make 0x00000081.
3. Convert the total to a decimal and specify this as the value for the variable.
For example, to set NFJAVA_DEBUGGING and MESS_NOTIFICATIONS, include the line:
NFJAVA_DEBUG=129
Set these variables only when developing code or at the request of Support.
Debug output contains all commands and replies sent to the hardserver in their entirety,
including all plain texts and the corresponding cipher texts as applicable.
Besides the diagnostic tools described in this section, we also supply a performance tool that
you can use to test Web server performance both with and without an nCipher HSM. This tool
is supplied separately. If you require a copy, contact your Sales representative.
Under normal operating conditions, you do not need to run nfdiag . You can run nfdiag before contacting
Support and include its output file with any problem report.
F.2.1.1 Usage
Run nfdiag with the standard -h |--help option to display information about the options and
parameters that control the program’s behavior.
The nfdiag command-line utility is an interactive tool. When you run it, it prompts you to supply the
following information:
which application(s) Identify all application software installed on the machine on which any
you are using problem with the nCipher product occurs.
what APIs you are Describe any custom software, especially any interaction it has with the
using nShield security system.
a description of the Include as much detail as possible, including any error messages you
problem have seen.
a Support ticket When you contact Support you are supplied with a Support ticket number.
number (if you have Enter this number to help Support expedite the collection of any
one) information you have sent.
a contact email address Supply an email address that has as few e-mail/spam filters as possible so
that any additional files that Support sends to you are not blocked. We use
the e-mail address you supply here only for communication directly
related to your problem report.
a contact name Enter your name (or the name of an appropriate person for contact by
Support).
a contact telephone Include the appropriate country and any region code for your contact
number telephone number.
any additional By default, nfdiag asks if you want to supply any additional diagnostic files.
diagnostic file(s) If you do not want to supply additional diagnostic files, type N, or Enter to
continue.
l Type Y.
Except for a Support ticket number, nfdiag requires non-NULL answers to all its prompts for
information.
Supplying this information helps nfdiag capture as much relevant information as possible for any problem
report to Support. As you supply information at each prompt in turn, press Enter to confirm the
information and continue to the next prompt. Information you supply cannot extend over multiple lines,
but if you need to supply this level of information, you can include it in additional attached files, as
described.
By default, nfdiag runs in verbose mode, providing feedback on each command that it executes and
which log files are available. If the system is unable to execute a command, the verbose output from
nfdiag shows where commands are stalling or waiting to time out.
At any time while nfdiag is running, you can type Ctrl-C to cancel its current commands and re-run it.
F.2.1.2 Output
After you have finished supplying information for each required prompt, nfdiag generates a plain text
output file and displays its file name.
If the file %NFAST_HOME%\log\logfile exists, nfdiag automatically includes this file in its output. If the file
%NFAST_HOME%\log\logfile does not exist, nfdiag warns you that it could not process this file. This
warning does not affect the validity of the generated output file.
l The contents of the following log files (if they are available):
o hardserver.log
o keysafe.log
o cmdadp.log
o ncsnmpd.log
l Any attached diagnostic files
Because the contents of the output file are plain text, they are human readable. You can choose to view
the output file to ensure no sensitive information has been included.
The nfdiag utility does not capture any pass phrases in the output file.
You view the tamper log using the nShield Connect front panel, by selecting System > System information >
View tamper log. You cannot erase the tamper log.
F.2.2.1 Usage
This option specifies that you want to display general information about the Security World. These options
are the default and need not be included explicitly.
-r |--repeat
This option displays the information repeatedly. There is a pause at the end of each set of information.
The information is displayed again when you press Enter.
-p |--preload-client-id
This option lists keys without key names. If APPNAME is specified, only keys for these applications are
listed.
-l|--name-list [APPNAME[IDENT]]
This option lists keys with their names. If APPNAME is specified, only keys for these applications are listed.
If IDENT is listed, only the keys with the specified identifier are listed.
-c|--cardset-list [TOKENHASH]
If TOKENHASH is not specified, this option lists the card sets associated with the Security World.
If TOKENHASH is specified, these options list the details of the card identified by hash.
Cardset
name "name"
k-out-of-n 1/1
flags Persistent PINRecoveryForbidden(disabled) !RemoteEnabled
timeout none
card names ""
hkltu hash
gentime 2005-10-14 10:56:54
Keys protected by cardset hash:
AppName app Ident keyident
AppName app Ident keyident
... ... ... ...
-s|--softcard-list [TOKENHASH]
This option works like the -c|--cardset-list option, except it lists softcards instead of card sets. If
TOKENHASH is not specified, this option lists the softcards associated with the Security World.
generation 1
state 0x70000 Initialised Usable Recovery !PINRecovery
!ExistingClient !RTC !NVRAM !FTO !SEEDebug
n_modules 1
hknso hash_knso
hkm hash_km
hkmwk hash_knwk
hkre hash_kre
hkra hash_kra
ex.client none
...
...
Module #1
generation 1
state 0x1 Useable
flags 0x10000 ShareTarget
n_slots 2
esn 34F3-9CB4-753B
hkml hash_kml
Module #1 Slot #0 IC 11
generation 1
phystype SmartCard
slotlistflags 0x2
state 0x4 Operator
flags 0x20000 RemoteEnabled
shareno 2
shares
error OK
Cardset
name "fred"
k-out-of-n 1/2
flags NotPersistent
timeout none
card names "" ""
hkltu hash_kt
Module #1 Slot #1 IC 0
generation 1
phystype SmartCard
slotlistflags 0x2 SupportsAuthentication
state 0x4 Admin
flags 0x10000 Pass phrase
shareno 1
shares LTNSO(PIN) LTM(PIN) LTR(PIN) LTNV(PIN) LTRTC(PIN) LTDSEE(PIN)
LTFTO(PIN)
error OK
No Cardset
No Pre-Loaded Objects
F.2.2.2.1 World
nfkminfo reports the following information about the Security World:
generation
state
Initialised
Usable
This indicates that there is at least one usable HSM in this Security World on this host.
!Usable
This indicates that there are no usable HSMs in this Security World on this host.
Recovery
This indicates that the Security World has the OCS and softcard replacement and the key
recovery features enabled.
!Recovery
This indicates that the Security World has the OCS and softcard replacement and the key
recovery features disabled.
AdminAuthRequired
This indicates that additional authorization is required for the following operations:
l Key generation
l Public key import
l Operator cardset creation
l Softcard creation.
This authorization is supplied by presenting any operator or admininstration card from the
same Security World. A pass phrase is not required:
ExistingClient
This indicates that there is a Client ID set, for example, by preload . This Client ID is given in
the ex.client output if the --preload-client-id flag was supplied.
!ExistingClient
This indicates that no Client ID is set. The ex.client output will be empty.
AlwaysUseStrongPrimes
This indicates that the Security World always generates RSA keys in a manner compliant
with FIPS 186-3.
!AlwaysUseStrongPrimes
This indicates that the Security World leaves the choice of RSA key generation algorithm
to individual clients.
SEEDebug
This indicates that the Security World has an SEE Debugging delegation key.
!SEEDebug
This indicates the Security World has no SEE Debugging delegation key.
SEEDebugForAll
PINRecovery
This indicates that the Security World has the pass phrase replacement feature enabled.
!PINRecovery
This indicates that the Security World has the pass phrase replacement feature disabled.
FTO
This indicates that the Security World has an FTO delegation key.
!FTO
This indicates that the Security World has no FTO delegation key.
NVRAM
This indicates that the Security World has an NVRAM delegation key.
!NVRAM
This indicates that the Security World has no NVRAM delegation key.
RTC
This indicates that the Security World has an RTC delegation key.
!RTC
This indicates that the Security World has no RTC delegation key.
AuditLogging
This indicates that Audit Logging is enabled for this Security World.
!AuditLogging
This indicates that Audit Logging is not enabled for this Security World.
n_modules
hknso
hkm
hkmwk
This indicates the SHA-1 hash of a dummy key used to load the Administrator Card Set (the dummy key is
the same on all HSMs that use Security Worlds and is not secret).
hkre
hkra
ex.client
This indicates the ClientID required to use any pre-loaded keys and tokens.
k-out-of-n
other quora
This indicates the number (quora) of Administrator Cards (K) required to perform certain other functions
as configured for this Security World.
ciphersuite
This indicates the name of the Cipher suite that the Security World uses.
Mode
none
This indicates that the Security World is in an unregulated mode. The Security World can
be configured to meet the needs of your security policy. This includes, but is not limited to,
creating a Security World that is compliant with FIPS140-2 level 2.
fips1402level3
This indicates that the Security World is in a mode compliant with FIPS140-2 level 3.
commoncriteriacmts
This indicates that the Security World is in a mode compliant with Common Criteria
Protection Profile EN 419 221-5, for Cryptographic Modules for Trust Services.
Assigned Keys
max usage
This indicates the maximum key usage reauthorization condition for Assigned Keys.
(common-criteria-cmts mode only).
max timeout
This indicates the maximum key timeout reauthorization condition for Assigned Keys
(common-criteria-cmts mode only).
F.2.2.2.2 Module
For each HSM in the Security World, nfkminfo reports:
generation
state
PreInitMode
InitMode
Unknown
Usable
This indicates that the HSM is programmed in the current Security World and can be
used.
Uninitialized
This indicates that the HSM does not have the Security Officer’s key set and that the HSM
must be initialized before use.
Factory
This indicates that the HSM has module key zero only and that the Security Officer’s key
is set to the factory default.
Foreign
AccelOnly
Unchecked
This indicates that, although the HSM appears to be in the current Security World,
nfkminfo could not find a module initialization certificate (a module_ESN file) for this HSM.
Failed
For internal security modules running firmware 2.61.2 and above, use the enquiry utility
for further information about the failure reason, or look for hardware errors in the
hardserver log.
MaintMode
flags
This displays ShareTarget if the HSM has been initialized to allow reading of remote card sets.
n_slots
This indicates the number of slots on the HSM (there is one slot for each physical smart card reader, one
slot for each soft token, one slot for each available Remote Operator slot and one slot for each associated
Dynamic Slots).
esn
This indicates the electronic serial number of the HSM (if the HSM is not in the Usable state, the electronic
serial number may not be available).
hkml
This indicates the hash of the HSM signing key (if the HSM is not in the Usable state, this value may not be
available).
F.2.2.2.3 Slot
For each slot on the HSM, nfkminfo reports:
IC
This indicates the insertion count for this slot (which is 0 if there is no card in the slot).
generation
phystype
l SmartCard
l SoftToken
slotlistflags
These are flags describing the capabilities of the slot. Single letters in parentheses are the flag codes
reported by the slotinfo utility:
0x2
(A) SupportsAuthentication
This indicates that the slot supports token-level challenge-response authentication.
0x40000
(R) RemoteSlot
This indicates that the slot is a Remote Operator slot that has been imported from a
remote HSM.
0x80000
(D) DynamicSlot
This indicates that it is a Dynamic Slot.
0x100000
(a) Associated
This indicates that a nShield Remote Administration Client has associated a card reader
with this Dynamic Slot.
0x200000
(t) TimedOut
This indicates that no response has been received from the smartcard in this Dynamic
Slot within the configured timeout.
0x400000
(f) SecureChannelFailed
This indicates that the secure channel between the HSM and the smartcard in this
Dynamic Slot has failed in some way.
state
Blank
Admin
This indicates that the smart card in the reader is part of the Administrator Card Set.
Empty
Error
This indicates that the smart card in the reader could not be read (the card may be from a
different Security World).
Operator
This indicates that the smart card in the reader is an Operator Card.
flags
This displays pass phrase if the smart card requires a pass phrase.
shareno
This indicates the number of the card within the card set.
shares
If the card in the slot is an Operator Card, no values are displayed for shares.
If the card in the slot is an Administrator Card, values are displayed indicating what key shares are stored
on the card. Each share is prefixed with the letters LT (Logical Token), and the remaining letters identify
the key (for example, the value LTNSO indicates that a share of KNSO, the Security Officer’s key, is stored
on the card).
error
This indicates the error status encountered if the smart card could not be read:
OK
TokenAuthFailed
This indicates that the smart card in the reader failed challenge response authentication
(the card may come from a different Security World).
PhysTokenNotPresent
If you purchased a developer kit, you can refer to the relevant developer documentation for a full list of
error codes.
name
k-out-of-n
flags
NotPersistent
Persistent
NotRemoteEnabled
This indicates that the card in the slot is not from a Remote Operator Card Set.
RemoteEnabled
This indicates that the card in the slot is from a Remote Operator Card Set.
PINRecoveryForbidden(disabled)
This indicates that the card in the slot does not have pass phrase replacement enabled.
This is always true if pass phrase replacement is disabled for the Security World.
PINRecoveryRequired(enabled)
This indicates that the card in the slot does have pass phrase replacement enabled.
timeout
the period of time in seconds after which the HSM automatically removes the Operator Card Set. If
timeout is set to none , the Operator Card Set does not time out.
card
lists the names of the cards in the set, not all software can give names to individual cards in a set.
hkltu
Run perfcheck with the standard -h |--help option to display information about the options and
parameters that control the program’s behavior.
l kx (key exchange)
l keygen (key generation)
l signing (signing)
l verify (verification)
l enc (encryption)
l dec (decryption)
l misc (miscellaneous).
To see the list of tests available in a particular suite, run a command of the form:
For example, to list all the signing tests, run the command:
In the output, each listed test in the suite is identified with a number. You must supply the number of the
desired test, along with its suite, in a command of the form:
perfcheck suite:test_number
For example, to use test 16 of the signing suite, run the command:
perfcheck signing:16
This command first produces some output containing information about operating environment. Then it
produces additional output of the following form:
Output from test suites, such as that in the example, includes the following information:
Value Description
Reps This value shows the number of repetitions of the test that have been run.
Generally, a larger number of repetitions produces more accurate data.
You can specify the number of repetitions by setting the --
repetitions=REPS option.
Total time This value shows the total time in seconds taken to run all repetitions of
the test.
Mean time This value shows the average time in seconds taken to run for one
repetition of the test. (This value is calculated by dividing the value of Total
time by the value of Reps).
Std dev This value shows the standard deviation in the Mean time . If this value is
high, it indicates that a large number of repetitions are necessary in order
for the throughput figure to be meaningful. You can suppress calculation
of the standard deviation by running perfcheck with the --no-std-dev
option; in some cases, setting --no-std-dev can increase throughput.
Value Description
computer again. This includes the time the command spends going over
the network.
Because an HSM can execute several commands at once, throughput is maximized by ensuring there is
always at least one command in the unit hardserver queue (so that there are always commands
available to give to the HSM).
The perfcheck utility sends multiple simultaneous nCore commands to keep the HSM busy. It can send
more commands if a required number of repetitions has not yet been reached.
After sending some initial commands, perfcheck begins marking commands with the time at which are
submitted; when a command comes back with a timestamp, perfcheck checks the amount of time
needed to complete the command and updates the values for Std dev and Latency. The value of Total
time is the amount of time from sending the first job to receiving the final one.
F.2.4.1 Usage
F.2.4.2 Output
Running the stattree utility displays a snapshot of statistics currently available on the host machine.
Statistics are gathered both by the hardserver (relating to the server itself, and its current clients) and by
each attached HSM.
Times are listed in seconds. Other numbers are integers, which are either real numbers, IP addresses, or
counters. For example, a result -CmdCount 74897 means that there have been 74,897 commands
submitted.
+PerModule:
+#1:
+ModuleObjStats:
-ObjectCount 5
-ObjectsCreated 5
-ObjectsDestroyed 0
+ModuleEnvStats:
-MemTotal 15327232
-MemAllocKernel 126976
-MemAllocUser 0
+ModuleJobStats:
-CmdCount 169780
-ReplyCount 169778
-CmdBytes 3538812
-ReplyBytes 4492764
-HostWriteCount 169772
-HostWriteErrors 0
-HostReadCount 437472
-HostReadErrors 0
-HostReadEmpty 100128
-HostReadDeferred 167578
-HostReadTerminated 0
-PFNIssued 102578
-PFNRejected 1
-PFNCompleted 102577
-ANIssued 1
-CPULoadPercent 0
+ModuleSerialStats:
-HostReadCount 437476
-HostReadDeferred 167580
-HostReadReconnect 167579
-HostReadErrors 0
-HostWriteCount 169774
-HostWriteErrors 0
PerModule , ModuleObjStats, and ModuleEnvStats are node tags that identify classes of statistics. #1
identifies an instance node.
ObjectCount, MemTotal, and the remaining items at the same level are statistics IDs. Each has a
corresponding value.
If node is provided, stattree uses the value given as the starting point of the tree and displays only
information at or below that node in the tree. Values for node can be numeric or textual. For example, to
view the object counts for local module number 3:
+#3:
+#ModuleObjStats:
-ObjectCount 6
-ObjectsCreated 334
-ObjectsDestroyed 328
The value of node must be a node tag; it must identify a node in the tree and not an individual statistic.
Thus, the following command does not work:
Category Contains
ModuleJobStats This tag holds statistics for the Security World Software commands (jobs)
processed by this HSM.
ModulePCIStats This tag does not apply to an nShield Edge. This tag holds statistics for the
PCI connection between the HSM and the host computer.
ModuleSerialStats This tag is for an nShield Edge only. It holds statistics for the serial
connection between the HSM and the host computer.
ServerGlobals Aggregate statistics for all commands processed by the hardserver since
it started.
The standard statistics (as described below) apply to the commands sent
from the hardserver to HSMs. Commands processed internally by the
server are not included here. The Uptime statistic gives the total running
time of the server so far.
Connections Statistics for connections between clients and the hardserver. There is
one node for each currently active connection. Each node has an instance
number that matches the log message generated by the server when that
client connected. For example, when the hardserver message is
Information: New client #24 connected , the client’s statistics appear under
node #24 in the stattree output.
PerModule Statistics kept by the HSMs. There is one instance node for each HSM,
numbered using the standard HSM numbering. The statistics provided by
each HSM depend on the HSM type and firmware version.
ModuleObjStats Statistics for the HSM’s Object Store, which contains keys and other
resources. These statistics may be useful in debugging applications that
Category Contains
ID Value
Uptime The length of time (in seconds) since an HSM was last reset, the
hardserver was started, or a client connection was made.
CmdCount The total number of commands sent for processing from a client to the
server, or from the server to an HSM. Contains the number of commands
currently being processed.
ReplyCount The total number of replies returned from server to client, or from HSM to
server.
CmdBytes The total length of all the command blocks sent for processing.
ReplyBytes The total length of all the reply blocks received after completion.
CmdMarshalErrors The number of times a command block was not understood when it was
received. A nonzero value indicates either that the parties at each end of a
connection have mismatched version numbers (for example, a more
recent hardserver has sent a command to a less recent HSM that the
HSM does not understand), or that the data transfer mechanism is faulty.
ReplyMarshalErrors The number of times a reply was not understood when it was received. A
nonzero value indicates either that the parties at each end of a connection
have mismatched version numbers (for example, a more recent
hardserver has sent a command to a less recent HSM that the HSM does
not understand), or that the data transfer mechanism is faulty.
ClientCount The number of client connections currently made to the server. This
appears in the hardserver statistics.
DeviceFails The number of times the hardserver has declared a device to have failed.
The hardserver provides a diagnostic message when this occurs.
DeviceRestarts The number of times the hardserver has attempted to restart an HSM
ID Value
after it has failed. The hardserver provides a Notice message when this
occurs. The message does not indicate that the attempt was successful.
QOutstanding The number of commands waiting for an HSM to become available on the
specified client connection. When an HSM accepts a command from a
client, this number decreases by 1 and DevOutstanding increases by 1.
Commands that are processed purely by the server are never included in
this count.
DevOutstanding The number of commands sent by the specified client that are currently
executing on one or more HSMs. When an HSM accepts a command from
a client, this number increases by 1 and QOutstanding decreases by 1.
Commands that are processed purely by the server are never included in
this count.
LongOutstanding The number of LongJobs sent by the specified client that are currently
executing on one or more HSMs. When an HSM accepts a LongJobs
command from a client, this number increases by 1 and QOutstanding
decreases by 1. Commands that are processed purely by the server are
never included in this count.
RemoteIPAddress The remote IP address of a client who has this connection. A local client
has the address 0.0.0.0.
HostWriteCount The number of write operations (used to submit new commands) that
have been received by the HSM from the host machine. One write
operation may contain more than one command block. The operation is
most efficient when this is the case.
HostWriteErrors The number of times the HSM rejected the write data from the host. A
nonzero value may indicate that data is being corrupted in transfer, or that
the hardserver/device driver has got out of sync with the HSM’s interface.
HostWriteBadData Not currently reported by the HSM. Attempts to write bad data to the HSM
are reflected in HostWriteErrors.
HostWriteOverruns Not currently reported by the HSM. Write overruns are reflected in
HostWriteErrors.
HostWriteNoMemory Not currently reported by the HSM. Write failures due to a lack of memory
are reflected in HostWriteErrors.
HostReadCount The number of times a read operation to the HSM was attempted. The
HSM can defer a read if it has no replies at the time, but expects some to
be available later. Typically the HSM reports HostReadCount in two
places: the number under ModuleJobStats counts a deferred read twice,
once when it is initially deferred, and once when it finally returns some
ID Value
HostReadErrors The number of times a read to an HSM failed because the parameters
supplied with the read were incorrect. A nonzero value here typically
indicates some problem with the host interface or device driver.
HostReadEmpty The number of times a read from the HSM returned no data because
there were no commands waiting for completion. In general, this only
happens infrequently during HSM startup or reset. It can also happen if
PauseForNotifications is disabled.
HostReadDeferred The number of times a read operation to the HSM was suspended
because it was waiting for more replies to become available. When the
HSM is working at full capacity, a sizeable proportion of the total reads are
likely to be deferred.
HostReadTerminated The number of times an HSM had to cancel a read operation which has
been deferred. This normally happens only if the clear key is pressed
while the HSM is executing commands. Otherwise it might indicate a
device driver, interface, or firmware problem.
ChanJobsIssued The number of fast channel jobs issued to the HSM. The fast channel
facility is unsupported on current HSMs. This number should always be 0 .
ChanJobsCompleted The number of fast channel jobs completed by the HSM. The fast channel
facility is unsupported on current HSMs. This number should always be 0 .
ID Value
HostIRQs On PCI HSMs, the total number of interrupts received from the host. On
current HSMs, approximately equal to the total of HostReadCount and
HostWriteCount.
HostDebugIRQs On PCI HSMs, the number of debug interrupts received. This is used only
for driver testing, and should be 0 in any production environment.
HostUnhandledIRQs On PCI HSMs, the number of unidentified interrupts from the host. If this is
nonzero, a driver or PCI bus problem is likely.
HostReadReconnect On PCI HSMs, the number of deferred reads that have now completed.
This should be the same as HostReadDeferred , or one less if a read is
currently deferred.
ObjectsCreated The number of times a new object has been put into the object store. This
appears under the HSM’s ModuleObjStats node.
ObjectsDestroyed The number of items in the HSM’s object store that have been deleted and
their corresponding memory released.
ObjectCount The current number of objects (keys, logical tokens, buffers, SEE Worlds)
in the object store. This is equal to ObjectsCreated minus
ObjectsDestroyed . An empty HSM contains a small number of objects that
are always present.
CurrentTempC The current temperature (in degrees Celsius) of the HSM main circuit
board. First-generation HSMs do not have a temperature sensor and do
not return temperature statistics.
ID Value
MemTotal The total amount of RAM (both allocated and free) available to the HSM.
This is the installed RAM size minus various fixed overheads.
MemAllocKernel The total amount of RAM allocated for kernel (that is, non-SEE) use in an
HSM. This is principally used for the object store (keys, logical tokens, and
similar) and for big-number buffers.
MemAllocUser The total amount of RAM allocated for user-mode processes in the HSM
(0 for non-SEE use). This includes the size of the SEE Machine image, and
the total heap space available to it. The HSM’s kernel does not know (and
does not report in the statistics) how much of the user-mode’s heap is
currently free, and how much is in use.
SystemFans The fan speed (RPM) for each fan in the HSM.
Therefore, after restoring power to a module, you must reload any keys that had been loaded onto it
before it lost power. After reloading, the KeyIDs are different.
Likewise, after restoring power to a module, you must reload any cards that were loaded onto it before it
lost power.
If you are using multiple nCipher modules in the same Security World, and have the same key
(or keys) loaded onto each module as part of a load-sharing configuration, loss of power to
one module does not affect key availability (as long as at least one other module onto which
the keys are loaded remains operational). However, in such a multiple-module system, after
restoring power to a module, you must still reload any keys to that module before they can be
available from that module.
The module configuration files are stored on the internal file system of the nShield Connect. They are
updated automatically when the nShield Connect is configured from the front panel. The configuration
files are also exported automatically to the remote file system, where they can be edited manually and
reloaded on the nShield Connect, if required. For more information, see "About user privileges" on
page 70.
The client configuration files are stored in the client’s file system. The client’s hardserver can also be set
up using environment variables. Environment variable settings override settings in the client configuration
files. For more information, see "Setting environment variables" on page 91.
File Description
config The master configuration file. This contains the current configuration for
the client. It is always present in the directory.
config-default The default configuration file. This can be used to restore factory settings
for the client. It is created by the cfg-mkdefault utility.
You can also save backup copies of configuration files in this directory.
In this path, ESN is the electronic serial number of the network nShield Connect from which the files were
exported. This directory contains the master configuration file config , which specifies the current
configuration for the nShield Connect. It is always present in the directory.
The remote file system information is also contained in the client configuration file section remote_file_
system.
Lines starting with a # character are comments and are ignored. Some comments that document the
configuration options are generated by the configuration process. You can add your own comments, but
in some cases they may later be overwritten.
A configuration file begins with a single line that specifies the version of the file syntax. This syntax-
version line has the format:
syntax-version=n
In this syntax-version line example, n represents the version of the syntax in which the file is written. The
system can process a file with a lower syntax version than the one it uses, but not one with a higher
version.
After the syntax-version line, the rest of the configuration file consists of sections that can be edited to
control different aspects of nShield Connect or client behavior. Each section begins with its name in
square brackets, as in this example:
[slot_imports]
Module configuration files and client configuration files have some sections in common, and some
specific to the type of file:
dynamic_slots cosmod
slot_mapping hs_clients
dynamic_slot_timeouts rfs_client
sys_log
config_op
ui_lockout
remote_sys_log
You can update the parameters defined in most of these sections to configure the way that the
hardserver handles secure transactions between the nShield Connect and applications that run on the
client.
Some sections are updated automatically and should not be edited manually. For more
information, see the descriptions of individual sections.
In each section, the bracketed name is followed by a specified set of fields. Each field is on a separate
line. Each field begins with its name, followed by an equals sign (=) and a value of the appropriate type.
White space can be included at either end of the line (for example, in order to indent lines as an aid to
clarity).
Some types of field are grouped into entries. An entry is a set of fields of different types that define an
instance of an object (for example, a particular client as distinct from other clients). Entries in the same
section are separated by a line that contains one or more hyphens (- ). Blank lines and comments are
allowed between the fields in an entry.
Strings are case sensitive in the section names and field names.
Multiple clients can be added to one configuration file by separating each client entry from the
next with a line consisting of one or more hyphens.
If a particular section is not present in the configuration file, it is assumed to have no entries.
G.4.1 nethsm_settings
The nethsm_settings section defines settings specific to the nShield Connect. The section contains the
following fields:
Field Description
enable_impath_ When set to the default yes value, this field enables impath resilience for
resilience the module. Setting this field to no disables impath resilience.
impath_resilience_ This field specifies the interval of time that must pass for a resumable
timeout impath resilience session to expire. In the event of network errors, clients
can reconnect and resume use of keys and other loaded objects until the
specified interval has passed (after which all previously loaded objects
Field Description
must be reloaded).
Specify this interval either in the form Nt, where N is an integer and t is s for
seconds, m for minutes, h for hours, d for days, or w for weeks, or as never
(in which case sessions never expire). If you specify N but not t, the
seconds are assumed. The default setting 604800 (604800 seconds is 1
week).
G.4.2 nethsm_eth
The nethsm_eth section defines the Ethernet interfaces for the nShield Connect. Each interface is defined
by an entry as follows:
Field Description
netmask The net mask for the nShield Connect. The default is 0.0.0.0.
gateway This field is retained for backwards compatibility only. The IP address of
the gateway is stored in the nethsm_gateway section and this field is set to
0.0.0.0 .
linkspeed This field specifies the link speed setting. It can be one of auto/1Gb
(nShield Connect only), 10BaseT, 10BaseT-FDX, 100BaseTX, or
100BaseTX-FDX.
G.4.3 nethsm_gateway
The nethsm_gateway section defines the default Ethernet gateway for the nShield Connect. There is one
field, as follows:
Field Description
gateway The IP address of the gateway for the nShield Connect. The default is
0.0.0.0 .
G.4.4 nethsm_route
The nethsm_route section defines the static routes for the nShield Connect. Each route is defined by an
entry as follows:
Field Description
gateway The IP address of the gateway for the route. The default is 0.0.0.0 .
G.4.5 nethsm_eth1_enable
The nethsm_eth1_enable section defines if the eth1 interface is enabled.
Field Description
enable The indicator of whether the eth1 interface is enabled or disabled (default
'no').
G.4.6 nethsm_enable
The nethsm_enable section defines whether ipv4 and or ipv6 are enabled or disabled for the interfaces
of the unit. The enable fields are:
Field Description
enable_ipv4 Indicator of whether the IPv4 protocol on the interface is enabled (default:
'yes').
enable_ipv6 Indicator of whether the IPv6 protocol on the interface is enabled (default:
'no').
enable_ipv6_static_ Indicator of whether the static IPv6 address for the interface is enabled
addr (default: 'no').
enable_ipv6_slaac Indicator of whether SLAAC on the interface is enabled (default 'no').
G.4.7 cosmod
The cosmod section defines the input configuration for the nShield Connect. The configuration is defined
by an entry as follows:
Field Description
keymap The selected layout for the keyboard connected to the nShield Connect
front panel. This value is either UK or US.
G.4.8 hs_clients
The hs_clients section defines the clients that are allowed to connect to the nShield Connect. Each client
is defined by an entry as follows:
Field Description
clientperm The type of connection permitted from the client. This is one of the
following:
keyhash The hash of the KNETI key that the client should present to authenticate
itself. Both software based authentication and nToken authentication are
supported; in the latter case, a value must also be provided for the esn
field.
esn The ESN of the client’s nToken. (Only applicable if nToken authentication
is used.)
G.4.9 rfs_client
The rfs_client section defines the remote file system where the module configuration is backed up and
the master copy of the Security World data is located, as follows:
Field Description
remote_ip The IP address of the computer on which the remote file system resides.
G.4.10 sys_log
The sys_log section defines how the nShield Connect logging works:
Field Description
behaviour The way the log is written. How the log is written is decided by setting
either of the following:
l log
l push
If log is set, the log is written only to the file system of the nShield Connect.
It is lost if the nShield Connect is rebooted. Logging stops when the file
system is full. If push is set, the log is automatically appended to the log file
in the RFS or remote syslog server at the interval specified in push_
interval.
push_interval The number of minutes between the log being appended when behaviour
is set to push, The default is 60 . The minimum is 1.
G.4.11 remote_sys_log
The remote_sys_log section defines a remote syslog server to send the nShield Connect logging
(system.log and hardserver.log) to.
Field Description
remote_syslog_ip The IP address of the remote syslog server to send logs to. The default is
0.0.0.0 .
remote_sys_log_port The UDP port of the remote syslog server to send logs to. The default is
514 .
G.4.12 config_op
The config_op section defines whether a client computer is allowed to update the module configuration
automatically (to push a configuration) from files on the client:
Field Description
push Whether the client is allowed to push configuration files to the nShield
Connect. This is decided by setting one of the following:
l ON
l OFF
remote_ip The IP address of the client that is allowed to push config files. The default
is 0.0.0.0 .
Field Description
remote_keyhash The hash of the key with which the authorized client is to authenticate
itself, or (as the default) 40 zeros to indicate no key authentication
required.
The default value for remote_keyhash (40 zeros) specifies that no authentication should occur.
We recommend specifying a key hash in place of this default.
G.4.13 ui_lockout
The ui_lockout section defines whether you can lock the nShield Connect using login settings:
Field Description
lockout_mode Controls front panel access to the nShield Connect. Set to:
l locked
Enables UI lockout without requiring a logical token.
l locked_lt
Enables UI lockout with a logical token (OCS) (requires a valid ltui_
hash to be set).
l unlocked
No UI lockout (default).
ltui_hash The hash of the logical token (LTUI) required to authorize access to the
nShield Connect menu structure when lockout_mode is set to locked_lt.
panel_poweroff This controls the function of the Power button on the nShield Connect
front panel when it is in operational mode. The default setting of yes
enables the Power button. When set to no , the Power button is disabled.
G.5.1 server_settings
The server_settings section defines the settings for the client hardserver you can modify while the
hardserver is running.
These flags are used by the NFLOG_DETAIL environment variable (see "Environment
variables to control logging" on page 305).
Field Description
loglevel This field specifies the level of logging performed by the hardserver.
It takes a value that is one of the following:
l info
l notice
l client
l remoteserver
l error
l serious
l internal
l startup
l fatal
l fatalinternal
logdetail This field specifies the level of detail logged by the hardserver. You
can supply one or more flags in a space-separated list. For more
information about the flags, see the table below.
connect_retry This field specifies the number of seconds to wait before retrying a
remote connection to a client hardserver. The default is 10.
connect_maxqueue This field specifies the maximum number of jobs which can be
queued on the hardserver. The default is 4096: this is also the
maximum value. Setting connect_maxqueue to a high value allows
high throughput, but may cause long latency if the hardserver goes
down.
accept_keepidle This field specifies the number of seconds before the first keepalive
Field Description
connect_command_block When the nShield Connect has failed, this field specifies the number
of seconds the hardserver should wait before failing commands
directed to that HSM with a NetworkError message. For commands
to have a chance of succeeding after the nShield Connect has failed
this value should be greater than that of connect_retry. If it is set to 0 ,
commands to an nShield Connect are failed with NetworkError
immediately. The default is 35.
max_pci_if_vers This field specifies the maximum PCI interface version number. If
max_pci_if_vers is set to 0 (the default), there is no limit.
enable_remote_mode If this field is set to yes (the default value) in the module configuration
file, nShield Connect mode changing using the nopclearfail utility is
enabled. If set to no , mode changing using the nopclearfail utility is
disabled.
enable_remote_reboot If this field is set to yes (the default value) in the module configuration
file, the nShield Connect remote reboot using the nethsmadmin utility
is enabled. If set to no , remote reboot using the nethsmadmin utility is
disabled.
enable_remote_upgrade If this field is set to yes (the default value) in the module configuration
file, the nShield Connect remote upgrade using the nethsmadmin
utility is enabled. If set to no , remote upgrade using the nethsmadmin
utility is disabled.
These flags are those used by the NFLOG_DETAIL environment variable (see "Environment variables to
control logging" on page 305).
You can supply a number of flags with the logdetail field, which specifies the level of detail logged by the
hardserver (see the table above). Supply the flags in a space separated list:
Flag Description
external_time This flag specifies the external time (that is, the time according to your
machine’s local clock) with the log entry.
external_date This flag specifies the external date (that is, the date according to your
machine’s local clock) with the log entry.
external_tid This flag specifies the external thread ID with the log entry.
external_time_t This flag specifies the external time_ti (that is, the time in machine clock
ticks rather than local time) with the log entry.
stack_backtrace This flag specifies the stack backtrace with the log entry.
stack_file This flag specifies the stack file with the log entry.
stack_line This flag specifies the message line number in the original library. This flag
is likely to be most useful in conjunction with example code we have
supplied that has been written to take advantage of this flag.
msg_severity This flag specifies the message severity (a severity level as used by the
NFLOG_SEVERITY environment variable) with the log entry.
msg_categories This flag specifies the message category (a category as used by the
NFLOG_CATEGORIES environment variable) with the log entry.
msg_writeable This flag specifies message writeables, and extra information that can be
written to the log entry, if any such exist.
msg_file This flag specifies the message file in the original library. This flag is likely
to be most useful in conjunction with example code we have supplied that
has been written to take advantage of this flag.
msg_line This flag specifies the message line number in the original library. This flag
is likely to be most useful in conjunction with example code we have
supplied that has been written to take advantage of this flag.
options_utc This flag showing the date and time in UTC (Coordinated Universal Time)
instead of local time.
G.5.2 server_remotecomms
The server_remotecomms section defines the remote communication settings for the client hardserver.
These are read only at hardserver start-up.
Any changes made to these fields in the Connect module config file should be followed by a reboot of the
nShield Connect.
It is not recommend that the port number be changed. If it is changed, the port number must match in the
configuration of peers. For example, if the port number is changed in the nShield Connect configuration,
the remote_port field of the nethsm_imports section of the client-side hardserver config file must be
updated to match. The port number can also be specified with the -P parameter when running
nethsmenroll.
Field Description
impath_port This field specifies the port on which the hardserver listens for incoming
impath connections. The default is 9004. Setting this field to 0 specifies
that the hardserver does not listen for incoming connections (do not set to
0 on an nShield Connect).
Make sure that firewall settings are consistent with port settings.
If you change this field you will need to re-enroll your client with the new
port value, see Enrolling the client from the command line on page 83.
impath_addr This field specifies the IP address at which the hardserver listens for
incoming impath connections. If this field is set to inaddr_any (which is the
default), the hardserver listens on all IP addresses.
impath_interface This field specifies a string representing the name of the Ethernet interface
on which the hardserver listens. This field is only examined if impath_addr
is set to inaddr_any.
G.5.3 server_startup
The server_startup section defines the settings for the hardserver that are loaded at start-up. Any
changes you make to the settings in this section do not take effect until after you restart the hardserver.
For more information, see "Stopping and restarting the client hardserver" on page 107.
Field Description
Field Description
nt_pipe_name This field specifies the name of the pipe to use for non-privileged
connections on Windows. An empty string specifies none. The default is
\\.\pipe\crypto .
nt_pipe_users This field specifies the name of the user or group who is allowed to issue
non-privileged connections on Windows. If this field is empty (which is the
default), any user can make non-privileged connections. User or group
names must be specified unqualified (e.g. bob not MYDOMAIN\bob or
bob@MYDOMAIN ).
nt_privpipe_name This field specifies the name of the pipe to use for privileged connections
on Windows. An empty string specifies none. The default is
\\.\pipe\privcrypto .
nt_privpipe_users This field specifies the name of the user or group who is allowed to make
privileged connections on Windows. If this field is empty (which is the
default), only processes running with local administrator privilege can
make privileged connections. User or group names must be specified
unqualified (e.g. bob not MYDOMAIN\bob or bob@MYDOMAIN ).
nonpriv_port This field specifies the port on which the hardserver listens for local non-
privileged TCP connections. The value 0 (which is the default) specifies
none. Java clients default to connecting to port 9000.
Make sure that your network firewall settings are correct. See the
Installation Guide for more about firewall settings.
priv_port This field specifies the port on which the hardserver listens for local
privileged TCP connections. The value 0 (which is the default) specifies
none. Java clients default to connecting to port 9001.
G.5.4 load_seemachine
The load_seemachine section of the hardserver configuration file defines SEE machines that the nShield
Connects connected to the client should load and, if required, start for use by other clients. Each SEE
machine is defined by the following fields:
Field Description
module This field specifies the nShield Connect on to which to load the SEE
machine. The value must be an integer. A nShield Connect with this ID
must be configured on the client computer.
machine_file This field specifies the file name of the SEE machine.
userdata This field specifies the userdata file name to pass to the SEE machine on
start-up. If this field is blank (" "), the SEE machine is loaded but not started.
By default, this field is blank.
worldid_pubname This field specifies the PublishedObject name to use for publishing the
KeyID of the started SEE machine. If this field is blank (" "), the KeyID is not
published. This field is ignored if the value of the userdata field is blank.
postload_prog This field specifies the program to run after loading the SEE machine in
order to perform any initialization required by the SEE machine or its
clients. The specified program must accept an argument of the form -
m module# .
postload_args This field specifies arguments to pass to the program specified by the
postload_prog field. The argument -m module# is automatically passed as
the first argument. The postload_args field is ignored if postload_prog is
not specified or is blank.
pull_rfs This field specifies whether the SEE machine name and userdata should
be pulled from the RFS. The default is no : set to yes to pull the SEE
machine and userdata from the RFS before loading on the remote nShield
Connect.
G.5.5 slot_imports
The slot_imports section defines slots from remote nShield Connects that will be available to the client.
Each slot is defined by the following fields:
Field Description
local_esn This field specifies the ESN of the local nShield Connect importing the slot.
local_slotid This field specifies the SlotID to use to refer to the slot when it is imported
on the local nShield Connect. The default is 2.
remote_ip This field specifies the IP address of the machine that hosts the slot to
import.
remote_port This field specifies the port for connecting to the nShield Connect.
remote_esn This field specifies the ESN of the remote nShield Connect from which to
import the slot.
remote_slotid This field specifies the SlotID of the slot to import on the remote nShield
Connect. The value of this field must be an integer. The default is 0.
G.5.6 slot_exports
The slot_exports section defines the slots on the HSMs connected directly to the client that the client
hardserver should export for other network HSMs to import. Each local slot has an entry for each network
nShield Connect that can import it, consisting of the following fields:
Field Description
local_esn This field specifies the ESN of the local nShield Connect whose slot can be
imported by a network nShield Connect.
local_slotid This field specifies the SlotID of the slot that is allowed to be exported. The
value must be an integer. The default is 0.
remote_ip This field specifies the IP address of the network nShield Connect that is
allowed to import the slot. Use 0.0.0.0 to allow all machines. The default is
0.0.0.0
remote_esn This field specifies the ESN of the nShield Connect allowed to import the
slot. Leave the value blank to allow all permitted nShield Connects in the
Security World. The default is blank.
G.5.7 dynamic_slots
The dynamic_slots section defines the number of Dynamic Slots that each HSM supports.
Field Description
slotcount The number of Dynamic Slots that the HSM is to support. If set to 0
(default) the HSM does not support Remote Administration.
G.5.8 slot_mapping
The slot_mapping section defines, for each specified HSM, a slot that is exchanged with slot 0 of the
HSM. Slot 0 becomes a Dynamic Slot and the local slot becomes the specified slot number. This enables
applications and utilities that only support slot 0 to use Remote Administration.
Field Description
G.5.9 dynamic_slot_timeouts
The dynamic_slot_timeouts section defines timeout values that are used to specify expected smartcard
responsiveness for all HSMs associated with the relevant host or client, when using the Remote
Administration.
Field Description
Round trip (HSM to smartcard and back) time limit in seconds. The card is
regarded as removed, if no response has been received within the
allowed time. Expected network delays need to be taken into account
when setting this. The default is ten seconds.
G.6.1 module_settings
The module_settings section defines the settings for the nShield Connect that can be changed while the
hardserver is running. The section contains the following fields:
Field Description
esn This field specifies the electronic serial number of the nShield Connect.
priority This field specifies the priority of the nShield Connect. The value for this
field can be an integer from 1 (highest) to 100 (lowest). The default is 100.
G.6.2 server_performance
The server_performance section defines the performance settings for the client hardserver. These are
read only at hardserver start-up. This section contains the following fields:
Field Description
target_concurrency This field allows the level of concurrency to be tuned. The value must
be an integer and will only come into effect when multi-threaded per-
formance scaling is enabled. If target_concurrency is set to 0 (the
default), the value will be automatically configured by the hardserver
based on the available number of physical CPU cores. The target con-
currency configured is written to the hardserver log.
G.6.3 nethsm_imports
The nethsm_imports section defines the network nShield Connects that the client imports. It can also be
set up by the nethsmenroll utility. Each nShield Connect is defined by the following fields:
Field Description
local_module This field specifies the ModuleID to assign to the imported nShield
Connect. The value must be an integer. An nShield Connect with this ID
must not be already configured on the client computer.
remote_ip This field specifies the IP address of the nShield Connect to import.
remote_port This field specifies the port for connecting to the nShield Connect.
remote_esn This field specifies the ESN of the imported nShield Connect.
keyhash This field specifies the hash of the key that the nShield Connect should
use to authenticate itself.
Field Description
privileged The value in this field specifies whether the client can make a privileged
connection to the nShield Connect. The default is 0 , which specifies no
privileged connections. Any other value specifies privileged connections.
ntoken_esn This field specifies the ESN of this client’s nToken, if an nToken is installed.
The default value for remote_keyhash (40 zeros) specifies that no authentication should occur.
We recommend that you set a specific key hash in place of this default.
G.6.4 rfs_sync_client
This section defines which remote file system the client should use to synchronize its key management
data:
Field Description
remote_port This field specifies the port for connecting to the nShield Connect.
use_kneti Setting this option to yes requires the client to use an authenticated
channel to communicate with the RFS server.
local_esn This is only required if use_kneti is set to yes. It is the ESN of the local
nShield Connect used for authentication.
G.6.5 remote_file_system
This section is updated automatically when the rfs-setup utility is run. Do not edit it manually.
The remote_file_system section defines a remote file system on the client by listing the nShield Connects
allowed to access the file system on this client. Each nShield Connect is defined by an entry consisting of
the following fields:
Field Description
remote_ip This field specifies the IP address of the remote nShield Connect that is
allowed to access the file system on this client.
Field Description
remote_esn This field specifies the ESN of the remote nShield Connect allowed to
access the file system on this client.
keyhash This field specifies the hash of the key with which the client must
authenticate itself to the nShield Connect. The default is 40 zeros, which
means that no key authentication is required.
native_path This field specifies the local file name for the volume to which this entry
corresponds.
volume This field specifies the volume that the remote host would access to use
this entry.
allow_read If this field is set to yes, it means that a remote server is allowed to read
the contents of the file. The default is no .
allow_write If this field is set to yes, it means that a remote server is allowed to write to
the file. The default is no .
allow_list If this field is set to yes, it means that a remote server is allowed to list the
contents of the file. The default is no .
is_directory If this field is set to yes, it means that this entry represents a directory. The
default is no .
is_text If this field is set to yes, it means that line endings should be converted to
and from the Unix convention for transfers.
If you upgrade from an earlier software version to v12 and are using Remote Administration,
you need to manually add the following sections to your configuration file.
G.6.6 remote_administration_slot_server_startup
The remote_administration_slot_server_startup section defines the communication settings that are
applied at start-up to the Remote Administration Service.
Field Description
port Which port to use to connect to the Remote Administration Service. The
default is 9005.
Arcfour N N Arcfour N
ARIA N N Aria N
Camellia N N Camellia N
DES N N DES N
DES2 N Y DES2 Y
SEED N N SEED N
Some algorithms marked as not FIPS-approved (for encryption) may still be available for
decryption operations.
FIPS approved in
FIPS approved in a Supported by
Algorithm a v1 or v2 Key type
v3 Security World generatekey
Security World
Diffie-Hellman Y Y DH or DHEx Y
DSA Y Y DSA Y
ECDH Y1 Y1 ECDH or EC Y
ECDSA Y2 Y2 ECDSA Y
Ed25519 N N Ed25519 N
El Gamal Y Y DH Y
KCDSA N N KCDSA N
RSA Y Y RSA Y
X25519 N N X25519 N
Some algorithms marked as not FIPS-approved (for signing) may still be available for
verification operations.
l A module is only operating in FIPS mode when it uses NIST-approved algorithms and the
algorithms are used with keys of an NIST approved length or curve.
When a module is initialized into FIPS 140-2 level 3 mode, you are only offered NIST-approved
algorithms. If you have a Security World created to comply with FIPS 140-2 level 3 and have any protocols
that use algorithms not approved by NIST, you must either migrate to a FIPS 140-2 level 2 Security World
or change your protocols. If you have a Security World created to comply with FIPS 140-2 level 3 and
have existing long-term keys for unapproved algorithms, then these keys cannot be used with the current
firmware. In such a case, we recommend that you either migrate your Security World to a FIPS 140-2
level 2 Security World or replace these keys with approved keys before upgrading to the current
firmware.
1FIPS approval is only for use with ECDH keys, not with EC keys.
2FIPS approval is only for use with ECDSA keys, not with EC keys.
These changes do not affect Security Worlds that were created to comply with FIPS 140-2 level 2, nor do
they affect systems that use the nShield module to protect long-term keys but perform encryption with
session keys on the host (as is the case with the nShield MSCAPI, and PKCS #11 libraries).
Some algorithms that are shown are not NIST-approved for encryption or signing operations
but may still be available for decryption or verification operations.
It is possible to create a FIPS-conforming Security World from a host server that is running Security World
v12.50 or later as long as the HSM is running v12.50 or later firmware. However your solution won't be
FIPS certifiable unless you are running the exact version of firmware that has been FIPS 140-2 certified.
These changes do not affect Security Worlds that were created to comply with FIPS 140-2 level 2, nor do
they affect systems that use the nShield module to protect long-term keys but perform encryption with
session keys on the host (as is the case with the nShield MSCAPI, and PKCS #11 libraries).
I.1 Architecture
Audit logging is implemented on the nShield Connect. The audit logging functionality is on the embedded
nShield Solo or nShield Solo XC card, "Architecture of nShield Connect/Connect XC Implementation"
below shows nShield Connect or Connect XC implementation. The audit log entries are generated on the
module, the hardserver acts as a relay to a syslog infrastructure.
Given the architecture described above, the Audit Logging capability is implemented in the HSM
(embedded Solo/Solo XC in the case of a nShield Connect). This means that the logging is at the level of
nCore commands as processed by the HSM. The hardserver layer implements a higher-level abstraction
which is presented to application clients. The information used to manage this such as Client Identifiers
etc. is not available to the HSM and therefore cannot be logged.
l Origin authentication
l Public verification
l Message integrity
l Replay resistance
l Message sequencing
l Detection of missing messages.
It is implemented on top of a standard syslog data stream and does not use any additional protocol. The
syslog-sign logging scheme adds a number of control messages to the log entries that are to be audited.
These are also implemented as syslog messages. The following sections outline the audit log entries that
are present in the syslog data stream for nShield Audit Logging. The signing mechanism used is DSA
with a 3072 bit key and SHA-256 as the hashing mechanism.
The number of messages is dictated by the transport medium, the size of the digests, the size of the
signature and the size of other data contained in the message. There is a limit to the size of messages
that can be transported over syslog. The signature is performed using a log signing key. This key is
generated and the private half is held securely in the HSM.
1. Audit Logging is set as enabled for this Security World and is recorded in the world file.
2. The HSM is initialized and:
l A flag indicating the Audit Logging status is recorded in the HSM's EEPROM
l A 3072bit DSA HSM specific Audit Logging Signing Key (KAL) is created and persisted in the
HSM's EEPROM
l A Certifier Block containing the public half of KAL is generated and sent to the log receiver
via the hardserver.
When a new HSM is indoctrinated into an Audit Logging Security World the world file specifies that this is
an Audit Logging Security World. The same actions as for initializing an HSM when the Audit Logging
Security World was created are performed. This means that:
l All HSMs in an Audit Logging Security World have Audit Logging enabled
l Each HSM has a distinct Audit Logging Signing Key.
The Audit Logging entries are delivered over syslog using UDP transport. This transport must be
configured before Audit Logging is enabled in order to collect the initial messages. The following section
on configuring syslog describe the steps necessary to enable syslog for Audit Logging.
The Real Time Clock (RTC) on the HSM must be set and the setting confirmed after creating
the Security World or indoctrinating an HSM into the Security World. The RTC on the HSM is
used to timestamp audit log entries.
[audit1@myhost ~]$ /opt/nfast/bin/nfkminfo
World
generation 2
state 0x37270009 Initialised Usable Recovery !PINRecovery !ExistingClient RTC NVRAM
FTO AlwaysUseStrongPrimes !DisablePKCS1Padding !PpStrengthCheck AuditLogging SEEDebug
n_modules 1
hknso 4703d2cde058e88ce4c4bf8afe8e25d436b2f864
hkm 90284ba3e2b2019769d2fa6fc38532fae637bfe0 (type Rijndael)
hkmwk c2be99fe1c77f1b75d48e2fd2df8dffc0c969bcb
hkre 09928bfc675103b4f2fd937cce1cef8764ada20c
hkra 66679c64c5255b78b6bf06b30ea4f6634a222dd5
hkmc aaa221d75803108a88534ad6dd1816a104720d0f
hkrtc 7dc8ab24343bd0bd2e24e071a2b8172aed0ecf43
hknv f19fe4c416aa773e5518543543f7cfa3924a12a7
hkdsee 6729cbafd7e4c2f8e579d3e9d25c04c72b4f602d
hkfto 184d8c282814bba505b1147ed7bce4dc6b678967
hkmnull 0100000000000000000000000000000000000000
ex.client none
k-out-of-n 1/1
other quora m=1 r=1 nv=1 rtc=1 dsee=1 fto=1
createtime 2018-05-03 19:22:17
nso timeout 10 min
ciphersuite DLf3072s256mAEScSP800131Ar1
min pp 0 chars
mode none
Module #1
....
Audit Logging is indicated by the presence of AuditLogging in the state line of the command's output. If
Audit Logging was not enabled this line would show !AuditLogging . This indication applies to the Security
World.
The enquiry command shows the Audit Logging status of the HSMs.
[audit1@myhost ~]$ /opt/nfast/bin/enquiry
Server:
enquiry reply flags none
enquiry reply level Six
.........
Module #1:
enquiry reply flags none
enquiry reply level Six
serial number 1111-2222-3333
mode operational
version 12.60.2
speed index 4512
rec. queue 19..152
level one flags Hardware HasTokens SupportsCommandState
version string 12.60.2-0-12d710d3920737e4d29426b9cf88eb0f21b12dd0 2018/05/03 12:00:21 UTC
checked in 000000005aeaf9d5 Thu May 3 08:00:21 2018
level two flags none
max. write size 8192
level three flags KeyStorage
level four flags OrderlyClearUnit HasRTC HasNVRAM HasNSOPermsCmd ServerHasPollCmds FastPollSlotList
HasSEE HasKLF HasShareACL HasFeatureEnable HasFileOp HasPCIPush HasLongJobs ServerHasLongJobs
AESModuleKeys NTokenCmds JobFragmentation LongJobsPreferred Type2Smartcard ServerHasCreateClient HasIni-
tialiseUnitEx AlwaysUseStrongPrimes Type3Smartcard HasKLF2 DevelopmentFirmware
module type code 7
product name nC2023E/nC3423E/nC4033E
device name #1 nFast PCI device, bus 3, slot 0.
EnquirySix version 7
impath kx groups DHPrime1024 DHPrime3072
feature ctrl flags LongTerm
features enabled ForeignTokenOpen RemoteShare GeneralSEE KISAAlgorithms StandardKM CodeSafeSSL Ellipt-
icCurve ECCMQV
version serial 28
rec. LongJobs queue 18
The HSM's Audit Logging status is indicated by the presence of AuditLogging in the active modes line.
Prior to enabling Audit Logging on a Security World it is necessary to configure the syslog
transport used by the Audit Logging facility.
The following example shows the relevant entries in the hardserver configuration file. Having set these
entries it is necessary to restart the hardserver for them to be recognized. If this configuration is being
applied to a nShield Connect HSM, the configuration needs to be pushed to the Connect and the Connect
hardserver restarted, see "nShield Connect utilities" on page 280.
[auditlog_settings]
# Start of the auditlog_settings section
# Hardserver settings for audit logging.
# Each entry has the following fields:
#
# The port number Auditlogging server listens to .
auditlog_port=514
#
# IP Address of the Auditlogging server
auditlog_addr=WWW.XXX.YYY.ZZZ
#
# Copy auditlog to hardserver log. (default=no)
# auditlog_copy_hslog=ENUM
Field Description
auditlog_port This is the UDP destination port for Audit Logging syslog messages. The
default is 514.
auditlog_addr This is the IP address of the host to which the Audit Logging syslog messages
should be delivered. The default is 0.0.0.0.
auditlog_copy_hslog This indicates that the syslog messages from Audit logging should be copied
to the hardserver's log file. This provides some degree of redundancy but
means that the hardserver's log file may grow significantly. The default is no.It
is not recommended on nShield Connect HSMs.
It is recommended that the syslog transport is checked before creating an Audit Logging Security World.
This can be accomplished by sending a log message to the configured host and port using a command
such as logger if it's available on your operating system, and the implementation of this command is
capable of sending messages to a syslog server over UDP.
The PRI value of this header <134> indicates the facility local0 and a severity of info .
The syslog infrastructure used for Log distribution is out of the scope of this guide and your responsibility
to implement. Log distribution for Audit Logging uses syslog as the transport medium which allows a
standard protocol and message format to be used for the Audit Logging messages. This transport is
compatible with SIEM systems and the wider syslog infrastructure in an organization can be used to
further distribute or process the log stream. There are many possible configurations of syslog
deployment. These are shown on "syslog Configurations" below.
It is recommended that logs from the nShield Audit Logging facility are separated from those from other
applications. This can be accomplished by using the information in the audit log messages described in
the section on Log Format. There are a number of entries that can be used to separate out the messages
from the nShield Audit Logging facility. These include:
The log messages can be further split into those from specific HSMs using the ESN in the audit log
messages.
As an example, the following rsyslog configuration will direct all messages with the string nCipher
Security to a specific log file:
Refer to the documentation for your syslog implementation for information on processing and distributing
log messages.
I.5.1.1 rsyslog
rsyslog can be configured to not reformat messages using the following approach:
1. Define a formatting template as shown below in the /etc/rsyslog.conf file. This should be added in
the #### MODULES #### section of the rsyslog configuration file.
$template myFormat,"%rawmsg%\n"
2. Apply this formatting template to the processing of Audit Logging messages. For this example it is
assumed that messages containing nCipher Security will be persisted in the file
/var/log/hsmauditlog . You can use any other selection mechanism such as storing messages for a
particular HSM as identified by its ESN in separate files.
3. If the rsyslog server is going to be used as a relay, then the format needs to be applied to any relay
statements in the rsyslog configuration file and to any receivers of the syslog message.
I.5.1.2 syslog-ng
syslog-ng does not appear to rewrite messages in the same way as rsyslog . Refer to the syslog-ng
documentation for information on formatting.
Parameter Description
CEF:Version This is mandatory and Version is currently 0.
Device Vendor This is nCipher Security
Device Product This identifies the family of nCipher HSMs:
l nShield Solo
l nShield Solo XC
l nShield Edge.
Parameter Description
Class ID Description
1 nCore Commands
l Periodic heartbeat
l Secure channel establishment
l Signature Blocks
l Certifier Blocks
4 Reserved
5 Shutdown messages
6 Reserved
Name This is the event being logged. For Audit Logging, it is either the nCore command that
is being logged, Cmd_Destroy for example, a description of the event such as
heartbeat or one of ssign or ssign-cert which identifies either a Signature Block or a
Certifier block.
Severity This is an indication of the importance of the message.
Severity Description
1 nCore Commands
l Reboot events
l Secure channel establishment
l Signature Blocks
l Certifier Blocks
6 Shutdown messages
Extension
Description
Name
esn Electronic Serial Number (ESN) of the HSM in the following format:
XXXX-XXXX-XXXX
rtc Time-stamp from the HSM's Real Time Clock (RTC) as ms since the epoch (1970 Jan
01 00:00:00 UTC).
outcome Outcome of the operation - success or failure
hkey Identifying nCore key hash for the main key of the command being logged as a 40
character hex string
hbase Identifying nCore key hash for the base key of a Cmd_DeriveKey command being
logged as a hex string
hwrap Identifying nCore key hash for the wrap key of a Cmd_DeriveKey command being
logged or the logical token hash for key blobbing operations as a hex string
hin3-5 Identifying nCore key hashes for the remaining keys of a Cmd_DeriveKey command
being logged as hex strings
hknso Identifying nCore key hash of Security Officer's key as a hex string
htok Identifying nCore Logical Token hash as a hex string
shareindex Index of share being operated on by Logical Token functions as a decimal number
sharesleft Number of Logical Token shares left to read or write as a decimal number
tokenslot Slot number for Logical Token operations as a decimal number
sharesneeded Quorum required to reconstruct a Logical Token as a decimal number
Extension
Description
Name
Cmd_SetNSOPerms
l AlwaysUseStrongPrimes
l DisablePKCS1Padding
l FIPSLevel3Enforcedv2
l CommonCriteriaCMTSRestrictions
Cmd_InitialiseUnitEx
l AuditLogging
l UseFIPSApprovedInternalMechanisms
Counter Description
seqNo Log message sequence number as a decimal number. This a counter that has a range of 1 to
9999999999. When seqNo reaches 9999999999 it is reset to 1. It is incremented for every
command log message sent. This is not part of RFC-5848 and has been added to provide a
direct mechanism for detecting deleted or missing log messages.
The sequence number is unique in the context of a reboot session. When rsid is incremented
Counter Description
seqNo is reset to 1.
rsid Reboot Session ID as a decimal number. This a counter that has a range of 1 to 9999999999.
When rsid reaches 9999999999 it is reset to 1. It is incremented every time the HSM is restar-
ted and whenever the Global Block Counter (gbc) reaches its limit and is reset.
Name Description
tpbl Total Payload Block Length. This is the length of all Certifier Block fragments.
findex Index of this fragment (1 based) as a decimal number.
flen Length of the fragment as a decimal number.
frag Base 64 encoded Certifier Block fragment.
sign DSA signature using KAL of the data in each fragment up to the sign extension. The DSA sig-
nature is DER encoded and then base64 encoded. It is present here to support consistency
checking.
Name Description
gbc Global Block Counter as a decimal number. Count of signature blocks sent in this Reboot Ses-
sion prior to this Signature Block. This is a decimal number that has a range of 1 to
9999999999. When gbc reaches 9999999999 it is reset to 0. At the same time the rsid is
incremented and seqNo reset to 1. It is incremented after every Signature Block is sent.
fmn First Message Number as a decimal number. First log message seqNo in this Signature Block.
Name Description
hcnt Count of log messages included in this Signature Block as a decimal number.
hb The log message SHA-256 hashes base64 encoded and separated by the & character. The &
character does not occur in base64 encoding and avoids SIEM issues with embedded spaces.
sign DSA signature using KAL of the data in the Signature Block up to the sign extension. The DSA
signature is DER encoded and then base64 encoded.
sMqGyWGh-
whMoqYP8ldIy7b-
b3UVQBp6M+fxVpSFFrz3b-
fDgJQNh/13YCAY1+r1JYvEn-
er7cnGatDIjnMgNqQPN6alqM787pMz3/eIq0L0xI8rVy99F/-
foV6aFcJVCvx-
sjL9wIQOd4AhjIgTfPTiAEC4UTl5Eg9YkKn-
jZX-
izpTx-
hReSZVMjIM8Fu2s-
jcvzh1Q8POqYcEuU5sZhQbLVjUvR-
pou2Hp-
gOTwhcXW+X4gWpMlXsVk-
wV7F24j4Ax6eiy-
aSp1HCx4savMxcyA3cxwp7dTUJnFPVr8npfqp2H3ai3khSIefMc7d8gyajJnOLlJQMzf6O5HrlVeuixd6hBdwd
sign-
=MEUCIBNPO7QZRkTnkhTdF28V-
VmhXxIvk96FS8nFs4wUNSUGI2AiEA8c+om7txuEVpJIO8yhTJ5nnEmFH+naseslidJMGQA2Q=
sign-
=MEUCIBNOaU/7dFXi6Y05vV7IXC3I5Dm6OLAqb0Nm3NKfwW6VAiEA-
Axs0NvHFNdWR2MAo+JJURxGWJrFmUwZ0Bu5z+nIB9ZfA=
The Signature Block has name element ssign identifying it as a Signature Block. The gbc is 6 meaning
this is the 7th Signature Block in this Reboot Session ID. The fmn is 31 and hcnt is 10 meaning that this
Signature Block covers messages 31 to 40. As Audit Logs are generated this sequence will be repeated.
Once this Signature Block has been received and with the log signing public key available the signature
on this Signature Block can be verified and then the hashes of the individual log messages can be
calculated and compared with the hashes recorded in the Signature Block for the corresponding log
message to allow the detection of tampering.
The generatekey utility (see "Key generation options and parameters" on page 391) provides the ability to
set this permission group flag when a key is generated by either:
When generatekey is used this flag is applied to all permission groups but is only checked by the HSM on
the group authorizing the desired action.
The following example shows this set on permission group 0 of a key's ACL.
In the following sections, the tables will indicate if this mechanism is required to generate a log message
for a specific command or key.
nCore Key and Logical Token hashes are the standard nCore identifying hashes. They are used to
identify a key or logical token as it is an invariant for the key or logical token. These hashes are logged as
lower-case hex encoding. In some cases a short hash may be presented. This is the first 10 bytes of the
hash in a lower-case hex encoding.
For each command logged the command is specified by the name element of the CEF header. The other
elements of the CEF header are filled as detailed in the previous section. All commands being logged will
also include the following CEF extensions:
Extension Description
esn ESN of the HSM
rsid Reboot Session ID
Extension Description
rtc Timestamp as milliseconds since the epoch derived from the HSM's Real Time Clock
seqNo Sequence number of the Audit Log message
outcome Success or failure
Identifying Log Messages: As Audit Logging will potentially be running for a long time, the
identification of a log message from an HSM based on the rsid and seqNo will not hold if the
HSM is not restarted before the seqNo is reset when it reaches 9999999999. In this case
account can be taken of the gbc as this will increment at a slower rate than the seqNo .
Therefore messages in the same rsid with the same seqNo will have significantly different
values of gbc (the mapping between seqNo and gbc is determined by the Signature Block
containing the message in question) . When the gbc is reset the rsid is incremented so
counting begins in a new Reboot Session. Account can also be taken of the value of the rtc.
Requires
Command Command Specific Information Logged Extension logkeyusage
ACL
Cmd_Sign nCore key hash hkey Yes
Cmd_Encrypt nCore key hash hkey Yes
Requires
Command Command Specific Information Logged Extension logkeyusage
ACL
Cmd_GenerateKeyPair nCore key hash hkey No
The nCore Key Hashes for the input keys will only be included
in the audit log if the Permission Group for the DeriveKey action
has the LogKeyUsage flag.
Slot tokenslot
Slot tokenslot
LT Hash htok
SlotId tokenslot
SlotId tokenslot
DSAp3072s256
DSAp3072s256
Combination of AuditLogging and
UseFIPSApprovedInternalMechanisms
Combination of AlwaysUseStrongPrimes,
DisablePKCS1Padding , FIPSLevel3Enforcedv2 and
CommonCriteriaCMTSRestrictions
Cmd_CreateSeeWorld
Cmd_SetSEEMachine
I.7.7 Heartbeat
The heartbeat is a periodic audit log message sent every 15 minutes. This audit log message indicates
that the HSM is still active. After a heartbeat event is logged a Signature Block is generated including the
heartbeat log message and any outstanding audit log messages. Waiting until the heartbeat is logged
before restarting the HSM will ensure outstanding log messages can be verified.
Command Specific
Command CEF Extension
Information Logged
Each of these messages are emitted with rsid and seqNo relating to the current session and will have a
prevrtc CEF element recording the RTC at the time of the event. The name element will identify the event.
If the event is associated with a nCore SOS code this will be indicated by a sos CEF extension and an
appropriate code. The Device Event Class Id is set to 5 and Severity will be set to 10 for errors or 6 for
shutdown events. The source CEF extension will be internal. The following table lists the events replayed
in a post reboot log. The available events depend on the type of HSM.
Cmd_Fail Cmd_Fail D
Environment_SensorFail HV
Temperature_OutofRange T
RNG_PeriodicTestFail HRTP
SOS Starting up crypto offload HF
SOS cache keygen failed HR
Voltage_Tamper V
Battery_Tamper B
Unknown_Tamper TAMPER
SelfTestFail POST test timed out HC0TTO
As an example, the following shows a post reboot log of Cmd_ClearUnit. In this excerpt, it can be seen
after the last fragment of the Certifier Block. A Signature Block is generated after the reboot log entries.
....
....
The following example shows the notional traceback from a Cmd_Encrypt operation. This command logs
the nCore Key Hash KKKKKKK. Prior to this the Key was loaded onto the HSM using Cmd_LoadBlob
which correlates the nCore Key Hash with the ncore Hash of the Logical Token that authorized loading
the Key. Tracing further back we can identify the shares used to reconstruct that Logical Token. In this
example two shares are required identified by share indices S1 and S2. The share index identifies a
specific card in an OCS cardset.
Cmd_Encrypt KKKKKKK
The basics of the verification approach is shown on Figure I.2 Log Verification on page 360.
To support Audit Log verification, nCipher provide an example verification program written in Python to
serve as an example for developing a more comprehensive verification solution.
C:\Program Files\nCipher\nfast\python\examples\audit-log-verifier.py
This program requires the use of the nShield Python interpreter. This is necessary to provide support for
the nShield specific marshalling functions used to export the log signing public key. The example
verification program also requires the presence of an nShield HSM accessible to the machine on which
the verification is to be performed. This is required to perform the cryptographic operations necessary to
verify the log signing public key and the Signature Blocks. This HSM does not need to be the same HSM
on which the logs were generated, nor does it need to be in a Security World.
The Audit Log verifier program is run with a command of the form:
Where:
Parameter Function
I.8.1.1 Results
Results from the Audit Log Verifier are written to several different files and saved in a sub-directory called
LogResult. See example below for more detail.
I.8.1.2 Example
Running a command of the form:
The screen output indicates the contents of the main results files which are stored in the LogResult sub-
directory. The contents of the folder will vary slightly depending on the log contents and whether there
were any failures, but should be similar to the following:
Use a text editor to examine the files as required to check the verification. Note that Inst1 in the filenames
refers to the first logging world instance in the log, see "Program Architecture" on page 389. If the log
contains messages relating to more than one logging world , files relating to subsequent instances will be
tagged with Inst2 , Inst3 etc.
If the verification fails, screen output should indicate the source of the failure. For example, output for a
log where a log message was missing would look something like this:
Output for a log where a log message had been tampered with or is otherwise corrupt might look like
this:
Output for a log where the signature block is corrupt will look something like this:
The failed log messages should be reported in Tampered_logs.txt in the LogResult folder.
If the certificate block is corrupt, output will be similar to that shown below. In this case, the CBs.txt file
may be empty and the cert block fragments will be written to Inconsistent.txt.
The verifier calls its parse function which segregates the messages based on ESN, and creates lists of
Certifier fragments, Signature Blocks and Log events, based on matching with regular expressions.
Syslog may have gathered logs from multiple sources. As such, the verifier has a concept of a logging
world, which represents a set of logs, sigblocks and certblocks that belong together, from a Security
World. Based on Reboot Sequence ID, Sequence Number of the Log event, Global block counter of the
Signature block and Fragment index of the Certifier block, a logging world is identified and a logging
instance is created.
All records are thus given a log-instance number, such that records with the same instance number
belong together.
Each event can thus be uniquely identified via a tuple. For the log messages, signature blocks and
certifier blocks these are respectively (rsid and sequence number ), (rsid and gbc) and (rsid and findex).
The reconstruct_CBs function is then called to validate the certifier fragments (using calls to an nCipher
HSM for crypto functionality). It then reconstructs the certifier blocks from the certifier fragments.
This does not require the HSM to be in the same Security World as the HSM that first
generated the logs.
For any log instance one valid Certifier Block is enough to validate the events, so further certifier blocks
are ignored after the first.
Next the process_sbs function is called. Signature Blocks for a supplied ESN are validated per log
instance (once again via calls to the module for crypto functionality), using the KAL value taken from the
Certifier block previously.
The validated Signature block hashes are maintained as a dictionary of hashes with keys as unique ids.
These unique ids per instance are generated based on rsid and sequence numbers.
The process_logs function is finally called. This generates the hash of each of the log events and matches
against hashes from corresponding signature blocks. Verified and Tampered log events are then written
to different files in the LogResult folder.
Currently the log messages are verified against the hash in the signature blocks, and the signature of the
signature blocks is verified against the key extracted from the certifier block. The certifier block its self is
not verified. A potential extension to the verifier tool would be to verify the certifier block. The certifier
block is signed by KLF2. This can be checked against the KLF2 value found within the module's warrant.
This would complete the chain of trust.
Additionally, the example verifier does not cope with fields that rotate back around to zero when their
max size is exceeded. (for example, gbk, rsid or seqno ). Currently logs, SBs and CBs are uniquely
identified by (rsid and sequence number ), (rsid and gbc) and (rsid and findex). This means that, if any of
those values rotate back around to zero, we are no longer able to uniquely identify them. As a potential
extension, RTC or line number values could be used to solve this.
The example verifier does not detect missing/deleted log messages in the case where a complete group
of log messages are deleted, along with their corresponding SignatureBlock. Given that the SeqNo field
increases for each log message,spotting missing SeqNos would reveal missing or deleted log messages.
This is a potential extension.
The example verifier expects a static, unchanging log file to be supplied to it. This would be compatible
with verifying a batch of log files at the end of each day, for example. A possible extension would be to
extend the verifier to cope with a live stream of logs, continuously verifying them as they are generated.
For information about generating keys with the generatekey utility, see "Generating keys
using the command line" on page 253 in "Working with keys" on page 252.
Parameter Description
custom Specifying the custom application type generates a key for custom
applications that require the key blob to be saved in a separate file.
pkcs11 Specifying the pkcs11 application type generates keys that are formatted
for use with PKCS #11 applications and are given a suitable identifier. The
set of possible supported key types is currently limited to:
l DES3
l DH
l DSA
l ECDH
l ECDSA
l Ed25519
l HMACSHA1
l RSA
l Rijndael (AES)
l X25519
Parameter Description
Some key types are only available if the features that support them have
been enabled for the module, if the Security World is not compliant with
FIPS 140-2 level 3, or if you do not set the --no-verify option.
embed Specifying the embed application type generates a key for use with older
applications that integrate with the OpenSSL CHIL engine and/or hwcrhk.
Note, these interop libraries are no longer provided as of v12.60.
You can use a key of the embed application type like a PEM-format
RSA/DSA key file, even though it is really a specially encoded reference to
a key stored in %NFAST_KMDATA%\local. This allows you to use an
embed key when integrating with applications that normally require
software RSA keys. For example, you can supply an embed key to the
patched version of OpenSSL we have provided so that it uses the module
to access the key rather than using its own built-in RSA operations.
kpm Specifying the kpm application type generates a key for delivery by an
nForce Ultra key server. The generatekey utility automatically creates a
special ACL entry that permits a kpm to be delivered to an nForce Ultra’s
enrolled internal hardware security module.
seeinteg Specifying the seeinteg application type generates an SEE integrity key.
The DSA, RSA, ECDSA and KCDSA algorithms are supported. SEE
integrity keys are always protected by an OCS and cannot be imported.
You cannot retarget an existing key as an SEE integrity key.
If a parameter’s argument contains spaces, you must enclose the argument within quotation
marks (" ").
You can supply an appropriate VALUE for the following NAME options:
Option Description
alias The VALUE for alias specifies an alias to assign to the key.
Option Description
assigned The VALUE for assigned specifies if the generated key is to be Assigned as
defined by nShield Solo XC Common Criteria Evaluated Configuration
Guide. This is only relevant in common-criteria-cmts mode Security Worlds
and the key must be protected with a non-recoverable softcard or token. If
set to yes the ACL of the generated key will match the definition of an
Assigned key in nShield Solo XC Common Criteria Evaluated Con-
figuration Guide and will be verified as an Assigned key by nfkmverify. The
default is no.
blobsavefile When using the custom application type, the VALUE for blobsavefile
specifies a file name of the form FILENAME.EXT to which the key blob is
saved. Additionally, a text file containing information about the key is
saved to a file whose name has the form ROOT_inf.txt; for asymmetric key
types, the public key blob is also saved to a file whose name has the form
ROOT_pub.EXT.
cardset The VALUE for cardset specifies an OCS that is to protect the key (if protect
is set to token ). In interactive mode, if you do not specify an OCS, you are
prompted to select one at card-loading time. The default is the OCS to
which the card currently inserted in the slot belongs (or the first one
returned by nfkminfo ).
To generate a certificate request you must set the VALUE for certreq to
yes, which makes generatekey prompt you to fill in the extra fields
required to generate a key with a certificate request. The resultant
certificate request is saved to the current working directory with a file
name of the form FILENAME_req.ext (where FILENAME is a name of your
choice).
An extra file with a name of the form FILENAME.ext is also generated for
use as a pseudo-key-header. This file can be removed after the certificate
request has been generated. You can use certreq with the --retarget
option to generate a self-signed certificate for an existing key.
checks For RSA key generation only, this specifies the number of checks to be
performed. Normally, you should leave VALUE empty to let the module pick
an appropriate default.
curve For ECDH and ECDSA key generation only, the VALUE for curve specifies
which curves from the supported range to use. Supported curves are:
ANSIB163v1, ANSIB191v1,BrainpoolP160r1, BrainpoolP160t1,
BrainpoolP192r1, BrainpoolP192t1, BrainpoolP224r1, BrainpoolP224t1,
Option Description
embedconvfile The VALUE for embedconvfile specifies the name of the PEM file that
contains the RSA key to be converted.
embedsavefile When using the embed application type, the VALUE for embedsavefile
specifies the name for the file where the fake RSA private key is to be
saved. The file has the same syntax as an RSA private key file, but actually
contains the key identifier rather than the key itself, which remains
protected.
from-application When retargeting a key, the VALUE for from-application specifies the
application name of the key to be retargeted. Only applications for which
at least one key exists are acceptable.
from-ident When retargeting a key, the VALUE for from-ident specifies the identifier of
the key to be retargeted (as displayed by the nfkminfo command-line
utility).
hexdata The VALUE for hexdata specifies the hex value of DES or Triple DES key to
import. The hex digits are echoed to the screen and can appear in process
listings if this parameter is specified in the command line.
ident The VALUE for ident specifies a unique identifier for the key in the Security
World. For applications of types simple , this is the key identifier to use. For
other application types, keys are assigned an automatically generated
identifier and accessed by means of some application-specific name.
keystore The VALUE for keystore specifies the file name of the key store to use. This
must be an nShield key store.
keystorepass The VALUE for keystorepass specifies the password to the key store to
use.
logkeyusage The VALUE for logkeyusage specifies if usage of the generated key in
cryptographic operations is subject to audit logging. If set to yes the ACL
of the generated key will predicate audit-logging entries to be made for
cryptographic usages of the key. The default is no.
module The VALUE for module specifies a module to use when generating the key.
Option Description
If there is more than one usable module, you are prompted to supply a
value for one of them. The default is the first usable module (one in the
current Security World and in the operational state).
paramsreadfile The VALUE for paramsreadfile specifies the name of the group parameters
file that contains the discrete log group parameters for Diffie-Hellman keys
only. This should be a PEM-formatted PKCS#3 file. If a VALUE for
paramsreadfile is not specified, the module uses a default file.
pemreadfile The VALUE for pemreadfile specifies the name of the PEM file that contains
the key to be imported. When importing an RSA key, this is the name of
the PEM-encoded PKCS #1 file to read it from. Password-protected PEM
files are not supported.
plainname The VALUE for plainname specifies the key name within the Security
World. For some applications, the key identifier is derived from the name,
but for others the name is just recorded in %NFAST_KMDATA% and not
used otherwise.
protect The VALUE for protect specifies the protection method, which can be
module for security-world protection, softcard for softcard protection or
token for Operator Card Set protection. The default is token , except for
seeconf keys, where the default is module . seeinteg keys are always
token-protected. The softcard option is only available when your system
has at least one softcard present.
pubexp For RSA key generation only, the VALUE for pubexp specifies (in
hexadecimal format) the public exponent to use when generating RSA
keys. We recommend leaving this parameter blank unless advised to
supply a particular value by Support.
recovery The VALUE for recovery enables recovery for this key and is only available
for card-set protected keys in a recovery-enabled world. If set to yes, the
key is recoverable. If set to no , key is not recoverable. The default is yes.
Non-recoverable module-protected keys are not supported.
seeintegname If present, the VALUE for seeintegname identifies a seeinteg key. The ACL
of the newly generated private key is modified to require a certificate from
the seeinteg key for its main operational permissions, such Decrypt and
Sign (DuplicateHandle , ReduceACL , and GetACL are still permitted
without certification.)
selfcert The VALUE for selfcert enables you to generate a self-signed certificate
Option Description
when generating a PKCS #11 key (RSA keys only). To generate a self-
signed certificate request you must set selfcert to yes, which makes
generatekey prompt you to fill in the extra fields required to generate a
key with a self-signed certificate. The resultant certificate is saved to the
current working directory with a file name of the form FILENAME.ext. You
can use this parameter with the --retarget option to generated a self-
signed certificate for an existing key.
size For key types with variable-sized keys, the VALUE for size specifies the
key size in bits. The range of allowable sizes depends on the key type and
whether the --no-verify option is used. The default depends on the key
type; for information on available key types and sizes, see "Cryptographic
algorithms" on page 354. This parameter does not exist for fixed-size
keys, nor for ECDH and ECDSA keys which are specified using curve .
strict For DSA key generation only, setting the VALUE for strict to yes enables
strict verification, which also limits the size to exactly 1024 bits. The default
is no .
type The VALUE for type specifies the type of key. You must usually specify the
key type for generation and import (though some applications only
support one key type, in which case you are not asked to choose).
Sometimes the type must also be specified for retargeting; for information
on available key types and sizes, see "Cryptographic algorithms" on
page 354. The --verify option limits the available key types.
x509country The VALUE for x509country specifies a country code, which must be a
valid 2-letter code, for the certificate request.
x509dnscommon The VALUE for x509dnscommon specifies a site domain name, which can
be any valid domain name, for the certificate request.
x509email The VALUE for x509email specifies an email address for the certificate
request.
x509locality The VALUE for x509locality specifies a city or locality for the certificate
request.
x509org The VALUE for x509org specifies an organization for the certificate
request.
x509orgunit The VALUE for x509orgunit specifies an organizational unit for the
certificate request.
x509province The VALUE for x509province specifies a province for the certificate
request.
xsize The VALUE for xsize specifies the private key size in bits when generating
Option Description
Diffie-Hellman keys. The defaults are 256 bits for a key size of 1500 bits or
more or 160 bits for other key sizes.
genera impo retarg custo embe hwcrh pkcs seeco seeinte sees simpl kp
te rt et m d k 11 nf g sl e m
alias X X X
blobsavefile X X X X
cardset X X X X X X X X
certreq X
checks X X X X X X X
curve X X X X X X X X
embedconvfile X X
embedsavefile X X X X X
from- X X X X X X X
application
from-ident X X X X X X X
hexdata X X X X X X
ident X X X X X
keystore X X X
keystorepass X X X
module X X X X X X X X X
nvram X X X X X X X
paramsreadfil X X X X X X X X
e
pemreadfile X X X X X
genera impo retarg custo embe hwcrh pkcs seeco seeinte sees simpl kp
te rt et m d k 11 nf g sl e m
plainname X X X X X X X X X X X
protect X X X X X X X X X X X
pubexp X X X X X X X
qsize X X X X X X X
recovery X X X X X X X X X X
seeintegname X X
selfcert X
size X X X X X X X X X X
strict X X X X X X
type X X X X X X X X X X
x509country X X X X X
x509dnscomm X X X X X
on
x509email X X X X X
x509locality X X X X X
x509org X X X X X
x509orgunit X X X X X
x509province X X X X X
xsize X X X X X X
We recommend that you use a keyboard to manage the front panel menu options and enter
text. See Using a keyboard to control the unit on page 58 for more information.
l Operational
o The default setting for day-to-day use
l Initialization
o Sets the nShield Connect to start in pre-initialization mode
o Allows you to use the nShield Connect to create a Security World or add the module to an
existing one
You cannot select Maintenance mode. It is managed by the nShield Connect and cannot be
set by a user.
enquiry
server:
enquiry reply flags none
enquiry reply level Six
serial number ####-####-####-####
mode operational
version #.#.#
speed index ###
rec. queue ##..##
...
version serial #
remote server port ####
Module #1:
enquiry reply flags none
enquiry reply level Six
serial number ####-####-####-####
mode operational
version #.#.#
speed index ###
rec. queue ##..##
...
rec. LongJobs queue ##
SEE machine type PowerPCSXF
In this example, the mode line (highlighted) shows that the nShield Connect is in operational
mode.
See Using KeySafe on page 264 for more about using KeySafe. See Module information on page 268 for
more about checking the mode.
K.4.1 Changing the mode using the front panel controls of an nShield Connect
To change the mode of an nShield Connect, use the front panel menu screens and dialogs to do the
following:
Once you have enabled remote mode changes, you can change the mode of an nShield Connect from a
computer using the nopclearfail command, without accessing the unit itself.
1. Run either:
a. The nopclearfail --operational | -O command.
or:
b. The nopclearfail --initialization | -I command.
When finished, the system responds with OK.
The system responds with OK, regardless of whether the mode of the nShield Connect
has changed or not. To confirm that state of the module, do the following:
The image file package is installed on the remote file system when you install the client software. The
following sections describe how to load this firmware package onto your nShield module.
We supply several versions of the module firmware. You can always upgrade to firmware with an equal
or higher VSN than that currently installed on your module.
You can never load an image file with a lower VSN than the currently installed version.
You can never load module firmware with a lower VSN than the currently installed firmware.
Ensuring you use an image file package with the highest available VSN allows you to benefit from
security improvements and enhanced functionality. It also prevents future downgrades of the image file
and/or that could potentially weaken security. However, you may choose to install an image file or
associated firmware that does not have the highest available VSN. For example, if you have a regulatory
requirement to use FIPS-approved firmware, you should install the latest available FIPS-validated
firmware package, which may not have the highest VSN. Similarly, if you want to install a version with
enhanced features without committing yourself to the upgrade, you can do so providing you upgrade only
to firmware with a VSN equal to that currently installed on your module.
Adding or restoring a module will require authorisation from a quorum of Administrator cards.
When upgrading the Connect image file, client licenses and features activations on the nShield
Connect will persist unless you deliberately factory state the unit (from the front panel menu).
For more information, see Adding or restoring an HSM to the Security World on page 144.
1. Copy the directory that contains the image file and/or firmware which you require to the directory
%NFAST_HOME%\nethsm-firmware .
The latest image file and/or firmware is placed here by default when you install the Security World
Software.
2. From the main menu on the unit, select System > Upgrade system.
3. Confirm that you want to upgrade the image file and/or firmware.
4. Select the directory that contains the image file and/or firmware which you require. You are
informed that the files are being transferred.
5. Verify the image version, HSM (firmware) version, and image VSN that are displayed, and confirm
the upgrade when prompted.
To apply a dynamic feature certificate, e.g. nShield Connect client license, do the following:
1. Use the nethsmadmin utility to list the nShield Connect feature files on the RFS. Run the command:
In this command:
--module=MODULE
2. Use the nethsmadmin utility to make the nShield Connect use a specific feature file from the RFS.
Run the command:
In this command:
--module=MODULE
Specifies the HSM to use, by its ModuleID (default = 1)
--rfs=RFS_IP.
Specifies the IP address of the RFS.
--apply-feature=FEATURE_FILENAME
Applies the feature certificate called FEATURE_FILENAME.
feature_file must be the path to the feature file that is displayed when you run the nethsmadmin
--module=MODULE--rfs_RFS_IP --list-features command. Errors are reported if you use either
just the feature name, or the full path. The file must be alphanumeric, and no longer than 150
characters.
The following is an example of the output expected when applying a dynamic feature:
The following is an example of the output expected when applying a static feature:
Use the fet utility to verify the feature was applied correctly.
The following description assumes the RFS and Client are separate machines which an nShield Connect
has already been configured to use. If you are using a combined RFS/Client, then apply the following
instructions to the same machine. The Client must have privileged access to the nShield Connect.
The new firmware image file must be contained in the following folder on the RFS:
l Windows: %NFAST_HOME%\nethsm-firmware\<version>
l Linux: $NFAST_HOME/nethsm-firmware/<version>
where ‘<version>’ is a subfolder containing a firmware image for the respective ‘version’.
If this folder does not already exist on the RFS, it must be created by a user with the necessary privileges.
(There can be more than one <version> subfolder). The image upgrade file may be supplied as a separate
item that must be copied into the subfolder for its respective version. The file must always be named
‘nCx3N.nff’ irrespective of its version.
To list the image file(s) available on the RFS, run the following command from the Client:
Where:
e.g.
nethsm-firmware/VersionName/nCx3N.nff
nethsm-firmware/AnotherVersionName/nCx3N.nff
In order to load (or upgrade) the firmware image onto the nShield Connect, run the following command
from the Client:
Where:
l <selected-image-version> specifies the version subfolder on the RFS containing the firmware image
you wish to load (upgrade) onto the nShield Connect.
Copy the path to the required image file as provided by the available image list above. (Linux
style path separators are used irrespective of whether the Client or RFS are Windows or Linux
based).
e.g.
If the nShield Connect suffers a loss of power while you are upgrading the image file and/or
internal module firmware, you should exit the ‘nethsmadmin’ utility and try to restart the
process as shown above, once power has been restored to the HSM.
After the image upgrade has completed, run the enquiry utility to check the image version of the target
nShield Connect is as expected.
Once you have enabled remote upgrade, you can upgrade an nShield Connect from a computer using
the nethsmadmin command, without accessing the unit itself.
If you are initializing the HSM into a new Security World, see "Creating a Security World" on page 127.
If you are re-initializing the HSM into an existing Security World, see "Adding or restoring an HSM to the
Security World" on page 144.
SNMP was developed in 1988 and revised in 1996. It is currently regarded as the standard method of
network management. It is widely supported and offers greater interoperability than traditional network
management tools (for example, rsh or netstat). This makes it ideal for use for the large array of platforms
that we support and also avoids the overhead of remote login and execution, helping to reduce network
congestion and improve performance.
SNMP defines a collection of network management functions allowing management stations to gather
information from, and transmit commands to, remote machines on the network. Agents running on the
remote machines can take information gathered from the system and relay this information to the
manager application. Such information is either requested from the underlying operating system or
gained by interrogating the hardware.
Every SNMP manager adds monitor components differently. Consult the documentation
supplied with your SNMP Manager application for details on how to add the MIB files.
Message Description
get This message is sent by a manager to retrieve the value of an object at the
agent.
set This message is sent by a manager to set the value of an object at the
agent.
The SNMP monitoring agent is based on the open-source Net-SNMP project, version 5.7.3. More
information on SNMP in general, and the data structures used to support SNMP installations, is available
from the NET-SNMP project Web site: http://net-snmp.sourceforge.net/.
This site includes some support information and offers access to discussion e-mail lists. You can use the
discussion lists to monitor subjects that might affect the operation or security of the SNMP agent or
command-line utilities.
Discuss any enquiries arising from information on the NET-SNMP Web site with Support
before posting potentially sensitive information to the NET-SNMP Web site.
If no existing SNMP agent is found, the SNMP agent runs on the default port 161. If an existing SNMP
agent is detected, and no SNMP agent configuration files are found (implying a fresh installation), the
installer automatically configures the SNMP agent to use the first unused port above 161 by creating a
new snmpd.conf configuration file with the appropriate directive. It then displays a message indicating the
number of the port that is has selected.
If an existing SNMP agent is found and an existing SNMP agent installation exists, the installer checks the
existing configuration files for an appropriate directive and warns you if one does not exist. If you need to
edit these configuration files yourself, a port is assigned by editing the agentaddress entry in snmpd.conf
file or edtiting the defaultPort entry in snmpd.conf file. If both files have been edited, the agentaddress
entry in snmpd.conf file takes priority for snmpd, and the defaultPort entry in snmpd.conf is ignored.
See SNMP agent command-line on page 440 for more information on additional parameters accepted by
snmpd.
This installs the agent as a Windows Service but does not start it automatically.
By default, the SNMP agent logs start-up and shut-down to the Event Viewer. More detailed
logging can be configured by providing additional parameters when running the SNMP agent
either from the command line or when registering as a service.
To unregister the SNMP agent as a windows service, enter the following command:
snmpd -unregister
The SNMP agent can be started and stopped from the services control panel or from the command
prompt using:
The default nShield SNMP installation allows read-only access to the Management Information Base
(MIB). There is no default write access to any part of the MIB.
Every effort has been taken to ensure the confidentiality of cryptographic keys even when the SNMP
agent is enabled. In particular, the nShield module is designed to prevent the theft of keys even if the
security of the host system is compromised, provided that the Administrator Cards are used only with
trusted hosts. Care must be used when changing the configuration of the SNMP agent.
We strongly advise that you use the SNMP User-based Security Model (USM) with
Authentication and Privacy protocols selected, to ensure only authorised users can obtain
information from the SNMP agent and the confidentiality and data integrity of the transferred
information is protected.
Care has also been taken to ensure that malicious attackers are unable to inundate your module with
requests by flooding your SNMP agent. Command results from administration or statistics commands are
cached, and thus the maximum rate at which the SNMP agent sends commands to the module is
throttled. For more information on setting the cache time-outs, see The SNMP configuration file:
snmp.conf on page 412.
If you are installing the SNMP agent to a host that has an existing SNMP agent installation, you may need
to edit the SNMP configuration files (snmpd.conf and snmp.conf) associated with the SNMP agent to
change the port on which the agent listens for SNMP requests. For more information, see Do you already
have an SNMP agent running? on page 410.
Make sure you protect access to the configuration files, since these contain information that
defines the security parameters of the SNMP system.
The default location for the nShield SNMP configuration files is the %NFAST_HOME%\etc\snmp\ directory.
The snmp.conf and snmpd.conf files are not created automatically by the installation. Instead, example
files (example.snmp.conf and example.snmpd.conf) are created in that location, which you can copy,
rename (to snmp.conf and snmpd.conf), and edit with your desired configuration settings.
The sample snmpd.conf file includes agentuser and agentgroup directives, however these are
inoperative in Windows.
You can override the default search path by setting the environment variable
SNMPCONFPATH to a colon-separated (“:”) list of directories for which to search.
The snmpd.conf file can contain any of the directives available for use in the snmp.conf file and may also
contain the following Security World Software-specific directives:
Directive Description
statstimeout This directive specifies the length of time for which statistics
commands are cached. The default is 5 seconds.
Directive Description
admintimeout This directive specifies the length of time for which administrative
commands are cached. The default is 60 seconds.
keytable This directive sets the initial state of the key table to none , all, or
query. See listKeys in Administration sub-tree overview on page
426.
enable_trap_zero_suffix This directive appends the '.0' suffix to object identifiers (OIDs) for
backward compatibility. The default is 0 (disabled): the directive can
be set to 1 to restore the suffix. Valid values are 0 and 1.
memoryUsageOkThreshold This directive specifies the threshold (as a percentage) below which
HSM memory usage is considered to be ok. The default is 0. See
Memory usage monitoring on page 425 for more details.
memoryUsageHighThreshold This directive specifies the threshold (as a percentage) at which
HSM memory usage is considered to be too high. The default is 0.
See Memory usage monitoring on page 425 for more details.
The timeouts should be set to values that achieve a balance between recieving up to date
information whilst preventing excessive load.
%NFAST_HOME%\etc\snmp\persist
Modifications should only be made to the persist folder's snmp.conf file in order to create users. The files
within this directory should otherwise only be managed by the SNMP agent itself.
User creation con be performed with the createUser directive. See USM users on page 414. On
initialization of the agent the information is read from the file and the lines are removed (eliminating the
storage of the master password for that user) and replaced with the key that is derived from it. This key is
a localised key, so that unlike the password, if it is stolen it can not be used to access other agents.
Do not modify the persistant snmpd.conf file while the agent is running. The file is only read on
initialization of the agent and it is overwritten when the SNMP agent terminates. Any changes
made to this file while the SNMP agent directives is running will be lost. The SNMP agent
should be stopped prior to adding createUser directories to the configuration file.
The default behaviour is to listen on UDP port 161 on all IPv4 interfaces (i.e. equivalent to udp:161).
agentaddress will listen on UDP port 161, but only on the loopback interface (the port specification ":161" is
not strictly necessary as this is the default port) . It will also listen on TCP port 1161 on all IPv4 interfaces.
USM provides authentication and privacy (encryption) functions and operates at the message level
allowing for the following security level to be used with SNMPv3:
Within this document the three possible security levels are referred to as noauth , auth and priv. However,
other forms are sometimes used within the NET-SNMP and the equivalents are:
auth authnopriv
priv authpriv
Users can be added to the SNMP configuration with the createUser directive, defining the security
mechanisms to be used.
createUser [-e ENGINEID] username [SHA authpass phrase] [AES privpass phrase]
It would not normally be necessary to specify the engine ID, but if it is specified, ENGINEID is defined as a
hexadecimal string of octets starting with the 0x prefix. The encoding of the engine ID is defined in the
description of SnmpEngineID from RFC3411.
The following recommendations should be followed when defining the security parameters for SNMPv3:
MD5 and DES are not supported or enabled in the nShield distribution of SNMP. Only SHA
may be used for authentication, and only AES may be used for privacy (encryption).
It is strongly recommended that createUser directives be added to the persist/snmpd.conf file, so that the
pass phrases are not available after the SNMP agent is installed. See "USM users" on the previous page.
The user can then be referenced in access control directives(s) after which it can be used.
rouser [-s usm] USERNAME [noauth | auth | priv [OID | -V VIEW [CONTEXT]]
rwuser [-s usm] USERNAME [noath | auth | priv [OID | -V VIEW [CONTEXT]]
These directives specify that an SNMPv3 user (USERNAME) will be allowed read-only or read-write
access respectively. The default (unspecified) security level is auth , which is the recommended minimum
security level (see above). It is not recommended to use the usm security level noauth , where all SNMP
messages are unauthenticated and any tampering of the message cannot be detected. Using noauth will
reduce the security of the SNMP messages to the level of SNMPv1 or SNMPv2c.
OID restricts access for that user to the subtree rooted at the given OID.
VIEW restricts access for that user to the specified View-based Access Control Model (VACM) view
name. An optional context can also be specified, or context to denote a context prefix. If no context field is
specified (or the token * is used), the directive will match all possible contexts. (Contexts are a mechanism
within SNMPv3 whereby an agent can support parallel versions of the same MIB objects, referring to
different underlying data sets.)
A security model can be specified with "-s SECMODEL " however the default security model "usm" is the
only security model which is supported in the nShield distribution of SNMP.
Example:
l Read-only user with access to the full OID tree requiring authentication as a minimum:
rouser userl
Or
l Read-only user with access to the nCipher MIB allowing unauthenticated requests:
l Read-write user with access to the full OID tree requiring authentication as a minimum:
rwuser user3
Or
l Read-write user with access to the snmpVacmMIB subtree requiring authentication and
encryption:
Or
Specifies an SNMPv1 or SNMPv2c community that will be allowed read-only (GET and GETNEXT) or
read-write (GET, GETNEXT and SET) access respectively. By default, this will provide access to the full
OID tree for such requests, regardless of where they were sent from. SOURCE allows access either from
a particular range of source addresses, or globally ("default"). A restricted source can either be a specific
hostname or address (e.g. localhost or 127.0.0.1), or a subnet - represented as IP/MASK (e.g.
10.10.10.0/255.255.255.0), or IP/BITS (e.g. 10.10.10.0/24).
OID VIEW and CONTEXT are as defined for rouser and rwuser .
Example:
l Setting up a read-only community named public that can be accessed by any user with the
community name:
rocommmunity public
l Setting up a read/write community named private that can only be accessed from the machine on
which the agent is running:
In each case, only one directive should be specified for a given SNMPv3 user, or community string. It is
not appropriate to specify both rouser and rwuser directives referring to the same SNMPv3 user (or
equivalent community settings). The rwuser directive provides all the access of rouser (as well as
allowing SET support). The same applies to rwcommunity and rocommunity.
More complex access requirements (such as access to two or more distinct OID subtrees, or different
views for GET and SET requests) should use VACM configuration directives.
Maps an SNMPv1 or SNMPv2c community string to a security name. As it defines the community and
maps it to a security name, rocommunity/rwcommunity directives are not required when using the
directive.
COMMUNITY defines the community name to be mapped to the security name. The same community
string can be specified in several separate directives with different source tokens, and the first
source/community combination that matches the incoming request will be selected. Various
source/community combinations can also map to the same security name.
CONTEXT if defined (using -Cn ), means that the community string will be mapped to a security name in
the named SNMPv3 context. Otherwise the default context ("") will be used.
Example:
Creating three SNMPv1/v2c community names (private , public and ltd ), where private and ltd only allow
requests from the machine on which the SNMP Agent is running (note lines beginning with a # in
snmpd.conf are treated as comments):
Maps a security name (in the specified security model) into a named group. Several group directives can
specify the same group name, allowing a single access setting to apply to several users and /or
community strings. Note that groups must be set up for the two community-based models separately - a
single com2sec directive will typically be accompanied by two group directives.
GROUP is the group name being defined/added to v1 , v2c or usm defines the security model to which the
definition relates SECNAME is the security (USM user name or security name defined by com2sec to be
added to the group.
Example:
Creating three groups (grp_private , grp_public, grp_limited ) for three USM users (user1 , user2 and user3 )
and the three communities shown in the com2sec example above:
Defines a named view - a subset of the overall OID tree. This is most commonly a single subtree, but
several view directives can be given with the same view name (VNAME), to build up a more complex
collection of OIDs. An optional mask can also be specified, providing a means of indicating which parts of
the OID must be matched.
included | excluded allows you to define whether the view includes or excludes the subtree, allowing the
definition of a more complex view (e.g. by excluding certain sensitive objects from an otherwise
accessible subtree).
MASK is an optional list of hex octets (separated by '.' or ':') whose bits indicate which OID sub-identifiers
to match against. So for example if we assume we have on OID with 11 sub-identifiers
(.1.3.6.1.x.y.z.table.entry.column.1 ) where the last four relate to a table, an entry, a column and index 1,
specifying a MASK value of "FF.A0 " (i.e. 1111111110100000) maps to this OID as follows:
1.3.6.1.x.y.z.table.entry.column.1
1111111 1 1 0 1
i.e. this mask means all parts of the OID except the column must match, therefore defining a view to any
column of the first row of the table.
By including and excluding various aspects of the full OID tree, it is possible to define fine grained visibility
within a view's definition.
Example:
Creating five views where vw_sysContact only has access to the system.sysContact.0 OID, vw_nCipher
only has access to the MIB, vw_global has access to the full OID tree, vw_nCipher_stats only has access
to nCipher.nC-series.statistics and vw_nCipher_admin only has access to nCipher.nC-
series.administration :
access GROUP CONTEXT any | v1 | v2c | usm noauth | auth | priv exact | prefix READ WRITE NOTIFY
Maps from a group of users/communities (with a particular security model and minimum security level,
and specific context) to one of three views, depending on the request being processed.
GROUP is a group name defined by the group directive and specifies the group that access is being
defined for.
CONTEXT specifies the context for the access (the default context is the empty string ""). The context of
incoming requests must match against the context either exactly or by prefix, as specified by the choice of
exact | prefix made in this directive.
any, v1 , v2c, or usm define the security model to which this definition relates.
noauth | auth | priv define the security level to which this definition relates. For v1 or v2c access, this will
need to be noauth as these protocols do not support authentication.
exact | prefix specify how CONTEXT should be matched against the context of the incoming request,
either an exact match to CONTEXT, or prefixed by CONTEXT.
READ, WRITE and NOTIFY specifies the view to be used for GET*, SET and TRAP/INFORM requests
(although the NOTIFY view is not currently used). The keyword none is used if there is to be no access for
that type of request.
Example:
Specifying that:
l SNMPv1 requests using the public community only have read access to the
enterprises.nCipher.nC-series.statistics subtree,
l SNMPv2c requests using the public community only have read access to the
enterprises.nCipher.nC-series.administration.subtree,
l SNMPv3 requests using the user2 USM user, must as a minimum be authenticated, and have
read, notify access to the nCipher MIB (i.e. enterprises nCipher)
l SNMPv3 requests using the user1 USM user, must as a minimum be authenticated and encrypted,
and have read, write and notify access to the full OID tree. Note that since requests must be
authenticated and encrypted as a minimum, SNMPv1 and v2c requests using the private
community cannot be made even though the community is included in grp_private.
l SNMPv1 and SNMPv2 requests using the ltd community and SNMPv3 requests using the user3
USM user, do not require to be authenticated or encrypted, and have read, write access to the
system.sysContact.0 OID.
trapcommunity COMMUNITY
Defines the default community to be used when sending SNMPv1 or SNMPv2 traps. Note that this
directive must be used prior to a trapsink or trap2sink directive that wishes to use this community.
Example:
trapcommunity traps
HOST is an address specifier defining the network target that traps will be sent to. It consists of an
optional transport specifier (udp (default if not specified) or tcp ) followed by a hostname or IPv4 address
followed by an optional port number, deliminated by colons ":". (e.g. localhost or tcp:192.168.137.2:163).
COMMUNITY if specified will be the community name used for the traps. If it is is not specified, the most
recently specified trapcommunity will be used.
PORT allows for port-number to be defined if it is not present as part of the HOST specification. If no port
is defined, the default port number of 162 will be used.
When a TCP transport specifier is used the SNMP agent establishes the TCP connection with the trap
manager at start-up. Therefore the trap manger must be started before the SNMP agent otherwise an
error is reported for the line in the snmpd.conf file which defines the trap manager.
Likewise when the TCP connection between the SNMP agent and the trap manager is dropped, traps are
lost. Therefore it is inadvisable to use TCP instead of UDP for the transport specifier of trap managers.
If TCP is used for the connection between the SNMP agent and the trap manager and the connection is
lost, to re-establish the connection the SNMP agent must be restarted, with the trap manager running and
able to accept a TCP connection from the SNMP agent.
For issues with the trap manager accepting TCP connections from a SNMP agent refer to trap manager
documentation.
Example:
Defines the configuration for a trap. This is the only way to define SNMPv3 traps and it is an alternative
method for defining SNMPv1 and SNMPv2 traps.
SNMPCMD_ARGS are arguments that would be used for an equivalent snmptrap command. So for
example to send an SNMPv3 trap as USM user user1 with authentication and encryption, the value "-v3 -
u user1 -1 priv" would be used.
Example:
The nShield SNMP monitoring agent provides MIB files that can be added to your (third-party)
SNMP manager application.
As a consequence, manager applications are generic and can be bought off the shelf. You may already
be running SNMP managers, and if so, you can use them to query the SNMP agent.
The manager is initially unaware of the MIB tree structure at a particular node. Managed
objects can be retrieved or modified, but only if their location in the tree is known.
It is more useful if the manager can see the MIB tree present at each managed node. The MIB module
descriptions for a particular node must be parsed by a manager-specific MIB compiler and converted to
configuration files. These files are read by the manager application at run time.
The SNMP agent is designed to monitor all current nShield modules, working with all supported versions
of nShield firmware (contact Support for details of supported firmware).
The MIB module resides at a registered location in the MIB tree determined by the Internet Assigned
Numbers Authority (IANA). The private enterprise number of 7682 designated by the IANA corresponds
to the root of the branch, and by convention this (internal) node is the company name.
The MIB module groups logically related data together, organizing itself into a classification tree, with
managed objects present at leaf nodes. The nC-series node (enterprises.nCipher.nC-series) is placed as
a sub-tree of the root (enterprises.nCipher ); this allows future product lines to be added as additional sub-
trees. The structure of the tree underneath the registered location is vendor-defined, and this
specification defines the structure chosen to represent Security World Software-specific data.
/opt/nfast/etc/snmp/mibs/ncipher-mib.txt
These categories form the top-level nodes of the sub-tree; the functionality of the first category is in the
administration sub-tree, and the second category is in the statistics sub-tree. The top-level tree also
contains three items that it would be useful to check at-a-glance:
M.7.3.1 Traps
The traps sub-tree (enterprises.nCipher.nC-series.nC-traps) contains traps that the SNMP agent sends
when certain events occur. For details on configuring traps, see USM users on page 414 .
Other generic Net-SNMP traps may also be received.These include the two below, see Net-
SNMP project website for more details.
With memory usage monitoring enabled, there will be a memoryUsageHighAlert trap sent each time the
currently in-use memoryUsageHighThreshold is reached or exceeded by an HSM.
l If the SNMP agent starts up and recognises that there are HSMs in a high memory usage state or,
For each of the four scenarios above, one memoryUsageHighAlert trap will be sent for each HSM in a
high memory usage state.
With memory usage monitoring enabled, there will be a memoryUsageOkAlert trap sent each time the
memory usage for an HSM falls below the currently in-use memoryUsageOkThreshold .
The value for memoryUsageOkThreshold is read from the snmpd.conf file on starting the SNMP agent
and is used provided it contains an integer value in the range 0 to 100 (inclusive); otherwise, the default
value of 0 is used. The value for memoryUsageHighThreshold is processed in the same way.
Memory usage monitoring is enabled unless the in-use values for memoryUsageOkThreshold and
memoryUsageHighThreshold are both 0 or the in-use values are such that memoryUsageOkThreshold >
memoryUsageHighThreshold .
An example of memory usage monitoring by an SNMP agent on a client computer enrolled with 2 HSMs
is given below:
The following table gives details of the individual nodes in the administration sub-tree:
4: resetquery
listKeys can be preset using the keytable config directive in snmpd.conf file (see The SNMP configuration
file: snmp.conf on page 412).
1: Operational
2: Pre-init
3: Init
4: Pre-maint
5: Maint
6: AccelOnly
7: Failed
8: Unknown
productName R DisplayString
1: unknown state.
2: usable
3: maintmode
4: uninitialized
5: factory
6: foreign
7: accelonly
8: failed
9: unchecked
10: initmode
11: preinitmode
12: outofrange
1: Datakey
2: Smart card
3: Emulated
4: Soft token
5: Unconnected
6: Out of range
7: Unknown
2: Empty
3: Blank
4: Administrator
5: Operator
6: Unidentified
7: Read error
8: Partial
9: Out of range
slot, if present.
cardsetName R DisplayString
The following table gives details of the nodes in the key administration table
(enterprises.nCipher.nC-series.administration.keyAdminTable ):
keyHash R MHash
4: Unknown
5: Invalid
6: Unset
4: Unknown
5: Invalid
6: Unset
If these values are set, they are taken as required attributes for filtering the list of available keys; if
multiple attributes are set, the filters are combined (AND rather than OR).
The following table gives details of the nodes in the key query sub-tree
(enterprises.nCipher.nC-series.administration.keyQuery):
4: Unknown
5: Invalid
6: Unset
4: Unknown
5: Invalid
6: Unset
keyQueryTimeLimit R/W Gauge32 Time limit for the key, if set (0 for no
limit).
Do not rely on information returned from the agent to change instantaneously on re-reading
the value. To avoid loading the nShield module with multiple time-consuming statistics
commands, the agent can choose to cache the values over a specified period. You can
configure this period in the agent configuration file see "Basic configuration" on page 411.
cmdBytesAll R Counter32
replyCountAll R Counter32
replyBytesAll R Counter32
clientCount R Gauge32
maxClients R Counter32
deviceFails R Counter32
deviceRestarts R Counter32
load[All] R Counter32
cmdBytes R Counter32
replyCount R Counter32
replyBytes R Counter32
loadModule R Counter32
loadModule R Counter32
objectCount R Gauge32
nvRAMInUse R Gauge32
volatileRAMInUse R Gauge32
compMajorVersion R Gauge
compMinorVersion R Gauge
compPatchVersion R Gauge
compBuildNumber R Gauge
The SNMP agent supports a limited subset of command line switches that can be specified when starting
the agent.
Usage
snmpd [-h] [-v] [-f] [-a] [-d] [-V] [-P PIDFILE):] [-q] [-D] [-p NUM] [-L] [-l LOGFILE] [-r]
Option Description
-H This option displays the configuration file directives that the agent understands.
-v This option displays version information.
-A This option specifies that warnings and messages should be appended to the log file
rather than truncating it.
-d This option specifies the dumping of sent and received UDP SNMP packets.
-V This option specifies verbose display.
-P PIDFILE This option specifies the use of a file (PIDFILE) to store the process ID.
-q This option specifies that information be printed in a more easily parsed format (quick
print).
-C This option specifies that the default configuration files not be read.
Utility Description
snmptest This utility monitors and manages SNMP inform-
ation.
snmpget This utility runs a single GET request to query for
SNMP information on a network entity.
These tools are general purpose SNMP utilities and are configurable for use with other SNMP
agents. For more information on configuring and using these tools, refer to the NET-SNMP
project Web site: http://net-snmp.sourceforge.net/.
The blue Status LED flashes the Morse distress code (SOS: three short pulses, followed by three long
pulses, followed by three short pulses). The Morse distress code is followed by one of the error codes
listed in the tables shown in this guide.
For internal security modules running firmware 2.61.2 and above, the error code listed in this chapter is
also reported by the enquiry utility in the hardware status field of the Module and under hardware errors
in the hardserver log.
Errors are a rare occurrence. If any module goes into the error state, except as a result of you issuing the
Fail command, contact Support, and give full details of your set up and the error code.
Contact Support even if you successfully recover from the error by taking the recommended action. For
troubleshooting information, see the relevant Installation Guide for your module type.
Numeral Morse
1 .----
2 ..---
3 ...--
4 ....-
5 .....
6 -....
7 --...
8 ---..
Numeral Morse
9 ----.
0 -----
The runtime library error codes could be caused by firmware bugs or by faulty hardware. If any of these
errors is indicated, reset the module.
Code Meaning
OLJ --- .-.. . - - - SIGFPE: unsupported arithmetic exception (such as division by 0).
Codes OLD, and OLE are more likely to indicate a hardware problem than a firmware problem.
To reset a unit that is in an error state, turn off the unit and then turn it on again.
In the following table, the symbol “#” stands for a given numeral’s Morse code representation.
Code Meaning
HRTP .... .-. - .--. Periodic (scheduled daily) RNG selftest failed.
HCV .... -.-. ...- CPLD wrong version for PCI policing firmware.
HHR .... .... .-. RTC hardware detection failed or random number
generator detection failed.
Code Meaning
HCn C .... -.-. # -.-. .- CPU n failed self-test; no memory for cached RAM
A test.
HCn C .... -.-. # -.-. -.-. CPU n failed self-test; CPU ID check failed.
C
HCn C .... -.-. # -.-. ..-. CPU n failed self-test; freeing memory for cached
F RAM test.
HCn C .... -.-. # -.-. --. CPU n failed self-test; setting up cached RAM test.
G
HCn C .... -.-. # -.-. .-. CPU n failed self-test; read error during cached RAM
R test.
HCn C .... -.-. # -.-. ...- CPLD version number incorrect (nShield Solo).
V
HCn C .... -.-. # -.-. .-- CPU n failed self-test; write error during cached RAM
W test.
HCn K .... -.-. # -.- .- CPU n failed selftest - AES known-answer test.
A
HCnK .... -.-. # -.- -... CPU n failed selftest - AES CMAC known-answer
B test.
HCn K .... -.-. # -.- -.-. CPU n failed selftest - ECDSA known-answer test
C
HCn K .... -.-. # -.- . CPU n failed self-test; DES known-answer test.
E
HCn K .... -.-. # -.- ..-. CPU n failed self-test; Triple-DES known-answer test.
F
HCn K .... -.-. # -.- .... CPU n failed self-test; SHA-1 known-answer test.
H
HCn K .... -.-. # -.- .--- CPU n failed selftest - HMAC-SHA256 known-
J answer test.
Code Meaning
N answer test.
HCn K .... -.-. # -.- .--. CPU n failed selftest - HMAC-SHA384 known-
P answer test.
HCn K .... -.-. # -.- .-. CPU n failed selftest - RSA known-answer test
R
HCn K .... -.-. # -.- ... CPU n failed self-test; DSA known-answer test.
S
HCn L .... -.-. # .-.. -.-. CPU n failed self-test; locking check.
C
HCn P .... -.-. # .--. ... CPU n failed self-test; test terminated at start.
S
HCn S .... -.-. # ... .--. CPU n failed self-test; no memory for uncached RAM
A test.
HCn S .... -.-. # ... ..-. CPU n failed self-test; freeing memory for uncached
F RAM test.
HCn S .... -.-. # ... .-. CPU n failed self-test; read error during uncached
R RAM test.
HCn S .... -.-. # ... .-- CPU n failed self-test; write error during uncached
W RAM test.
HCn T .... -.-. # - ... CPU n failed self-test; could not start test.
S
KFE -.- ..-. . Flash sector erase failed. Repeat firmware upgrade.
KFP -.- ..-. .--. Flash sector program failed. Repeat firmware upgrade.
For instructions on upgrading module firmware, see the appendix in the User Guide for your
module type.
D -.. Fail command received. Reset module by turning it off and then
on again.
maximum allowable.
SOS IJA can occur for any type of log message (i.e. a log message, signature block or certifier
block).
To improve the cooling of your PCIe module, increase the distance between PCIe cards, and
increase the airflow through your host computer.
Do not uninstall the Security World Software unless either you are certain it is no longer
required or you are going to upgrade it.
The uninstaller removes only those files that were created during the installation. To remove key data or
Security World data, navigate to the installation directory and delete the files in the %NFAST_KMDATA%
folder.
If you intend to remove your Security World before uninstalling the Security World Software, nCipher
recommends that you erase the OCS before you erase the Security World or uninstall the Security World
Software. Except where Remote Administration cards are used, after you have erased a Security World,
you can no longer erase any cards that belonged to it.
1. Log in to the host computer as Administrator or as a user with local administrator rights.
2. Run the following command to erase the OCS:
When using a Solo, Solo+, Connect or Connect+, around 40 outstanding jobs per HSM is a good target
when using an application that is coded directly against the nCore API. When using higher-level APIs
such as PKCS#11 or CNG, your application may benefit from increasing the job count further, e.g. to 60 or
more outstanding jobs per HSM.
The ncperftest utility supports performance measurements of a range of cryptographic operations with
different job counts and client thread counts. You may find this useful to inform tuning of your application.
Run ncperftest --help to see the available options.
When using higher-level APIs such as PKCS#11 or CNG, all cryptographic operations are synchronous, so
larger numbers of threads must be used to increase the job count and make full use of HSM resources.
These APIs automatically create a hardserver connection for each thread. If many HSMs are being used,
a great many threads may be required to achieve best throughput. You can adjust the thread counts in
the performance test tools for these APIs (e.g. cksigtest for PKCS#11 and cngsoak for CNG) to gauge how
much concurrency is required for best throughput in your application.
You may benefit from using a scalable memory allocator that is designed to be efficient in multi-threaded
applications, examples include:
On all systems except HP-UX, the hardserver is configured to use a scalable memory allocator by default,
so only the client application requires special configuration. On HP-UX, the hardserver will automatically
use the HP MallocNextGen memory allocator if it is installed. MallocNextGen is an optional package
which can be downloaded free of charge from the HP website:
https://h20392.www2.hpe.com/portal/swdepot/displayProductInfo.do?productNumber=MallocNextGen
On some systems the default operating system scheduling algorithm is also not optimized for highly
multi-threaded applications. A real-time scheduling algorithm such as the POSIX round-robin scheduler
may yield noticeable performance improvements for your application. This has been observed to be
especially the case on HP-UX, where you can execute your application using the rtsched utility to change
the scheduling algorithm from the default.
Benefits of MergedKeys:
l A client need hold only a single M_KeyID reference instead of one for each HSM.
l That ID remains usable even while the key's actual IDs on HSMs can fluctuate.
l The hardserver can use heuristics to choose the most appropriate HSM (e.g. the least heavily
loaded one).
l If some HSMs become unavailable, the hardserver uses the remaining ones automatically.
l A MergedKey can be updated, removing its entry for a defunct HSM and corresponding
single-key ID.
l New HSMs can be added: if a new HSM is made operational and added to the relevant security
world, then
l the key can be loaded onto that HSM, thus creating a new single-key ID for that key on that
HSM, and then
l the new (Key ID, HSM) pair can be added to the existing Merged Key.
https://help.ncipher.com
Appendix S Glossary
Authorized Card List
Controls the use of Remote Administration cards. If the serial number of a card does not appear in the
Authorized Card List, it is not recognized by the system and cannot be used. The list only applies to
Remote Administration cards.
The Administrator Cards containing share in the logical tokens that protect the Security World keys,
including KNSO, the key-recovery key, and the recovery authorization keys. Each card contains one share
from each token. The ACS is created using the well-known module key so that it can be loaded onto any
nShield module.
See also "Security World" on page 461, "Operator Card Set (OCS)" on page 460
Although AES is often referred to as Rijndael (the cipher having been submitted to the AES selection
process under that name by its developers, Joan Daemen and Vincent Rijmen), these are not precisely
the same cipher. Technically, Rijndael supports a larger range of block and key sizes (at any multiple of
32 bits, to a minimum of 128 bits and a maximum of 256 bits); AES has a fixed block size of 128 bits and
only supports key sizes of 128, 192, or 256 bits.
Audit logging
Audit logging, also known as syslog-sign, adds a number of control messages to the log entries that are
to be audited:
CAST
CAST is a symmetric encryption algorithm with a 64-bit block size and a key size of between 40 bits to
128 bits (but only in 8-bit increments).
See also "Triple DES" on page 462, "Advanced Encryption Standard (AES)" on the previous page
Diffie-Hellman
The Diffie-Hellman algorithm was the first commercially published public key algorithm. The Diffie-
Hellman algorithm can only be used for key exchange.
ECDH
A variant of the Diffie-Hellman anonymous key agreement protocol which uses elliptic curve
cryptography.
ECDSA
Elliptic Curve DSA: a variant of the Digital Signature Algorithm (DSA) which uses elliptic curve
cryptography.
See also "Digital Signature Algorithm (DSA)" on the previous page, " Diffie-Hellman" on the previous
page.
EdDSA
Edwards-curve DSA; a Digital Signature Algorithm (DSA) which uses a variant of Schnorr Signature
based on Twisted Edwards curves.
nCipherKM supports the Edwards 25519 curve and it's prehash variant, Ed25519ph. The context variant,
Ed25519ctx, is not supported. Keys generated using the Ed25519 algorithm can be used for both
Ed25519 and Ed25519ph signature operations.
encryption: {A}B
This notation indicates the result of A encrypted with key B.
All Security Worlds are compliant with FIPS 140-2. By default, Security Worlds are created to comply with
FIPS 140-2 at level 2, but those customers who have a regulatory requirement for compliance with
FIPS 140-2 at level 3 can also choose to create a Security World that meets those requirements.
Hardserver
The hardserver software controls communication between the internal hardware security module and
applications on the network. The module hardserver is configured using the front panel on the module or
by means of uploaded configuration data. Configuration data is stored on the module and in files in a
specially configured file system on each client computer.
Hash: H(X)
This notation indicates a fixed length result that can be obtained from a variable length input and that can
be used to identify the input without revealing any other information about it. The nShield module uses
the Secure Hash Algorithm (SHA-1) for its internal security.
HID is not modified by any operations on the key (for example, altering the ACL, the application data field,
or other modes and flags)
HID is the same for both public and private halves of a key pair.
Unique data is added to the hash so that a HID is most unlikely to be the same as any other hash value
that might be derived from the key material.
Key blob
A key blob is a key object with its ACL and application data encrypted by a module key, a logical token, or
a recovery key. Key blobs are used for the long-term storage of keys. Blobs are cryptographically secure;
they can be stored on the host computer’s hard disk and are only readable by units that have access to
the same module key.
Key object: KA
This is a key object to be kept securely by the module. A key object may be a private key, a public
counterpart to a private key, a key for a symmetric cipher (MAC or some other symmetric algorithm), or
an arbitrary block of data. Applications can use this last type to allow the module to protect any other data
items in the same way that it protects cryptographic keys. Each key object is stored with an ACL and a
20-byte data block that the application can use to hold any relevant information.
KeyID: ID KA
When a key object KA is loaded within the module’s RAM, it is given a short identifier or handle that is
notated as IDKA. This is a transient identifier, not to be confused with the key hash HID(KA).
Logical token: KT
A logical token is a key used to protect key blobs. A logical token is generated on the nShield module and
never revealed, except as shares.
MAC: MACKC
This notation indicates a MAC (Message Authentication Code) created using key KC.
Module
See "hardware security module (HSM)" on the previous page.
Module key: KM
A module key is a cryptographic key generated by each nShield module at the time of initialization and
stored within the module. It is used to wrap key blobs and key shares for tokens. Module keys can be
shared across several modules to create a larger Security World.
l module key zero KM0, a module key generated when the module is initialized and never revealed
outside the module.
l null, or well-known module key KMWK.
See also: "Security World" on the next page, "hardware security module (HSM)" on page 458.
The notation KNSO-1 indicates the Security Officer’s signing key. This key is usually a key to a public-key
signature algorithm.
See also: "Security World" on the next page, "Administrator Card Set (ACS)" on page 456.
For example, the remote access solution is used to run Security World utilities remotely and to enter
passphrases.
Remote Administration
An optional Security World feature that enables Remote Administration card holders to present their
cards to an HSM located elsewhere. For example, the card holder may be in an office, while the HSM is in
a data center. Remote Administration supports the ACS, as well as persistent and non-persistent OCS
cards, and allows all smart card operations to be carried out, apart from loading feature certificates.
Dynamic Slot
Virtual card slots that can be associated with a card reader connected to a remote computer. Remote
Administration Slots are in addition to the local slot of an HSM and any soft card slot that may be
available. HSMs have to be configured to support between zero (default) and 16 Remote Administration
Slots.
Rijndael
See "Advanced Encryption Standard (AES)" on page 456
Salt: X
The random value, or salt, is used in some commands to discourage brute force searching for keys.
Security World
The Security World technology provides an infrastructure for secure lifecycle management of keys. A
Security World consists of at least one HSM, some cryptographic key and certificate data encrypted by a
Security World key and stored on at least one host computer, a set of Administrator Cards used to control
access to Security World configuration, recovery and replacement operations, and optionally one or more
sets of Operator Cards used to control access to application keys.
See also "Administrator Card Set (ACS)" on page 456, "Operator Card Set (OCS)" on page 460.
Share: KTi
The notation KTi indicates a share of a logical token. Shares can be stored on smart cards or software
tokens. Each share is encrypted under a separate share key.
Tamper Resistance
Hardening a device so that tamper attempts are more difficult (require specialized tools and take more
time, e.g. potting and using hardened containers).
Tamper Evidence
Using materials or mechanism that will indicate, under visual inspection, that a tamper has occurred (e.g.
tamper evident labels).
Tamper Detection
Mechanisms that indicate when a potential tamper is occurring (e.g. temperature sensors, that indicate
when the temperature of the device's environment has exceeded a preset threshold).
Tamper Response
An automatic reaction to a tamper being detected (e.g. purge of the sensitive data).
Triple DES
Triple DES is a highly secure variant of the Data Encryption Standard (DES) algorithm in which the
message is encrypted three times.
See also "Data Encryption Standard (DES)" on page 457, "Advanced Encryption Standard (AES)" on
page 456.
Contact Us
Web site: https://www.ncipher.com
Support: https://help.ncipher.com
Email Support: [email protected]
Online documentation: Available from the Support site listed above.
You can also contact our Support teams by telephone, using the following numbers:
Americas
Toll Free: +1 833 425 1990
Fort Lauderdale: +1 954 953 5229
Sawgrass Commerce Center – A
Suite 130,
13800 NW 14 Street
Sunrise
FL 33323 USA
Asia Pacific
Australia: +61 8 9126 9070
World Trade Centre Northbank Wharf
Siddeley St
Melbourne VIC 3005
Australia