Nshield Connect v13 4 User Guide
Nshield Connect v13 4 User Guide
1. Introduction
All nShield HSMs support standard cryptography frameworks and integrate with
many standards based products.
• You are familiar with the basic concepts of cryptography and Public Key
Infrastructure (PKI)
• You have read the Installation Guide.
• You have installed your nShield HSM.
1.1.1. Terminology
The nShield Connect is also referred to as the hardware security module or the
nShield HSM.
1.2. Conventions
The Security World for nShield is a collection of programs and utilities, including
the hardserver, supplied by Entrust to install and maintain your nShield security
system.
Entrust provides the firmware that runs on the nShield HSM, and software to run
on each client computer. The nShield HSM is supplied with the latest version of the
HSM firmware installed. For more information about:
• Upgrading the firmware, see Upgrading the image file and associated
firmware.
• Installing and configuring the software on each client computer, see the
Installation Guide and Client Software and module configuration.
• The supplied utilities, see Supplied utilities.
• Maintenance of your nShield hardware, see Maintenance of nShield Hardware.
The software, firmware, and utilities have version numbers and there is also a
version number for the World which refers to the World data that is stored in
encrypted form on the client computer, typically in the opt/nfast/kmdata (Linux) or
C:\ProgramData\nCipher\Key Management Data (Windows) directory or on the RFS.
This data includes information concerning the World itself and also concerning
each key that was created within that World. The World version created is
determined by the version numbers of the software and firmware used when it
was first created, see Creating and managing a Security World.
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.2.1.1. Hardserver
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.
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
• The front panel to configure the unit, see The front panel interface
• The specially configured file system to configure the unit and the client, see
Client Software and module configuration.
Each unit uses a remote file system (RFS). You can configure the RFS on any
computer, but it is normally located on the first client that is configured. The RFS
contains:
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 Security World Software is a collection of programs and utilities that you
install on the client and use to maintain the nShield security system. The Security
World Software includes the following:
The nShield HSM is referenced and used by a utility or application in the same way
as a local (PCI-connected) nShield HSM.
The default locations for Security World Software and program data directories on
English-language systems are summarized in the following table:
The instructions in this guide refer to the locations of the software installation and
• Linux: Create a symbolic link from /opt/nfast/ to the directory where the
software is actually installed.
• Windows: Ensure that the associated nShield environment variables are re-set
with the correct paths for your installation. For more information about
creating symbolic links, see your operating system’s documentation.
Unless noted, all the executable utilities provided in the bin subdirectory of your
nShield installation have the following standard help options:
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, for example running enquiry instead of opt/nfast/bin/enquiry>
(Linux) or <%NFAST_HOME%\bin\enquiry> (Windows).
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.
We recommend that you monitor the Announcements & Security Notices section
on Entrust nShield, https://nshieldsupport.entrust.com, 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.
• Security
• Application independence
• Platform independence
• Flexibility
• Scalability
• Robustness
• 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 the
image below.
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
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.
You must keep the ACS secure and separate from the HSMs
when you are not using it, to minimize risk to the Security
World.
• Zero or more Operator Card Sets (OCSs) to control access to application keys
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.
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.
secure area).
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:
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.
For more information, refer to the nShield Remote Administration User Guide.
Security World and key data is stored on the file system of the nShield HSM, 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. 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.
In order to comply with the latest encryption standards, Entrust has adopted an
enhanced NIST SP800-131A compliant encryption protocol between nShield HSM
HSMs and their clients with 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
Release Image versions Security World Security World Software1 v11.50 and
version nShield HSM Software1 v11.40 later
1
Previously known as nCipher software, or nCSS.
A Security World that complies with the roles and services section of FIPS 140
Level 2 does not require any authorization to create an OCS or an application key.
When you create a Security World, you can choose whether the Security World is
compliant with the roles and services section of either:
The FIPS 140 Level 3 option is included for those customers who have a regulatory
requirement for compliance with FIPS 140 at Level 3.
If you choose to create a Security World that complies with FIPS 140 Level 3, the
nShield HSM initializes in that mode, conforming with the roles and services, key
Before you can create or erase an OCS in a Security World that complies with FIPS
140 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 Entrust nShield
Support, https://nshieldsupport.entrust.com.
• Safely move a Security World between platforms with differing native formats.
For example, you can move a Security World between Windows and Linux
operating environments.
• Include hosts running different operating systems in the same Security World.
• Which applications you intend to use. You can add a key for any supported
application at any time.
• 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.
• Card Set 1 protects multiple keys for use with Application 1 and Application 2
• Card Set 2 protects a single key for use with Application 2
• Card Set 3 protects multiple keys for use with Application 2 and Application
3
• 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.
You can use the Security World key to protect an application key that you must
make available to all your users at all times. This key is called a module-protected
key. Module-protected keys:
• Have no passphrase
• Are usable by any instance of the application for which they were created,
provided that this application is running on a server fitted with a hardware
security module belonging to the correct 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.
You can use OCSs to enable the same keys for use in a number of different HSMs
at the same time.
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
• K to 1
• N at least equal to the number of the HSMs you want to use.
You can then insert single cards from the OCS into the appropriate card slot of
each HSM to authorize the use of that key.
• K to 1
• N equal to the number of users.
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.
If you cannot risk the failure of a smart card, but some keys must remain
accessible at all times, you can create a 1/2 OCS.
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).
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.
If you create a standard (non-persistent) OCS, you can only use the keys
protected by that OCS while the last required card of the quorum remains loaded
in the card reader. The keys protected by this card are removed from the memory
of the hardware security module as soon as the card is removed from the card
reader, which provides added security.
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:
• The use of the same smart card in several hardware security modules at the
same time
• 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:
• When the application that loaded the OCS closes the connection to the
hardware security module
• After a time limit that is specified when the card set is created
• When an application chooses to remove a key
• When the HSM is cleared. See Manually removing keys from an HSM for more
information
• If there is a power loss to the module, for example, due to power outage.
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 passphrase 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.
You can manually remove all keys protected by persistent cards by clearing the
hardware security module. For example, you could:
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 passphrase for a card at any time provided that you have
access to the card, the existing passphrase, and a hardware security module that
belongs to the Security World to which the card belongs. For more information,
see Changing card and softcard passphrase.
passphrases are limited to a maximum length of 254 characters, when using the
following commands:
• new-world
• createocs
• cardpp
• ppmk
• racs
You can still use and edit existing passphrases that are longer than 254 characters.
Prior to Security World Software v11.72, we set no absolute limit on the length of
passphrases, although individual applications may not accept passphrases longer
than a specific number of characters. Likewise, the Security World does not
impose restrictions on which characters you can use in a passphrase, although
some applications may not accept certain characters.
Entrust recommends that your password only contains 7-bit ASCII characters:
A-Z, a-z, 0-9, ! @ # $ % ^ & * - _ + = [ ] { } | \ : ' , . ? / ` ~ " < > ( ) ;
The HSM maintains a penalty time, measured in seconds and based on the number
of failed PINs. Each failed attempt to enter a passphrase adds 4 seconds to the
penalty time.
The penalty timer has a 14s penalty threshold, the first 3 failed passphrase
verifications do not incur a penalty delay. Before verifying a passphrase, the HSM
waits for the current penalty timer to be below 14s. The penalty time decays over
time.
A softcard is a file containing a logical token that you cannot load without a
passphrase. You must load the logical token to authorize the loading of any key
that is protected by the softcard. Softcard files:
The passphrase 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.
an OCS.
Use of an NVRAM-stored key is the same as for any other key protected by an
nShield HSM Security World.
NVRAM key storage was introduced only for those users who must store keys
within the physical boundary of a hardware security 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.
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.
• Ensure each client has at least one hardware security module configured
• Copy the Security World data to each client
• 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.
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.
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.
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 HSM can be replaced and returned to the
HSM pool without restarting the client application.
You should also use the front panel controls of the nShield HSM,
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.
When using the racs utility, you cannot redefine the quantities in
a K of N relationship for an ACS. The K of N relationship defined
in the original ACS persists in the new ACS.
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:
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 the front panel
controls of the nShield HSM. 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:
• To issue a new key if you lose the OCS that protects the existing key
• 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.
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 HSM 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.
• Create OCSs
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.
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.
• Visit https://nshieldsupport.entrust.com.
• Contact Support.
Many applications use a PKCS (Public Key Cryptography Standard) #11 library to
generate and manage cryptographic keys. We have produced an nShield version
of the PKCS #11 library that uses the Security World to protect keys.
Enabling a PKCS #11 based application to use nShield hardware key protection
involves configuring the application to use the nShield PKCS #11 library.
The nShield 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 nShield PKCS #11 library has
vendor specific extensions that support K/N card sets, see nShield PKCS #11
library with the preload utility.
A Security World does not make any distinction between different applications
that use the nShield 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:
• Never insert a smart card used with key management products into a smart
card reader you do not trust.
• Never insert a smart card reader you do not trust into your hardware security
module.
• Never tell anyone your passphrase.
• Never write down your passphrase.
• Never use a passphrase that is easy to guess.
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.
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.
• Use the touch wheel to scroll the displayed information in the direction
indicated by the onscreen arrows.
• 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.
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.
Tasks Action
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 HSM
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 HSM. See About user privileges and
ui_lockout 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, and follow the
onscreen instructions.
This option is not available if UI Lockout with OCS has not enabled.
Put the unit in standby Press the Power button or select System > Shutdown/Reboot >
mode Shutdown.
Restore the unit to its Select System > System configuration > Default config.
original configuration
Clear the memory of the Use the Clear button or select HSM > HSM reset.
internal hardware security
module
Tasks Action
Set the Real-Time Clock on Select Security World mgmt > Admin operations > Set secure RTC.
the unit
Change the mode of the Select HSM > Set HSM mode.
unit
• Select Operational mode to run the unit normally.
• Select initialization mode to configure the unit with software
utilities rather than the front panel.
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:
You can connect a keyboard to the USB connector on the front panel. You can
connect either a US or a UK keyboard. To configure the unit for your keyboard
type, select System > System configuration > Keyboard layout and then choose
the keyboard type you require.
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.
If a tamper event does occur, you can use the Security World data stored on the
RFS and the Administrator Card Set to recover the keys and cryptographic data.
Should this happen, examine your unit for physical signs of tampering (see
Physical security checks).
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).
For more information about creating and managing security policies, see the
Security Policy Guide.
You require a quorum of the Administrator Card Set (ACS) to restore the key data
and reconnect the nShield HSM to the network.
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). 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). If the tamper event occurred:
After closing the lid you must reboot the nShield HSM. The unit will then
automatically reset to a factory state. If the lid remains open, the above message
will remain on the screen and all button presses are ignored.
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 HSM 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 HSM chassis.
3. Check all surfaces — the top, bottom and sides of the nShield HSM — 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.
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 tamper protection circuitry remains fully operational if the nShield HSM 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).
battery power is low. The Status LED also displays a low power
warning. For more information, see the Installation Guide.
If you receive any of the following error messages on the nShield HSM display,
accompanied by the orange warning LED, follow the related action in the table
below:
Battery power low Consider replacing fan tray during the next scheduled
service/maintenance period.
If the error message is Single fan fail, the nShield HSM 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
HSM is removed from mains power) is running low.
The Battery Power low indication has no detrimental affect on the nShield HSM
performance whilst the unit remains powered. Entrust recommend customers
should consider replacing the fan tray module during the next
service/maintenance.
If two fans fail from a redundant pair, the nShield HSM will display the error
message Many fans have failed for a few seconds and it will then shutdown. On
reboot, the nShield HSM 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.
If a PSU fails, an orange warning LED comes on and an error message is displayed
on the nShield HSM display. Although you are advised to contact Support, the unit
can continue to operate normally and you can replace the failed PSU at your
convenience. There is no need to power down the unit when you replace the failed
PSU.
In addition to the orange warning LED, an audible warning is given when a PSU
fails on an nShield HSM. The audible warning is turned off when you navigate to
the Critical errors screen.
Entrust guarantees a minimum battery life of three years, even if the nShield HSM
remains in storage and is not connected to the mains power supply during this
time.
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.
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.
3. Create and configure a Security World, as described in Creating a Security
World.
4. Create an OCS, as described in Creating Operator Card Sets (OCSs).
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 HSM to use the client.
b. To configure client computers so that they work with the unit, see
Configuring client computers to use the nShield HSM.
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 hardserver.
2. Test the installation and configuration. See the Installation Guide for your HSM
for more information.
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.
Linux
There are three levels of user:
• Superuser
• nfast group user
• normal
Typically, normal users can carry out operations involving Security Worlds,
cardsets and keys, but not create Security Worlds, keys and cardsets. nfast
group users have enhanced access, enabling them to create Security Worlds,
cardsets and keys. For example, encrypted copies of keys are held in kmdata
(/opt/nfast/kmdata). Normal users only have read access to the files, whereas
nfast group users have read and write access, enabling them to create and use
keys. nfast group users can also change the mode of an HSM remotely.
Superuser access (for example, root) is required for such tasks as software
installation, starting and stopping the hardserver and SNMP.
Windows
There are two levels of user in Windows:
• Administrator access
• Normal
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.
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:
• Each client hardserver to communicate with the HSM that the client needs to
use
• The HSM to communicate with clients that are allowed to use the HSM.
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).
Each HSM has separate configuration files on the RFS, stored in the directories
with names of the form /opt/nfast/kmdata/hsm-ESN/config (Linux) or
%NFAST_KMDATA%\hsm-ESN\config (Windows) 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.
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 HSM
and client configuration files.
To configure the Ethernet interfaces (IPv4 and IPv6), see the Installation Guide for
your HSM.
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
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 FINISH
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.
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.
For more information about the RFS and its contents, see:
The nShield 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 nShield HSM.
You can configure the connection to use secure authentication using software-
based authentication or with an nToken (or local HSM) installed in the RFS. When
enabled the nShield HSM not only examines the RFS’s IP address, but also requires
the RFS to identify itself using a signing key.
Obtain the following information about the nShield HSM before you set up an RFS
for the first time:
• The IP address
• The electronic serial number (ESN)
• The hash of the KNETI key (HKNETI). The KNETI key authenticates the nShield HSM to
clients. It is generated when the nShield HSM is first initialized from factory
state.
If your network is secure and you know the IP address of the nShield 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. For guidance on network security, see
the nShield Security Manual.
In this command, <Unit IP> is the IP address of the nShield HSM, which could be
one of the following:
• an IPv4 address
• an IPv6 address, including a link-local IPv6 address
• a hostname
A285-4F5A-7500 2418ec85c86027eb2d5959fef35edc5e1b3b698f
Alternatively, you can find this information on the nShield 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:
Enter IP address:
CANCEL CONTINUE
3. The next screen asks for the port number on which the RFS is listening. Enter
the port number and press the right-hand navigation button to continue:
CANCEL CONTINUE
4. Select the config push mode and press the right-hand navigation button to
continue:
mode to:
AUTO
CANCEL CONTINUE
◦ AUTO: The RFS is only allowed to push configuration files to the nShield
HSM if secure authentication is enabled. This is the default value.
◦ ON: The RFS is allowed to push configuration files to the nShield HSM.
◦ OFF: The RFS is not allowed to push configuration files to the nShield HSM.
5. You must confirm whether to enable or disable secure authentication when
setting up the RFS. The following screen is displayed:
YES
CANCEL CONTINUE
a. Select No and press the right-hand navigation button to configure the RFS
without secure authentication. The authentication of the RFS will be
based on the IP address only.
b. Select Yes and press the right-hand navigation button to configure the
RFS with secure authentication.
6. Skip this step if you have not selected secure authentication.
>0DA8-A5AE-BA0D
Software Key
BACK SELECT
At the next screen, verify that the key hash displayed by the nShield HSM
matches the RFS key hash:
Remote 0DA8-A5AE-BA0D
reported the key hash:
9e0020264af732933574
0cfe10446d33cea33f4a
Is this EXACTLY right?
CANCEL CONFIRM
The RFS key hash is obtained by running the commands described below.
Take a copy of the returned key hash and compare it to the value reported on
the nShield HSM display.
enquiry -m0
This command returns the software key hash, tagged as kneti hash, as part
of its output, for example:
Server:
enquiry reply flags none
enquiry reply level Six
...
kneti hash d4c3d757a67416cb9ba31f33febd6ead688629e5
...
ntokenenroll -H
nToken module #1
nToken ESN: 0DA8-A5AE-BA0D
nToken key hash: 9e0020264af732933574
0cfe10446d33cea33f4a
Check that the ESN also matches the one reported on the nShield HSM
display.
If the RFS key hash matches the one reported on the nShield HSM display,
press the right-hand navigation button to continue the RFS configuration.
Otherwise press the left-hand navigation button to cancel the operation.
After you have defined the RFS, the nShield HSM configuration files are exported
automatically. See the User Guide for more about configuration files.
To modify the RFS at a later date, select System > System configuration > Remote
file system, and then select the required action.
You can allow other clients to access the remote file system and
share Security World and key data that is stored in the kmdata
(Linux) or %NFAST_KMDATA% (Windows) 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
optionally their key hash and nToken ESN.
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 HSM 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.
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
BACK SELECT
1-1-1
Network config
Hardserver config
Remote file system
Client config
Resilience config
Config file options
BACK SELECT
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:
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 HSM 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 authentication using software-
based authentication or with an nToken (or local PCIe HSM) installed in the client.
When enabled the nShield HSM not only examines the client IP address, but also
requires the client to identify itself using a signing key.
The client configuration process varies slightly depending on whether you are
enrolling the client with or without secure client authentication:
1. On the nShield HSM front panel, use the right-hand navigation button to
select System > System configuration > Client config > New client.
Client configuration
CANCEL NEXT
Enter the IP address of the client, and press the right-hand navigation button.
2. Use the touch wheel to confirm whether you want to save the IP or not, and
press the right-hand navigation button.
Client configuration
3. Use the touch wheel to select the connection type between the nShield HSM
and the client.
Client configuration
Unprivileged
BACK NEXT
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 Linux.
4. When you have selected a connection option, press the right-hand navigation
button.
Client configuration
Yes
BACK NEXT
Client configuration
9004
CANCEL NEXT
>3138-147F-2D64
Software Key
BACK SELECT
The next screen asks you to verify that the key hash displayed by the nShield
HSM matches the client key hash:
Remote 3138-147F-2D64
reported the key hash:
691be427bb125f387686
38a18bfd2eab75623320
Is this EXACTLY right?
CANCEL CONFIRM
The client key hash is obtained by running the commands described below.
Take a copy of the returned key hash and compare it to the value reported on
the nShield HSM display.
enquiry -m0
This command returns the software key hash, tagged as kneti hash, as part
of its output, for example:
Server:
enquiry reply flags none
enquiry reply level Six
...
kneti hash f8222fc007be38b78ebf442697e244dabded38a8
...
ntokenenroll -H
nToken module #1
nToken ESN: 3138-147F-2D64
nToken key hash: 691be427bb125f387686
38a18bfd2eab75623320
Check that the ESN also matches the one reported on the nShield HSM
display.
If the client key hash matches the one reported on the nShield HSM display,
press the right-hand navigation button to continue the RFS configuration.
Otherwise press the left-hand navigation button to cancel the operation.
8. The nShield HSM 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 HSM, you must enable
additional client licenses (see Enabling optional features). 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 HSM, you
must enable the additional clients as described in Enabling
optional features.
2. Add a new entry to config.new in the hs_clients section to contain the details
of the client to be added.
addr=<client_IP>
clientperm=permission_type
Where:
<client_IP> can be either the IP address of the client or 0.0.0.0, ::, or blank if
the HSM is to accept clients identified by their key hash instead of their IP
address.
0.0.0.0 or ::, and blank result in the same behavior. You can only use them in
the configuration file, you cannot enter these values in the front-panel user
interface.
If you set both the <client_IP> field (the client’s IP address) and the key hash,
the HSM must identify clients from both of these fields.
permission_type defines the type of commands the client can issue (unpriv, priv
or priv_lowport).
esn=nToken_ESN
keyhash=nToken_keyhash
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.
3. Load the updated configuration file on to the nShield HSM. To do this, run the
following command:
Alternatively, you can load the configuration file using the nShield HSM front
panel without enabling config push. The configuration file (config.new) must
be in the /opt/nfast/kmdata/hsm-ESN/config (Linux) or %NFAST_KMDATA%\hsm-
ESN\config (Windows) directory on the remote file system. To do this, select
System > System configuration > Config file options > Fetch configuration.
The Front Panel does not display all current properties for the
client. Entrust recommends that you retrieve the current client
settings before you start the update. See HSM and client
configuration files. During the configuration update, check the
current configuration file against the values displayed on the
Front Panel. Check the values at each configuration step before
proceeding to the next step and finally confirming the changes.
The nethsm_imports section defines the network HSMs that the client imports (See
nethsm_imports). It can also be set up by the nethsmenroll utility.
anonkneti remote_ip
nToken module #1
nToken ESN: 3138-147F-2D64
nToken key hash: 691be427bb125f3876838a18bfd2eab75623320
• Enter the nToken’s ESN in the field ntoken_esn in the config file.
• Each HSM entry after the first must be introduced by a line consisting of one
or more hyphens, i.e. ---.
• At the command line run the command cfg-reread, to reload the hardserver’s
configuration.
• Verify that the client can use the nShield HSM by running enquiry, which
reports the HSM’s status.
For information about configuration file contents, see HSM and client
configuration files.
nethsmenroll --help
To retrieve the nShield HSM’s ESN and HKNETI, run the command
3138-147F-2D64 691be427bb125f38768638a18bfd2eab75623320
If the nShield HSM’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>
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 HSM.
config-serverstartup This utility is used to configure the client’s hardserver to enable TCP
sockets.
6.6.3.1. nethsmenroll
Usage:
Options Description
-m --module=MODULE
-<hsm-ip> The IP address of the nShield HSM, which could be one of the
following:
• an IPv4 address
• an IPv6 address, including a link-local IPv6 address
• a hostname
-r --remove
Options Description
where there is no possibility of a man-
in-the-middle attack. For guidance on
network security, see the nShield
Security Manual.
-V --verify-nethsm-details
-n --ntoken-esn=ESN
6.6.3.2. config-serverstartup
config-serverstartup [OPTIONS]
For more information about the options available to use with config-serverstartup,
run the command:
config-serverstartup --help
synchronization of system time on the HSM with one or more NTP servers.
Network Time Protocol (NTP) is intended to synchronize all participating
computers to within a few milliseconds of Coordinated Universal Time (UTC).
System time on the nShield HSM is independent of the Real Time Clock (RTC) in
the HSM and is used for log messages and front panel display.
After configuring NTP the HSM 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 HSM.
• config push is enabled for the remote computer used to configuring NTP.
Refer to the nShield Remote Administration User Guide for more information.
• The client computer enabled for auto push is configured for Privileged
connections, see Configuring the nShield HSM to use the client, so that the
nShield HSM can be rebooted from the client computer.
Utility Description
The new NTP settings will take effect the next
time the target nShield HSM 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.
Linux
Windows
Returns:
The requested NTP configuration changes have been uploaded and will take effect when the target nShield HSM is
restarted.
This behavior 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 HSM logs are configured to be stored on the HSM or the
RFS). For further information see Configuring log file storage.
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.
For instructions, see the documentation for the operating system of the
remote host.
2. Make sure that the HSM can communicate with an RFS host so that you can
push the new configuration file to the HSM. See Basic HSM, RFS and client
configuration in the Installation Guide for your HSM.
3. If your HSM configuration file predates the functionality to send logs to a
remote syslog server, manually create the remote_sys_log section in the config
file for the remote module.
See remote_sys_log.
remote_sys_log_ip=REMOTE_SYSLOG_SERVER_IP
remote_sys_log_port=REMOTE_SYSLOG_SERVER_PORT
5. Run the following command to push the new config file to the HSM:
cfg-pushnethsm
cfg-pushnethsh --force
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:
Linux
Windows
2. On each client that is to be a cooperating client, you must run the rfs-sync
command-line utility with appropriate options:
◦ for clients using a software KNETI key to authenticate themselves to the
RFS, run the command with the default options:
◦ for clients using a module KNETI key to authenticate themselves to the RFS,
run the command:
In this 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.
To remove a cooperating client so the RFS no longer recognizes it, you must:
• Know the IP address of the cooperating client that you want to remove
• Manually update the remote_file_system section of the hardserver
configuration file by removing the following entries for that particular client:
Linux
remote_ip=<client_IP_address>
remote_esn=keyhash=0000000000000000000000000000000000000000
native_path=/opt/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=/opt/nfast/kmdata/local/sync-store/
volume=kmdata-backup
allow_read=yes
allow_write=yes
allow_list=yes
is_directory=yes
is_text=no
Windows
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%\local\sync-store
volume=kmdata-backup
allow_read=yes
allow_write=yes
allow_list=yes
is_directory=yes
is_text=no
6.9.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.
• an IPv4 address
• an IPv6 address, including a link-local IPv6 address
• a hostname
6.9.1.2. rfs-sync
6.9.1.2.1. Usage
6.9.1.2.2. Options
-U|--update
These options update local key-management data from the remote file system.
-c|--commit
These options commit local key-management data changes to the remote file
system, and update the client from the remote file system.
-s|--show
These options display the current synchronisation configuration.
--setup
This option sets up a new synchronisation configuration. Specifics of the
configuration can be altered using setup_options as follows:
-a|--authenticate
This set-up option specifies the use of a module KNETI key to authenticate this
client to the RFS. By default the software KNETI key is used instead.
-m|--module=module
This option selects the local module to use for authentication. The default is 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.
--rfs-hkneti=HNETI
This option specifies the hash of the KNETI key to use for nToken or software-
based authentication of the RFS.
--rfs-esn=ESN
This options specifes the ESN of the nToken to use for authentication of the
RFS.
ip_address
This option specifies the IP address of the remote file system, which could be
one of the following:
• an IPv4 address
• an IPv6 address, including a link-local IPv6 address
• a hostname
--remove
This option removes the synchronisation configuration.
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.
Linux
You can set Security World Software-specific environment variables in the file
/etc/nfast.conf. This file is not created by the installation process: you must
create it yourself. /etc/nfast.conf is executed by the start-up scripts of nShield
HSM services as the root user. This file should only contain shell commands
that can safely be run in this context. /etc/nfast.conf should be created with
access permissions that allow only the root user to write to the file.
Windows
You can set Security World Software-specific environment variables as follows:
1. Open the System dialog by clicking System in the control panel menu.
2. Select the Advanced tab and click the Environment Variables button.
• NFLOG_FILE
• NFLOG_SEVERITY
• NFLOG_DETAIL
• NFLOG_CATEGORIES
6.10. 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.
To set up the Ethernet interfaces (IPv4 and IPv6), see the Installation Guide for
your HSM.
After you have defined static routes, you should test them as described in Testing
routes.
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.
When you have installed the unit in its final location, you should test the
connection between the unit and the client. You can do this from the client, as
described in this section, or by using the Ping remote host option on the unit. To
do this from the unit, select System > System configuration > Network config >
Ping remote host.
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>
When you have defined or edited a route from the unit to a remote computer, you
should test it. To do this you can issue a ping command from the unit to the IP
address of the host.
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.
You can trace the route taken from the unit to a remote computer. You can also
use this method to trace the route from the unit to the client.
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
2.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.
You can trace the route from the client to the unit or (if the client is connected to
the public Internet) to a remote computer.
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:
You can view details of all the IP addresses for which the internal security module
has a route stored. The routing table includes entries for static routes (which are
stored permanently) and local hosts to which the module has set up temporary
routing entries.
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 nShield HSM and the administrator configuring and using
the HSM. The only required local activity is to connect the nShield HSM 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) or by pushing an updated configuration file
to the nShield HSM (refer to the nShield Remote Administration User Guide for
more information.).
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:
This is the default baud rate. If you have manually changed the baud rate to
9600 (see here), enter this value instead.
• Data bits: 8
• Parity: None
• Stop bits: 1.
Once the connection is established, press Return until a login prompt is displayed.
The login prompt should look like:
nethsm login:
[cli]
# Start of the cli section
# The serial CLI baud rate configuration. Restart your CLI connection after
# changing.
# Each entry has the following fields:
#
# Set to "115200" or "9600" to select the relevant baud rate for the serial
# CLI connection. Note active CLI serial connections are broken upon the
# setting of a new baud rate.
baud_map=BAUDRATE
Changing the baud rate using the front panel creates the [cli]
section in the config file if it does not already exist.
6.11.2.1. Troubleshooting
Error Action
Miscellaneous characters displayed on the screen Make sure the serial port connection is
configured correctly, see Serial port
configuration.
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.
front panel.
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 HSM 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 the network interface link, get the network interface MAC
address
Command Description
rfsaddr Get/set the RFS IP address, port, optional secure authentication and
push mode
Before you can use this command, you must put the nShield 5c into
maintenance mode with maintmode
uptime Show how long the nShield HSM 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.
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.
• By serial number
• By ModuleID.
You can obtain the ModuleID 's and serial numbers of all your modules by running
the enquiry command-line utility.
The serial number is a unique 12-digit number that is permanently encoded into
each module. Quote this number in any correspondence with Support.
6.11.6.2.1. 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.
To be able to share OCSs and keys between modules, the modules must be in the
same Security World.
If you have a module installed, you can add further modules without reinstalling
the server software.
However, we recommend that you always upgrade to the latest server software
and upgrade the firmware in existing modules to the latest firmware.
1. Install the module hardware. Refer to the Installation Guide for information on
installing nShield hardware.
2. (Linux) Run the script /opt/nfast/sbin/install.
3. Add the module to the Security World. Refer to Adding or restoring an HSM
to the Security World.
The Security World Software supports fail-over: if a module fails, its processing
can be transferred automatically to another module provided the necessary keys
have been loaded. Depending on the mode of failure, however, the underlying bus
and operating system may not be able to recover and continue operating with the
remaining devices.
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.
Linux
/opt/nfast/sbin/init.d-ncipher stop
Windows
If the Remote Administration Service is running, you will be warned and given
the option of continuing or not.
Similarly, you can start the hardserver on the client, and where applicable the
Linux
/opt/nfast/sbin/init.d-ncipher start
You can also restart the hardserver on the client, and where applicable the
Remote Administration Service, by running the following command:
/opt/nfast/sbin/init.d-ncipher restart
Windows
On Windows, 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.
This removes the configuration of the module but does not change its KNETI.
menu and confirm that you want to return the unit to its factory state.
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.
After a factory reset, ensure you re-enable any dynamic features. See Remotely
enabling dynamic feature certificates including nShield HSM client licenses.
• The contents of the configuration files, see Module and client configuration
files
• Configuring a new remote file system for the unit, see Configuring the Remote
File System (RFS).
1. sign in to the client computer as a regular user, and open a command window.
2. Run the command:
Linux
opt/nfast/bin/enquiry
Windows
enquiry
Server:
enquiry reply flags none
enquiry reply level Six
serial number ####-####-####
mode operational
version #-#-#
speed index ######
rec. queue ####..####
---
version serial #
remote port (PV4) ####
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 OK
The addr and clientperm fields are required for each client, and keyhash is
recommended for authentication: :
[hs_clients]
addr=<client_IP>
clientperm=permission_type
keyhash=software_keyhash
Where:
If you set both the <client_IP> field (the guest VM’s IP address) and the
key hash, client connections will be restricted based on both values.
permission_type defines the type of commands the client can issue (unpriv
for unprivileged only, priv for privileged or priv_lowport for privileged
connections restricted to low port numbers).
If there is more than one client being configured, the fields for each client
must be separated by line consisting of one or more hyphens (e.g. ----).
c. Load the updated configuration file in the host hardserver. To do this, run
the following command:
hsc_nethsmexports
2. Configure the hardserver in the guest VM to enroll to the host hardserver with
an IP address using the virtual switch. Enter the following command for each
guest hardserver that should have unprivileged access:
nethsmenroll <host-hardserver-ip>
Run the following command if the guest hardserver should have privileged
access for mode change and administration:
nethsmenroll -p <host-hardserver-ip>
You will be asked to confirm your entries. You should then see the following
message:
The HSM 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.
nShield modules incorporate hardware that supports elliptic curve operations for
ECDH (Elliptic curve Diffie-Hellman) and ECDSA (Elliptic Curve Digital Signature
Algorithm) keys.
nShield Solo 500+, 6000+ Yes Yes Yes, Prime curves and twisted Yes
Brainpool curves are
nShield 6000+ accelerated4.
nShield Solo XC Yes Yes Yes, Prime curves and both Yes
twisted and non-twisted
Brainpool curves are
accelerated4.
1
Accessed via nCore, PKCS#11 and JCE APIs.
2
Both Prime and Binary named curves are supported. Refer to Named Curves,
below, which lists the most commonly supported elliptic curves.
3
Offload acceleration refers to offloading the elliptic curve operation from the
main CPU for dedicated EC hardware acceleration.
4
Binary curves are supported, but are not hardware offload accelerated.
5
Brainpool curves are supported as named curves via nCore, PKCS#11 and JCE
only.
Elliptic curve supported / API Microsoft CNG, PKCS#11, Java Microsoft CNG, PKCS#11, Java
Cryptographic Engine (JCE)1. Cryptographic Engine (JCE)1.
1
Java elliptic curve functionality is fully supported by the nShield security provider,
nCipherKM. There is also the option to use the Sun/IBM PKCS #11 Provider with
nCipherKM configured to use the nShield PKCS#11 library.
1
Java elliptic curve functionality is fully supported by the nShield security provider,
nCipherKM. There is also the option to use the Sun/IBM PKCS #11 Provider with
nCipherKM configured to use the nShield 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
if supported by the nShield HSM (see nShield software / API support required to
use elliptic curve functions, above).
• PKCS #11:
◦ Mechanisms supported by PKCS #11: Mechanisms
• CNG (Windows):
◦ Supported algorithms for CNG: Supported algorithms for CNG
◦ Key exchange for CNG: Key exchange
• Symmetric and asymmetric algorithms: Cryptographic algorithms
• Using generatekey options and parameters to generate ECDH and ECDSA keys:
Key generation options and parameters
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 Entrust to find out
whether your country is currently within the
CGEA.
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.
For v12 and later, Entrust recommends that you use Remote Administration, which
is more flexible than the Remote Operator functionality.
This implementation of ECDSA uses an RNG that is not within scope for the
nShield HSM certifications and for this reason it will not be used when the HSM is
in a fips-140-level-3 or common-criteria-cmts Security World (regardless of the
feature bit setting).
You can purchase additional client licenses that allow you to run multiple clients
for the unit. Three clients are always enabled on each unit.
• If possible, make a note of the unit serial number. This can be found on the
base of the unit.
• 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:
• Entrust sends you a smart card that contains the Feature Enabling Certificate.
The Feature Enabling Certificate contains the information that you need to enable
the features you have ordered.
• You can enable static features from the front panel of the unit or from the
client.
• Entrust recommends that you enable dynamic features from the client. If the
dynamic feature applies directly to nShield HSM, for example client licenses,
you can use a nethsmadmin option to apply them. See Remotely enabling
dynamic feature certificates including nShield HSM client licenses
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 /opt/nfast/kmdata/hsm-
ESN/features/fet.txt (Linux) or %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.
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.
1. Use the nethsmadmin utility to list the nShield HSM feature files on the RFS. Run
the command:
In this command:
2. Use the nethsmadmin utility to make the nShield HSM use a specific feature file
from the RFS. Run the command:
In this command:
◦ <feature_file> must be the path to the feature file that is displayed when
you run the nethsmadmin command with the --list-features option. Errors
are reported if you use either just the feature name, or the full path. The
You normally create a Security World after installing and configuring the module
and its software. For more information, see:
• The Installation Guide for more about installing the module and software.
• Client Software and module configuration
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. 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.
For more information about the type of user that is required for different
operations, see About user privileges.
Other nShield HSMs can also use a Security World created on an nShield HSM
using client cooperation. For more information, see Setting up client cooperation.
The logic for finding the security world data directory is:
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.
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 remote file system of /opt/nfast/kmdata/local (Linux) or %NFAST_KMDATA%\local
(Windows). 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.
Load a Security World creates or modifies (for each module in the Security
World) module_ESN
cards_HASH_NUMBER
• <ESN> - Electronic serial number of the module on which the Security World
is created.
• <IDENT> - Identifier given to the card set or key when it is created.
• <NUMBER> - Number of the card in the card set.
• <APPNAME> - Name of the application by which the key was created. It’s a
40-character string that represents the hash of the card set’s logical token. It’s
either user supplied or a hash of the key’s logical token, depending on the
application that created the key.
• world
• A module_ESN file for each module that this host uses
• A cards_<IDENT> file for each card set that is to be loaded from this host
• A card_<IDENT>_NUMBER file for each card in each card set that is to be loaded
from this host
• 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.
of creation. For convenience, Security World options can be divided into the
following groups:
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.
When you create a Security World, you must always configure the basic options
described in this section.
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.
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.
By default, Security Worlds are created to comply with the roles and services, key
management, and self-test sections of the FIPS 140 standard at Level 2. However,
you can choose to enable compliance with the FIPS 140 standard at Level 3.
If you enable compliance with FIPS 140 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.
From firmware version 12.70, the nShield HSM always targets FIPS 186-4
compliance when generating RSA keys of 1024 bits or more. It typically does this
using a "strong primes" strategy, however Entrust only guarantees this strategy if
the UseStrongPrimes setting is enabled.
If your firmware is version 12.70 or higher, you do not need this setting enabled for
FIPS 186-4 compliance.
If you are using an older version of firmware, meaning it has a version number
lower than 12.70, then you need the UseStrongPrimes setting enabled to grant FIPS
186-2 compliance.
If your Security World is FIPS 140 Level 3, then this setting is on by default. If your
Security World is not FIPS 140 Level 3, then you can disable the UseStrongPrimes
setting for faster RSA key generation, however this removes FIPS 186-2
compliance.
To use a module without needing physical access to present Operator Cards, you
must enable the Remote Operator feature on the module. For more information,
see Enabling optional features.
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.
By default, Security Worlds are created with the ability to replace one OCS or
softcard with another. This feature enables you to transfer keys from the
protection of the old OCS of softcard to a new OCS or softcard.
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).
By default, Security Worlds are created so that you cannot replace the passphrase
However, you can choose to enable passphrase replacement at the time you
create a Security World. This option makes it possible to replace the passphrase of
a card or softcard even if you do not know the existing passphrase. Performing
such an operation requires authorization from the Security World’s ACS.
You must configure SEE options if you are using the nShield Secure Execution
Engine (SEE). If you do not have SEE installed, the SEE options are irrelevant.
SEE debugging is disabled by default, but you can choose whether to enable it for
all users or whether to make it available only through use of an ACS. In many
circumstances, it is useful to enable SEE debugging for all users in a development
Security World but to disable SEE debugging in a production Security World.
Choose the SEE debugging options that best suit your situation.
Real-time clock (RTC) options are relevant only if you have purchased and
installed the CodeSafe Developer kit. If so, by default, Security Worlds are created
with access to RTC operations enabled. However, you can choose to control
access to RTC operations by means of an ACS.
Options relating to Security World replacement are relevant only if you are
replacing a Security World.
To help you decide on the Security World you require, see Security World
options.
• You must have enough smart cards to form the Security World’s card sets.
1. From the main menu, select Security World mgmt > Module initialization >
New Security World.
2. Specify the Security World mode:
a. FIPS 140 Level 3 creates a Security World compliant with FIPS 140
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 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.
Module reprogramming Initializing an HSM into a Security World. You must specify
a value of K for this operation.
NVRAM access Reading from and writing to the NVRAM. You can choose
to authorize this operation with KNSO, see Nonvolatile
memory (NVRAM) options.
RTC access Updating the real time clock. You can choose to authorize
this operation with KNSO, see Real-time clock (RTC)
options.
SEE debugging Viewing full SEE debug information. You can specify a
value of K for this operation, all it for all users or authorize
it with KNSO, see SEE debugging. This operation is disabled
in Common Criteria CMTS mode.
8. Specify whether the HSM is a valid target for remote shares (that is, whether it
can import slots), see Remote Operator. 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 passphrase for the card. If you choose to
specify a passphrase:
i. Enter the passphrase.
ii. Enter the passphrase again to confirm it. If the two passphrases do
not match, you must enter the correct passphrase twice.
d. When prompted, remove the card.
12. Repeat the previous step to format additional cards for the ACS, setting their
passphrases 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.
• The HSM must be in pre-initialization mode. See Checking and changing the
mode on the HSM for more about changing the mode.
• 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.
• (Windows) You must have set the NFAST_HOME environment variable.
installation.
• (Linux) If you have installed the Security World Software in a directory other
than /opt/nfast/, you must have created a symbolic link from /opt/nfast/ to
the directory in which the software is actually installed.
• Before configuring the Security World, you should know:
To help you decide on the Security World you require, see Security World
options.
• You must have enough smart cards to form the Security World’s card set.
When you have finished creating a Security World, you must change the mode to
"Operational" using nopclearfail -I m1 or nopclearfail -O -m1.
8.1.5.2. Using nethsmadmin to copy a Security World to an nShield HSM and check
the current version
nethsmadmin can also be used to check if the Security World files have been copied
to the nShield HSM. 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.
Open a command prompt window and type the command new-world using the
options in the table.
The example below will create a Security World supporting FIPS140 Level 3 with a
ACS quorum of 3/5 and with audit logging enabled.
In this command:
Option Description
--initialize This option creates a new Security World, replacing any existing
/opt/nfast/kmdata/local/ (Linux) or %NFAST_KMDATA%\local (Windows)
directory.
%NFAST_KMDATA%\local (Windows) directory in
which these reside as %NFAST_KMDATA%\localN
(Linux) or /opt/nfast/kmdata/localN (Windows)
(where N is an integer assigned depending on
how many Security Worlds have been previously
saved during overwrites).
--no-remoteshare-cert This option prevents making the HSM from becoming 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 UseStrongPrimes Security World
setting.
Option Description
--no-recovery This option disables 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).
We recommend that you do not disable the
recovery and replacement option.
enabled after Security World creation without
reinitializing the Security World and discarding
all the existing keys within it.
--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 N s, N h, or N d 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.
Option Description
--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.
requesting that cards be inserted. Therefore any
OCSs that you create for use with these
applications must have K=1.
<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 passphrase 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.
Option Description
--pp-min=LENGTH This option enables a minimum passphrase length check for the
Administrator Card Set (ACS) the Operator Card Set (OCS) and any
associated softcards when you create a Security World. The minimum
passphrase length check is then applied after the Security World is
created. When enabled and you attempt to create a card passphrase
with fewer characters than the specified minimum length, the
following warning message displays:
Example:
--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.
Option Description
Features for the Security World can be specified using the command line.
Linux-only
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.
rtc This feature specifies that ACS authorization is needed to set the real-
time clock (RTC); (see Real-time clock (RTC) options).
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.
The following features remain available for use on presentation of the standard
ACS quorum, even if turned off using the ! operator:
• nvram
• rtc
• fto
Setting the quorum of one these features to 0 has the same effect as turning it off
using the ! operator.
The passphrase replacement (p) and dseeall features are turned off by default; the
other options are turned on by default.
To use extended debugging for the HSM, you must set the
dseeall flag.
If new-world cannot interpret the command line, it displays its usage message and
exits.
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.
The HSM must be in pre-initialization mode. See Checking and changing the mode
on the HSM for more about changing the mode.
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.
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.
The HSM can now be used to create Operator Cards and keys for the new Security
World.
• Select Security World mgmt > Display World info from the main menu
• Run the nfkminfo command-line utility. See Displaying information about a
Security World with nfkminfo.
• Run the kmfile-dump command-line utility. See Displaying information about a
Security World with kmfile-dump.
• Run the nethsmadmin command-line utility. See Using nethsmadmin to copy a
Security World to an nShield HSM and check the current version.
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
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.
The following table maps there flags visible on the front panel when you select 3
Security World mgmt > 3-1 Display World Info to the flags in the output of
nfkminfo.
admin k-out-of-n
Initialized Initialised
ForeignTokenOpen FTO
kmfile-dump [<worldfile>]
You can also restore an HSM to a Security World to continue using existing keys
and Operator Cards:
• Erases the Security World data on the HSM’s internal file system
• Reads the required number of cards (K) from the ACS so that it can re-create
the secret
• Reads the Security World data from the remote file system
• Uses the secret from the ACS to decrypt the Security World key
• Stores the Security World key in the HSM’s nonvolatile memory
• Configures the HSM for audit logging if the Security World was created with
audit logging selected.
• You cannot access any keys that were protected by a previous Security World
that contained that HSM.
• You have to sync the module file to the clients by one of the following
methods:
◦ Copy the files manually to the clients.
◦ Run rfs-sync -update.
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.
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.
4. At the prompt, insert an Administrator Card, and enter its passphrase if
required.
5. Continue to insert Administrator Cards when prompted until you have inserted
the number required to authorize HSM reprogramming.
1. Ensure the HSM is in initialization mode and run the wizard by double-clicking
its shortcut in the Windows Start menu: Start > Entrust nShield Security
World.
2. Click the Next button.
The wizard allows you to configure HSM Pool mode for CAPI/CNG.
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|--program
This option adds 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.
◦ -S|--no-remoteshare-cert
These options prevent the HSM from becoming a target for remote shares.
◦ -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
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.
The HSM must be in pre-initialization mode. See Checking and changing the
mode on the HSM 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 passphrases as required.
2. After new-world has reprogrammed the HSM, restart the HSM in the operational
state.
The HSM must be in pre-initialization mode. See Checking and changing the
mode on the HSM for more about changing the mode.
If any error occurs (for example, if you do not enter the correct
passphrases), the HSM is reset to the factory state. The HSM
does not form part of the Security World unless you run new-
world again.
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.
• Two HSMs. These can be any of the currently supported HSM types and the
two HSMs do not need to be of the same type.
• A quorum of ACS cards for the source World.
• A quorum of ACS cards for the destination World.
• Sufficient blank cards to create new OCS cards for any keys that are OCS
protected.
• Remote mode switching must be enabled on both HSMs used for the
migration. See enable_remote_mode in the server_settings section or the Top-
level menu chapter of the HSM Install Guide.
If the name or quorum is to be changed, you must create the softcard or OCS
in the destination world before migration begins.
• Replacement cards should be of the same or newer generation than the cards
that they replace.
• The source and destination modules must both have KLF2 warrants in the
correct location.
The migration process directly downloads the warrants from the module for
the nShield 5s and nShield 5c HSMs. You do not need to take any action.
◦ If one or both of the modules have a KLF warrant, you must request an
upgrade to a KLF2 warrant from [email protected] before you
start the migration.
◦ For Solo + and Solo XC, the default location is NFAST_KMDATA/warrants/
(Linux) or NFAST_KMDATA\warrants\ (Windows).
◦ For Connect + and Connect XC, the default location is NFAST_KMDATA/hsm-
<ESN>/warrants/ (Linux) or NFAST_KMDATA\hsm-<ESN>\warrants\ (Windows).
See Warrant Management.
• The operator running the migrate-world utility must have the access rights to
create a privileged connection to the hardserver.
• The migration tool must have exclusive use of the modules during migration.
Do not use them for any other purpose during migration and if either module
is an nShield network-attached HSM, do not enter anything via the front panel
during migration.
• Plan mode: Returns a list of steps for migration and the required card sets and
passphrases but does not migrate any keys.
• Perform mode: Runs the plan mode prior to presenting the option to proceed
and migrate keys according to the plan.
-k <KEYS>|--keys-at-once=<KEYS> Migrate no more than this number of keys per ACS loading.
This is 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.
--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.
• Install the latest version of the Security World Software from the installation
media. See the Installation Guide for more information.
• Ensure that the warrant files for the source and destination modules are
stored in their default locations. If the warrant files are not at the default
location, the --src-warrant and --dst-warrant parameters need to be specified
in the migrate-world command.
◦ For Solo +, or Solo XC, the default location is NFAST_KMDATA/warrants/
(Linux) or NFAST_KMDATA\warrants\ (Windows).
◦ For Connect +, Connect XC modules, the default location is
NFAST_KMDATA/hsm-<ESN>/warrants/ (Linux) or NFAST_KMDATA\hsm-
<ESN>\warrants\ (Windows).
◦ For nShield 5s and nShield 5c, you do not need to specify warrant
locations because they store their warrants within the module.
• Copy the source World data to a location defined by the --source=<SOURCE>
parameter of the migration tool.
• If the destination World does not exist already, create a new destination
World. For instructions, see Creating a Security World
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.
2. Ensure that the data for the destination World is in the standard location for
World data, derived from one of the following:
◦ Either the environment variable NFAST_KMLOCAL or NFAST_KMDATA.
◦ The default directory:
▪ (Linux) /opt/nfast/kmdata/local/
▪ (Windows) C:\ProgramData\Key Management Data\local, or C:\Documents
and Settings\All Users\Application Data\nCipher\Key Management
Data\local, as appropriate.
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 passphrases.
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.
• If the keys are module-protected, run the utility with one of the following
options:
◦ -L option, which checks the ACL of a loaded key instead of the generation
certificate.
◦ -R option, which checks the ACL of a key loaded from a recovery blob.
• If the keys are protected by cardsets or softcards, run the nfkmverify utility
with the -R option in combination with the preload utility.
Example:
You can specify custom protection pairs if you want to change the name, the
quorum, or the properties of the protection. You can also combine multiple source
protections of the same type into one destination protection. You cannot diffuse
keys from one source protection to multiple destination protections.
and "s:name" when a source card set and softcard share a name. The source and
destination protection types must match.
The following example shows the two ways of specifying a set of protection pairs
and the different ways each protection can be referred to. The example hashes are
shortened for readability.
migrate-world [OPTIONS] \
--src-prots "ocs 1,softcard 1,c:name1,s:name1,XXXXXXX1,XXXXXXX2" \
--dst-prots "ocstarget1,softcardtarget,ocstarget1,softcardtarget,ocstarget1,ocstarget2"
8.4.8. Troubleshooting
If you encounter any errors that are not listed in the following
table, contact Support.
Source module must be This utility requires you to Specify the correct modules.
specified. specify both a source and
destination module which must
Destination module must be be different modules and both
specified. must be usable.
Destination World has There are problems with one of Contact Support.
indistinguishable cardsets or the Worlds.
softcards.
Source World not recoverable. The source World is not If the source World is not
recoverable and the keys recoverable, you cannot use the
therefore cannot be migrated. migration utility to migrate keys.
Contact Support.
Missing security World at PATH. The path for the source World is Supply the correct path to the
wrong. source World. If you have
Source world must be specified. supplied the correct path to the
There is no World data at the directory that contains the
location that was specified source World data, the
when running the migration migration utility has not found a
utility. destination World.
Source World is the same as the An incorrect path was supplied Run the utility with the correct
destination World. for the source World data when path to the source World data.
running the utility.
Move the source World data to
The destination World data a different location and then
does not exist in the default copy the destination World data
location defined by the to the default location.
environment variable NFAST_
KMLOCAL or NFAST_KMDATA. If the default location is defined
by an environment variable,
configure the variable to point
to the location of the
destination World, which then
becomes the new default
location.
Cannot find <NAME> utility, The software installation is Reinstall the software.
needed by this utility. partially completed. The path
(in the environment variable for Ensure that the path points to
<NAME> utility is too old, need the operating system) might be the latest version of the
at least version <VERSION pointing to an old version of the software.
NUMBER>. software.
nFast error: TimeLimitExceeded; The ACS time-out limit has Restart the key migration
in response to SetKM… expired. process; see Security World
migration.
Destination world does not You have specified the --key None. The keys will be migrated
support audit logging. -logging option but the but LogKeyUsage will not be set
destination world does not in the ACL of migrated keys.
support audit logging.
Failed to load warrant file There is a problem reading the Check that your warrant files are
<FILE>. warrant file. in the correct location and have
not been edited in any way.
anonkneti -m 127.0.0.1
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.
After you have erased a module, it is in the same state as when it left Entrust (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.
Option Description
8.6.2.1. Output
KeySafe erases all secrets from the module, returning it to its factory state.
8.6.4.1. Output
Initialising Unit
This operation does not remove any files from the remote file system or client
machines. You should remove the files manually from the /opt/nfast/kmdata/local
(Linux) or %NFAST_KMDATA%\local (Windows) directory on the remote file system and
any client computers to which the Security World was copied.
• You are not able to access any keys that you previously used in a deleted
Security World
• It is recommended that you reformat any nShield Remote Administration
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.
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 nShield key
management HSM can access your old keys.
8.8.1. Deleting the Security World using the nShield HSM 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.
• You will not be able to access any of the keys that you have previously used
• Before you remove an old Security World, you must reformat any smart cards
that were used previously as Operator Cards within this Security World.
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 nShield 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 /opt/nfast/kmdata/local (Linux) or
%NFAST_KMDATA%\local (Windows) 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 passphrases.
OCS Keys that are protected by an OCS can only be used by the operator
who possesses the OCS and any relevant passphrases (if set).
For more information about creating a Security World, see Creating and managing
a Security World.
For more information about key management, see Working with keys.
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).
If you want to use the Remote Operator feature to configure smart cards for use
with a remote unit, see Remote Operator.
• Names for individual cards, as well as a name for the whole card set
• Specific K/N policies
• Optional passphrases for any card within a given set
• Formal FIPS 140 Level 3 compliance.
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 HSM front panel.
However, you can also use the following tools to create an OCS:
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.
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 passphrase. 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 HSM front
panel
To create an OCS, follow these steps:
1. From the main menu, select Security World mgmt > Cardset operations >
Create OCS.
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 passphrase for the card. If you
choose Yes, you are prompted to enter the passphrase 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
Option Description
-m <MODULE>| This option specifies the number of the hardware security module
--module=<MODULE> to be 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.
for requesting that cards be inserted.
Therefore any OCSs that you create for use
with these applications must have <K>=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 passphrase replacement for this OCS is
disabled. Setting this option overrides the default setting, which is
that the card passphrases are replaceable. You can specify the
enablement of passphrase 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.
-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.
If you have created a FIPS 140 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.
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
When you insert a valid card, createocs prompts you to type a passphrase.
3. Type a passphrase and press Enter. Alternatively, press Enter if you do not
want this card to have a passphrase.
A passphrase can be of any length and can contain any character that you can
type.
If the passphrases do not match, createocs prompts you to input and confirm
the passphrase 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.
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 passphrase recovery will be enabled for the OCS. (Only available
if the Security World has passphrase 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.
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.
7. Select whether or not you want to set a passphrase for the currently inserted
card. Each card in a set can have an individual passphrase, and you can also
create a set in which some cards have passphrases and others do not.
8. If setting a passphrase for the currently inserted card, enter the same
passphrase in both text fields. A passphrase can contain any characters you
can type except for tabs or carriage returns (because these keys are used to
move between data fields).
9. After entering your desired passphrase (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
(Windows)
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: Start >
Entrust nShield Security World.
3. The wizard displays the welcome screen.
4. Click the Next button. The wizard allows you to configure HSM Pool mode for
CAPI/CNG.
The wizard determines what actions to take based on the state of the Security
World and of the HSMs that are attached to your computer:
◦ If the wizard cannot find the Security World, it prompts you to create a
new Security World or to install cryptographic acceleration only.
If you want the OCS to be persistent, select the Persistent option. Persistence
is described in Persistent Operator Card Sets.
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.
Under the constraints of level 3 of the FIPS 140 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.
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.
Card.
If you insert a card that is not blank, the wizard asks you if
you want to erase it.
11. When you have inserted an appropriate card, the wizard prompts you for the
name of the card and, if required, a passphrase.
If you want to protect this card with a passphrase, turn on the Card will
require a passphrase option, and enter the passphrase. You must enter the
passphrase in both fields to ensure that you have typed it correctly.
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 or Registering the CNG CSP.
A softcard’s passphrase 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.
2. When prompted, type a passphrase for the new softcard, and press Enter.
A passphrase 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 passphrase again to confirm it, and press Enter.
If the passphrases do not match, ppmk prompts you to input and confirm the
passphrase again.
After you have confirmed the passphrase, ppmk completes creation of the new
softcard.
5. Click Commit.
6. Set a passphrase for the softcard by entering the same passphrase in both
text fields.
A passphrase 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 passphrase at any
time. You must provide a passphrase for each card.
7. After entering your desired passphrase in both text fields, click the OK button.
KeySafe displays a dialog indicating that the softcard has been successfully
created.
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 Windows Start menu:
Start > Entrust nShield Security World.
3. The wizard displays the welcome screen.
4. Click the Next button. The wizard allows you to configure HSM Pool mode for
CAPI/CNG.
The wizard determines what actions to take based on the state of the Security
World and of the HSMs that are attached to your computer:
◦ If the wizard cannot find the Security World, it prompts you to create a
new Security World or to install cryptographic acceleration only.
Under the constraints of level 3 of the FIPS 140 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.
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).
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 opt/nfast/kmdata/local/
(Linux) or %NFAST_KMDATA\local% (Windows) 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.
9.3.2. Erasing card sets using the nShield HSM 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.
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
opt/nfast/kmdata/local (Linux) or %NFAST_KMDATA\local% (Windows) 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 to continue using KeySafe.
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 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.
To erase a softcard with ppmk, open a command window, and give the command:
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 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.
9.4.1. Viewing card sets using the nShield HSM 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.
In order to view information about individual cards with KeySafe, follow these
steps:
In order to view information about whole OCSs with KeySafe, follow these steps:
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.
To list the softcards in the current Security World using the nfkminfo command-line
utility, give the command:
nfkminfo --softcard-list
In this command --softcard-list specifies that you want to list the softcards in the
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
To list the softcards in the current Security World using the ppmk command-line
utility, use the command:
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 passphrase of a card using the nShield HSM front panel
To verify the passphrase associated with a card using the unit front panel:
The type of the card (Administrator or Operator) is displayed with the number
of the card in the card set.
3. If this is the card that you want to check, press the right-hand navigation to
confirm.
4. Enter the passphrase.
To verify the passphrase associated with a card using the cardpp command-line
utility, use the command:
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
passphrase is set or prompts you to enter the passphrase and checks to see if it is
correct.
In this command, you can identify the softcard whose passphrase 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 passphrase and then tells you whether the
passphrase you entered is correct for the specified softcard.
Normally, in order to change the passphrase of a card or softcard, you need the
card or softcard and the existing passphrase. Known card passphrase can be
changed using the front panel, KeySafe or the cardpp command-line utility;
softcard passphrase can be changed using KeySafe or the ppmk command-line
utility. You can also add a passphrase to a card or softcard that currently does not
have one or remove a passphrase from a card that does currently have one.
If you generated your Security World with the passphrase replacement option, you
can also replace the passphrase of a card or softcard even if you do not know the
existing passphrase. Such a passphrase replacement operation requires
authorization from the ACS.
Each card in a set can have its own individual passphrase. You can even have a set
in which some cards have a passphrase and others do not.
4. Select the softcard whose passphrase you want to change, and click the
Change passphrase button. KeySafe takes you to the Get Softcard Protection
passphrase panel.
5. Enter the old passphrase, and click the OK button.
KeySafe either displays an error dialog (if the passphrase is not correct) or
takes you to the Set Softcard Protection passphrase panel.
6. Enter your new passphrase, and enter it again in the second field to confirm
the passphrase is correct.
7. Click the OK button.
Each card in a card set can have its own individual passphrase. You can even have
a set in which some cards have a passphrase and others do not. A passphrase can
be of any length and can contain any characters that you can type.
To change a known card’s passphrase 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 passphrase you want to change. (If there is
a card already in the slot, you are not prompted.)
3. If prompted, enter the existing passphrase for the card (If the card has no
current passphrase you are not prompted.) If you enter the passphrase
correctly, cardpp prompts you to enter the new passphrase.
4. Enter a new passphrase, and then enter it again to confirm it.
After you have confirmed the new passphrase, cardpp changes the card’s
passphrase.
To change a known softcard’s passphrase when you know the passphrase, follow
these steps:
In this command, you can identify the softcard whose passphrase you want to
change either by its name (<NAME>) or by its logical token hash as listed by
nfkminfo (<IDENT>).
2. Type the old passphrase, and press Enter. If you enter the old passphrase
correctly, ppmk prompts you to enter the new passphrase.
3. Type the old passphrase, and press Enter. Type the new passphrase again, and
press Enter to confirm it.
After you have confirmed the new passphrase, ppmk then changes the
softcard’s passphrase.
If you generated your Security World with the passphrase replacement option, you
can change the passphrase of a card even if you do not know its existing
passphrase. Such a passphrase replacement operation requires authorization from
the ACS.
• As prompted, insert the appropriate number of cards from the ACS required
to authorize passphrase replacement.
• When prompted, insert the Operator Card whose passphrase you want to
replace. To replace its passphrase:
a. When prompted, type the new passphrase, and then press Enter.
b. When prompted, type the new passphrase again to confirm it, and then
press Enter.
cardpp sets the new passphrase, and then prompts you for another
Operator Card.
• Repeat the process in the previous step to change the passphrase on further
cards, or press Q to quit.
If you generated your Security World with the passphrase replacement option, you
can change the passphrase of a softcard even if you do not know its existing
passphrase. Such a passphrase replacement operation requires authorization from
the ACS.
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 passphrase replacement.
3. When prompted, type the new passphrase, and then press Enter.
4. When prompted, type the new passphrase again to confirm it, and then press
Enter.
If the passphrase does not match, ppmk prompts you to input and confirm the
passphrase again.
After you successfully confirm the new passphrase, ppmk finishes configuring the
softcard to use the new passphrase.
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:
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.
Deleting the information about an OCS from the client does not remove the data
for keys protected by that card set. On the KeySafe 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, Entrust 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.
• Have enabled OCS and softcard replacement when you created the Security
World
• Have created the original OCS using the front panel of the unit, createocs,
createocs-simple, KeySafe, or the nShield PKCS #11 library version 1.6 or later
• Have a sufficient number of cards from the ACS to authorize recovery and
replacement
• Have initialized a second OCS using the front panel of the unit, createocs,
createocs-simple, KeySafe, or the nShield 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.
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 passphrases if required.
5. Insert the required number of Operator Cards, and enter their passphrases 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.
In order to replace an OCS, you must have another OCS onto which to copy the
first set’s data. If you do not already have an existing second OCS, you must create
a new one. For more information, see Creating Operator Card Sets (OCSs).
When you have a second OCS ready, follow these steps in order to replace the
first OCS:
This panel lists existing OCSs in tabular form. For each card set it displays:
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.
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.
To use the rocs command-line utility interactively, run it without any parameters:
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>.
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.
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>.
4. List the keys in the current Security World using the list keys command,
which is described in the section list keys.
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>.
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>.
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.
rocs prompts you for the passphrase 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.
a. rocs prompts you to insert a card from the first OCS that you have
selected as the target. OCSs are processed in ascending numerical order
If you are recovering keys to a softcard, rocs prompts you for the passphrase
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.
• help <topic>
• help intro
• list cardsets
• list keys
• mark <key-spec>
• module <number>
• quit
• recover
• rescan
• revert <key-spec>
• save <key-spec>
• status
• target <cardset-spec>
• unmark <key-spec>
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.
This command lists the OCSs and softcards in the current Security World.
For example:
No.
Name Keys (recov) Sharing
1 test 6 (6) 3 of 5; 20 minute timeout
2 test2 3 (2) 2 of 3
3 test3 1 (1) 1 of 1; persistent
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.
This command lists the keys in the current Security World, as in the following
example:
No.
Name App Protected by
1 rsa-test hwcrhk module
2 Id: uc63e0ca3cb032d71c1c pkcs11 test2
R 3 Server-Cert pkcs11 test --> test2
4 Id: uc63e0ca3cb032d71c1c pkcs11 test --> test3
5 Server-Cert pkcs11 module (test ---> fred2)
In this output:
Output Description
No. The key number, which you can use in mark and unmark
commands.
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.
This command marks the listed keys that are to be recovered to the target OCS or
softcard. You can mark one or more keys by number, ident, OCS or softcard, or
hash. For more information, see Specifying keys.
To mark more than one key at a time, ensure that each key-spec is separated from
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.
This command selects the hardware security module to be used. The module
number must correspond to a hardware security module in the current Security
World. If the hardware security module does not exist, is not in the Security World,
or is otherwise unusable, then rocs displays an error message and does not
change to the selected module.
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 returns keys that have been recovered, but not saved, to being
protected by the original protection method. If the selected keys have not been
recovered, rocs displays an error message.
This command writes the new key blobs to disk. If you specify a key-spec, only
those keys are saved. Otherwise, all recovered keys are saved.
9.6.3.1.11. status
This command lists the currently selected hardware security module and target
OCS or softcard.
This command selects a given OCS or softcard as the target. You can specify the
card set or softcard name, the number returned by list cardsets, or the hash.
This command unmarks the listed keys. Unmarked keys are not recovered.
You can select all the options for rocs using the command line by running a
command of the form:
In this command:
Option Description
-m|--module=<MODULE> These options specify the number of the hardware security module to
use.
-t|--target=<CARDSET-SPEC> These options specify the OCS or softcard to be used to protect the
keys. For more information, see Specifying card sets.
-k|--keys=<KEYS-SPEC> These options select the keys to be recovered. For more information,
see Specifying keys.
-c|--cardset=<CARDSET-SPEC> These options select all keys that are protected by the given OCS or
softcard. For more information, see Specifying card sets.
-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.
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.
The value of <CARDSET-SPEC> identifies one or more OCSs or softcards. It may have
any of the following forms:
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.
The --keys=<KEYS-SPEC> option identifies one or more keys. It may have any of the
following forms:
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
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:
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.
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.
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 passphrase 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 HSMs in the same Security World, either
using the Security World mgmt > RFS operations > Update World files
option on the HSM concerned or using the nethsmadmin utility, see Using
nethsmadmin to copy a Security World to a nShield HSM and check the
current version.
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 passphrases
have been set as intended, see Verifying the passphrase of a card or softcard
10. Erase the Administrator Cards from the old card set. For more information,
see Erasing cards and softcards.
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.
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.
7. When you insert a blank card, KeySafe takes you to the Set Card Protection
passphrase panel.
8. If you want to set a passphrase for this Administrator Card:
KeySafe then prompts you for the next card (if any). A given passphrase is
associated with a specific card, so each card can have a different passphrase.
You can change these passphrases 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.
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 HSMs in the same Security World, for
example using the nethsmadmin utility, see Using nethsmadmin to copy a
Security World to an nShield HSM and check the current version.
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 passphrases
have been set as intended, see Verifying the passphrase of a card or softcard.
6. Erase the old Administrator Cards; for more information, see Erasing cards
and softcards.
When using the racs utility, you cannot redefine the quantities in
a K of N relationship for an ACS. The K of N relationship defined
in the original ACS persists in the new ACS.
racs [-m|--module=<MODULE>]
You can use KeySafe or the generatekey utility to generate or import keys for use
with your applications (see Working with keys). By default, KeySafe uses the same
mechanisms and supports the same applications as the generatekey utility.
On Linux, you must add the user of any application that uses an
nShield HSM to the group nfast before the application runs. On
Windows, by default any user is allowed to use any application
that uses an nShield HSM.
• 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
We recommend 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 Entrust
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 nShield software, please contact Entrust
nShield Technical Support, https://nshieldsupport.entrust.com.
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:
• http://www.oracle.com/technetwork/java/index.html
• http://www.oracle.com/technetwork/java/all-142825.html
If you need to change either or both of these port settings, you restart the
hardserver before continuing the nCipherKM JCA/JCE CSP installation
process. For more information, see Stopping and restarting the
hardserver.
2. For Java 8 only. Copy the nCipherKM.jar file to the extensions folder of your
local Java Virtual Machine installation from /opt/nfast/java/classes (Linux) or
%NFAST_HOME%\java\classes (Windows).
The location of the extensions folder depends on the type of your local Java
Virtual Machine (JVM) installation:
In these paths, $JAVA_HOME (Linux) and %JAVA_HOME% (Windows) are the home
directory of the Java installation (commonly specified in the JAVA_HOME
environment variable). If you are using Java 11 or Java 17 you do not need to
copy the jar file.
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.
5. Add the nCipherKM provider to the java.security file located in the security
directory for your local Java Virtual Machine (JVM) installation:
security.provider.<n>=com.ncipher.provider.km.nCipherKM, where <n> is the
position in the list of providers, for example:
security.provider.1=sun.security.provider.Sun
security.provider.2=sun.security.rsa.SunRsaSign
security.provider.3=com.sun.net.ssl.internal.ssl.Provider
security.provider.4=com.sun.crypto.provider.SunJCE
security.provider.5=sun.security.jgss.SunProvider
security.provider.6=com.sun.security.sasl.Provider
security.provider.7=com.ncipher.provider.km.nCipherKM
For Java 11 and Java 17 you do not need to specify the fully qualified class
name for the provider. Instead you can just use the provider name:
security.provider.<n>=nCipherKM.
The JVM uses this file to select the provider from which to request a
mechanism instance. If your JCE application does not request the nCipherKM
provider by name, or if it fails to load keys, you might need to move the
nCipherKM provider to the top of the list:
security.provider.1=com.ncipher.provider.km.nCipherKM. Do not change the
relative order of the other providers in the list.
When you have installed the nCipherKM JCA/JCE CSP, you must have created
a Security World before you can test or use it. For more information about
creating a Security World, see Creating a Security World.
After installation, you can test that the nCipherKM JCA/JCE CSP is functioning
correctly by running the command.
For Java 8:
java com.ncipher.provider.InstallationTest
Linux
Windows
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:
The nCipher provider is installed, but is not registered at the top of the providers list in the java.security
file.
See the user guide for more information about the recommended system configuration.
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.
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:
• Check that you have configured ports correctly, as described in Installing the
nCipherKM JCA/JCE CSP. For more information about hardserver
configuration file settings, see server_startup.
• 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.
• 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.
After making any changes to the nCipherKM JCA/JCE CSP installation, run the
InstallationTest command again and check the output.
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.
Linux
Windows
Alternatively, you can specify the location of the nCipherKM jar on the classpath:
Linux
Windows
10.1.3. keytool
Use the Java keytool utility to read and edit an nShield KeyStore. You must specify
the correct nCipher.sworld KeyStore type when you run the keytool utility.
To generate a new key in an OCS-protected KeyStore with the Java keytool utility,
run the following command:
keytool -genkeypair -storetype nCipher.sworld -keyalg RSA -sigalg SHA1withRSA -storepass <KeyStore_passphrase>
-keystore <KeyStore_path>
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.
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.
JCECSP_DEBUGFILE This property specifies a path to the file to which logging output is to
be written. Set this property if the JCECSP_DEBUG property is set to a
value other than the default of 0. For details about the effects of
setting different values for this property, see JCECSP_DEBUG property
values.
protect This property specifies the type of protection to be used for key
generation and nCipherKM KeyStore instances. You can set the value
of this property to one of module, <SOFTCARD_NAME:SOFTCARD_IDENT>, or
cardset. OCS protection (cardset) uses the card from the first slot of
the first usable hardware security module. To find the logical token
hash <IDENT> of a softcard, run the command nfkminfo --softcard-list.
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.
ignorePassphrase If the value of this property is set to true, the nCipherKM provider
ignores the passphrase 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
passphrase be provided; setting this property allows a dummy
passphrase to be used.
seeintegname Setting the value of this property to the name of an SEE integrity key
causes the provider to generate SEE application keys. These keys may
only be used by an SEE application signed with the named key.
com.ncipher.provider.announ The default value for this property is auto, which uses firmware auto-
cemode 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.
com.ncipher.provider.enable For the value of this property, you supply a comma-separated list of
mechanism names that are to be forced on, regardless of the
announce mode selected.
com.ncipher.provider.disabl For the value of this property, you supply a comma-separated list of
e mechanism names that are to be forced off, regardless of the
announce mode selected. Any mechanism supplied in the value for the
com.ncipher.provider.disable property overrides the same mechanism if
it is supplied in the value for the com.ncipher.provider.enable property.
The JCECSP_DEBUG system property is a bit mask for which you can set different
values to control the debugging functions. The following table describes the
effects of different values that you can set for this property:
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 at either Level 2 or Level 3.
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.
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 nShield 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:
The passphrase used with the KeyStore must be the passphrase of the card from
the OCS that protects the keys in the KeyStore.
To use the nShield PKCS #11 library, you must tell the application the name and
location of the library. The exact method for doing this depends on the
application.
Instructions for using the nShield PKCS #11 library with specific applications are
available from Entrust nShield Technical Support,
https://nshieldsupport.entrust.com.
Depending on the application, you may need to set the path and library name
/opt/nfast/toolkits/pkcs11/libcknfast.so (Linux) or
%NFAST_HOME%\toolkits\pkcs11\cknfast.dll (Windows) in a dialog or configuration
file.
The nShield 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.
From version 1.7, the nShield PKCS #11 library can be used with FIPS 140 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 passphrase.
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.
The following paragraphs in this section describe the functions that an nShield
HSM can provide.
The nShield PKCS #11 library can use the nShield HSM to sign and verify messages
using the following algorithms:
• DSA
• RSA
• DES3_MAC
• AES
• ECDSA (if the appropriate feature is enabled)
The nShield PKCS #11 library can use an nShield HSM to perform asymmetric
encryption and decryption with the RSA algorithm.
The nShield PKCS #11 library can use the nShield HSM to perform symmetric
encryption with the following algorithms:
• DES
• Triple DES
• AES
the host CPU for other tasks) means that you achieve better overall performance.
The nShield PKCS #11 library can perform message digest operations with MD5,
SHA-1, SHA-224, SHA-256, SHA-384, and SHA-512 algorithms. However, for
reasons of throughput, the library performs these operations on the host
computer.
10.2.1.6. Mechanisms
The mechanisms currently supported by the nShield PKCS #11 library, including
some vendor-supplied mechanisms, are listed in the Cryptographic API Integration
Guide.
The nShield PKCS #11 library can use an nShield HSM to wrap (encrypt) a private
or secret key, or to unwrap (decrypt) a wrapped key.
The mechanisms supported by the nShield 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).
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.
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.
If load-sharing mode is enabled, the nShield PKCS #11 library creates a virtual slot
for each OCS in the Security World (returning the name of the card set) unless
you have set CKNFAST_CARDSET_HASH (as described in CKNFAST_CARDSET_HASH).
When you insert a smart card from an OCS in the current Security World, the
nShield 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 nShield 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 passphrase for the OCS. The exact mechanism for
supplying the passphrase 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 nShield
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.
If HSM Pool mode is enabled, the nShield PKCS #11 library exposes a single pool of
HSMs and a single virtual slot for a fixed token with the label accelerator. This
accelerator slot can be used to create module protected keys and to support
session objects. HSM Pool mode does not support token protected keys, any pre-
existing OCS or softcard protected keys are hidden from PKCS #11. In FIPS 140
Level 3 Security Worlds, keys cannot be created in HSM Pool mode, however keys
created outside HSM Pool mode, for example using generatekey or a non-Pool
mode PKCS #11 application, can be used in HSM Pool mode.
There will be two entries for each HSM, unless you have set
CKNFAST_NO_ACCELERATOR_SLOTS.
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 nShield PKCS #11 library logs out
any previously logged-in token from the slot and closes any open sessions.
You can use the preload command-line utility to preload K/N OCSs before actually
using PKCS #11 applications. The preload utility loads the logical token and then
passes it to the PKCS #11 utilities.
You must provide any required passphrase 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 passphrase), but the PKCS #11 library will not
actually check the supplied passphrase. preload must be also used with the
cksotool utility to perform operations that require the PKCS #11 Security Officer
role.
A logical token preloaded by preload for use with the nShield 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.
• CKNFAST_ASSUME_SINGLE_PROCESS
• CKNFAST_ASSURANCE_LOG
• CKNFAST_CARDSET_HASH
• CKNFAST_CONCATENATIONKDF_X963_COMPLIANCE
• CKNFAST_DEBUG
• CKNFAST_DEBUGDIR
• CKNFAST_DEBUGFILE
• CKNFAST_DH_LSB
• CKNFAST_FAKE_ACCELERATOR_LOGIN
• CKNFAST_HSM_POOL
• CKNFAST_JCE_COMPATIBILITY
• CKNFAST_LOADSHARING
• CKNFAST_LOAD_KEYS
• CKNFAST_NO_ACCELERATOR_SLOTS
• CKNFAST_NO_SYMMETRIC
• CKNFAST_NO_UNWRAP
• CKNFAST_NONREMOVABLE
• CKNFAST_NVRAM_KEY_STORAGE
• CKNFAST_OVERRIDE_SECURITY_ASSURANCES
• CKNFAST_RELOAD_KEYS
• CKNFAST_SEED_MAC_ZERO
• CKNFAST_SESSION_THREADSAFE
• CKNFAST_SHARE_SESSION_KEYS
• CKNFAST_TOKENS_PERSISTENT
• CKNFAST_USE_THREAD_UPCALLS
• CKNFAST_WRITE_PROTECTED
If you used the default values in the installation script, you should not need to
change any of these environment variables.
Linux
This file must be in the /opt/nfast/ directory of the client.
Windows
If the NFAST_HOME environment variable is not set, or if environment variables are
<variable>=<value>
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.
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.
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
Value Description
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_DH_LSB
If this variable is set the least significant bytes of the result of DH/ECDH key
agreement using the CKM_DH_PKCS_DERIVE, CKM_X9_42_DH_DERIVE or CKM_ECDH1_DERIVE
mechanisms are taken. This is in line with the PKCS#11 specification. If this variable
is not set the most significant bytes will be used. The latter behavior is consistent
with Security World software prior to v12.81.
10.2.4.9. CKNFAST_FAKE_ACCELERATOR_LOGIN
If this variable is set, the nShield 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.10. CKNFAST_HSM_POOL
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.11. CKNFAST_JCE_COMPATIBILITY
This property is included to allow the saving of objects when using Java PKCS#11
providers.
10.2.4.12. CKNFAST_LOADSHARING
10.2.4.13. CKNFAST_NO_ACCELERATOR_SLOTS
If this variable is set, the nShield 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.
10.2.4.14. CKNFAST_NO_SYMMETRIC
If this variable is set, the nShield PKCS #11 library does not advertise any
symmetric key operations.
10.2.4.15. CKNFAST_NO_UNWRAP
If this variable is set, the nShield 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.16. CKNFAST_NONREMOVABLE
When this environment variable is set, the state changes of the inserted card set
are ignored by the nShield PKCS #11 library.
10.2.4.17. 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.18. 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:
• all
• none
• tokenkeys
• longterm [=<days>]
• explicitness
• import
• unwrap_mech
• unwrap_kek
• derive_kek
• derive_xor
• derive_concatenate
• unwrap_rsa_aes_kwp
• weak_<algorithm>
• shortkey_<algorithm>=<bitlength>
• silent.
Linux
CKNFAST_OVERRIDE_SECURITY_ASSURANCES="<parameter1>;<parameter2>=<value3>"
Windows
set CKNFAST_OVERRIDE_SECURITY_ASSURANCES=<parameter1>;<parameter2>=<value3>
CKNFAST_OVERRIDE_SECURITY_ASSURANCES=<parameter1>;<parameter2>=<value3>
10.2.4.18.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.18.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.18.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.18.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.
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:
10.2.4.18.5. explicitness
10.2.4.18.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.18.7. unwrap_mech
The unwrap_mech parameter allows you to create keys with CKA_UNWRAP=true and
CKA_DECRYPT=false.
When CKA_UNWRAP is set to true and CKA_DECRYPT is not specified in the template,
then CKA_DECRYPT is automatically set to true.
10.2.4.18.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.18.9. derive_kek
10.2.4.18.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.18.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.18.12. unwrap_rsa_aes_kwp
a one-time unwrap of only the wrapped target key. When the RSA unwrapping key
has CKA_UNWRAP_TEMPLATE set it is necessary to construct the ACL when the RSA key
is created in order to setup the partitioning guarantees from the
CKA_UNWRAP_TEMPLATE. The intended wrapped target keys are unknown at this time,
which means the ACL must permit a one-time unwrap of any key.
10.2.4.18.13. 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.18.14. shortkey_<algorithm=bitlength>
10.2.4.18.15. 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.19. 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.20. 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.21. CKNFAST_SHARE_SESSION_KEYS
This variable can take a list of one or more semi-colon (;) separated values to
improve performance through loadsharing when session keys are used. See
CKNFAST_LOADSHARING.
• all (default)
• copy
• derive
• generate
• import
• none
• unwrap
If the origin of the session key matches a selected category, then the key is
automatically shared to all HSMs when it is created.
10.2.4.22. 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.
10.2.4.23. CKNFAST_USE_THREAD_UPCALLS
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
10.2.4.24. CKNFAST_LOAD_KEYS
This variable will load private objects at C_Login time, rather than at the first
cryptographic operation.
10.2.4.25. CKNFAST_WRITE_PROTECTED
Set this variable to make your OCS or softcard (token) write-protected. If a token
is write-protected, you cannot:
10.2.4.26. CKNFAST_RELOAD_KEYS
Set this variable to enable PKCS #11 key reloading. See section PKCS _11 with key
reloading in the Cryptographic API Integration Guide.
To verify the installation of the nShield PKCS #11 library, follow these steps:
If you have an invalid Security World (for example, if all your HSMs are in the
initialization state), ckcheckinst quits with the following error message:
◦ PKCS #11 library interface version 2.40 refers to the version of the
PKCS #11 specification supported
◦ implementation version 1.## refers to the version of the nCipher PKCS #11
library
◦ Loadsharing and Failover enabled is shown if load-sharing has been
enabled. Alternatively Pool mode enabled is shown if Pool mode has been
enabled.
Slots that contain a valid Operator Card are indicated by the status Operator
card and the card’s label. A fixed token is always available and is listed as slot
0.
2. If there are no available slots with cards in them, you can choose one of the
following actions:
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:
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 nShield
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.
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, generate new
Operator Card Sets, see Creating an Operator Card Set with the CSP or CNG
wizard, 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 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.
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.
generated NFKM key into a container. For more information about using the
cspimport utility, run cspimport specifying either the --help or --usage options.
• CALG_DES
• CALG_3DES_112 (double-DES)
• CALG_3DES
• CALG_RC4
• CALG_AES_128
• CALG_AES_192
• CALG_AES_256
• CALG_SHA1
• CALG_SHA256
• CALG_SHA384
• CALG_SHA512
• CALG_SSL3_SHAMD5
• CALG_MD5
• CALG_MAC
• CALG_HMAC
CSP versions 1.11.0 and later have a number of advantages over older versions:
• 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.
• 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.
• 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:
• If you want to share the same key between multiple computers, we supply the
cspimport utility for transferring keys between containers.
• 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
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 them. It can also be used to delete container files if the current
user has administrative privileges.
configure-csp-poolmode The --mscapi option allows HSM Pool mode to be enabled or disabled
for the nShield CAPI CSP without using the CSP wizard.
Utility Description
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.
You can unregister the nShield CNG CSP without removing the provider DLL files
from your system. After unregistering, you can reregister the nShield CNG CSP,
removing the files from your system. For more information, see Unregistering or
reregistering the CNG CSP.
You can completely uninstall the nShield CNG CSP, removing the files from your
system. After uninstalling, you must reinstall the files and then reregister the CNG
CSP before you can use it. For more information, see Unregistering or
reregistering the CNG CSP.
To register the nShield 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.5.1.1.1. Registering the CNG CSP with the CNG Configuration Wizard
We recommend using the CNG Configuration Wizard to register the nShield CNG
CSP. The product installation process places a shortcut to the CNG Configuration
Wizard in the Windows Start menu: Start > Entrust nShield Security World.
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, generate new OCSs, see Creating an
Operator Card Set with the CSP or CNG wizard, 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 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 nShield CNG CSP with
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:
The wizard allows you to configure HSM Pool mode for CNG.
If the prerequisite to create a Security World has been fulfilled, the wizard
displays a confirmation screen.
The wizard displays a screen confirming that your Security World and (if
you chose to create an OCS) an OCS have been created.
2. When the wizard has confirmed that it is ready to register the nShield CNG
providers, click the Next button.
When configuration of your nShield CNG CSP is complete, the wizard displays a
confirmation screen.
You can use the cngregister command-line utility to register the nShield CNG CSP
manually even if you have not already created a Security World (or, if you choose
OCS-protection for your keys, even if you have not already created an OCS).
To register the nShield CNG CSP with the cngregister command-line utility, run the
command without specifying any options:
cngregister
You can use the cngregister command-line utility to unregister or reregister the
nShield 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 Uninstalling
or reinstalling the CNG CSP.
CNG CSP, you can reregister it at any time as long as the files
have not been uninstalled from your system.
After unregistering the nShield CNG CSP, you can reregister it at any time as long
as the files have not been uninstalled from your system. To reregister the nShield
CNG CSP on your system, run the command:
cngregister
For more information about these command-line utilities, see Utilities for CNG.
1. To remove any and all dependencies that you have set, run the command:
ncsvcdep -x
2. Unregister the nShield 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.
cnginstall32 -U
cnginstall -U
To reinstall the nShield CNG CSP after you have previously uninstalled it:
cnginstall32 -i
cnginstall -i
2. Reregister the nShield CNG CSP on your system by running the command:
cngregister
For more information about these command-line utilities, see Utilities for CNG
DSA Hardware
ECDSA_P224 Hardware
ECDSA_P256 Hardware
ECDSA_P384 Hardware
ECDSA_P521 Hardware
10.5.2.2. Hashes
DH Hardware
ECDH_P224 Hardware
ECDH_P256 Hardware
ECDH_P348 Hardware
ECDH_P521 Hardware
RNG Hardware
cnglist --list-providers
To identify the keys that are available from a particular provider, run the command:
To list the keys available from the Security World Key Storage
Provider, run the command cnglist --list-keys (without
specifying the --provider option).
10.5.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
10.5.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:
10.5.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 nShield 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.
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.
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 nShield
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 nShield CNG CSP:
These utilities are located in the bin directory of your Security World Software
installation (for example, %NFAST_HOME%\bin).
10.5.5.1. cngimport
Use cngimport to migrate keys to the Security World Key Storage Provider. For
more information, see Migrating keys for CNG.
10.5.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 nShield 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 nShield CNG DLL files, ensure that you unregister the CNG
CSP. For more information, see:
• cngregister
• Unregistering or reregistering the CNG CSP
After unregistering the nShield CNG CSP, you can reregister it at any time as long
as the files have not been uninstallted from your system. To reregister the nShield
CNG CSP on your system, run the command:
cngregister
For more information about uninstalling and reinstalling the nShield CNG CSP with
cnginstall, see Uninstalling or reinstalling the CNG CSP.
10.5.5.3. cngregister
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:
• cnginstall
• Uninstalling or reinstalling the CNG CSP.
If any applications or services are using the nShield CNG CSP for
key storage or cryptography, unregistering it can cause system
instability.
After unregistering the nShield CNG CSP, you can reregister it at any time as long
as the files have not been uninstalled from your system. To reregister the nShield
CNG CSP on your system, run the command:
cngregister
10.5.5.4. cngsoak
Use cngsoak to obtain statistics about the performance of the nShield 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.5.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 nShield 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
10.5.5.6. cnglist
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.5.5.6.1. configure-csp-poolmode
To remove HSM Pool mode setting for CNG from the registry, use the command:
If you want to develop your own CodeSafe applications, you must also purchase
the CodeSafe developer kit.
Check the documentation that your CodeSafe application vendor supplies for
information about how to set up and use the application, as well as for any other
installation and configuration information.
1. Ensure that the SEE machine for the application is in the /opt/nfast/custom-
seemachines (Linux) or %NFAST_HOME%\custom-seemachines (Windows) directory on
the remote file system.
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:
◦ The name of the SEE machine file.
◦ The name of the user data file, if required.
◦ The type of custom SEE machine you are using (select SEElib or BSDlib
sockserv).
4. Log in to a host machine as a user in the nfast group and run the following
command (m1 is the Security World’s module number for the HSM whose
front panel you used in the previous steps):
For more information about configuring log file storage options, see Configuring
log file storage.
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.
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
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.
6. Run nopclearfail -c -w.
If you wish to use the Remote Operator feature, you must have
enabled it as described in Enabling optional features. 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.
The HSMs must be in the same Security World, and must have been initialized
with remote card set reading enabled.
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 the HSM for more about changing the mode.
Starting from 12.81, you can export and import dynamic slots as Remote Operator
slots.
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.
The output from this selection must show that flags are set to include
ShareTarget, as in the following example:
Module #1
generation 2
state 0x2 Usable
flags 0x10000 ShareTarget
n_slots 3
esn 8851-43DF-3795
hkml 391eb12cf98c112094c1d3ca06c54bfe3c07a103
• slot_exports
• slot_imports
• slot_mapping
Before you can configure hardservers for Remote Operator, ensure that:
• You have configured the attended and unattended HSMs for Remote Operator
as described in Configuring HSMs for Remote Operator.
• Your network firewall settings are correct. See the Installation Guide for more
information about firewall settings.
When the HSMs have been configured, use one of the following methods to
configure slot import and export:
• Use the nShield HSM front panel, see Configuring slot import and export using
the nShield HSM front panel.
• Update the HSM configuration file, see Configuring hardservers for Remote
Operator using the HSM configuration file.
12.2.3.1. Configuring slot import and export using the nShield HSM front panel
If you need to configure the export of slots other than 0, see Configuring
hardservers for Remote Operator using the HSM configuration file.
b. Specify the HSM to which the slot is being export by supplying values for:
▪ The IP address of the unattended HSM
▪ The ESN of the unattended HSM.
2. Configure the unattended HSM to import the slot that you are exporting from
the attended HSM by following these steps:
a. From the main menu, select Security World mgmt > Set up remote slots
> Import slot.
b. Specify the details of the Remote Operator slot by supplying values for:
▪ The IP address of the HSM from which the slot is being exported
▪ The ESN of the HSM from which the slot is being exported
▪ The ID of the slot on the importing HSM
▪ The port to use to connect to the hardserver hosting the attended
HSM.
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
passphrase, 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).
The same applies for any keys that an application on an unattended HSM needs to
load but that were not generated on that machine.
12.2.3.2. Configuring hardservers for Remote Operator using the HSM configuration
file
1. On the attended HSM’s host machine, configure the hardserver to allow slot 0
of the local HSM (with ESN AAAA-AAAA-AAAA) to be exported to a remote
HSM (with ESN BBBB-BBBB-BBBB, hosted by the machine with the IP address
222.222.222.222):
a. Create a copy of the configuration file as config.new in the
/opt/nfast/kmdata/hsm-ESN/config (Linux) or
C:\ProgramData\nCipher\nfast\kmdata\hsm-ESN\config (Windows) directory.
b. Edit the sections related to slot export in config.new:
[slot_exports]
# Start of the slot_exports section
# Local slots that the hardserver should allow remote modules to import. Note
# that if a slot which has been remapped in the slot_mapping section is to be
# exported, it must be referred to in this section by its original
# (pre-mapping) local_slotid.
# Each entry has the following fields:
#
# ESN of the local module whose slot is allowed to be exported.
# local_esn=ESN
#
# SlotID of the slot which is allowed to be exported. (default=0)
# local_slotid=INT
#
# IP address of the machine allowed to import the slot or empty to allow all
# machines. (which is the default)
# remote_ip=ADDR
#
# ESN of the module allowed to import the slot or "" to allow all modules
# which are permitted in the security world. (default ="")
# remote_esn=ESN
[slot_mapping]
# Start of the slot_mapping section
# Slot remapping configuration. Notes for Remote Operator users: If a slot
# which is remapped in this section is also exported in the slot_exports
# section, the local_slotid field in the slot_exports section must be set to
# the original (pre-mapping) local_slotid. When importing that slot in another
# module, the slot_imports section must refer instead to the new
# (post-mapping) remote_slotid.
# Each entry has the following fields:
#
d. Check that the configuration file has been updated. This can be confirmed
using the timestamp on the updated config file.
e. Clear the HSM for the changes to take effect, run the nopclearfail
command:
2. On the unattended module’s host machine, configure the hardserver to import
slot 0 from the remote attended module (with ESN AAAA-AAAA-AAAA,
hosted by the machine with the IP address 111.111.111.111) to the local module
(with ESN BBBB-BBB-BBBB).
a. Edit the sections related to slot import in config.new:
[slot_imports]
# Start of the slot_imports section
# Remote slots that the hardserver should import to modules on this machine.
# Note that if a remote slot which has been remapped in the slot_mapping
# section on the remote system is to be imported, it must be referred to in
# this section by its new (post-mapping) remote_slotid.
# Each entry has the following fields:
#
# ESN of the local module to import the slot to
# local_esn=ESN
#
# SlotID to use to refer to the slot when it is imported on the local module.
# Setting this value to 0 means it will be automatically assigned to the
# lowest available value. (default=0)
# local_slotid=INT
#
# IP address of the machine hosting the slot to import
# remote_ip=ADDR
#
# Port to connect to on the remote machine
# remote_port=PORT
#
# ESN of the remote module to import the slot from
# remote_esn=ESN
#
# SlotID of the slot to import on the remote module (default=0)
# remote_slotid=INT
the updated file and the network address of the nShield HSM to load the
new configuration.
c. Check that the configuration file has been updated. This can be confirmed
using the timestamp on the updated config file.
d. Clear the HSM for the changes to take effect, run the nopclearfail
command:
3. Check the Remote Operator slot configuration:
slotinfo -m 1
If slot import 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
passphrase, 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).
The same applies for any keys that an application on an unattended HSM needs to
load but that were not generated on that machine.
Or:
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 remote slot #2 has been mapped to slot #0, the output from
this command includes the lines:
• The R in the Flags column indicates that slot #0 is now a Remote Slot
or:
• Using the front panel controls to navigate to Security World mgmt > Display
World.
When dynamic slots are added to an HSM after the initial configuration was done
with only remote slots, the dynamic slots will take precedence over the remote
slots. The slot numbers of the remote slots will therefore change. You will have to
revise the slot mapping and specify the new slot number of the remote slot.
1. On the attended HSM’s host machine, configure the hardserver to allow the
export of the relevant slot by refering to it by its original slotID.
a. To export the local slot, local_slotid=0.
b. To export a dynamic slot, local_slotid=2 (or higher if the HSM is
configured with multiple dynamic slots).
2. On the unattended HSM’s host machine, configure the hardserver to import
the relevant slot by refering to it by its new slotID.
a. To import the exported local slot, remote_slotid=2 (or higher, same as the
slotID specified in the mapping section of the attended HSM’s
configuration file).
b. To import the exported dynamic slot, remote_slotid=0.
The dynamic_slots section allocates exactly 1 dynamic slot to each of modules 1 and
2.
[dynamic_slots]
esn=BBBB-BBBB-BBBB
slotcount=1
-----
esn=AAAA-AAAA-AAAA
slotcount=1
The slot_imports section first imports module 1 slot #0 to module 2 slot #3 and
then imports module 1 slot #2 to module 2 slot #4.
[slot_imports]
local_esn=AAAA-AAAA-AAAA
remote_ip=127.0.0.1
remote_port=9004
remote_esn=BBBB-BBBB-BBBB
remote_slotid=0
-----
local_esn=AAAA-AAAA-AAAA
remote_ip=127.0.0.1
remote_port=9004
remote_esn=BBBB-BBBB-BBBB
remote_slotid=2
[slot_exports]
local_esn=BBBB-BBBB-BBBB
local_slotid=0
-----
local_esn=BBBB-BBBB-BBBB
local_slotid=2
The slot_mapping section swaps module 2 slot #0 and module 2 slot #2.
[slot_mapping]
esn=AAAA-AAAA-AAAA
slot=2
1. Push the hardserver configuration file to the nShield HSM by running cfg-
pushnethsm.
2. Clear the modules by running nopclearfail.
This is the expected system configuration output for the relevant modules:
slotinfo -m1
Slot Type Token IC Flags Details
#0 Smartcard - 0 A
#1 Software Tkn - 0
#2 Smartcard - 0 AD
slotinfo -m2
Slot Type Token IC Flags Details
#0 Smartcard - 0 AD
#1 Software Tkn - 0
#2 Smartcard - 0 A
#3 Smartcard - 0 AR
#4 Smartcard - 0 ARD
It is possible to use some of the features when the attended HSM (exporting end)
has the new version of the software (12.81+) and the unattended HSM (importing
end) has an older version (pre-12.81).
A dynamic slot which has been exported by the attended HSM can be imported to
the unattended HSM. Its local slotID will need to be manually specified if the
unattended HSM has any dynamic slots configured. This is due to the default
import slot (slot #2) being occupied by the dynamic slot. The unattended HSM
can remap its dynamic slots to slot #0, but cannot remap any of its imported slots.
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.
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.
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.
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.
It is possible to redirect the syslog of the Connect to either the RFS or a client, for
more information, see syslog.
You can also modify the [nethsm_watchdog] section in the Connect Configuration
File by setting enable_watchdog to yes or no. Then, push it to the Connect as
usual using cfg-pushnethsm.
The watchdog automatically applies the new setting after a cycle (usually up to a
minute).
Network Devices:
- eth0
- eth1
- nshield0
Monitored Processes:
- hardserver
- netui
- cosmod
System Information Report:
enabled: False
interval: 1h
CPU Usage Monitoring:
threshold: 180%
interval: 60s
frequency: 1h
The Watchdog also monitors address changes on these interfaces. A typical report
looks like this:
Mar 13 10:47:50 nethsm nfwatchdog: The addresses of interface eth0 have been set to ["00:60:e0:87:a1:59",
"172.23.135.129"].
Mar 13 13:58:25 nethsm nfwatchdog: The addresses of interface eth0 have changed from ["00:60:e0:87:a1:59",
"172.23.135.8"] to ["00:60:e0:87:a1:59", "172.23.135.129"].
If the process is running, the Watchdog reports, in JSON format, the process
name, arguments, PID, uptime, status and children, if any.
By default, the System Information Report is printed every hour (if enabled). To
change the interval, set System Information Report > interval to the desired
interval. This field can be expressed in seconds, minutes, hours, or days. Examples:
8h, 2d8h5m20s, 2m4s. A unit is required.
Mar 13 14:05:32 nethsm nfwatchdog: System Report for the Connect is {"system_uptime": "3:20:13.930539",
"virtual_memory": {"total": 8253513728, "free": 7962390528, "available": 7996977152, "used": 173985792},
"load_avg": [0.09, 0.04, 0.01]}
enabled True or False, default: False. Whether the System Information Report is
enabled.
interval An interval in seconds, minutes, The interval at which the System Information
hours or days, default: 1h. Report is printed, if enabled. A unit (s, m, h or d)
is required.
Mar 13 10:48:44 nethsm nfwatchdog: Global CPU usage for the Connect is 92.1%, higher than the threshold of 90%.
Mar 13 10:48:44 nethsm nfwatchdog: CPU usage for the the following processes is higher than the threshold of 90%.
Mar 13 10:48:44 nethsm nfwatchdog: Process hardserver, 90.5%: {"arguments": ["../sbin/hardserver", "-Llogfile"],
"children": [{"arguments": ["../sbin/hardserver", "--spawn-svc"], "children": [], "name": "hardserver", "pid":
620, "status": "sleeping", "uptime": "0:00:54"} {"arguments": ["/opt/nfast/bin/ncssh", "-id",
"/opt/nfast/services/client/ncoreapi/ssh/id_ecdsa", "-known-hosts", "/opt/nfast/services/module/5CA8-5A32-
80F2/ncoreapi/known_hosts", "-hosts", "/opt/nfast/services/module/hosts.txt", "-hostname", "nshield-5CA8-5A32-
80F2.local", "-port", "2203", "-user", "ncoreapi", "ncoreapi", "operational"], "children": [], "name": "ncssh",
"pid": 626, "status": "sleeping", "uptime": "0:00:54"}], "name": "hardserver", "pid": 598, "status": "sleeping",
"uptime": "0:00:55"}
For each process, the Watchdog reports the process name, the CPU usage as
reported by psutil’s cpu_percent, and in JSON format: the process name,
arguments, PID, children, status and uptime.
The threshold must be a number between 0% and 100% x (number of CPUs on the
Connect). The % sign is optional. The default is 180%.
The interval is the time during which the Watchdog samples the CPU usage. This
interval is blocking, that is to say that the Watchdog is not able to perform any
other monitoring while the sampling is happening. The default is 60s. This field
can be expressed in seconds, minutes, hours, or days. Examples: 8h, 2d8h5m20s,
2m4s. A unit is required.
The frequency sets how often the Watchdog performs the sampling. By default,
the Watchdog performs the CPU usage sampling for 60s every hour (frequency =
1h). This field can be expressed in seconds, minutes, hours, or days. Examples: 8h,
2d8h5m20s, 2m4s. A unit is required.
threshold A percentage between 0% and Threshold above which global CPU and process
100% x number of CPU, default: CPU usage is reported. The % sign is optional.
180%.
interval An interval in seconds, minutes, The interval during which the Watchdog
hours or days, default: 60s. computed the CPU usage (both total and per
process). A unit (s, m, h or d) is required.
Aug 7 03:47:46 nethsm nfwatchdog: Information: Process netui exited, awaiting parent.
Aug 7 03:47:51 nethsm nfwatchdog: Information: 3 processes (netui, cosmod, hardserver) exited, awaiting parent.
Should any Watchdog event occur several times in a row, the reports will be
filtered out, so as not to flood the log. This will be reported by the Watchdog in
the following way:
May 9 09:35:47 nethsm nfwatchdog: Global CPU usage for the Connect is 200.0%, higher than the threshold of
180.0%.
The Connect will pick up the new configuration and the Watchdog will apply it
after a cycle (usually up to 1 minute). The syslog should show:
Feb 10 13:22:36 nethsm ../sbin/config-update: found new pushed watchdog config, attempting to install
Feb 10 13:22:36 nethsm ../sbin/config-update: successfully installed new watchdog config
[nethsm_watchdog]
# Start of the nethsm_watchdog section
# Connect Watchdog configuration. This section allows you to enable or disable
# the Connect Watchdog and set up config file push.
# Each entry has the following fields:
#
# Enable the Connect watchdog. (default=no)
# enable_watchdog=ENUM
#
# Whether to allow a client to push new watchdog config files to the netHSM.
# If "on" then this effectively allows a client to remotely configure the
# nethsm_watchdog. (default=off)
# push=ENUM
#
# The IP address of the client allowed to push watchdog config files. If not
# set, or set to 0.0.0.0 or ::, allows ANY IP address to push on a new config
# file.
# remote_ip=ADDR
#
# The hash of the key that the authorised client should use to authenticate
# itself, or 40 zeros to indicate no key authentication required. (Default is
# 40 zeros).
# remote_keyhash=KEYHASH
remote_keyhash The hash of the key that the authorised client should
use to authenticate itself, or 40 zeros to indicate no key
authentication required. The default is 40 zeros.
13.4. Troubleshooting
The Watchdog is designed to fall back to its default values in case the Watchdog
Configuration File is missing or malformed. If the Watchdog does not behave as
you intended, examine the syslog for clues.
Could not open Watchdog Configuration File. Watchdog Push a new Watchdog
Watchdog Configuration File has been restored Configuration File is Configuration File.
to its default state. missing or contains a
YAML syntax error.
Could not read missing … field. Using default … The field is missing or Update the Watchdog
instead. there is a typo. Configuration File and
push it again.
Ignoring unrecognized category … from There is a typo in the Update the Watchdog
Watchdog Configuration File. Valid categories category or it is out-of- Configuration File and
are … date. push it again.
Ignoring unrecognized subcategory … from There is a typo in the Update the Watchdog
Watchdog Configuration File. Valid subcategory or it is out- Configuration File and
subcategories are … of-date. push it again.
Could not parse any time information from … in The string is not a valid Update the Watchdog
the Watchdog Configuration File. Examples of time. Configuration File and
valid strings: … Could not use … as …. Using push it again.
default … instead.
Could not parse 'CPU Usage The threshold provided Update the Watchdog
Monitoring/threshold': must be a number, not … is not a valid number. Configuration File and
push it again.
Could not parse 'CPU Usage The threshold provided Update the Watchdog
Monitoring/threshold': must be between 0% and is not a number. Configuration File and
200%, not … push it again.
• KeySafe
• generatekey and related utilities
• 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.
When you attempt to generate keys for a Security World that complies with FIPS
140 Level 3, you are prompted to insert an Administrator Card or Operator Card.
Use Operator Cards for FIPS authorization. You should only use
the Administrator Card Set for setting up new Security Worlds or
performing administrative functions.
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.
Generating a key creates both a key and a certificate request for the following
application types:
• embed (OpenSSL)
• kpm
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, lowercase ASCII letters, and hyphens (-).
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.
In this command:
For details of the available application types (APPNAME) and parameters that control
other key properties (NAME=VALUE), see Key generation options and parameters and
parameters.
To generate a simple RSA key in batch mode, protected by module protection, use
the command:
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.
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.
When you generate an NVRAM-stored key, you must have sufficient nonvolatile
memory available in the module or the command fails.
• RSA keys in PEM-encoded PKCS #1 format (from a file). The PEM key that
contains the key to import must not require a passphrase.
• DES, DES2 and Triple DES keys (entered in hex).
You cannot import keys into a Security World that complies with
FIPS 140 Level 3. Attempting to import keys into a FIPS 140
Level 3 Security World returns an error.
Option Description
<OPTIONS> You can specify particular options when running generatekey that
control details of key importation.
<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
Linux
Windows
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.
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
passphrases 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, 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
<APPNAME> This option specifies the name of the application for which
the key is to be generated. This must be an application for
which generatekey can generate keys.
from-application=<appname> This option specifies the name of the application with which
the key is currently associated.
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.
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.
application name, nfkminfo lists only the keys for that application. Commonly,
<APPNAME> is often one of:
• custom
• embed
• pkcs11
• kpm
• kps
• mscapi (Windows)
• seeconf
• seeinteg
• simple
You can also specify your own application names for APPNAME as appropriate to
your system.
To list information about a specific key, specify the --key-list option with an
application and key identifier:
BlobRecoveryKA
format 8 Indirect
other flags 0x0
hkm none
hkt none
hkr hash_krBlobPubKA
format 5 Module
other flags 0x0
hkm hash_km hkt none
hkr none
No extra entries
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. Entrust recommends that you verify keys in their original
Security World at their time of generation.
14.6.1. Usage
To verify the key generation certificates from the command line, run the
command:
Option Description
-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.
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.
KeySafe provides a GUI based interface to perform many of the main tasks
required to use an nShield Security World. This appendix describes KeySafe, the
Security World management tool. It includes information about:
• Starting KeySafe
• Using the graphical user interface (GUI) for KeySafe
• Using buttons to select and run operations
• Using the keyboard to navigate KeySafe
• KeySafe error reporting.
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"
nonpriv_port=9000
priv_port=9001
See the Installation Guide for more about ports and firewall
settings.
Linux
Ensure that X11 is properly configured and running before starting KeySafe.
Windows
Start KeySafe from the Windows Start menu: Start > Entrust nShield Security
World > KeySafe. You may need administrator privileges to run KeySafe.
The Windows KeySafe launcher checks that the components required to run
KeySafe are installed. You will be prompted to install any missing components.
15.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 which you can:
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:
• Create a key
• Import a key
• Discard a key
• 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.
15.3.3. Menus
Three menu options are available from the menu bar at the top of the screen:
• File
◦ 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.
• Manage
◦ Introduction - opens the Introduction panel. See Introduction button.
◦ World - opens the World Operations panel. See World button.
◦ Card sets - opens the List Operator Card Sets panel. See Cardsets button.
◦ Softcards - opens the List Softcards panel. See Soft Cardsets button.
◦ Keys - opens the Keys panel. See Keys button.
• Help
◦ 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.
At the top level of the Security World tree, the following information is displayed:
• RTC Key — whether a real-time clock authorization key has been generated
(Yes or No)
• NVRAM Key — whether a non-volatile memory authorization key has been
generated (Yes or No)
• SEE Debug Key — whether SEE debugging has been enabled (Yes or No)
• Open SEE Debugging — whether Open SEE debugging has been enabled
(Yes or No)
• FTO Key — whether a foreign token key has been generated (Yes or No)
Module information may be displayed either inside or outside the Security World.
Modules that have not been incorporated into a Security World will be shown
beneath the Outside Security World node.
At the top level of the Module tree, the following information is displayed:
Mode Description
Mode Description
The Module status tree has an Advanced folder that shows the following details
when expanded:
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.
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.
The Tab key always takes you to the next field or button. If the cursor is not
currently active in a text field, pressing the space bar or the Enter key activates
the currently selected button (as if you had clicked it). Pressing the Shift-Tab
button combination takes you to the previous field (if any) or deselects an
automatically selected button (if any).
15.4. Errors
If KeySafe detects an error from which it cannot recover, it may display a Fatal
Error message.
Please ensure that the hardserver is running and accepting TCP connections.
Click OK to exit.
Possible causes
Suggested solutions
Possible causes
Suggested solutions
1. Exit KeySafe
2. Update the firmware as described in Upgrading the image file and associated
firmware
3. Restart KeySafe
The firmware upgrade process destroys all persistent data held in a key-
management module. If your security system requires that the persistent data held
in a key-management module must survive intact during the upgrade or
initialization of the key-management module, a backup and recovery mechanism
of your kmdata (Linux) or _%NFAST_KMDATA% (Windows) directory must be
implemented.
If you receive any error message titled Unexpected Error, contact Support with
details of what you were doing, and the exact error message.
This appendix describes how you can ensure that a suitable warrant is available to
allow an nShield Remote Administration Card to be used with nShield Solo and
Edge HSMs. To be able to use an nShield Remote Administration Card you need to
ensure that:
Ensure v12.xx Security World Software has been installed on your host computer
(to access the nfwarrant tool) and the nShield Solo or Edge HSM has Firmware
2.61.2 firmware or later installed.
You then need to carry out the following steps to ensure a suitable warrant is
available
5. Validate the warrant that you receive from Entrust to ensure that it matches
the sent request.
6. Install the warrant.
• Identify modules that have the appropriate firmware and KLF2 key
• Identify modules that need their KLF2 key to be warranted by Entrust
• Generate a warrant upgrade request for a specific module, as required
• Install an upgraded warrant
• List KLF2 warrants
Usage:
Options:
Option Description
-h|--help Displays the options you can use with the utility.
$ nfwarrant --check
In this example:
Ensure that the ESN in this request file is the correct one and send the file to
Entrust to be signed.
Warrant details: Filename: XXXX-XXXX-CF11 ESN: XXXX-XXXX-CF11 Keytype: ECDSAPublic Curve: NISTP521
2. Compare the ESN in the file received from Entrust with the one in the original
request, by running the following command:
XXXX-XXXX-CF11
This includes a KLF2 and a KLF3 warrant. The KLF3 warrant is currently unused
and is installed in preparation for multi-tenant systems.
These utilities exist in the bin subdirectory of your Security World Software
installation. Unless noted, all utilities have the following standard help options:
17.1.1. enquiry
Obtain information about the hardserver (Security World Software server) and the
modules connected to it.
17.1.2. checkmod
Check modulo exponentiations performed on the module against the test data
located in opt/nfast/testdata (Linux) or %NFAST_HOME%\testdata (Windows).
17.1.3. cfg-mkdefault
Create a default client configuration file for the hardserver configuration sections.
17.1.4. cfg-reread
Load the hardserver configuration from the configuration file.
17.1.5. fet
• Activate features
• View the status of features
• Verify that a feature has been successfully enabled on a connected module
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.
17.1.6. ncdate
View, set, and update the time on a module’s real-time clock.
17.1.7. ncversions
Obtain and verify the versions of the Security World Software components that
are installed. This utility lists the following information:
17.1.7.1. 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.
17.1.8. nopclearfail
Clear an HSM, put an HSM into the error state, retry a failed HSM, or change the
HSM mode.
You must use a privileged connection to use this utility with the following
parameters:
17.1.9. nvram-backup
Copy files between a module’s NVRAM and a smart card, allowing files to be
backed up and restored.
17.1.10. nvram-sw
View and modify information about NVRAM areas.
17.1.11. pubkey-find
Obtain information of the public key from a certificate or certificate request (in a
Base-64 encoded PEM file).
17.2. randchk
Run a universal statistical test on random numbers returned by the module.
17.2.1. rtc
View and set the module’s real-time clock.
• --adjust: The module uses the difference between its idea of the current time
and the new time, together with how long it’s been since the clock was last
17.2.2. slotinfo
• Obtain information about tokens in a module
• Format a smart card
17.2.4. stattree
Obtain statistics gathered by the Security World Software server and modules.
Linux
Archive the existing hardserver log from /opt/nfast/log/hardserver.log and re-
open as a fresh log file.
When run with no arguments, it will automatically archive the existing log to
/opt/nfast/log/archive/hardserver.DATETIME.log (where DATETIME is the current
date and time). The directory /opt/nfast/log/archive/ is created if it does not
already exist.
Optionally, a single argument can be provided with the full file name to archive
the existing hardserver log to.
Windows
Extract Windows event log entries and output them to the console or a text
file.
As required, specify:
17.3.1. fwcheck
Verify the firmware installed on a module.
17.3.2. nfloadmon
Upgrade the module monitor and firmware of nShield PCIe and network-attached
HSMs.
All the listed utilities, except the floodtest utility, are supported
only on FIPS 140 Level 2 Security Worlds.
des_kat Perform DES known-answer tests. This utility indicates if any of them
fail.
ncthread-test Stress test modules and test nCore API concurrent connection
support.
generatekey Generate, import, or retarget keys. This utility is included in the Core
Tools bundle, which contains all the Security World Software utilities.
For more information, see:
You must use a privileged connection to use this utility with the
following parameter:
nfkminfo Obtain information about a Security World and its associated cards
and keys. For more information, see:
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.
PKCS #11 keys either have keys_pkcs_um or
key_pkcs_uc as the prefix.
elftool Convert ELF format executables into a format suitable for loading as
an SEE machine.
hsc_loadseemachine Load an SEE machine into each module that is configured to receive
one, then publishes a newly created SEE World, if appropriate.
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.
Use the following utilities to manage the interfaces between the PKCS #11 library
and the module.
ckcheckinst Verify the installation of the nShield PKCS #11 libraries. For more
information, see Checking the installation of the nCipher PKCS #11
library.
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.
Do not run this utility unless directed to do so by
Support.
ckshahmac Perform a PKCS #11 test for vendor-defined SHA1_HMAC key signing and
verification capabilities.
cksigtest Measure module signing or encryption speed when used with nShield
PKCS #11 library calls.
The Security World software enables you to 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 (--nopin)
option, the utility lists only the public objects.
This utility does not output any potentially sensitive attributes, even if
the object has CKA_SENSITIVE set to FALSE.
ckmechinfo View details of the supported PKCS #11 mechanisms provided by the
module.
ckrsagen Test RSA key generation. You can use specific PKCS #11 attributes for
generating RSA keys.
cksotool Create a PKCS #11 Security Officer role, and manage its PIN.
anonkneti View the ESN and HKNETI key hash from a module identified by its IP
address.
For more information, see Configuring the remote file system (RFS).
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.
nethsmadmin Administer an nShield HSM without using the front panel. Options
include:
You must use a privileged connection to use this utility with the
following parameters:
nethsmenroll Edit the local hardserver configuration file to add the specified nShield
HSM 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
HSM. For example:
• nethsm_imports.
• Configuring the unit to use the client.
• nethsmenroll.
ntokenenroll Enroll a locally attached nToken with an nShield HSM. This utility
installs the Electronic Serial Number (ESN) of the nToken within the
client configuration file and displays the module’s ESN and the hash of
the key to be used in nToken authentication.
For more information, see Configuring the unit to use the client.
rfs-setup Create a default RFS hardserver configuration. Run this utility when
you first configure the RFS.
rfs-sync Synchronize the Security World data between a cooperating client and
the RFS. This utility is run on the client.
You can use this utility with nShield modules if an
nShield HSM is present.
For more information about these utilities, see Utilities for the CAPI CSP.
cspcheck Check that CSP container files and keys in the %NFAST_KMDATA% directory
are intact and uncorrupted and that the referenced key files exist.
cspcheck64
cspmigrate Move CSP container information for an existing Security World from
the registry into the Security World.
cspmigrate64
cspnvfix Regenerate the NVRAM key counter area for a specified nShield CSP
key.
cspnvfix64
csptest64
keytst Create, test, and display information about keys and CSP key
containers.
keytst64
configure-csp-poolmode Configure HSM Pool mode for the nShield CAPI CSP.
configure-csp-poolmode64
cngimport Migrate Security World, CAPI and CNG keys to the Security World Key
Storage Provider.
cnginstall32 Remove or reinstall the provider DLLs and associated registry entries
manually.
cnginstall
For more information, see cnginstall.
(nShield CNG provider
installer utility)
cngregister (nShield CNG Unregister and re-register the nShield providers manually.
provider registration utility)
For more information, see:
configure-csp-poolmode Configure HSM Pool mode for the nShield CNG CSP. For more
information, see configure-csp-poolmode.
configure-csp-poolmode64
pollbare Obtain information about state changes. The functionality of this test
utility depends on whether the server or an HSM supports nCore API
poll commands.
To know if your server or HSM supports nCore
API poll commands, run the enquiry utility.
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.
This installs the nShield Security Software to the default installation directory,
%PROGRAMFILES%\nCipher\nfast\, and restarts the machine.
This uninstalls the nShield Security Software packages and restarts the
machine.
Open PowerShell and set the signing property and scope of script execution.
The support files for running nShield commands from PowerShell are
Authenticode-signed, so the execution can be restricted to only signed
scripts:
If unsigned PowerShell scripts are to be executed, you may want to relax this
so that locally created scripts can be run without signing:
The above commands can be run with the additional parameter -Scope
CurrentUser to restrict the changes to the currently logged-in user. For
example to permit the current user to run locally-created scripts, run:
support, you can specify those directories with a semi-colon separated list of
paths in the NC_PS_ADDITIONAL_DIRECTORIES environment variable.
$env:NC_PS_ADDITIONAL_DIRECTORIES="C:\Path1;C:\Path2"
Parameter Description
AllUsers Profile is available for all users on the local machine rather than just
the current user.
Example:
Add-nShieldToProfile -AllHosts
Do not call the executables directly (for example, do not call & 'C:\Program
Files\nCipher\nfast\bin\new-world.exe') because this will not enable the
PowerShell support.
the same way as the corresponding command under regular Windows consoles. If
you can run cardpp --check in a regular Windows console, you can run cardpp
--check in PowerShell.
The global variable $LASTEXITCODE of PowerShell contains the exit code (0 for
success) immediately after execution of the nShield command.
Batch mode is intended for automation. Commands can be run from a script and
an output can be redirected to a file. Batch mode does not prompt for input in the
host UI. Input can be supplied programmatically with a PowerShell input pipeline.
If input is needed but no suitable pipeline was supplied, the command fails rather
than stall program execution to wait for user interaction. Standard output and
standard error text printed by the underlying nShield program is written to output
and error pipelines that can be redirected or piped. If the program fails, that is, it
returns a non-zero exit code, the error code is also thrown as an exception that
appears in the error pipeline. In batch mode, output and error texts are visible only
at the very end of execution, because such texts are objects that the command
returns to the pipeline instead of writing them incrementally to the host UI.
If the mode is not explicitly set, PowerShell normally defaults to interactive mode.
However, if any input pipeline objects are supplied, PowerShell defaults to batch
mode. You can therefore switch to batch mode without setting it explicitly simply
by piping $null:
You can change the default mode to batch mode by setting the NC_PS_INTERACTIVE
environment variable:
$env:NC_PS_INTERACTIVE=0
Command Notes
Set-nShieldBatchMode
Set-nShieldInteractiveMode
To restrict a setting to a particular PowerShell scope, you can use the PowerShell
variable $nShieldInteractiveCommandMode, which can be set to $True or $False.
Set-nShieldBatchMode
$passphrase | cardpp --check
Multiple values can be supplied to provide the input to successive prompts. For
example, the generatekey command can be automated to provide passphrases for
operator cards, softcards, or administrator cards. In the following example, the
passphrase variables are passed to the input pipeline, and the remaining key
generation parameters are passed on the command-line:
nShield commands support using SecureString instances both for the input
pipeline and as parameters to the nShield command. This helps reduce the
visibility of plaintext passphrases or other sensitive values in scripts or in the shell.
This is useful when using the input pipeline to automate the presentation of
passphrases to the prompts in card-loading commands. It also means that nShield
commands that take a passphrase as a command-line parameter can be presented
that string without the string becoming directly visible.
Example:
20.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 image below shows the relationship between preload, modules and
applications:
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 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
-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 is definitely a name, use --cardset-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.
-n PATTERN|--name-pattern=PATTERN Load keys with name matching PATTERN. Use * for wildcard.
--polling-interval=POLLING_INTERVAL Interval (s) between polls for changes to the module list
(default=60). High availability mode only.
Argument Effect
--log-level=LOG_LEVEL The log level to log, options: DEBUG, INFO, WARNING, ERROR. Default
is INFO, if unrecognized option it will fall back 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
By default the preload file location is /tmp (Linux) or the current user’s temporary
folder (Windows):
Linux
/tmp/nfpriv_<username>/default
Windows
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 -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.
20.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.
20.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, for example, kfips and ltfips.
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.
◦ For each Merged Key that was loaded by this instance of preload:
◦ Ensure there is a valid current entry for each usable HSM.
◦ To achieve this, check HSMs and load (or re-load) keys onto them as
necessary, and update Merged Key contents.
◦ Ensure that the individual key IDs within each Merged Key are valid:
Remove any that are no longer valid and usable (such as those for a
removed HSM).
◦ Update the preload file to reflect changes, if any.
◦ 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.
As mentioned above, preload in high availability mode will (re)load keys onto
modules when a module is usable. A module will be considered usable if that
module is in operational mode and in the correct world (and in the case of OCS
protected keys, if a card from the OCS set is inserted into the module, locally or
remotely). Preload will not attempt to perform actions that involve world
administration, such as world loading or client enrolment. Users are responsible for
managing worlds and client enrolment, and thus for bringing modules into a
usable state.
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 utilized.
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 the section above on using preload.
Merged Key IDs (just like single-key IDs) are shared between
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:
Given multiple preload processes run under high availability, the process that will
manage the keys is the first process to find them, based on command line options.
This would load the softcard softcard1 on all modules as well as the key
simple_softcard1:
5bccb6f540802ef1da3828f6b8b0f3fc985272e6 2 0x44313d47 1
5bccb6f540802ef1da3828f6b8b0f3fc985272e6 1 0x44313d46 1
...
> nfkminfo -k simple simplesoftcard1
...
name "simple_softcard1"
hash 29235f2a0b77fc1e18641b0820fe3c93e030a02e
...
> nfkminfo -s
...
Operator logical token hash name
5bccb6f540802ef1da3828f6b8b0f3fc985272e6 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:
PKCS #11 key reloading requires preload to be run in high availability mode, with
the following options enabled:
• --high-availability.
• --no-token-keys.
• --preload-file=PRELOAD_FILE, where PRELOAD_FILE must match the location
given to PKCS #11 with the NFAST_NFKM_TOKENSFILE environment variable.
• Either --cardset=<IDENT> or --softcard=<IDENT> (depending on whether using
card set or softcard protected keys), where <IDENT> is the identifier of the card
set or softcard, respectively.
For more information, see section PKCS _11 with key reloading in the
Cryptographic API Integration Guide.
• -o --any-one
• -i --interactive
• exit
• --admin
• --reload-everything
20.8. Logging
By default preload logs to stderr.
For example:
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.
• DEBUG
• INFO
• WARNING
• ERROR
• 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.
Any other string should be a path to different preload file. It can then call
NFKM_GetInfo to get the security world info:
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
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.
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):
0x00000040 This flag shows the stack file with the stack_file
log entry.
0x00004000 This flag shows the full path to the file options_fullpath
that issued 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 the dbg_stubbignum flag with the logging functionality found in
previous Security World Software releases.)
Category Description
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.
pkcs11 Logs all other messages from the PKCS #11 library.
Category Description
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.
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, create the following registry key if it does
not already exist:
HKEY_LOCAL_MACHINE\SOFTWARE\nCipher\Cryptography
For a 32-bit program on a 64-bit OS, create the following registry key if it does
not already exist:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\nCipher\Cryptography
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.
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:
• nfdebug.txt
• ncspdddebug.txt
• 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 the
/opt/nfast/cknfastrc (Linux) or %NFAST_HOME%\cknfastrc (Windows) 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.
The following table maps PKCS #11 debug level numbers to the corresponding
NFLOG_SEVERITY value:
PKCS #11 debug level PKCS #11 debug NFLOG_SEVERITY Output in log
meaning value
0 DL_None NONE
This section describes how you can specify the debugging information generated
by Java.
In order to make the Java generic stub output debugging information, set the
Java property NFJAVA_DEBUG. The debugging information for NFJAVA, NFAST, and other
libraries (for example, KMJAVA) can all use the same log file and have their entries
interleaved.
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.
3. Convert the total to a decimal and specify this as the value for the variable.
NFJAVA_DEBUG=129
You can set the Java debug options by immediately preceding them with a -D. Use
the NJAVA_DEBUGFILE property to direct output to a given file name, for example:
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.
22.2.1.1. Usage
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) you Identify all application software installed on the machine on which any
are using problem with the nShield product occurs.
what APIs you are using Describe any custom software, especially any interaction it has with
the nShield security system.
a description of the Include as much detail as possible, including any error messages you
problem have seen.
a Support ticket number (if When you contact Support you are supplied with a Support ticket
you have one) number. Enter this number to help Support expedite the collection of
any 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 number Include the appropriate country and any region code for your contact
telephone number.
At any time while nfdiag is running, you can type Ctrl-C to cancel its current
commands and re-run it.
22.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.
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 passphrases in the output
file.
NIC status and address details are disabled by default. To enable or disable NIC
details in the stattree output is done via the configuration menu, System > System
Configuration > NIC exposure config > Device Status and select the appropriate
setting (Yes or No). Similarly for enabling or disabling the NIC addressing which is
done via the Address Reporting option.
A typical stattree report with NIC status and address details enabled looks like:
+#HostSysInfo:
+SystemFans:
+#1:
-CurrentFanRPM 6240
+#2:
-CurrentFanRPM 6240
+#3:
-CurrentFanRPM 6240
+#4:
-CurrentFanRPM 6300
+NetworkInterfaces:
+#1:
-InterfaceName eth0
-InterfaceLinkState up
+NetworkAddresses:
+#1:
-InterfaceNetworkAddress 172.23.135.127
+#2:
-InterfaceName eth1
-InterfaceLinkState down
+NetworkAddresses:
You view the tamper log using the nShield HSM front panel, by selecting System >
System information > View tamper log. You cannot erase the tamper log.
22.2.2.1. Usage
-w|--world-info
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
-k|--key-list [<APPNAME>[<APPNAME>]]
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. The output is similar to this:
If <TOKENHASH> is specified, these options list the details of the card identified by
hash. The output is similar to this:
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.
If you run nfkminfo with the -w|--world-info option, it displays information similar to
that shown in these examples:
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 Usable
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 passphrase
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
22.2.2.2.1. World
generation
state
Initialised This indicates that the Security World has been initialized.
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.
• Key generation
• Public key import
• Operator cardset creation
• Softcard creation. This authorization is supplied by presenting
any operator or administration card from the same Security
World. A passphrase 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.
PINRecovery This indicates that the Security World has the passphrase replacement
feature enabled.
!PINRecovery This indicates that the Security World has the passphrase 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 Level 2.
fips1402level3 This indicates that the Security World is in a mode compliant with
FIPS 140 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).
22.2.2.2.2. Module
generation
state
Unknown This indicates that the HSM’s state could not be determined.
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 This indicates that the HSM is from an unknown Security World.
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.
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).
22.2.2.2.3. Slot
IC
This indicates the insertion count for this slot (which is 0 if there is no card in the
slot).
generation
phystype
• SmartCard
• SoftToken
slotlistflags
These are flags describing the capabilities of the slot. Single letters in parentheses
are the flag codes reported by the slotinfo utility:
state
Blank This indicates that the smart card in the reader is unformatted.
Admin This indicates that the smart card in the reader is part of the
Administrator Card Set.
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
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:
TokenAuthFailed This indicates that the smart card in the reader failed challenge
response authentication (the card may come from a different Security
World).
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
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(disabl This indicates that the card in the slot does not have passphrase
ed) replacement enabled. This is always true if passphrase replacement is
disabled for the Security World.
PINRecoveryRequired(enabled This indicates that the card in the slot does have passphrase
) 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.
• kx (key exchange)
• keygen (key generation)
• signing (signing)
• verify (verification)
• enc (encryption)
• dec (decryption)
• misc (miscellaneous)
To see the list of tests run by default in a particular suite, run a command of the
form:
To see all available tests in a particular suite, including those not run by default,
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.
• by test number:
perfcheck suite:test_number
perfcheck signing:16
• by test name:
Example:
The test numbers change between releases. If you want to rerun tests for
comparison, reference the tests by their names.
perfcheck prints the results of individual tests to output as it goes along, and then
prints a full report at the end. By default, perfcheck runs each test three times for
both minimum and maximum queue sizes, and then collates the results in the final
report. See --help for the options to adjust this behavior.
Optionally, perfcheck can write its output to a directory in multiple formats using
the --outputdir option to specify a directory name. This will create a new
subdirectory under the specified directory to write the output. The --nosubdir
option can be added as well to write output to the specified directory directly, in
which case that directory must not already exist. The output directory will contain
perfcheck.html, perfcheck.txt, perfcheck.csv, and perfcheck.json files that contain
the report in HTML, text, CSV, and JSON format respectively. JSON files that
contain the detailed results of individual tests will also be written to the output
directory.
Output reports from test suites include the following information about each test:
Value Description
Queue This value is the number of outstanding jobs in the queue when the
test was run.
By default, most tests run both with a queue of 1, and with a fully
maxed out module queue, to give an indication of both one-at-a-time
performance and the bandwidth for the operation. The queue can be
set differently using the --queue option, in which case only that queue
length will be run with, except for some misc suite tests which set their
own queue.
Value Description
Some tests, for example enc, set the Unit to something other than an
operation, for example KB, to indicate the amount of data that can be
encrypted.
Min latency (ms) This value is the time in milliseconds that the quickest individual job
across all the test runs took to round-trip.
Mean latency (ms) This value is the mean time in milliseconds that jobs took to round-trip.
If a test has been rerun, this is the mean of the mean latency values
from each run.
Max latency (ms) This value is the time in milliseconds that the slowest individual job
across all the test runs took to round-trip.
If a test has been rerun, this is the mean of the CV (%) values from
each run.
Min rate (tps) This is the estimated lower bound of the throughput for this queue size
in transactions per second.
The value becomes more accurate if more test runs of the same test
are done. When it is compared against Mean rate (tps) and Max rate
(tps), Min rate (tps) gives an indication of the variability between runs.
Mean rate (tps) This is a measure of throughput. Unlike Rate (Units/s), it is expressed in
transactions per second, that is, as the number of jobs that round-trip
per second.
Mean rate (tps) is included for comparison against the Min rate (tps)
and Max rate (tps) figures.
Max rate (tps) This is the estimated upper bound of the throughput for this queue
size in transactions per second.
The value becomes more accurate if more test runs of the same test
are done. When it is compared against Min rate (tps) and Mean rate
(tps), Max rate (tps) gives an indication of the variability between runs.
Value Description
Reps This value is the number of repetitions that were actually carried out,
that is, the number of jobs that were round-tripped over all tests of
this operation for this queue size.
If a test was rerun, this is the sum of the repetitions for each run. The
target repetitions for an individual run can be set using the
--repetitions option but note that in most cases more repetitions will
be run depending on the --accuracy setting provided that the timeout
is not reached. It is recommended to set --accuracy rather than
--repetitions to control the accuracy of the test instead of adjusting
the repetitions.
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.
22.2.4.1. Usage
22.2.4.2. Output
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
+ModuleDriverStats:
-DriverIRQs 2547906
-DriverReadIRQs 1274069
-DriverWriteIRQs 1276373
-DriverWriteFails 0
-DriverWriteBlocks 1276373
-DriverWriteBytes 49625888
-DriverReadFails 0
-DriverReadBlocks 0
-DriverReadBytes 0
-DriverEnsureFail 0
-DriverEnsure 1274065
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:
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:
ModuleDriverStats fields:
Field Description
Category Contains
ModuleJobStats This tag holds statistics for the Security World Software commands
(jobs) processed by this HSM.
ModuleSerialStats This tag only applies to nShield USB-attached HSMs. It holds statistics
for the serial connection between the HSM and the host computer.
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.
Category Contains
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 leak key handles, for example.
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.
ID Value
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
after it has failed. The hardserver provides a Notice message when this
occurs. The message does not indicate that the attempt was
successful.
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.
ID Value
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
data. The number under ModulePCIStats counts this as one operation.
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.
ID Value
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.
CPULoadPercent The current utilization of the main CPU, across all cores.
If you are on a firmware version earlier than 13.1, this instead reports a
load average that is scaled by 100, but could be greater than 100% if
there is an average of more than one runnable thread.
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.
SystemFans The fan speed (RPM) for each fan in the HSM.
NVMFreeSpace The total amount of free space in the NVRAM of the HSM, in bytes.
NVMWearLevel The wear level of the HSM’s NVRAM, expressed as a percentage of the
ratio between the erase count and the endurance.
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.
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
HSM. They are updated automatically when the nShield HSM 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 HSM, if required. For more information, see Client Software and module
configuration.
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.
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 HSM from
which the files were exported. This directory contains the master configuration file
config, which specifies the current configuration for the nShield HSM. 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 one or more number sign characters (#) 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 HSM 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:
server_remotecomms_ipv6 nethsm_eth_ipv6
nethsm_gateway_ipv6
nethsm_route_ipv6
dynamic_slots nethsm_bond_enable
slot_mapping nethsm_enable
dynamic_slot_timeouts cosmod
auditlog_settings hs_clients
rfs_client
sys_log
remote_sys_log
config_op
ui_lockout
You can update the parameters defined in most of these sections to configure the
way that the hardserver handles secure transactions between the nShield HSM and
applications that run on the client.
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
Strings are case sensitive in the section names and field names.
23.4.1. nethsm_settings
The nethsm_settings section defines settings specific to the nShield HSM. The
section contains the following fields:
Field Description
enable_impath_resilience When set to the default yes value, this field enables impath
resilience for the module. Setting this field to no disables
impath resilience.
impath_resilience_timeout This field specifies the interval of time that must pass for a
resumable 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 must be
reloaded).
expose_nic_status When set to the yes value, this field enables NIC details in the
stattree output. Setting this field to default no disables NIC
details.
expose_nic_addresses When set to the yes value, this field enables NIC addresses in
the stattree output, only if expose_nic_status is enabled.
Setting this field to default no disables NIC addresses.
23.4.2. nethsm_eth
The nethsm_eth section defines the Ethernet interfaces for IPv4 for the nShield
HSM. Each interface is defined by an entry as follows:
Field Description
netmask The net mask for the nShield HSM. 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 5s only), 10BaseT, 10BaseT-FDX, 100BaseTX, or 100BaseTX-FDX.
23.4.3. nethsm_eth_ipv6
The nethsm_eth_ipv6 section defines the Ethernet interfaces for IPv6 for the nShield
HSM. Each interface is defined by an entry as follows:
Field Description
addr The static IPv6 address for this interface. The default is ::. If SLAAC is
enabled, this address is ignored.
netmask The subnet prefix length of the static IPv6 address for the interface.
The default is 64.
23.4.4. nethsm_gateway
The nethsm_gateway section defines the default IPv4 Ethernet gateway for the
nShield HSM. There is one field, as follows:
Field Description
gateway The IPv4 address of the gateway for the nShield HSM. The default is
0.0.0.0.
23.4.5. nethsm_gateway_ipv6
The nethsm_gateway_ipv6 section defines the default IPv6 Ethernet gateway for the
nShield HSM. There is one field, as follows:
Field Description
gateway The IPv6 address of the gateway for the nShield HSM. The default is ::.
23.4.6. nethsm_bond
The nethsm_bond section defines the HSM bond interface, used for network
bonding. The bond interface’s address and netmask configuration are inherited
from the eth0 (iface=0) configuration. Each entry has the following fields:
Field Description
• 802.3ad
• active-backup Default: 802.3ad.
Range: 0 - 10000.
Default: 100.
primary Primary device. The specified device will always be the active slave
while it is available.
Possible values:
• eth0
• eth1
Default: eth0.
Field Description
Range: 0 - 255.
Default: 1.
lacp_rate The rate in which the Ethernet interface asks the link partner to
transmit LACPDU packets in 802.3ad mode.
Possible values:
• slow
• fast
Default: slow.
xmit_hash_policy The transmit hash policy to use for slave selection in 802.3ad mode.
Possible values:
• layer2
• layer2+3
• encap2+3
Default: layer2.
The process of network bonding, including all the fields above, are described in
https://www.kernel.org/doc/Documentation/networking/bonding.txt.
23.4.7. nethsm_route
The nethsm_route section defines the static IPv4 routes for the nShield HSM. Each
route is defined by an entry as follows:
Field Description
addr The IPv4 address of the route destination. The default is 0.0.0.0.
Field Description
gateway The IPv4 address of the gateway for the route. The default is 0.0.0.0.
23.4.8. nethsm_route_ipv6
The nethsm_route_ipv6 section defines the static IPv6 routes for the nShield HSM.
Each route is defined by an entry as follows:
Field Description
masklen The number of bits to mask for the subnet address prefix, that is, the
number in the range of 1 to 128) after the / of an address in CIDR
format. The default is 64.
23.4.9. nethsm_eth1_enable
The nethsm_eth1_enable section defines if the eth1 interface is enabled.
Field Description
23.4.10. nethsm_bond_enable
The nethsm_bond_enable section defines if the bond interface is enabled.
Field Description
23.4.11. 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
ipv6_conf_addr Indicator of whether the interface uses IPv6 static addresses (static)
or SLAAC (slaac). The default is static.
23.4.12. cosmod
The cosmod section defines the input configuration for the nShield HSM. The
configuration is defined by an entry as follows:
Field Description
keymap The selected layout for the keyboard connected to the nShield HSM
front panel. This value is either UK or US.
23.4.13. 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_esn ESN of the remote module used to authenticate the RFS, or empty
when using software KNETI authentication or no authentication
required (default is empty).
Field Description
push Whether to allow the RFS to push configuration files to the nShield
HSM:
23.4.14. sys_log
The sys_log section defines how the nShield HSM logging works:
Field Description
behaviour The way the log is written. How the log is written is decided by setting
either of the following:
• log
• push
If log is set, the log is written only to the file system of the nShield
HSM. It is lost if the nShield HSM 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.
23.4.15. remote_sys_log
The remote_sys_log section defines a remote syslog server to send the nShield HSM
logging (system.log and hardserver.log) to. It can be an IPv4 or an IPv6 address.
Field Description
remote_syslog_ip The IP address of the remote syslog server to send logs to. The default
is 0.0.0.0.
Field Description
remote_sys_log_port The UDP port of the remote syslog server to send logs to. The default
is 514.
23.4.16. 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
HSM. This is decided by setting one of the following:
• ON
• OFF
remote_ip The IP address of the client that is allowed to push config files. If no
value is set, or if it is set to 0.0.0.0 or ::, any IP address can push on a
new config file.
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.
23.4.17. ui_lockout
The ui_lockout section defines whether you can lock the nShield HSM using login
settings.
• Must be persistent.
• Must not be remoteable.
• Do not need a passphrase, but if a passphrase is configured, it has to be used.
Field Description
lockout_mode Controls front panel access to the nShield HSM. Set to:
• locked
• locked_lt
• unlocked
No UI lockout (default).
ltui_hash The hash of the logical token (LTUI) required to authorize access to the
nShield HSM menu structure when lockout_mode is set to locked_lt.
panel_poweroff This controls the function of the Power button on the nShield HSM
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.
23.5.1. server_settings
The server_settings section defines the settings for the client hardserver you can
modify while the hardserver is running.
Field Description
loglevel This field specifies the level of logging performed by the hardserver.
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.
Field Description
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.
connect_broken This field specifies the number of seconds of inactivity allowed before
a connection to a client hardserver is declared broken. The default is
90.
connect_keepalive This field specifies the number of seconds between keepalive packets
for remote connections to a client hardserver. The default is 10.
accept_keepidle This field specifies the number of seconds before the first keepalive
packet for remote incoming connections. The default is 30. Ideally,
accept_keepalive should be at least twice the value of the
connect_keepalive setting on the unattended machines.
accept_keepalive This field specifies the number of seconds between keepalive packets
for remote incoming connections. The socket will be closed after up to
ten consecutive probe failures. The default is 10.
connect_command_block When the nShield HSM 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 HSM has failed this value
should be greater than that of connect_retry. If it is set to 0, commands
to an nShield HSM 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 HSM mode changing using the nopclearfail utility is
enabled. If set to no, mode changing using the nopclearfail utility is
disabled.
Do not set enable_remote_mode in the client
configuration file.
Field Description
enable_remote_reboot If this field is set to yes (the default value) in the module configuration
file, the nShield HSM remote reboot using the nethsmadmin utility is
enabled. If set to no, remote reboot using the nethsmadmin utility is
disabled. Run cfg-pushnethsm to push the new config file to the module.
enable_remote_upgrade If this field is set to yes (the default value) in the module configuration
file, the nShield HSM remote upgrade using the nethsmadmin utility is
enabled. If set to no, remote upgrade using the nethsmadmin utility is
disabled. Run cfg-pushnethsm to push the new config file to the module.
These flags are those used by the NFLOG_DETAIL environment variable (see
Environment variables to control logging).
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.
Flag Description
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.
unix_file_descriptor_max This field sets the number of file descriptors the hardserver must be
capable of having open concurrently on Linux. The value must be an
integer. If unix_file_descriptor_max is set to 0 (the default), the value
will be ignored by the hardserver. If it is set to a positive value, the
hardserver will refuse to start if the file descriptor hard limit on the
system is less than that value. This configuration entry can be used to
make sure that the hardserver is capable of satisfying the maximum
number of hardserver connections that applications may make use of.
serious Serious error, trying to continue Unexpected errors from system calls, but
they are more serious and likely to indicate
an issue somewhere in the system.
internal Serious internal error, trying to Possible bug in the hardserver, but it might
continue also be an issue in the environment the
hardserver is running in.
startup Fatal error during startup The hardserver could not start, for example
because of an invalid configuration file or
because it cannot bind to a TCP socket
which is already in use. The hardserver will
abort.
23.5.3. server_remotecomms
The server_remotecomms section defines the remote IPv4 communication settings
for the client hardserver. These are read only at hardserver start-up.
Any changes made to these fields in the HSM config file should be followed by a
reboot of the nShield HSM.
It is not recommended 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 HSM configuration, the remote_port field of the
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 HSM).
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.
impath_addr This field specifies the IPv4 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.
23.5.4. server_remotecomms_ipv6
The server_remotecomms_ipv6 section defines the remote IPv6 communication
settings for the client hardserver. These are read only at hardserver start-up.
Any changes made to these fields in the HSM config file should be followed by a
reboot of the nShield HSM.
It is not recommended 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 HSM 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 HSM).
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.
impath_addr This field specifies the IPv6 address at which the hardserver listens for
incoming impath connections. If this field is set to :: (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 ::.
23.5.5. 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.
Field Description
On Linux, this field specifies the name of the socket to use for non-
privileged connections. The default is /dev/nfast/nserver. If the
NFAST_SERVER environment variable is set, it overrides any value set for
unix_socket_name in the hardserver configuration file. For more
information about environment variables, see Environment variables.
Field Description
On Linux, this field specifies the name of the socket to use for
privileged connections. The default is /dev/nfast/privnserver. If the
NFAST_PRIVSERVER environment variable is set, it overrides any value set
for unix_privsocket_name in the hardserver configuration file.
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 (for example, 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 (for example, 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)
specifie
Make sure that your network firewall settings are correct. See the
Installation Guide for more about firewall settings.
Field Description
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.
23.5.6. load_seemachine
The load_seemachine section of the hardserver configuration file defines SEE
machines that the nShield HSMs 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 HSM on to which to load the SEE
machine. The value must be an integer. A nShield HSM 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.
Field Description
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 HSM.
If you require the new functionality enabled by
this field, you can add the field to the
load_seemachine section of your existing
configuration file.
23.5.7. slot_imports
The slot_imports section defines slots from remote nShield HSMs 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 HSM 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 HSM. 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 HSM.
remote_esn This field specifies the ESN of the remote nShield HSM from which to
import the slot.
remote_slotid This field specifies the SlotID of the slot to import on the remote
nShield HSM. The value of this field must be an integer. The default is
0.
23.5.8. 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 HSM that can import it,
consisting of the following fields:
Field Description
local_esn This field specifies the ESN of the local nShield HSM whose slot can be
imported by a network nShield HSM.
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 nShield HSM that is allowed to
import the slot. Keep this field blank to allow all machines. The default
is blank.
remote_esn This field specifies the ESN of the nShield HSM allowed to import the
slot. Leave the value blank to allow all permitted nShield HSMs in the
Security World. The default is blank.
23.5.9. 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.
23.5.10. 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
23.5.11. 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.
23.6.1. module_settings
The module_settings section defines the settings for the nShield HSM 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 HSM.
priority This field specifies the priority of the nShield HSM. The value for this
field can be an integer from 1 (highest) to 100 (lowest). The default is
100.
23.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
performance 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
concurrency configured is written to the hardserver log.
23.6.3. nethsm_imports
The nethsm_imports section defines the network nShield HSMs that the client
imports. It can also be set up by the nethsmenroll utility. Each nShield HSM is
defined by the following fields:
Field Description
local_module This field specifies the ModuleID to assign to the imported nShield
HSM. The value must be an integer. An nShield HSM with this ID must
not be already configured on the client computer.
remote_ip This field specifies the IP address of the nShield HSM to import.
remote_port This field specifies the port for connecting to the nShield HSM.
remote_esn This field specifies the ESN of the imported nShield HSM.
keyhash This field specifies the hash of the key that the nShield HSM should use
to authenticate itself.
privileged The value in this field specifies whether the client can make a
privileged connection to the nShield HSM. 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.
23.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 RFS.
use_kneti Setting this option to yes to use a local module KNETI instead of the
default hardserver’s software KNETI to authenticate this client to the
RFS.
local_esn This is only required if use_kneti is set to yes. It is the ESN of the local
module used for authentication.
remote_esn ESN of the remote module used to authenticate the RFS, or empty
when using software KNETI authentication or no authentication
required (default is empty).
23.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 HSMs allowed to access the file system on this client. Each nShield
HSM is defined by an entry consisting of the following fields:
Field Description
remote_ip This field specifies the IP address of the remote nShield HSM that is
allowed to access the file system on this client.
remote_esn This field specifies the ESN of the remote nShield HSM allowed to
access the file system on this client.
Field Description
keyhash This field specifies the hash of the key with which the client must
authenticate itself to the nShield HSM. 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 Linux convention for transfers.
23.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.
Field Description
23.6.7. hs_clients
The hs_clients section defines the clients that are allowed to connect to the
nShield HSM. Each client is defined by an entry as follows:
Field Description
addr Either the IP address of the client or 0.0.0.0, ::, or blank if the HSM is
to accept clients identified by their keyhash instead of their IP address.
0.0.0.0 or ::, and blank result in the same behavior. You cannot enter
these values in the front-panel user interface. You can only use them in
the configuration file and you will have to use the correct key hash for
identification if no IP address is configured.
keyhash The hash of the KNETI key that the client should present to
authenticate itself.
For nToken authentication, a value must also be provided for the esn
field.
Arcfour N N Arcfour N
ARIA N N Aria N
Camellia N N Camellia N
DES N N DES N
DES2 Y N DES2 Y
1
Triple DES Y N Triple DES Y
SEED N N SEED N
1
Not FIPS 140 approved for encryption operations, but available for decryption
operations.
Asymmetric Algorithms
Diffie-Hellman Y Y DH or DHEx Y
DSA Y Y DSA Y
2 2 3
ECDH Y Y ECDH or EC Y
4
ECDSA Y Y4 ECDSA or EC Y
ECIES N N ECDH or EC N
Ed25519 N N Ed25519 N
ElGamal Y Y DH Y
KCDSA N N KCDSA N
RSA Y Y RSA Y
X25519 N N X25519 N
1
Some insecure key sizes are non-FIPS 140 approved.
2
FIPS 140 approval is only for use with ECDH keys, not with EC keys, but see 3 for
exception.
3
FIPS 140 allows an EC key to be used as an ECDH key for a single use-case. In
this use case, an ECDH key is allowed to perform a single signing of a Certificate
Signing Request (CSR), so that a certificate for the ECDH key can be generated.
4
FIPS 140 approval is only for use with ECDSA keys, not with EC keys.
• If you have a FIPS 140 Level 3 Security World and have any protocols that use
algorithms not approved by FIPS, you have the following options:
◦ If you need to use these non-approved algorithms, you can migrate to a
FIPS 140 Level 2 Security World.
◦ If you have strict FIPS 140 Level 3 requirements, you must replace your
To obtain more details on the specific algorithms that are FIPS approved for use in
the HSM, refer to the nShield Security Policy for the particular FIPS CMVP certified
nShield product that you are using.
For the FIPS CMVP certificates for nShield products, see https://csrc.nist.gov/
projects/cryptographic-module-validation-program/validated-modules/search.
The FIPS CMVP certificate links to the Security Policy.
You can create a v3 Security World that is compliant with FIPS 140 Level 3 from a
host server if you meet the following criteria:
• The host server is running Security World host-side software version 12.50 or
later.
• The HSM is running firmware version 12.50 or later.
Your solution is only FIPS 140 compliant if you are running the exact firmware
version that has been FIPS 140 certified.
Prerequisites
• If the audit logs are to be sent to a non-default location, the configuration file
must be set up before the Security World is created.
• 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.
1. Check the syslog transport before creating an Audit Logging enabled Security
World.
Send a log message to the configured host and port using a command, for
example logger, that can send messages to a syslog server over UDP.
[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
Key considerations:
• A Security World is created with Audit Logging enabled if either the --audit
-logging or -G options are passed to the new-world command or the Security
World is created in the common-criteria-cmts mode. This requires that the HSM
is capable of audit logging and Security World creation will fail if the HSM
does not support Audit Logging.
• Additional HSMs are indoctrinated into an Audit Logging enabled Security
1. Audit Logging is set as enabled for this Security World and is recorded in the
world file.
2. The HSM is initialized and:
◦ A flag indicating the Audit Logging status is recorded in the HSM’s
EEPROM
◦ A 3072bit DSA HSM specific Audit Logging Signing Key (KAL) is created
and persisted in the HSM’s EEPROM
◦ A Certifier Block containing the public half of KAL is generated and sent
to the log receiver via the hardserver.
When you indoctrinate a new HSM 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:
◦ All HSMs in an Audit Logging Security World have Audit Logging enabled
◦ Each HSM has a distinct Audit Logging Signing Key.
Enabled AuditLogging
Disabled !AuditLogging
>nfkminfo
...
state 0x37270009 Initialised Usable Recovery !PINRecovery !ExistingClient RTC NVRAM FTO
AlwaysUseStrongPrimes !DisablePKCS1Padding !PpStrengthCheck AuditLogging SEEDebug
...
Enabled AuditLogging
>enquiry
...
mode operational
...
active modes AuditLogging UseFIPSApprovedInternalMechanisms AlwaysUseStrongPrimes
hardware status OK
The audit log entries are generated on the module, the hardserver acts as a relay
to a syslog infrastructure. The logging is at the level of nCore commands as
processed by the HSM.
• Origin authentication
• Public verification
• Message integrity
• Replay resistance
• Message sequencing
• 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.
This is the log message from the entity being audited. It is in a standard format
and includes operation specific data required to provide an auditing capability. As
each log message is generated on the HSM, a digest operation is performed on it
and the digest buffered in the HSM.
Signature Block
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.
Certifier Block
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, as shown 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:
Adjust the example paths for the platform running your syslog server as
appropriate. s_log is the source receiving the audit logging messages.
25.4.1. rsyslog
rsyslog can be configured to not reformat messages using the following approach:
$template myFormat,"%rawmsg%\n"
Linux
Windows
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.
25.4.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.
section the audit log entries are distributed using the syslog transport mechanism.
Parameter Description
• nShield Solo
• nShield Solo XC
• nShield Edge
• nShield 5s
Class ID Description
1 nCore Commands
• Periodic heartbeat
• Secure channel establishment
• Signature Blocks
• 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.
Parameter Description
Severity Description
1 nCore Commands
• Reboot events
• Secure channel establishment
• Signature Blocks
• Certifier Blocks
6 Shutdown messages
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).
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
timelimit How many seconds after reassembly the Logical Token is usable for
mode Mode that a channel is opened in. One of encrypt, decrypt, sign or
verify
Cmd_SetNSOPerms
• AlwaysUseStrongPrimes
• DisablePKCS1Padding
• FIPSLevel3Enforcedv2
• CommonCriteriaCMTSRestrictions
Cmd_InitialiseUnitEx
• AuditLogging
• UseFIPSApprovedInternalMechanisms
prevrtc The previous value of the HSM’s RTC as ms since the epoch. Used to
indicate previous value of the RTC before a Cmd_SetRTC timestamp or an
event occurring before a restart
Counter Description
When a client is enrolled into the HSM, the following takes place:
• A session value is calculated from both the client’s IP address and its KNETI
hash.
• The HSM automatically generates an audit log with the Cmd_SessionCreate
command that contains the IP address of the client, the client’s KNETI hash
and the corresponding session ID.
Subsequently, whenever the client executes a loggable command on the HSM, the
audit log that’s generated will contain the session field with the client’s unique
identifier.
If this session is terminated (for example, if the Impath Resilience session expires
after a client disconnects and doesn’t resume the session before the timeout),
then the HSM will generate an audit log with the Cmd_SessionDestroy command to
indicate this.
Name Description
session A unique identifier for the client that executed a command on an HSM.
This field is only available on audit logs generated inside an HSM for
commands initiated by the HSM’s clients.
Name Description
tpbl Total Payload Block Length. This is the length of all Certifier Block
fragments.
sign DSA signature using KAL of the data in each fragment up to the sign
extension. The DSA signature is DER encoded and then base64
encoded. It is present here to support consistency checking.
which dictates the number of audit log messages it covers. This release supports a
maximum of 10 audit log messages per Signature Block. The main data for the
Signature Block is the SHA-256 hashes of the log messages covered by the block.
Name Description
fmn First Message Number as a decimal number. First log message seqNo in
this Signature Block.
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.
This is an example Certifier Block produced after a reboot of the HSM. The log
messages have been reformatted for display as each one can be up to 1024
characters long. The Reboot Session ID (rsid) is 8. There are five fragments in this
example. The first four are 450 characters and the final 340 long for a total length
of the payload of 2140 characters. The Event Class Id is 3 and the severity is 5
identifying these as infrastructure messages.
NwA
This example shows a sequence of audit log messages with a Signature Block after
10 messages. These are in the same rsid as the previous example. The log
sequence number for this excerpt starts at 31 and the last log message before the
Signature Block is sequence number 40. The name element identifies the
command being executed by the HSM. Each of the example commands operates
on an nCore Key and this is identified by the nCore key hash of the relevant key.
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.
hkey=c4ab637985a542e7eb3eb4838f57872d5422bbb4
The generatekey utility (see Key generation options and parameters) 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
rtc Timestamp as milliseconds since the epoch derived from the HSM’s
Real Time Clock
nCore Key Hashes of private and public key halves
are identical
The nCore Key Hashes for the input keys will only be
Slot tokenslot
Cmd_Destroy is used for Logical Tokens as
well as Keys
Slot tokenslot
LT Hash htok
SlotId tokenslot
required to reconstruct the Logical Token. It
reduces to 0 when a quorum of the Shares
have been read.
SlotId tokenslot
DSAp3072s256
DSAp3072s256
Combination of AlwaysUseStrongPrimes,
DisablePKCS1Padding, FIPSLevel3Enforcedv2
and CommonCriteriaCMTSRestrictions
Cmd_CreateSeeWorld
Cmd_SetSEEMachine
New RTC value will be shown in the rtc
extension
25.6.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.
with name element heartbeat, Severity 4,
and Device Event Class Id 2. In the CEF
extensions it’s logged with source=internal.
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_ClearUnit Cmd_ClearUnit
Cmd_Fail Cmd_Fail D
Environment_SensorFail HV
Temperature_OutofRange T
RNG_PeriodicTestFail HRTP
Voltage_Tamper V
Battery_Tamper B
Unknown_Tamper TAMPER
....
<134>May 16 15:08:45 myhost2 CEF:0|nCipher Security|nShield Solo XC|12.60.2|3|ssign-cert|5|esn=1111-2222-4444
rsid=2 rtc=1524140117693 tpbl=2140 findex=5
flen=340frag=3/ITRJT4T/qgd2ZEJufIzCR+nR9lngOrmogj+5JM7VMFLsWGDxUqxmFlpqs52T2zWuYIeFHGQfx9WS9PUhf2eLMyF/7onn+hFUs5
7/GSZlGbCnxWybfPN27oyXjHE7pfyOrWRVKlIw8UULHVezVsxeIsZuuNEsZa5gUQ++DkoTu5M2BoPr4A+6dVL2eDhOF1m2zKATfk2moW93GkA3AO7
lNPV5xU76ujo2tT7Mttvg+vyddiF2UWe6n75U0FMFjlM9WnhpFAhNk9mJPrNZ5smf4i9JuNKZat+5tq5w2b/a8Sy01EVEKtJI5SSjahtp5z77RseQ
8H8ytsw6oAAAA=sign=MEUCIHgrF1m7t9X5xsl/gXwlju0bPfFPjJeIeIiH8TKSN7prAiEAs3lPS62zX3TE940/Dw9/1gVradNi62wrQI+WlSI4IY
U=
<134>May 16 15:08:45 myhost2 CEF:0|nCipher Security|nShield Solo XC|12.60.2|5|Cmd_ClearUnit|6|esn=1111-2222-4444
rsid=2 rtc=1524140117693 seqNo=1 source=internal prevrtc=1524140108693
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
Cmd_LoadLogicalToken LLLLLLL
The basics of the verification approach is shown on the Audit Log Verification
diagram.
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
25.7.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.
25.7.1.2. Example
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. 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:
//k=&s0QG1C08QBi34gaTU2+rUzp/dwtAXi9Hv0IjDvDL/yg=&Im5nW+OX0gbdlLnrFLxsZtR4meDSEXG5JXtkMmltTZU=&LGAXS1nvgHElvXhk8R
VT2lCK2NMtXyD9OYTecVOaaBk=&MbJAk706yU2+QykWmtfnCV0lxn/enber8aJK3cZyxLg=&y2qxF5VGm/X/h6ZcZ5iOes7ZAFpqM/6ND8nAXzCM/
bY=&kWjEaGIclJv494A1ZcUgGHJko7AeKvUUqVimhfExioU= Length: 577
Verifying SB....Lineno:29:InstanceNo:1
Valid Hash list from SBs written to ValidHashes_fromSB_forInst1.txt
In-Valid Hash list from SBs written to InvalidHashes_fromSB_forInst1.txt
Log entry found in Tampered SB. Line no:8 SeqNo:2
Log entry found in Tampered SB. Line no:9 SeqNo:3
Log entry found in Tampered SB. Line no:10 SeqNo:4
Log entry found in Tampered SB. Line no:11 SeqNo:5
Log entry found in Tampered SB. Line no:12 SeqNo:6
Log entry found in Tampered SB. Line no:13 SeqNo:7
Log entry found in Tampered SB. Line no:14 SeqNo:8
Log entry found in Tampered SB. Line no:15 SeqNo:9
Log entry found in Tampered SB. Line no:16 SeqNo:10
Log entry found in Tampered SB. Line no:17 SeqNo:11
No entry in SB for event @ Line:30 : Seq No:22 --
No entry in SB for event @ Line:31 : Seq No:23 --
Verified cert blocks written to./LogResult/CBs.txt
Sig blocks written to./LogResult/SBs.txt
Log messages written to./LogResult/AllEvents.txt
Anything that did not match (incl.
invalid cert blockfragments) written to :./LogResult/Inconsistent.txt
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).
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 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 with the gbk, rsid or
seqno fields. 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.
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.
Parameter Description
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:
• DES3
• DH
• DSA
• ECDH
• ECDSA
• Ed25519
• HMACSHA1
• RSA
• Rijndael (AES)
• X25519
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 Level 3, or if you do not set the --no-verify
option.
In applications that use Security World software older than v12.60 and
would use the legacy OpenSSL CHIL engine with hwcrhk:
Parameter Description
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.
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.
blobsavefile When using the custom application type, the VALUE for blobsavefile
specifies a file name of the form FILENAME_req.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).
Option Description
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).
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,
BrainpoolP256r1, BrainpoolP256t1, BrainpoolP320r1, BrainpoolP320t1,
BrainpoolP384r1, BrainpoolP384t1, BrainpoolP512r1, BrainpoolP512t1,
NISTP192, NISTP224, NISTP256, NISTP384, NISTP521, NISTB163,
NISTB233, NISTB283, NISTB409, NISTB571, NISTK163, NISTK233,
NISTK283, NISTK409, NISTK571, SECP160r1 and SECP256k1
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.
Option Description
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.
• digits 0-9
• lower-case letters a-z
• hyphen (-)
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. 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).
You can also specify a module by setting the
--module option.
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.
Option Description
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 kmdata (Linux) or
%NFAST_KMDATA% (Windows) 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.)
If you use seeintegname to specify a key that has been recovered with
the rocs utility, you must also use the -N option with generatekey.
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. This parameter does not exist for fixed-size
keys, nor for ECDH and ECDSA keys which are specified using curve.
Option Description
strict For DSA key generation only, setting the VALUE for strict to yes
enables strict verification, which also limits the size to 2048 or 3072
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. 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 Diffie-Hellman keys. The defaults are 256 bits for a key size
of 1500 bits or more or 160 bits for other key sizes.
alias X X X
blobsavefile X X X
cardset X X
certreq
checks X
curve X
embedconvfile X
embedsavefile X X X
from-application X
from-ident X
hexdata X
ident X X
keystore X X X
keystorepass X X X
module X X
nvram X X
paramsreadfile X
pemreadfile X
plainname X X X
protect X X
pubexp X
qsize X
recovery X X
seeintegname
selfcert
size X
strict X
type X
x509country X X X
x509dnscommon X X X
x509email X X X
x509locality X X X
x509org X X X
x509orgunit X X X
x509province X X X
xsize X
The following table shows which applications are applicable to the different NAME
options:
Property custom embed hwcrhk pkcs 11 seeconf seeinte seessl simple kpm
g
alias
blobsavefile X
cardset X X X X X X
certreq X
checks X X X X X X
curve X X X X X X X
embedconvfile X
embedsavefile X X
from-application X X X X X X
from-ident X X X X X X
hexdata X X X X X
ident X X X
keystore
keystorepass
module X X X X X X X
nvram X X X X X
paramsreadfile X X X X X X X
Property custom embed hwcrhk pkcs 11 seeconf seeinte seessl simple kpm
g
pemreadfile X X X X
plainname X X X X X X X X
protect X X X X X X X X X
pubexp X X X X X X
qsize X X X X X X
recovery X X X X X X X X
seeintegname X X X
selfcert X
size X X X X X X X X X
strict X X X X X
type X X X X X X X X X
x509country X X
x509dnscommon X X
x509email X X
x509locality X X
x509org X X
x509orgunit X X
x509province X X
xsize X X X X X
The nShield HSM Status LED indicates the operational status of the module.
The nShield HSM screen shows a color-coded footer at the bottom of the display
when it is not in Operational mode.
Linux
opt/nfast/bin/enquiry
Windows
enquiry
Example output:
Server:
enquiry reply flags none
enquiry reply level Six
serial number ####-####-####-####
mode operational
version #.#.#
speed index ###
rec. queue ##..##
...
version serial #
remote port (IPv4) ####
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 shows that the nShield HSM is in operational
mode.
3. Expand the Security World and/or Outside Security World nodes as required.
4. Locate the appropriate nShield HSM (Module).
The current mode of the module is displayed in the State field.
See Using KeySafe for more about using KeySafe. See Module information for
more about checking the mode.
You can use the following commands to change the mode of a module:
1. Run either:
After installing your nShield HSM by following the Installation Guide, Entrust
recommend that you use some of the provided software utilities to monitor your
installation. Specifically, the stattree command allows reporting of voltages and
temperatures from your module.
The table below documents the expected normal operating ranges for the
temperatures of your module. Module temperatures would be expected to be
within these values when installed with sufficient cooling in an approximately 20-
30°C ambient air temperature environment. Calculated stattree statistics such as
minima and maxima are reset on module reboot.
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.
The Version Security Number (VSN) stands as a safeguard to prevent earlier and
potentially less secure images and accompanying firmware from being loaded
onto the nShield Connect. It prevents the loading of an image file with a lower
VSN than the existing VSN. The VSN is not incremented with every release, but
only in the event of a significant security enhancement to the nShield Connect and
/ or its internal module.
When upgrading the nShield HSM image file, client licenses and
features activations on the HSM will persist. However, if you
factory state the unit dynamic features are lost and must be re-
enabled.
For more information, see Adding or restoring an HSM to the Security World.
Ensure you have a quorum of the ACS and that the ACS is
available and operating correctly prior to commencing any
firmware upgrade. If you do not, you will not be able to reload
your Security World on your nShield Connect and you will not be
able to use any of your keys.
Before upgrading, copy the directory containing the .nff file from the .iso or DVD
to the nethsm-firmware directory on the Remote File System of the nShield
Connect.
The following sections describe how to load this firmware package onto your
nShield Connect.
1. Ensure that the Connect image file is named nCx3N.nff and located in the
following directory:
◦ Windows: %NFAST_HOME%\nethsm-firmware\<version>\nCx3N.nff.
◦ Linux: /opt/nfast/nethsm-firmware/<version>/nCx3N.nff.
The directory <version> should match the image version string identified on the
firmware ISO. If you are not sure on the details, contact Entrust nShield Support,
https://nshieldsupport.entrust.com.
1. From the main menu on the unit, select System > Upgrade system.
2. Confirm that you want to upgrade the image file.
3. Select the directory that contains the image file or firmware that you require.
If multiple Connect image directories are displayed, scroll to the relevant
You are informed that the files are being transferred. The nShield Connect will
disconnect from the network during the upgrade procedure and reconnect
once the upgrade is complete.
4. Verify the image version, HSM (firmware) version, and image VSN that are
displayed, and confirm the upgrade when prompted.
The image upgrade file may be supplied as a separate item that must be copied
into the subfolder for its respective version. The default file name is nCx3N.nff.
1. Ensure that the new image file is in the following folder on the RFS:
◦ Windows: %NFAST_HOME%\nethsm-firmware\<version>
◦ Linux: /opt/nfast/nethsm-firmware/<version>
If the <version> subfolder does not already exist on the RFS, it must be
created by a user with the necessary privileges.
2. List the image file(s) available on the RFS, run the following command from
the Client:
Where:
For example, if the version folder does not exist or its name is not
correct, the nethsmadmin command cannot find the image:
3. In order to load (or upgrade) the Connect image run the following command
from the Client:
Where:
For example:
4. After the image upgrade has completed, run the enquiry utility to check the
image version of the target nShield HSM is as expected.
If you are initializing the HSM into a new Security World, see Creating a Security
World.
If you are re-initializing the HSM into an existing Security World, see Adding or
restoring an HSM to the Security World.
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.
Message Description
set This message is sent by a manager to set the value of an object at the
agent.
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
On Windows, the SNMP agent can be installed and activated separately. After
installing the SNMP components, an activation command can be issued.
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
editing the defaultPort entry in snmp.conf file. If both files have been edited, the
agentaddress entry in snmpd.conf file takes priority for snmpd, and the defaultPort
entry in snmp.conf is ignored.
/opt/nfast/scripts/init.d/ncsnmpd stop|start|restart
See The SNMP configuration file: snmp.conf for more information on additional
parameters accepted by snmpd.
Windows
To register the SNMP agent as a Windows service, enter the following
command with administrative privileges:
See The SNMP configuration file: snmp.conf for more information on additional
parameters accepted by snmpd.
This installs the agent as a Windows Service but does not start it automatically.
snmpd -unregister
The SNMP agent can be started and stopped from the services control panel or
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.
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.
The Security World Software package uses various configuration files to configure
its applications. This section describes the overall nature of the configuration files
for the SNMP agent.
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?.
The SNMP agent reads its configuration files on startup, and any changes made
after this point will have no effect. If new directives are added and need to be
applied, the SNMP agent can be forced to re-read its configuration files with:
The snmp.conf configuration file contains directives that apply to all SNMP
applications. These directives can be configured to apply to specific applications.
The snmp.conf configuration file is not required for the agent to operate and report
MIB entries.
The snmpd.conf configuration file defines how the SNMP agent operates. It is
required only if an agent is running.
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.
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.
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 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 for more details.
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 can be performed with the createUser directive. See USM users. 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.
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.
agentgroup ncsnmpd
agentuser ncsnmpd
sysLocation STRING
sysContact STRING
sysName STRING
The three directives above set the system location, contact or name for the SNMP
Agent respectively. Ordinarily these objects are writable via a suitably authorised
SNMP SET request, however, specifying one of these directives in the
configuration file makes the corresponding object read-only.
sysServices INTEGER
Sets the value of the sysService.0 object. RFC1213 defines how the integer value is
calculated.
sysDescr STRING
sysObjectID OID
The two directives above set the system description and object ID for the agent.
These objects are not SNMP-writable, but these directives can be used by a
network administrator to configure suitable values for them.
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:
noauth noauthnopriv
auth authnopriv
priv authpriv
Users can be added to the SNMP configuration with the createUser directive,
defining the security mechanisms to be used.
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.
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:
• Read-only user with access to the full OID tree requiring authentication as a
minimum:
rouser userl
Or
• Read-write user with access to the full OID tree requiring authentication as a
minimum:
rwuser user3
Or
Or
OID VIEW and CONTEXT are as defined for rouser and rwuser.
Example:
rocommmunity public
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.
available using four configuration directives - com2sec, group, view and access. The
directives essentially define who has access and what they have access to using
four directives. The first two directives (comsec2sec and group) define the who, while
the last two (view and access) define the what.
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.
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 (for example, 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
1 1 1 1 1 1 1 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
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:
• SNMPv1 requests using the public community only have read access to the
enterprises.nCipher.nC-series.statistics subtree,
• SNMPv2c requests using the public community only have read access to the
enterprises.nCipher.nC-series.administration.subtree,
• SNMPv3 requests using the user2 USM user, must as a minimum be
authenticated, and have read, notify access to the nShield MIB (i.e. enterprises
nCipher)
• 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.
• 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
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. The
address components are separated by colons ":". For example, localhost or
tcp:192.168.137.2:163.
COMMUNITY if specified will be the community name used for the traps. If it 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
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.
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.
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.
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:
30.7.3.1. Traps
hardserverAlert This trap is sent when the hardserver fails or is shut down.
memoryUsageHighAlert This trap is sent when the HSM memory usage high
threshold has been reached or exceeded by an HSM. See
section on Memory usage monitoring below for more
details.
memoryUsageOkAlert This trap is sent when the memory usage for an HSM falls
below the HSM memory usage ok threshold. See section on
Memory usage monitoring below for more details.
• If the SNMP agent starts up and recognises that there are HSMs in a high
memory usage state or,
• If HSMs in a high memory usage state are enrolled or,
• If the SNMP agent loses and then re-gains contact with the local hardserver
which is connected to HSMs in a high memory usage state or,
• If failed HSMs in a high memory usage state then recover.
For each of the four scenarios above, one memoryUsageHighAlert trap will be sent for
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.
The following table gives details of the individual nodes in the administration sub-
tree:
2: NotRunning
4: resetquery
listKeys can be preset using the keytable config directive in snmpd.conf file (see
The SNMP configuration file: snmp.conf).
The following table gives details of the nodes in the Security World hash sub-tree
(enterprises.nCipher.nC-series.administration.swHashes):
The following table gives details of the nodes in the Security World quorums sub-
tree (enterprises.nCipher.nC-series.administration.swQuorums):
The following table gives details of the nodes in the module administration table
(enterprises.nCipher.nC-series.administration.moduleAdminTable):
1: Operational
2: Pre-init
3: Init
4: Pre-maint
5: Maint
6: AccelOnly
7: Failed
8: Unknown
productName R DisplayString
2: Usable
3: MaintMode
4: Uninitialized
5: Factory
6: Foreign
7: AccelOnly
8: Failed
9: Unchecked
10: InitMode
11: PreInitMode
12: Unverified
13:
UnusedTableEntry
The following table gives details of the nodes in the slot administration table
(enterprises.nCipher.nC-series.administration.slotAdminTable):
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
The following table gives details of the nodes in the card set administration table
(enterprises.nCipher.nC-series.administration.cardsetAdminTable):
cardsetName R DisplayString
The key administration table is visible as long as the listKeys node in the
administration sub-tree is set to a value other than none.
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
The key query sub-tree is used if the listKeys node in the administration sub-tree
is set to query.
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
The following table gives details of the nodes in the statistics sub-tree, and the
module statistics table (enterprises.nCipher.nC-
series.statistics.moduleStatsTable):
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
The following table gives details of the nodes in the module statistics table
(enterprises.nCipher.nC-series.statistics.moduleStatsTable):
cmdBytes R Counter32
replyCount R Counter32
replyBytes R Counter32
loadModule R Counter32
loadModule R Counter32
objectCount R Gauge32
nvRAMInUse R Gauge32
volatileRAMInUse R Gauge32
CPUVoltage8 R DisplayString
CPUVoltage8 R DisplayString
CPUVoltage9 R DisplayString
CPUVoltage10 R DisplayString
CPUVoltage11 R DisplayString
The following table gives details of the nodes in the nShield HSM statistics table
(enterprises.nCipher.nC-series.statistics.netHSMStatsTable):
The following table gives details of the nodes in the per connection statistics table
(enterprises.nCipher.nC-series.statistics.connStatsTable):
The following table gives details of the nodes in the per module, per connection
statistics table (enterprises.nCipher.nC-series.statistics.connModuleStatsTable).
The fan table provides the speeds of each fan on the remote module (HSM). The
following table gives details of the nodes in the fan table
(enterprises.nCipher.softwareVersions.netHSMFanTable):
The following table gives details of the nodes in the software versions table
(enterprises.nCipher.softwareVersions.softwareVersionsTable):
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.
-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.
-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).
-p NUM This option specifies running on port NUM instead of the default: 161.
-C This option specifies that the default configuration files not be read.
Option Description
-r This option specifies not exiting if root-only accessible files cannot be opened.
-I [-]INITLIST This option specifies a list of MIB modules to initialize (or not). Run
snmpd with the -Dmib_init option for a list.
Utility Description
snmpget This utility runs a single GET request to query for SNMP
information on a network entity.
snmpset This utility runs a single SET request to set SNMP information on a
network entity.
snmpgetnext This utility runs a single GET NEXT request to query for SNMP
information on a network entity.
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 ...--
Numeral Morse
4 ....-
5 .....
6 -....
7 --...
8 ---..
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
OLC --- .-.. -.-. SIGABRT: assertion failure and/or abort() called.
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.
Code Meaning
HCV .... -.-. ...- CPLD wrong version for PCI policing
firmware.
Code Meaning
HCnC .... -.-. # -.-. -.-. CPU n failed self-test; CPU ID check
C failed.
HCnC .... -.-. # -.-. ..-. CPU n failed self-test; freeing memory
F for cached RAM test.
HCnC .... -.-. # -.-. .-. CPU n failed self-test; read error during
R cached RAM test.
HCnC .... -.-. # -.-. .-- CPU n failed self-test; write error
W during cached RAM test.
HCnK .... -.-. # -.- -... CPU n failed selftest - AES CMAC
B known-answer test.
HCnK .... -.-. # -.- -.-. CPU n failed selftest - ECDSA known-
C answer test
Code Meaning
HCnK .... -.-. # -.- .... CPU n failed self-test; SHA-1 known-
H answer test.
HCnK .... -.-. # -.- .-. CPU n failed selftest - RSA known-
R answer test
HCnK .... -.-. # -.- ... CPU n failed self-test; DSA known-
S answer test.
HCnL .... -.-. # .-.. -.-. CPU n failed self-test; locking check.
C
HCnP .... -.-. # .--. ... CPU n failed self-test; test terminated
S at start.
HCnS .... -.-. # ... .--. CPU n failed self-test; no memory for
A uncached RAM test.
HCnS .... -.-. # ... ..-. CPU n failed self-test; freeing memory
F for uncached RAM test.
HCnS .... -.-. # ... .-. CPU n failed self-test; read error during
R uncached RAM test.
HCnS .... -.-. # ... .-- CPU n failed self-test; write error
W during uncached RAM test.
HCnT .... -.-. # - ... CPU n failed self-test; could not start
S test.
The following error codes indicate faults encountered when a module is in the
maintenance mode.
KFE -.- ..-. . Flash sector erase failed. Repeat firmware upgrade.
KFP -.- ..-. .--. Flash sector program failed. Repeat firmware upgrade.
SOS IJA can occur for any type of log message (i.e. a log
message, signature block or certifier block).
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, Entrust 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.
When using an nShield HSM, Entrust recommend that you set the number of
outstanding jobs within the rec. queue (recommended queue) range specified by
the enquiry output for the module.
If you are sending single jobs synchronously from each thread of your client
application, try to keep the number of threads within this rec. queue range for best
throughput.
When using higher-level APIs, such as PKCS#11, your application could benefit
from increasing the thread count above the rec. queue range or the number that
gives the best throughput when using nCore directly.
If you are load-balancing across multiple HSMs and want to maximize throughput
across all of them, then use the sum of all rec. queue ranges for each of the
modules to set the target for the outstanding jobs.
When using higher-level APIs such as PKCS#11, 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 (for example, cksigtest for PKCS#11) 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 tcmalloc.
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.
Benefits of MergedKeys:
• A client need hold only a single M_KeyID reference instead of one for each
HSM.
• That ID remains usable even while the key’s actual IDs on HSMs can fluctuate.
• The hardserver can use heuristics to choose the most appropriate HSM (for
example, the least heavily loaded one).
• If some HSMs become unavailable, the hardserver uses the remaining ones
automatically.
◦ A MergedKey can be updated, removing its entry for a defunct HSM and
corresponding single-key ID.
• New HSMs can be added: if a new HSM is made operational and added to the
relevant security world, then
◦ the key can be loaded onto that HSM, thus creating a new single-key ID
for that key on that HSM, and then
◦ the new (Key ID, HSM) pair can be added to the existing Merged Key.
• /opt/nfast/kmdata (Linux).
• %NFAST_KMDATA%, typically C:\ProgramData\nCipher\Key Management Data (
Windows).
• Any path that was created by the rfs-setup utility and associated with RFS
volumes to prepare an RFS for an nShield HSM or for use with the rfs-sync
utility.
• Subdirectories of permitted paths.
If you want to add custom paths not included in this list as RFS volumes, you must
add them to the list of permitted paths before starting the hardserver (Linux) or
nFast Server (Windows) service. If you make these changes after starting the
service, you need to restart it for the changes to take effect.
You can update the list of permitted paths by either setting the
NFSERV_RFS_ALLOWED_PATHS environment variable (see Allow custom RFS
paths with an environment variable) or by creating an additional config.secure
configuration file (see Allow custom RFS paths with a configuration file.)
This file must only be writable by root. This is enforced by nShield start-up
scripts.
Windows
Create the NFSERV_RFS_ALLOWED_PATHS environment variable in the global system
environment variables with a semicolon-separated list of paths (\<path>\share).
C:\path1\share;D:\path 2\share
Linux
{
"rfs_allowed_paths" : ["/path1/share", "/path 2/share"]
}
Windows
{
"rfs_allowed_paths" : ["C:\\path1\\share", "D:\\path 2\\share"]
}