User Guide Nshield Connect 12.80 Linux
User Guide Nshield Connect 12.80 Linux
• An Entrust nShield Connect (Linux platforms only) Hardware Security Module (HSM).
• An associated Security World. nShield hardware security modules use the Security
World paradigm to provide a secure environment for all your HSM and key
management operations.
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 Connect.
1.1.1. Terminology
The Connect is referred to as the Connect, the hardware security module, or the HSM.
1.2. Conventions
Entrust provides the firmware that runs on the nShield Connect, and software to run on
each client computer. The Connect is supplied with the latest version of the HSM
firmware installed. For more information about:
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 directory /opt/nfast/kmdata/local/world or 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
The hardserver software controls communication between the internal security module
and applications on the network.
Separate instances of the hardserver run on the unit and each client that is configured to
work with the unit. There is a secure channel, known as the impath, between the two
software instances, which forms a single secure entity for transferring data between the
unit and the clients. See also Compatibility issues.
The unit’s hardserver is configured using the front panel on the unit, or by means of
uploaded configuration data. Configuration data is stored on the unit and in files in a
specially configured file system on each client computer. For more information about
using:
• The front panel to configure the unit, see The nShield Connect user 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 Connect 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
program data directories by their names (for example, Key Management Data) or
absolute paths (for example, /opt/nfast/kmdata).
Unless noted, all the executable utilities provided in the bin subdirectory of your nShield
installation have the following standard help options:
If you have installed the Java Developer component, the Java Generic Stub classes,
nCipherKM JCA/JCE provider classes, and Java Key Management classes are supplied
with HTML documentation in standard Javadoc format, which is installed in the
appropriate nfast/java directory when you install these classes.
Release notes containing the latest information about your product are available in the
release directory of your installation media.
• 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 needs to obtain all
the components before gaining any information.
Because the Security World is built around nShield key-management modules, keys are
only ever available in plain text on secure hardware.
All Security Worlds rely on you using the security features of your
operating system to control the users who can access the Security
World and, for example, write data to the host.
In FIPS 140-2 Level 3 Security Worlds, you require a card from either
the ACS or an OCS to authorize most operations, including the creation
of keys and OCSs.
Each card set consists of a number of smart cards, N, of which a smaller number, K, is
required to authorize an action. The required number K is known as the quorum.
An ACS is used to authorize several different actions, each of which can require a
different value for K. All the card sets are distinct: a smart card can only belong to the
ACS or to one OCS.
Each user can access the keys protected by the Security World and the keys protected
by their OCS. They cannot access keys that are protected by another OCS.
Operator Cards employ the Security World key to perform a challenge-response protocol
with the hardware security module. This means that Operator Cards are only useable by
an HSM that belongs to the same Security World.
The Remote Operator feature 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.
Security World and key data is stored on the file system of the Connect, where it is
updated whenever card or key operations are performed on the HSM. The data is also
automatically transferred to the remote file system (RFS). If required, you can also share
the data with client computers that use the Security World. 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 Connect 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 between the HSM and clients or
hosts:
• v11.50 or higher clients communicating with a v11.40 or lower Connect, where the
HSM client uses an nToken.
• v11.50 or higher Connect communicating with a Remote File System (RFS) using
v11.40 or lower.
1
Previously known as nCipher software, or nCSS.
A Security World that complies with the roles and services section of FIPS 140‑2 Level 2
does not require any authorization to create an OCS or an application key.
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‑2 Level 3 option is included for those customers who have a regulatory
requirement for compliance with FIPS 140‑2 at Level 3.
If you choose to create a Security World that complies with FIPS 140‑2 Level 3, the
nShield HSM initializes in that mode, conforming with the roles and services, key
management, and self-test sections of the FIPS validation certificate.
Before you can create or erase an OCS in a Security World that complies with FIPS 140‑2
Level 3, you must authorize the action with a card from the ACS or an OCS from that
Security World.
• 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.
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 with the security policies
of your organization.
• 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 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.
• 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 pass phrase if it has one. Certain applications only
permit one user at a time to log in, in which case any previously loaded persistent OCS
used in that application is removed before the user is allowed to log in with a new OCS.
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.
A Security World can contain a mix of persistent and non-persistent card sets.
You can change the pass phrase for a card at any time provided that you have access to
the card, the existing pass phrase, and a hardware security module that belongs to the
Security World to which the card belongs. For more information, see Changing card and
softcard pass phrase.
Pass phrases 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 pass phrases that are longer than 254 characters.
Prior to Security World Software v11.72, we set no absolute limit on the length of pass
phrases, although individual applications may not accept pass phrases longer than a
specific number of characters. Likewise, the Security World does not impose restrictions
on which characters you can use in a pass phrase, although some applications may not
accept certain characters.
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 pass phrase adds 4 seconds to the penalty
time.
The penalty timer has a 14s penalty threshold, the first 3 failed pass phrase verifications
do not incur a penalty delay. Before verifying a pass phrase, the HSM waits for the
current penalty timer to be below 14s. The penalty time decays over time.
A softcard is a file containing a logical token that you cannot load without a pass phrase.
You must load the logical token to authorize the loading of any key that is protected by
the softcard. Softcard files:
Softcard-protected keys offer better security than module-protected keys and better
availability than OCS-protected keys. However, because softcard-protected keys do not
require physical tokens to authorize key-loading, OCS-protected keys offer better
security than softcard-protected keys.
The pass phrase of a softcard is set when you generate it, and you can use a single
softcard to protect multiple keys. Softcards function as persistent 1/1 logical tokens, and
after a softcard is loaded, it remains valid for loading its keys until its KeyID is destroyed.
NVRAM-stored keys are encrypted in exactly the same way as application keys that are
protected by the unit. The encrypted application key on the unit is replaced by a file
containing the name of the NVRAM file that contains the application key. This file allows
applications to use NVRAM-stored keys in the same way as keys stored in the remote file
system. You can protect an NVRAM-stored key with either the Security World or an OCS.
Use of an NVRAM-stored key is the same as for any other key protected by an Connect
Security World.
• Offers no additional security benefits above those offered by the standard Security
World Software mechanisms
• Is available for only a limited number of keys
• Reduces a Security World’s ability to offer load-balancing and recovery
• Requires backup and recovery procedures in addition to any that you implement for
data stored on the client computer.
NVRAM key storage was introduced only for those users who must store keys within the
physical boundary of a hardware security module (such as an Connect) to comply with
regulatory requirements. NVRAM-stored keys provide no additional security benefits and
their use exposes your ACS to increased risk. Storing keys in nonvolatile memory also
reduces load-balancing and recovery capabilities. Because of these factors, we
recommend you always use standard Security World keys unless explicitly required to
use NVRAM-stored keys.
2.5. Scalability
A Security World is scalable. You can add multiple hardware security modules to a server
and share a Security World across multiple servers. You can also add OCSs and
application keys at any time. You do not need to make any decisions about the size of
the Security World when you create it.
If you create cards or keys in a Security World from a client rather than on the hardware
security module (using the command line 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
Module #1: Not Present indicates that there are no HSMs in the pool.
2.6. Robustness
Cryptography must work 24 hours a day, 7 days a week, in a production environment. If
something does go wrong, you must be able to recover without compromising your
security. A Security World offers all of these features.
You should regularly back up the data stored in the Key Management Data directory with
your normal backup procedures. It would not matter if an attacker obtained this data
because it is worthless without the Security World key, stored in your hardware security
module, and the Administrator cards for that Security World.
When you create a Security World, it automatically creates recovery data for the Security
World key. As with all host data, this is encrypted with the same type of key as the
Security World key. The cryptographic keys that protect this data are stored in the ACS.
The keys are split among the cards in the ACS using the same K/N mechanism as for an
OCS. The ACS protects several keys that are used for different operations.
The cards in the ACS are only used for recovery and replacement operations and for
adding extra hardware security modules to a Security World. At all other times, you must
store these cards in a secure environment.
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 Connect can be replaced and returned to the HSM pool without restarting
the client application.
For information about replacing a hardware security module, see Adding or restoring an
HSM to the Security World.
You should also use the front panel controls of the Connect, racs or the
KeySafe Replace Administrator Card Set option to migrate the ACS
from standard nShield cards to nShield Remote Administration Cards.
Authorization needs to take place using the local slot of an HSM.
A hardware security module does not store recovery data for the ACS. Provided that K is
less than N for the ACS, and you have at least K cards available, a hardware security
module can re-create all the keys stored on the device even if the information from other
cards is missing.
The loss or failure of one of the smart cards in the ACS means that you must replace the
ACS. However, you cannot replace the ACS unless you have:
Although replacing the ACS deletes the copy of the recovery data on
your host, you can still use the old ACS with the old host data, which
you may have stored on backup tapes and other hosts. To eliminate any
risk this may pose, we recommend erasing the old ACS as soon as you
create a new ACS.
You can only recover keys protected by an OCS to another OCS, and
not to a softcard. Likewise, you can only recover softcard-protected
keys to another softcard, and not to an OCS.
To create new copies of the keys protected by the recovery key on an OCS, you can use
either:
It is not possible to recover PKCS #11 keys using the front panel controls
of the Connect. You must use the rocs command-line utility.
However, there is always some extra risk attached to the storage of any key-recovery or
OCS and softcard replacement data. An attacker with the ACS and a copy of the
recovery and replacement data could re-create your Security World. If you have some
keys that are especially important to protect, you may decide:
• 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
If you have not allowed recovery and replacement functionality for the Security World,
then you cannot recover any key in the Security World (regardless of whether the key
itself was created as recoverable).
The recovery data for application keys is kept separate from the recovery data for the
Security World key. The Security World always creates recovery data for the Security
World key. It is only the recovery of application keys that is optional.
Most applications store only their long-term keys in the Security World.
Session keys are short term keys generated by the application which
are not normally loaded into the Security World.
When you use KeySafe to create cards or keys, the data is written to the Key
Management Data directory on the computer on which you run KeySafe. An Connect can
only use this data when it is transferred to the remote file system (if it is on a different
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
• List the OCSs in the current Security World
• Change the pass phrase on an Operator Card
• Remove a lost OCS from a Security World
• Replace OCSs
• Erase an Operator Card
• Add a new key to a Security World
• Import a key into a Security World
• List the keys in the current Security World
• Delete a key from a Security World.
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.
We have produced Integration Guides for many supported applications. The Integration
Guides describe how to install and configure an application so that it works with Entrust
hardware security modules and Security Worlds.
• Visit https://nshieldsupport.entrust.com.
• Contact Support.
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 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:
If you have any doubts about the security of a key and/or Security
World, replace that key and/or Security World with a newly generated
one.
Label Description
A Power button
C Display screen
D Touch wheel
H Select button
J Clear button
K USB connector
Each menu or dialog includes onscreen navigation labels that appear at the bottom of
the display screen, on either side next to the display navigation buttons. Press the button
next to the label to perform the action specified by the label.
To go back to the previous dialog or menu screen, use the navigation button to the left
of the screen. To confirm a dialog value or select a menu option, either:
Use the touch wheel to changes values or move the cursor on the display screen. To
confirm a value, touch the Select button.
Menus are displayed as a list of selectable options. An onscreen arrow points to the
currently selectable option. If the menu has more than four options, an arrow indicates
the direction in which more options are available.
At the top right of the display screen, a number sequence indicates the path to the
current option. The last digit of the sequence shows the location of the menu you are
currently viewing. The top level menu has no numbers, but when you select the System
menu, the number 1 is shown.
The preceding digits in the sequence show the position of each option in turn that was
selected in previous menu screens to reach the current menu. For example, the sequence
1-2 shows that the indicator is on the second option of the menu that was reached by
selecting the first option on the top-level menu.
3.2.2. Dialogs
For some tasks, a dialog is displayed onscreen. When the dialog opens, the cursor is in
the first field. To change and then enter values:
1. Use the touch wheel to change the displayed value of the fields.
2. Touch the Select button to enter the displayed value and move to the next field in
the dialog.
• 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.
There is a series of start-up information topics available. By default, the first displayed
topic is the current System time. Use the touch wheel to view the other start-up
information topics.
Tasks Action
Understand and control Use the Power button to power up the unit.
the power status of the
If the Power button is not illuminated, the unit is not powered.
unit
The Power button flashes intermittently as the unit powers up.
It also flashes when the unit is in standby mode. For more
information about the Power button, see the Installation
Guide.
Control access to the You can control access to the menus on the unit and the
unit 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.
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.
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
Set the Real-Time Clock Select Security World mgmt > Admin operations > Set secure
on the unit RTC.
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:
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
The tamper detection functionality on the Connect provides additional physical security,
over and above that provided by the holographic security seal, and alerts you to
tampering in an operational environment. There is a removable lid on top of the Connect,
protected by the security seal and tamper switches. To prevent the insertion of objects
into the Connect, baffles are placed behind vents.
To optimize their effectiveness, use the physical security measures implemented on the
Connect in association with your security policies and procedures. For more information
about creating and managing security policies, see the Security Policy Guide on the NIST
CMVP website.
When you see this message, 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).
Or:
• Disable the tamper detection functionality and then reset the Connect to a factory
state.
You require a quorum of the Administrator Card Set (ACS) to restore the key data and
reconnect the Connect to the network. If you chose to disable the tamper protection
circuitry when you reset the Connect to a factory state, a cautionary warning is displayed
prior to the request for card authorization. For information about re-enabling disabled
tamper detection functionality, see Disabling tamper detection functionality.
** TAMPER DETECTED **
Unit lid is open
Replace lid or disable
tamper detection.
DISABLE
An open lid indicates that the physical security of the unit is compromised. You may
want to examine your unit for other physical signs of tampering (see Physical security
checks). 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:
If you choose to replace the lid of the Connect, the onscreen message changes to the
tamper alert message that is given when the lid is closed. Closing the lid provides you
with the option to reset the unit to a factory state without disabling tamper detection
functionality. If the lid remains open, all button presses other than those made using the
right-hand navigation button are ignored. Pressing the right-hand navigation button
disables tamper responsiveness and resets the Connect to a factory state.
1. Check that the physical security seal is authentic and intact. Look for the holographic
foil bearing the nCipher logo. Look for cuts, tears and voiding of the seal. The seal is
located on the top of the Connect chassis.
2. Check that the metal lid remains flush with the Connect chassis.
3. Check all surfaces — the top, bottom and sides of the Connect — for signs of physical
damage.
4. Check that there are no signs of physical damage to the vents, including attempts to
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 Connect is placed on
standby while a replacement operation is performed (whether you are replacing the fan
tray module or one of the two PSUs, in the case of dual PSU units).
If you receive any of the following error messages on the Connect 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 Connect can continue operating under the
specified operating environment. Although you are advised to contact Support, the
limited nature of such a failure means you can replace the fan tray module at your
convenience.
If the error message is Many fans fail, you must replace the fan tray module immediately.
If the error message is Battery Power low, this indicates that one or both of the backup
batteries located on the fan tray module (required only when the Connect is removed
from mains power) is running low.
If two fans fail from a redundant pair, the Connect will display the error message Many
fans have failed for a few seconds and it will then shutdown. On reboot, the Connect will
then display the error messages System Shutdown and Both fans in a pair had failed. In
this situation the fan tray module must be replaced immediately.
If a PSU fails, an orange warning LED comes on and an error message is displayed on the
Connect 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 Connect. 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 Connect remains in
storage and is not connected to the mains power supply during this time.
• Bring the management of the Connect into line with your existing operational
1. From the main menu select System > System configuration > Tamper config.
Tamper responsiveness
is currently enabled.
Tamper responsiveness is disabled and the unit is reset to a factory state. To restore the
key data and reconnect the Connect to the network you must present a quorum of the
ACS.
1. From the main menu select System > System configuration > Tamper config.
2. You are shown the following dialog:
Tamper responsiveness
is currently DISABLED.
nCipher recommends
that tamper should be
enabled. Re-anble
tamper responsiveness?
Tamper responsiveness is enabled and the unit is reset to a factory state. To restore the
key data and reconnect the Connect to the network you must present a quorum of the
ACS. Tamper events are logged and never erased.
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 Connect to use the client.
b. To configure client computers so that they work with the unit, see Configuring
client computers to use the nShield Connect.
c. To enable the TCP sockets for Java applications (including KeySafe), run the
command:
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.
• 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 (e.g., root) is required for such tasks as software installation, starting
and stopping the hardserver and SNMP
• 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.
For information about configuring the HSM by importing an edited configuration file, see
About user privileges.
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 where ESN represents the electronic
serial number of the HSM from which the files were exported. These directories can
contain the following files:
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 nShield
Connect and client configuration files.
To configure the Ethernet interfaces (IPv4 and IPv6), see the Connect Installation Guide.
Ensure that you have configured the Ethernet interfaces on the HSM before attempting
to configure the hardserver. See the Installation Guide for more information about
configuring the Ethernet interfaces.
You can configure the following options to specify network interfaces on which the
hardserver listens:
Option Description
1. From the main menu, select System > System configuration > Hardserver config.
The following screen appears:
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.
You must have created an RFS on the client computer before you
specify the IP address of the client.
For more information about the RFS and its contents, see:
The HSM must be able to connect to TCP port 9004 of the RFS. If necessary, modify the
firewall configuration to allow this connection on either the RFS itself or on a router
between the RFS and the HSM.
Obtain the following information about the HSM before you set up an RFS for the first
time:
• The IP address
• The electronic serial number (ESN)
• The hash of the KNETI key (HKNETI). The KNETI key authenticates the HSM to clients. It is
generated when the HSM is first initialized from factory state.
If your network is secure and you know the IP address of the HSM, you can use the
anonkneti utility to obtain the ESN and hash of the KNETI key by giving the following
command on the client computer. For guidance on network security, see the nShield
Security Manual.
In this command, <Unit IP> is the IP address of the HSM, which could be one of the
following:
A285-4F5A-7500 2418ec85c86027eb2d5959fef35edc5e1b3b698f
Alternatively, you can find this information on the HSM startup screen. Use the touch
wheel to scroll to the appropriate information.
1. Prepare the RFS on the client computer (or another appropriate computer) by
running the following command on that computer:
In this command:
To modify or delete an RFS at a later date, select System > System configuration >
Remote file system, and then select the required action.
After you have defined the remote file system, the HSM configuration files are exported
automatically to the remote file system. For more information about configuration files,
see nShield Connect and client configuration files.
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 Connect front panel. Moreover, the log file stored on the HSM is cleared
every time it is powered down.
You may also additionally configure the logs to be sent to a remote syslog server, see
Configuring Remote Syslog.
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:
You can connect either a US or a UK keyboard. To configure the Connect for your
keyboard type, select System > System configuration > Keyboard layout and then
choose the keyboard type you require.
You can configure the connection to use secure client authentication, either with an
nToken installed in the client or with software-based authentication. If a client attempts
to connect to the Connect when secure client authentication is in use, the HSM not only
examines the client’s IP address, but also requires the client to identify itself using a
signing key.
The client configuration process varies slightly depending on whether you are enrolling
the client with or without secure client authentication:
1. On the Connect front panel, use the right-hand navigation button to select System >
System configuration > Client config > New client.
CANCEL NEXT
2. Enter the IP address of the first client, and press the right-hand navigation button.
3. Use the touch wheel to confirm whether you want to save the IP or not, and press
the right-hand navigation button.
Client configuration
4. Use the touch wheel to display the type of connection between the internal security
module of the Connect 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 Linux.
Client configuration
Yes
BACK NEXT
You must choose whether to disable or enable secure authentication when enrolling the
client.
To enroll the client without secure authentication, select No and press the right-hand
navigation button. By selecting No, authentication of the client will be based on the IP
address only.
If you enable secure authentication, you must choose whether to use nToken or
software-based authentication.
a. On the client, open a command line window, and run the command:
ntokenenroll -H
nToken module #1
nToken ESN: 3138-147F-2D64
nToken key hash: 691be427bb125f38768638a18bfd2eab75623320
You will need to compare the returned key hash with a value
reported on the Connect display in a subsequent step. Write the
hash down, or ensure that you can see the key hash displayed on
the Connect as you work on the client.
You will now be presented with a list of ESN options. Select the ESN that matches
the output from ntokenenroll command, produced above.
After selecting an ESN, the Connect display will show information of the following
form, identifying the selected nToken by its ESN and displaying a key hash:
691be427bb125f387686
38a18bfd2eab75623320
CANCEL CONFIRM
c. Compare the hash displayed by the Connect with the hash that was previously
reported by ntokenenroll on the client. If there is an exact match, press the right-
hand navigation button to configure the client.
d. The Connect displays a message reporting that the client has been configured. Press
the right-hand navigation button again.
a. On the client, open a command line window, and run the command:
d4c3d757a67416cb9ba31f33febd6ead688629e5
You will need to compare the returned key hash with a value
reported on the Connect display in a subsequent step. Write the
hash down, or ensure that you can see the key hash displayed on
the Connect as you work on the client.
b. On the Connect, enter the number of the port on which the client is listening and
press the right-hand navigation button. (The default is 9004.)
You will now be presented with a list of ESN options, including a Software key option
After selecting the Software key option, the Connect display will show information of
the following form, displaying the software key hash:
691be427bb125f387686
38a18bfd2eab75623320
CANCEL CONFIRM
d. Compare the hash displayed by the Connect with the hash that was previously
reported by anonkneti on the client. If there is an exact match, press the right-hand
navigation button to configure the client.
e. The Connect displays a message reporting that the client has been configured. Press
the right-hand navigation button again.
To modify or delete an existing client, select System > System configuration > Client
config and perform the appropriate procedure.
If you want to use multiple clients with the Connect, 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 Connect, you must enable
the additional clients as described in Enabling optional features.
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).
a. If the client is using an nToken, two additional entries will need to be added to
the configuration file:
esn=nToken_ESN
keyhash=nToken_keyhash
Where nToken_ESN is the ESN of the client’s nToken and nToken_keyhash is the hash
of the key that the client’s nToken should authenticate itself with.
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 Connect. To do this, run the following
command:
With auto push enabled, you can load the configuration file using the Connect front
panel. The configuration file (config.new) must be in the directory
/opt/nfast/kmdata/hsm-ESN/config on the remote file system. To do this, select System
> System configuration > Config file options > Fetch configuration.
For this release, you must generate a new client configuration file to
take advantage of the new functionality. To generate a new client
configuration file, back up your existing configuration file and run the
command cfg-mkdefault. This generates a template for the
configuration file into which you can copy the settings from your old
configuration file.
The nethsm_imports section defines the network HSMs that the client imports (See
nethsm_imports). It can also be set up by the nethsmenroll utility.
• If the client is to be enrolled with an nToken, open a command line window, and run
the command: ntokenenroll --H. This command produces output of the form:
nToken module #1
nToken ESN: 3138-147F-2D64
nToken key hash: 691be427bb125f3876838a18bfd2eab75623320
• 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 Connect by running enquiry, which reports the
HSM’s status.
For information about configuration file contents, see nShield Connect and client
configuration files.
nethsmenroll --help
3138-147F-2D64 691be427bb125f38768638a18bfd2eab75623320
If the Connect’s ESN and HKNETI are not specified, nethsmenroll attempts to contact the
HSM to determine what they are, and requests confirmation.
nethsmenroll --ntoken-esn <nToken ESN> [Options] --privileged <Unit IP> <Unit ESN> <Unit KNETI HASH>
2. If you are enrolling the client without an nToken, i.e. software-based authentication or
no authentication, run the command:
nethsmenroll [Options] --privileged <Unit IP> <Unit ESN> <Unit KNETI HASH>
Utility Description
6.5.3.1. nethsmenroll
The nethsmenroll command-line utility edits the client hardserver’s configuration file to
add the specified Connect. If the Connect’s ESN and HKNETI are not specified, nethsmenroll
attempts to contact the Connect to determine what they are, and requests confirmation.
Usage:
nethsmenroll [Options] --privileged <nShield Connect IP> <nShield Connect ESN> <nShield Connect KNETI HASH>
Options Description
-m, --module=MODULE Specifies the local HSM number to use (default is 0 for
dynamic configuration by hardserver).
-<nShield Connect IP> The IP address of the nShield Connect, which could be
one of the following:
-V, --verify-nethsm-details When the ESN and HKNETI have been provided on the
command line, verifies that the selected HSM is alive,
reachable and matches those details.
-P, --port=PORT Specifies the port to use when connecting to the given
Connect (default 9004).
6.5.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
Entrust recommends that the NTP Server(s) are trusted servers within
your local network, not internet time servers.
After configuring NTP the Connect has to be re-started for the configuration to take
effect. When starting up after being configured, the NTP client can make a step change
to the system time to bring it into line with that of the NTP server(s). At all other times,
the NTP client will only slew (gradually change) the system time. When using NTP there
should be no need to set the system time by setting time and date from the front panel
of the Connect.
• auto push is enabled for the client computer you wish to use for configuring NTP,
see Configuring auto push.
• The client computer enabled for auto push is configured for Privileged connections,
see Configuring the Connect to use the client, so that the Connect can be rebooted
from the client computer.
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
Returns:
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
Connect 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.
1. In the remote_sys_log section of the config file for the remote module, add the
following settings:
remote_sys_log_ip=REMOTE_SYSLOG_SERVER_IP
remote_sys_log_port=REMOTE_SYSLOG_SERVER_PORT
2. Run the following command to push the new config file to the module:
cfg-pushnethsm
cfgpushnethsh --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:
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 that use a local KNETI for authorization (which is generated when the
HSM is first initialized from factory state) and which are to be given write access
to the RFS, run the command:
◦ for clients that do not have a local KNETI and require write access, run the
command:
The rfs‑sync utility uses lock files to ensure that updates are made in a
consistent fashion. If an rfs‑sync --commit operation (the operation that writes
data to the remote file system) fails due to a crash or other problem, it is
possible for a lock file to be left behind. This would cause all subsequent
operations to fail with a lock time‑out error.
The rfs‑sync utility has options for querying the current state of the lock file, and
for deleting the lock file; however, we recommend that you do not use these
options unless they are necessary to resolve this problem. Clients without write
access cannot delete the lock file.
3. 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:
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
6.8.1.1. anonkneti
To find out the ESN and the hash of the KNETI key for a given IP address, use the anonkneti
command-line utility. A manual double‑check is recommended for security.
6.8.1.2. rfs-sync
This utility synchronises the kmdata between a cooperating client and the remote file
system it is configured to access. It should be run when a cooperating client is initialised
in order to retrieve data from the remote file system and also whenever a client needs to
update its local copy of the data or, if the client has write access, to commit changes to
the data.
6.8.1.2.1. Usage
6.8.1.2.2. Options
-U, --update
These options update local key-management data from the remote file system.
-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
These set-up options specify use of KNETI authentication. This is the default.
--no-authenticate
This set-up option specifies that KNETI authentication should not be used.
-m, --module=module
These options select which HSM to use for KNETI authorisation. The default is HSM 1.
This option can only be used with the --authenticate option.
-p, --port=port
These options specify the port on which to connect to the remote file system. The
default is 9004.
ip_address
This option specifies the IP address of the remote file system, which could be one of
the following:
--remove
This option removes the synchronisation configuration.
A client can use rfs-sync --show to display the current configuration, or rfs-sync --remove
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.
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 Connect 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.
The Security World Software generates logging information that is configured through a
set of four environment variables:
• NFLOG_FILE
• NFLOG_SEVERITY
• NFLOG_DETAIL
• NFLOG_CATEGORIES
6.9. Routing
If you have configured only one network interface, you do not need to configure a static
route for the unit, although you can do so if you wish. If you have configured a second
network interface, you can choose to configure a static route.
If the unit is to connect to a remote host or network that is unreachable through the
default gateway, you must set up extra static routes in the system routing table.
To set up the Ethernet interfaces (IPv4 and IPv6), see the Connect Installation Guide.
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.
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:
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.
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 Connect and the administrator configuring and using the HSM.
The only required local activity is to connect the Connect to power and to serial and
Ethernet ports. Everything that can be configured using the front panel can then be
configured remotely either over the serial interface, by using the nethsmadmin utility (see
nethsmadmin) or by pushing an updated configuration file to the nShield Connect (see
Configuring the Connect with configuration files).
To access the serial console command line interface, first determine the device name of
Once the connection is established, press Return until a login prompt is displayed. The
login prompt should look like:
nethsm login:
6.10.1.1. Troubleshooting
Error Action
Miscellaneous characters displayed on the Make sure the serial port connection is
screen 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 Connect Security Manual.
Once you are successfully logged in to a serial console session you will see the welcome
message:
(cli)
• To enable the serial console interface, navigate to System > System configuration >
Remote config options > Serial Console and set to On.
• To disable the serial console interface, set Serial Console to Off.
The serial interface is enabled by default and will turn back on with the default password
if the unit is reset to its factory state. This means if you do not want the serial console
enabled you will need to disable it after each factory state.
If you do not see the menu option System > System configuration > Remote config
options > Serial Console on the front panel then this means that your Connect does not
support the serial console feature (the hardware does not support serial access).
The availability of the serial console feature can also be checked remotely from an
enrolled client by running the enquiry utility.
Command Description
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)
uptime Show how long the Connect has been running (since last
boot)
For additional help on a command, run help command to see additional guidance on
command usage, syntax and parameter documentation.
The unit firmware checks to confirm whether any features that it attempts to use are
enabled. It normally does this when it authorizes the commands or command options
that relate to a specific feature.
Most features are static; that is, they are enabled by means of a switch in the EEPROM of
the unit. A dynamic feature must be enabled again if the unit is reinitialized.
Some optional features are static; that is, they are enabled by means of a switch in the
EEPROM of the unit. A dynamic feature must be enabled again if the unit is reinitialized.
If you are enabling the Remote Operator feature, you must enable it on
the unit that is to be used as the unattended unit. For information
about Remote Operator, see Remote Operator.
Cryptography based on elliptic curves relies on the mathematics of random elliptic curve
elements. It offers better performance for an equivalent key length than either RSA or
Diffie-Hellman public key systems. Using RSA or Diffie-Hellman to protect 128-bit AES
keys requires a key of at least 3072 bits. The equivalent key size for elliptic curves is only
256 bits. Using a smaller key reduces storage and transmission requirements.
Elliptic curve cryptography is endorsed by the US National Security Agency and NIST
(the National Institute of Standards and Technology), and by standardization bodies
including ANSI, IEEE and ISO.
nShield modules incorporate hardware that supports elliptic curve operations for ECDH
(Elliptic curve Diffie‑Hellman) and ECDSA (Elliptic Curve Digital Signature Algorithm)
keys.
All nShield HSMs require specific activation to utilize the elliptic curve features. HSMs use
an activator smart card to enable this feature. Refer to Enabling features with a smart
card for instructions on how to enable the EC feature. Additionally it is possible to
activate the elliptic curve feature without a physical smart card. In this case the
certificate details can be provided by email and entered locally. Refer to Enabling
features without a smart card Contact Sales if you require an EC activation.
The following table details the range of nShield HSMs and the level of elliptic curve
support that they offer.
nShield Solo 500+, 6000+ Yes Yes Yes, Prime curves and Yes
twisted Brainpool curves are
nShield 6000+
accelerated4.
nShield Solo XC Yes Yes Yes, Prime curves and both Yes
twisted and non-twisted
nShield Solo XC
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.
6.11.1.4. nShield software / API support required to use elliptic curve functions
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.
This table lists the supported named curves that are pre-coded in nShield module
firmware.
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
nShield modules also allow the entry of custom elliptic curves which are not pre-coded in
firmware. If the curve is Prime, it may benefit from hardware acceleration if supported by
the nShield HSM (see nShield software / API support required to use elliptic curve
functions, above).
For more information on how to use elliptic curves, see the following sections:
• PKCS #11:
◦ Mechanisms supported by PKCS #11: Mechanisms
• Symmetric and asymmetric algorithms: Cryptographic algorithms
• Using generatekey options and parameters to generate ECDH and ECDSA keys: Key
generation options and parameters
The SEE is a unique secure execution environment. The SEE features available to you are:
For more information about the SEE, see the CodeSafe Developer Guide.
Many Entrust customers keep critical servers in a physically secure and remote location.
The Security World infrastructure, however, often requires the physical presence of an
operator to perform tasks such as inserting cards. Remote Operator enables these
customers to remotely manage servers running Security World Software using a secure
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.
ISS, also called Foreign Token Open (FTO) allows data to be read to and written from ISO
7816 compliant smart cards in a manner prescribed by ISO7816-4. ISS allows you to
develop and deploy a security system that can make full use of ISO 7816 compliant smart
cards from any manufacturer.
Utilise a faster alternative for Random Number Generation (RNG) for Elliptic Curve
Digital Signature Algorithm (ECDSA). This feature is applicable for Solo XC / Connect XC
modules only.
The faster performance, comparable with V12.40 performance, is achieved by the RNG
part of ECDSA being done on the NXP C291 Crypto Coprocessor.
This implementation of ECDSA uses an RNG that is not within scope for the Connect
certifications and for this reason it will not be used when the HSM is in a fips-140-2-level-
3 or common-criteria-cmts Security World (regardless of the feature bit setting).
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:
The Feature Enabling Certificate contains the information that you need to enable the
features you have ordered.
For more information, including pricing of features, telephone or email your nearest Sales
representative using the contact details from this guide, or contact Entrust nShield
Support, https://nshieldsupport.entrust.com.
When enabling static feature(s) from the front panel, either using a
card or a file, the module is cleared without warning. This will cause the
HSM to drop or restart any SEE machine, and lose all the application
keys that were loaded. In some cases, applications may need to be
restarted.
To see which (if any) features have already been enabled on the Connect, from the main
menu select HSM > HSM feature enable > View current state.
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 .
To enable a new feature with a Feature Enabling smart card from Entrust:
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 also provide the Feature Enabling Certificate information supplied by Entrust
from a file.
1. Put the file that contains the feature enabling certificate in /opt/nfast/kmdata/hsm-
ESN/features on the remote file system. In this path, ESN is the ESN of the module.
You can give the file any name that you wish. You must enter the file name on the
unit’s front panel, so you may prefer to use a short name.
2. From the front panel, select HSM > HSM feature enable > Read from a file.
3. Specify the name of the file that contains the certificate.
If your application is multi-threaded, you can add additional modules and expect
performance to increase proportionally until you reach the point where cryptography no
• 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.4.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.
In general, the hardserver determines which modules can perform a given command. If
no module contains all the objects that are referred to in a given command, the server
returns an error status.
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.
Before you install new hardware, check the release notes on the
installation media supplied with your new module for information about
specific compatibility issues, new features, and bug fixes.
1. Install the module hardware. Refer to the Installation Guide for information on
installing nShield hardware.
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.
/opt/nfast/sbin/init.d-ncipher stop
Similarly, you can restart the hardserver on the client, and where applicable the Remote
Administration Service, by running the following command
/opt/nfast/sbin/init.d-ncipher start
This removes the configuration of the module but does not change its KNETI.
This gives a new KNETI to the unit, which means that you must update the keyhash field of
the unit’s entry in the nethsm_imports section of the configuration file of all the clients that
use it.
• 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. Log in on the client computer as a regular user, and open a command window.
2. Run the command:
opt/nfast/bin/enquiry
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
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.
• Card holders to present smart cards to an HSM without being physically present at
the HSM (e.g. the card holder may be in an office, while the HSM is in a datacenter)
• All Administrator and Operator card operations to be carried out remotely
• Security World programs and utilities to be run remotely when used in combination
with a standard remote access solution
• Full remote administration of Security Worlds and their HSMs including:
◦ Remote mode change
◦ Create/load/unload Security World
◦ Firmware upgrade
◦ Module status (SOS) reporting
◦ Connect reboot
◦ Connect front panel lock out.
Once the software has been installed and the hardware security modules have been
configured, Remote Administration enables full remote administration of Security Worlds
and their HSMs.
When a card is inserted in a reader that is associated with an HSM, the nShield Remote
Administration Client and the Remote Administration Service convey messages between
the card and the HSM, allowing a secure channel of communications to be established.
The nethsmadmin tool provides many of the Remote Administration capabilities for an
Connect without accessing the front panel.
The nShield Remote Administration smart cards are FIPS 140-2 Level 3 certified devices,
supporting execution of a custom Java Applet developed by Entrust. The smart cards
used with previous versions of Security World software and nShield HSMs are still
useable but, as previously, only in an HSM’s local slot. Remote Administration smart cards
can be used both remotely and in an HSM’s local slot.
The use of nShield Remote Administration Cards is controlled by an Authorized Card List.
If a card does not appear in the list, it cannot be used. See Authorized Card List for more
information.
Existing Administrator smart cards can be migrated to new Remote Administration smart
cards using the racs (replace administrator card set) utility. Similarly existing OCS can be
migrated using the rocs (replace operator card set) utility, provided the Security World
has recovery enabled and the keys protected by that OCS are recovery enabled.
By default, the Authorized Card List is empty following software installation. The serial
numbers of Remote Administration smart cards must be added to the list using a text
editor before they can be used.
For more information on the Authorized Card List, see Authorized Card List.
The RAC GUI (usually running on a laptop or workstation) communicates with the RAS
(in a datacenter) over a standard TCP/IP connection. If the RAC computer is not on the
same local network as the RAS computer, Entrust recommend that the connection is
made over a VPN.
In the example screen shown, an HSM will not be Remote Administration (RA) Ready
until it has the appropriate firmware, and has one or more dynamic Slots configured.
For users who want to script the card presentation process, there is also a command line
utility, raccmd.
See the nShield Remote Administration Client User Guide for more information on
deploying and using the Remote Administration GUI or command line utility.
The RAS participates as a crypto client of the HSMs. As such, the server used to host this
software component must be a licensed client of the Connects being remotely
administered. If your Remote File System (RFS) is already a licensed client, the RAS can
For more information, see the Trusted Verification Device (TVD) User Guide.
A privileged connection is required to carry out privileged operations, such as, for
example, changing the mode of the Connect or Connect XC.
For information on installing the Remote Administration Service bundle, see the
installation guide for your HSM.
For more information on the Remote Administration Client, see the nShield Remote
Administration Client user guide.
7.6.4. TVD
A nShield Remote Administration Client can connect to one nShield TVD during a
session.
For information on installing the TVD driver and confirming the HSM Electronic Serial
Number (ESN) using the nShield TVD, see the nShield Remote Administration Client user
guide.
Enabling the auto push feature allows any client computer to change
the HSM configuration file and gives the client the power to make
configuration changes that are otherwise only available through the
HSM secure user interface.
The auto push feature must be enabled if you want to use NTP time
synchronisation on the HSM, see Configuring NTP in the nShield
Connect.
To enable auto push, on the Connect display, use the right-hand navigation button to
select System > System configuration > Config file options > Setup auto push > Auto
push mode, set ON or OFF, then select CONFIRM. A confirmation message will be
displayed.
Once auto push has been enabled, you must specify the IP address of the client from
which to push the configuration from. On the Connect display, use the right-hand
navigation button to select System > System configuration > Config file options > Setup
auto push > Push address. Enter the IP address and select CONFIRM. A message will be
displayed confirming your chosen IP address. Select CONTINUE.
Once auto push is enabled, you can complete the configuration steps by editing the
configuration files, rather than by using the front panel of the Connect. See Configuring
the Connect with configuration files for more about configuration files.
or:
b. Use the front panel controls to navigate to Security World mgmt > Set up
dynamic slots > Dynamic Slots and follow the instructions on the screen.
2. Clear the HSM for the changes to take effect.
You can check that the HSM has Dynamic Slots by:
slotinfo -m 1
For example, if four Dynamic Slots have been configured, the output from this
◦ The D in the Flags column indicates that slots 2 to 5 are Dynamic Slots.
or:
◦ Using the front panel controls to navigate to Security World mgmt > Display
World.
In this command:
--module=<MODULE>
Do the following:
7.11.3. Enabling and disabling remote reboot using the front panel of
the Connect
Do the following:
• To enable remote reboot, navigate to System > System configuration > Remote
config options > Remote Reboot and set to on.
• To disable remote reboot, set Remote Reboot to off.
Once you have enabled remote reboot, you can reboot an Connect from a computer
using the nethsmadmin command, without accessing the unit itself.
7.11.4.1. Enabling and disabling remote mode changes using the module configuration file
See Configuring the Connect with configuration files for more about editing the module
configuration file.
Do the following:
• To enable mode change using nopclearfail, locate the server_settings section of the
7.11.4.2. Enabling and disabling remote mode changes using the front panel of the
Connect
Do the following:
• To enable remote mode change, navigate to System > System configuration >
Remote config options > Remote mode changes and set to on.
• To disable remote mode change, set Remote mode changes to off.
Once you have enabled remote mode change, you can change the mode of an Connect
from a computer using the nopclearfail command, without accessing the unit itself.
7.11.5.1. Enabling and disabling remote upgrade using the module configuration file
See Configuring the Connect with configuration files for more about editing the module
configuration file.
Do the following:
7.11.5.2. Enabling and disabling remote upgrade using the front panel of the Connect
Do the following:
• To enable remote upgrade, navigate to System > System configuration > Remote
config options > Remote Upgrade and set to on.
• To disable remote upgrade, set Remote Upgrade to off.
Once you have enabled remote upgrade, you can upgrade an Connect from a computer
Do the following:
• Use The dynamic_slot_timeouts section in the module configuration file to define the
round trip (HSM to smartcard and back) time limit (the default is 10 seconds), and
the card removal detection timeout (the default is 30 seconds).
• Push the updated configuration file to the Connect. See dynamic_slot_timeouts and
Configuring the Connect with configuration files for more information.
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. You can
check the mapping by:
▪ Running the command:
slotinfo -m 1
For example, if dynamic slot #2 has been mapped to slot #0, the output
from this command includes the lines:
▪ The D in the Flags column indicates that slot #0 is now a Dynamic Slot
or:
▪ Using the front panel controls to navigate to Security World mgmt > Display
World.
By default, the Authorized Card List is empty following software installation. The serial
numbers of Remote Administration Cards must be added to the list before they can be
used.
The Authorized Card List is a text file /opt/nfast/kmdata/config/cardlist on the RFS and
each client computer. The file is read from the RFS by associated Connects as and when
required for front panel operations. The list applies to all Connects associated with the
RFS, regardless of the Security World to which a Connect may belong, including when
creating a Security World from the front panel. For client initiated card operations the
Authorized Card List file on that client computer is used. The RFS and client copies of
the Authorized Card List have to be kept in step manually.
• Enable and disable remote mode of an Connect using nopclearfail -O/-I, see
Changing the mode
• Reboot an Connect using the nethsmadmin utility, utility nethsmadmin --module=
[MODULE] –-reboot, see Using nethsmadmin to reboot an Connect
• Upgrade Connect firmware using the nethsmadmin utility, nethsmadmin --module=MODULE—
upgrade-image=image_name, see Upgrading the nShield Connection image file and
firmware from a privileged client
• Synchronise an Connect’s Security World data using the nethsmadmin utility,
nethsmadmin --module =[ModuleID] --update-world, see Creating a Security World using
new-world
• Check if Security World files have been copied to an Connect using the nethsmadmin
utility, nethsmadmin –module=[ModuleID] --check-world, see Creating a Security World
using new-world
For information on presenting nShield Remote Administration smart cards, see the
nShield® Remote Administration Client user guide.
There are two ways to configure the Connect by importing edited configuration files.
6. Check that the configuration file on the RFS has been updated with the required
changes.
You will have to copy the configuration file to the RFS manually.
To permit Connect configuration remotely from the RFS computer without enabling the
auto push option:
Whichever method you use, the updated configuration file becomes the new Connect
configuration. It is automatically copied back to the file /opt/nfast/kmdata/hsm-ESN/config/
on the remote file system.
7.13.3.1. [server_settings]
7.13.3.2. [dynamic_slot_timeouts]
7.13.3.3. [dynamic_slots]
7.13.3.4. [slot_mapping]
7.13.3.5. [remote_administration_service_startup]
7.13.3.6. [ui_lockout]
The ui_lockout section is relevant for Connect only. It does not apply to
nShield Solo, nShield Solo XC or nShield Edge HSMs.
To update an existing hardserver configuration file, edit and insert the sections above.
Alternatively factory resetting an Connect will generate a new configuration file including
the new Remote Administration relevant sections listed above. See the appropriate User
Guide for more information on editing and loading configuration files.
You normally create a Security World after installing and configuring the module and its
software. For more information, see:
• 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.
To use the module to protect a different set of keys, you can replace an
existing Security World with a new Security World.
For more information about the type of user that is required for different operations, see
About user privileges.
All Security Worlds rely on you using the security features of your
operating system to control the users who can access the Security
World and, for example, write data to the host. See server_startup for
more about configuring users for Remote Administration.
Other Connect modules can also use a Security World created on an Connect using
client cooperation. For more information, see Setting up client cooperation.
If a Security World operation is done on the module, the files are created or updated on
the module and automatically copied to the directory specified by the environment
If the Security World operation is done on a client machine (for example, Operator Card
Set and key operations), files are created or updated in the or the directory specified by
the NFAST_KMLOCAL environment variable, on the client machine only.
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
[.path]`/opt/nfast/kmdata/local’s remote file system. These files must then be updated
on the module by selecting Security World mgmt > RFS operations > Update World
files from the main menu.
To be able to create Operator Cards or keys, the user on the client must have write
permission for this directory. All other valid users must have read permission.
cards_HASH_NUMBER
In this table:
• <ESN> is the electronic serial number of the module on which the Security World is
created
• <IDENT> is the identifier given to the card set or key when it is created
• <NUMBER> is the number of the card in the card set
• <APPNAME> is the name of the application by which the key was created.
The <IDENT> of a card set is a 40-character string that represents the hash of the card
set’s logical token. The <IDENT> of a key is either user supplied or a hash of the key’s
logical token, depending on the application that created the key.
• 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.
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.
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-2 standard at Level 2. However, you
can choose to enable compliance with the FIPS 140-2 standard at Level 3.
This option provides compliance with the roles and services of the FIPS
140- 2 Level 3 standard. It is included for those customers who have a
regulatory requirement for compliance.
If you enable compliance with FIPS 140-2 Level 3 roles and services, authorization is
required for the following actions:
In addition, you cannot import or export private or symmetric keys in plain text.
The default setting is to generate RSA keys in a manner compliant with FIPS 186-3. If you
have not selected to create a FIPS 140-2 Level 3 Security World then you can choose to
turn this setting off to decrease the RSA key generation time. If you have selected a FIPS
140-2 Level 3 or common-criteria-cmts Security World then you cannot alter this setting.
When this option is selected RSA key lengths must be a multiple of 256
bits.
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
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 replace an OCS with another OCS, or a softcard with another
softcard, but you cannot replace an OCS with a softcard or a softcard
with an OCS. Likewise, you can transfer keys from an OCS to another
OCS, or from a softcard to another softcard, but you cannot transfer
keys from an OCS to a softcard or from a softcard to an OCS.
You can choose to disable OCS and softcard replacement for a Security World when you
create it. However, in a Security World without this feature, you can never replace lost or
damaged OCSs; therefore, you could never recover the keys protected by lost or
damaged OCSs, even if the keys themselves were generated as recoverable (which is the
default for key generation).
For an overview of Security World robustness and OCS or softcard replacement, see
Replacing an Operator Card Set or recovering keys to softcards. For details about
performing OCS and softcard replacement operations, see Replacing Operator Card Sets
and Replacing the Administrator Card Set.
By default, Security Worlds are created so that you cannot replace the pass phrase of a
card or softcard without knowing the existing pass phrase.
However, you can choose to enable pass phrase replacement at the time you create a
Security World. This option makes it possible to replace the pass phrase of a card or
softcard even if you do not know the existing pass phrase. Performing such an operation
requires authorization from the Security World’s ACS.
For details about performing pass phrase replacement operations, see Changing
unknown or lost pass phrase.
Enabling nonvolatile memory (NVRAM) options allows keys to be stored in the module’s
NVRAM instead of in the Key Management Data directory of the host computer. Files
stored in the module’s non-volatile memory have Access Control Lists (ACLs) that
control who can access the file and what changes can be made to the file. NVRAM
options are relevant only if your module’s firmware supports them, and you can store
keys in your module’s NVRAM only if there is sufficient space.
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.
When initiated from the Connect front panel, while a Security World is
being created the Connect disconnects itself from the network to
ensure that the operation is not interrupted. This means that the
Remote Administration feature cannot be used to present cards from a
remote location when creating a Security World from the front panel.
• The directory /opt/nfast/kmdata/local on the remote file system must exist and be
empty.
• 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 sets.
1. From the main menu, select Security World mgmt > Module initialization > New
Security World.
2. Specify the Security World mode:
a. FIPS 140-2 Level 3 creates a Security World compliant with FIPS 140-2
requirements for roles and services at Level 3.
b. Common Criteria CMTS creates a Security World supporting Common Criteria
Protection Profile EN 419 221-5.
c. Unrestricted creates a Security World which doesn’t impose any particular
conformance. With appropriate environmental constraints, an unrestricted
Security World can be compliant with FIPS 140-2 Level 2.
3. Select the Cipher suite for the Security World. Currently only one option is available
for the Security World key, AES (SP800-131AR1).
4. Enter the default quorum for the ACS. This consists of:
a. The maximum number of cards from the ACS required by default for an
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.
• The HSM must be in pre-initialization mode. See Checking and changing the mode on
an nShield Connect 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.
• 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.
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 restart the HSM in
operational mode.
8.1.5.2. Using nethsmadmin to copy a Security World to an Connect and check the
current version
nethsmadmin can also be used to check if the Security World files have been copied to the
Connect. Run the command:
In these commands:
--module=<MODULE>
Follow the directions in this section to create a Security World from the command line
with the new-world utility.
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-2 Level 3 with a ACS
quorum of 3/5 and with audit logging enabled.
In this command:
Option Description
‑‑no-remoteshare-cert This option tells new-world not to make the HSM a target for
remote shares.
--no-strict-rsa-keygen If you have not specified a mode parameter you can use the
-no-strict-rsa-keygen flag to disable the UseStrongPrimes
setting. Otherwise it will be enabled by default. See
UseStrongPrimes Security World setting.
‑‑cipher‑suite=<CIPHER- This option specifies the Cipher suite and type of key that is
SUITE> used to 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.
This option only takes effect if you are creating a new Security
World.
--disablepkcs1pad This option disables the use of PKCS#1 v1.5 padding. All
attempts to use PKCS#1 v1.5 padding for encryption or
decryption operations will be rejected.
--pp-min=LENGTH This option enables a minimum pass phrase length check for
the Administrator Card Set (ACS) the Operator Card Set
(OCS) and any associated softcards when you create a
Security World. The minimum pass phrase length check is
then applied after the Security World is created. When
enabled and you attempt to create a card pass phrase with
fewer characters than the specified minimum length, the
following warning message displays:
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.
Features for the Security World can be specified using the command line.
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.
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:
Setting the quorum of one these features to 0 has the same effect as turning it off using
the ! operator.
The pass phrase replacement (p) and dseeall features are turned off by default; the other
options are turned on by default.
The nonvolatile memory and SEE world debugging options are relevant
only if you are using the Secure Execution Engine. If you have bought
the CodeSafe Developer Kit, refer to the CodeSafe Developer Guide for
more information.
To use extended debugging for the HSM, you must set the dseeall flag.
The dseeall option is designed for testing purposes only. Do not enable
this feature on production Security Worlds as it may enable SEE
applications to leak security information.
If 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. See Checking and changing the mode on an nShield Connect for more about
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 Connect 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.
kmfile-dump [<worldfile>]
You can also restore an HSM to a Security World to continue using existing keys and
Operator Cards:
• Have installed the additional HSM hardware, as described in the Installation Guide.
• Have a copy of the Security World data on the HSM’s remote file system in the Key
Management Data directory.
• Possess a sufficient number of cards from the ACS and the appropriate pass phrases.
• 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.
After adding an HSM to a Security World, you cannot access any keys that were
protected by a previous Security World that contained that HSM.
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.
In this command:
◦ -l|--program
This option tells new‑world to add an HSM to an existing Security World (in the
Key Management Data directory). If you have multiple HSMs available, you can
use the -m|--module=MODULE option to specify an HSM. If you do not specify an
HSM new‑world adds all available HSMs to the Security World.
◦ -S|--no-remoteshare-cert
These options tell new-world not to make the HSM 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 existing
Security World.
If you intend to initialize the HSM into a new Security World, run new-world with the -i
option.
If the HSM is not in the pre-initialization state, new-world displays an error and exits.
See Checking and changing the mode on an nShield Connect for more about
changing the mode.
If the HSM is in the pre-initialization state, new-world prompts you for cards from the
Security World’s ACS and to enter their pass phrases as required.
If any error occurs (for example, if you do not enter the correct pass
phrases), the HSM is reset to the factory state. The HSM does not form
part of the Security World unless you run new-world again.
We recommend that where compliance with the specifications above is required, you
create a new World and create new keys within that World. However, the software also
includes a migrate-world command-line utility that you can use for migrating existing keys
into the new World. This is provided as a convenience for customers who require
compliance with the specifications, and who need to continue using existing keys.
In the case of a Common Criteria World the specification prohibits the importing of
assigned keys. Only general keys can be imported into a common-criteria-cmts World.
Throughout the following sections, the terms Source World refers to the
World from which you want to migrate keys, and Destination World
refers to the World to which you want to migrate keys.
The utility requires the use of two modules. One module is referred to
as the source module. The other module is referred to as the
destination module.
• Two HSMs. These can be any of the hardware variants Solo+, Solo-XC, Connect+,
Connect-XC and do not need to be of the same type.
• A quorum of ACS cards for the source World.
• Plan mode: Returns a list of steps for migration and the required card sets and pass
phrases 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.
-h, --help Obtain information about the options you can use with
the utility.
--source=<SOURCE> Specify the path to the folder that contains the source
World data.
• 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
• 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
You must enable all your features on the destination module before
migration. Otherwise, the migration will fail.
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: /opt/nfast/kmdata/local/.
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
• 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:
Do not use the nfkmverify utility with the default -C option. If you
use this option, the utility returns errors because the ACL in the
certificate will reflect the old world.
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
Destination module must be
must be different modules
specified.
and both must be usable.
Source and Destination
modules must be different.
Destination World has There are problems with one Contact Support.
indistinguishable cardsets or of the Worlds.
softcards.
Cannot determine
protection of keys.
Source World not The source World is not If the source World is not
recoverable. recoverable and the keys recoverable, you cannot use
therefore cannot be the migration utility to
migrated. migrate keys.
Contact Support.
Missing security World at The path for the source Supply the correct path to
PATH. World is wrong. the source World. If you
have supplied the correct
Source world must be There is no World data at
path to the directory that
specified. the location that was
contains the source World
specified when running the
data, the migration utility
migration utility.
has not found a destination
World.
Source World is the same as An incorrect path was Run the utility with the
the destination World. supplied for the source correct path to the source
World data when running World data.
the utility.
Move the source World data
The destination World data to a different location and
does not exist in the default then copy the destination
location defined by the World data to the default
environment variable NFAST_ location.
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
Ensure that the path points
path (in the environment
<NAME> utility is too old, to the latest version of the
variable for the operating
need at least version software.
system) might be pointing
<VERSION NUMBER>.
to an old version of the
software.
nFast error: The ACS time-out limit has Restart the key migration
TimeLimitExceeded; in expired. process; see Security World
response to SetKM… migration.
Destination world does not You have specified the --key None. The keys will be
support audit logging. -logging option but the migrated but LogKeyUsage
destination world does not will not be set in the ACL of
support audit logging. migrated keys.
Failed to load warrant file There is a problem reading Check that your warrant files
<FILE>. the warrant file. are in the correct location
and have not been edited in
any way.
Erasing a module removes any data stored in its nonvolatile memory (for example, data
for an SEE program or NVRAM-stored keys). To preserve this data, you must back it up
before erasing the module. We provide the nvram‑backup utility to enable data stored in
nonvolatile memory to be backed up and restored.
You do not need the ACS to erase a module. However, unless you have
a valid ACS and the host data for this Security World, you cannot
restore the Security World after you have erased it.
After you have erased a module, it is in the same state as when it left 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.
In this command:
Option Description
8.5.2.1. Output
If new-world successfully erased a module, it does not display any messages. Otherwise,
new-world returns an error message.
If you have any keys that were protected by an erased module, you
cannot access them unless you restore these secrets. You cannot
restore these secrets unless you have the appropriate ACS.
In this command, --module=<MODULE> specifies the ID of the module you want to erase. If
you do not specify this option, all modules in the pre-initialization state are erased.
--strong-kml specifies that the module generates an AES (SP800-131A) module signing
8.5.4.1. Output
If initunit is successful, for each module that is in the pre-initialization state, it returns a
message similar to this:
Initialising Unit
># Setting dummy HKNSO Module Key Info:
HKNSO
>################### HKM
>###################
This operation does not remove any files from the remote file system or client machines.
You should remove the files manually from the /opt/nfast/kmdata/local 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
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.
If audit logging was enabled for the Security World then audit logs
can still be verified provided that the audit log data is maintained
as this contains all the information needed to verify the logs. For
further information see Audit Logging.
8.7.1. Deleting the Security World using the Connect front panel
When you erase a Security World using the unit front panel, all long-term key material is
deleted from the HSM’s memory and all Security World data is removed from the HSM’s
internal file system.
• 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.
If you do not reformat the smart cards used as Operator Cards before
you reinitialize your HSM, you must throw them away because they
cannot be used, erased, or reformatted without the old Security World
key.
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 directory on the RFS and any
client computers to which the Security World was copied.
When you create a Security World, an Administrator Card Set (ACS) is created at the
same time. You use the ACS to:
The Security World is used to create and manage keys, and the Operator Card Sets
(OCSs) and softcards you create with the Security World are used to protect those keys.
Direct protection Keys that are directly protected by the Security World are
usable at any time without further authorization.
Softcard Keys that are protected by a softcard can only be used by the
operator who possesses the relevant pass phrases.
OCS Keys that are protected by an OCS can only be used by the
operator who possesses the OCS and any relevant pass
phrases (if set).
For more information about creating a Security World, see Creating and managing a
Security World.
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 pass phrases for any card within a given set
• Formal FIPS 140-2 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 Connect 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.
An OCS to be used to authorize login on a unit must be persistent and not loadable
remotely. It is recommended that such an OCS is not used to protect sensitive keys.
9.1.2. Time‑outs
OCSs can be created with a time‑out, so that they can only be used for limited time after
the OCS is loaded. An OCS is loaded by most applications at start up or when the user
supplies the final required pass phrase. After an OCS has timed out, it is not loadable by
another application unless it is removed and reinserted. Time‑outs operate
independently of OCS persistence.
9.1.4. Creating an Operator Card Set using the nShield Connect front
panel
To create an OCS, follow these steps:
1. From the main menu, select Security World mgmt > Cardset operations > Create
OCS.
If the card is not blank, choose whether to overwrite it or to use a different card. (If
the card is an Operator Card from another Security World, you cannot overwrite it
and are prompted to enter a different card.)
9. If you have chosen to name individual cards, you are prompted to enter the name for
the card.
10. You are asked whether you wish to specify a pass phrase for the card. If you choose
Yes, you are prompted to enter the pass phrase twice.
While the Operator Card is being created, the screen displays the message
Processing.
If there are further cards from this OCS to be processed, the screen changes to
Waiting. Remove the card, and repeat steps 8 through 10 for each of the remaining
cards.
When all the cards in the set have been processed, you are told that the card set has
been created successfully.
Option Description
-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.
-R|--no-pp-recovery This option specifies that pass phrase replacement for this
OCS is disabled. Setting this option overrides the default
setting, which is that the card pass phrases are replaceable.
You can specify the enablement of pass phrase
replacement explicitly by setting the ‑‑pp‑recovery option.
-q|--remotely-readable This option allows this card set to be read remotely. For
information on configuring Remote OCSs, see Remote
Operator.
-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.
With Security World Software v11.72 and later, pass phrases are
limited to a maximum length of 254 characters, when using
createocs. See Maximum pass phrase length.
If you have created a FIPS 140-2 Level 3 compliant Security World, you must provide
authorization to create new Operator Cards; createocs prompts you to insert a card
that contains this authorization. Insert any card from the Administrator Card Set or
any Operator Card from the current Security World.
If you insert an Administrator Card from another Security World or an Operator Card
that you have just created, createocs displays the following message:
When you insert a valid card, createocs prompts you to type a pass phrase.
The nShield PKCS #11 library requires Operator Cards with pass
phrases.
3. Type a pass phrase and press Enter. Alternatively, press Enter if you do not want this
card to have a pass phrase.
A pass phrase can be of any length and can contain any character that you can type.
If the pass phrases do not match, createocs prompts you to input and confirm the
pass phrase again.
5. When the new card has been created, if you are creating a card set with more than
one card in it, createocs prompts you to insert another card.
6. For each additional card in the OCS, follow the instructions from step 2 through 4.
3. Select an HSM within the Security World from the Security World status pane.
4. Click the Create new card set button to open the Create Operator Card Set panel.
You can specify the following options:
a. A name for the card set.
b. Whether pass phrase recovery will be enabled for the OCS. (Only available if the
Security World has pass phrase recovery enabled.)
c. Whether the card set can be used remotely. (Only available if the Security World
has remote sharing available.) For more information, see Remote Operator.
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.
A message is displayed, confirming that the card is blank. Click OK to open the Set
Card Protection pass phrase panel.
To overcome this you must replace the card you have inserted with
another card that is readable (or blank).
7. Select whether or not you want to set a pass phrase for the currently inserted card.
Each card in a set can have an individual pass phrase, and you can also create a set
in which some cards have pass phrases and others do not.
8. If setting a pass phrase for the currently inserted card, enter the same pass phrase in
both text fields. A pass phrase can contain any characters you can type except for
tabs or carriage returns (because these keys are used to move between data fields).
You can change a pass phrase at any time. If you do not set a pass
phrase now, you can use the KeySafe Change Pass Phrase option (on
the Examine/Change Card panel) to add one later. Likewise, if you
later decide that you do not need a pass phrase on a card, you can
use this option to remove it.
9. After entering your desired pass phrase (if any) in both text fields, click the OK
button. Unless you have entered details for the last card in the set, KeySafe returns
you to the Create Operator Card Set panel and prompts you to enter the next card
in the set to be written.
10. After KeySafe has written the details of the last smart card in the set, it displays a
dialog indicating that the OCS has been successfully created. Click the OK button,
and KeySafe returns you to the Create Operator Card Set panel, where you can
create another OCS or choose a different operation by clicking one of the menu
buttons.
A softcard is a file containing a logical token that cannot be loaded without a pass
phrase; its logical token must be loaded in order to authorize the loading of any key that
is protected by the softcard. Softcard files are stored in the Key Management Data
directory and have names of the form softcard_<hash> (where <hash> is the hash of the
logical token share). Softcards belong to the Security World in which they are created.
A softcard’s pass phrase is set when you generate it, and you can use a single softcard to
protect multiple keys. Softcards are persistent; after a softcard is loaded, it remains valid
for loading the keys it protects until its KeyID is destroyed.
Softcards are not supported for use with the nCipherKM JCA/JCE CSP
in Security Worlds that are compliant with FIPS 140-2 Level 3.
To use softcards with PKCS #11, you must have CKNFAST_LOADSHARING set
to a nonzero value. When using pre-loaded softcards or other objects,
the PKCS #11 library automatically sets CKNFAST_LOADSHARING=1 (load-
sharing mode on) unless it has been explicitly set to 0 (load-sharing
mode off).
1. Decide whether you want the new softcard’s pass phrase to be replaceable or non
‑replaceable. To create a softcard with a replaceable pass phrase, run the command:
In these commands, <NAME> specifies the name of the new softcard to be created.
2. When prompted, type a pass phrase for the new softcard, and press Enter.
A pass phrase can be of any length and contain any characters that you can type
except for tabs or carriage returns (because these keys are used to move between
data fields).
3. When prompted, type the pass phrase again to confirm it, and press Enter.
If the pass phrases do not match, ppmk prompts you to input and confirm the pass
phrase again.
After you have confirmed the pass phrase, ppmk completes creation of the new softcard.
5. Click Commit.
6. Set a pass phrase for the softcard by entering the same pass phrase in both text
fields.
A pass phrase can contain any characters you can type except for tabs or carriage
returns (because these keys are used to move between data fields) and can be up to
1024 characters long. You can change a pass phrase at any time. You must provide a
pass phrase for each card.
7. After entering your desired pass phrase in both text fields, click the OK button.
KeySafe displays a dialog indicating that the softcard has been successfully created.
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.
You can erase Operator Cards using the unit front panel, KeySafe or the createocs utility.
You can also use these methods to erase Administrator Cards other than those in the
current Security World’s ACS (for example, you could use these methods to erase the
remaining Administrator Cards from an incomplete set that has been replaced or
Administrator Cards from another Security World).
None of these tools erases cards from the current Security World’s
ACS.
If you erase an Operator Card that is the only card in an OCS, information about the card
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.
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 the
opt/nfast/kmdata/local after you have erased the last card.
7. After erasing a card, KeySafe displays a dialog to confirm that the card has been
erased. Click OK to continue using KeySafe.
You can erase an entire card set at one time with the KeySafe
Discard Card Set(s) feature.
Option Description
-e|--erase These options specify that you want to erase a card (rather
than create an OCS).
If you have more than one card reader and there is more than one card
available, createocs prompts you to confirm which card you wish to
erase. Use [Ctrl][X] to switch between cards.
If you have created a FIPS 140-2 Level 3 compliant Security World, you must provide
authorization in order to erase or create Operator Cards. You can obtain this
authorization from any card in the ACS or from any Operator Card in the current Security
World, including cards that are to be erased. After you insert a card containing this
authorization, createocs prompts you to insert the card to be erased.
1. Start KeySafe.
2. Click the Softcards menu button. KeySafe takes you to the Softcard Operations
panel.
3. Select the softcard you want to erase from the list.
4. Click the Discard Softcard button.
5. KeySafe asks you to confirm that you want to erase this card. Click Yes to confirm.
6. After erasing a softcard, KeySafe displays a dialog box to confirm that the card has
been erased. Click OK to continue using KeySafe.
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-2 Level 3 compliant Security World, you must
provide authorization to erase softcards; ppmk prompts you to insert a card that contains
this authorization. Insert any card from the ACS or any Operator Card from the current
Security World.
If you insert an Administrator Card from another Security World or an Operator Card that
you have just created, ppmk displays an error message and prompts you to insert a card
with valid authorization. When ppmk has obtained the authorization from a valid card or if
no authorization is required, it completes the process of erasing the softcard.
To view details of all the Operator Cards in a Security World or details of an individual
To list all softcards in a Security World or to show details of an individual softcard, you
can use the ppmk or nfkminfo command-line utilities. To check which pass phrase is
associated with a softcard, you can use the ppmk command-line utility.
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.
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
current Security World.
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 pass phrase of a card using the Connect front panel
To verify the pass phrase associated with a card using the unit front panel:
The type of the card (Administrator or Operator) is displayed with the number of the
3. If this is the card that you want to check, press the right-hand navigation to confirm.
4. Enter the pass phrase.
If the pass phrase that you entered is correct, a confirmation message is shown.
Otherwise, an error is reported.
To verify the pass phrase 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 pass
phrase is set or prompts you to enter the pass phrase and checks to see if it is correct.
In order to verify the pass phrase of a particular softcard, open a command window, and
give the command:
In this command, you can identify the softcard whose pass phrase you want to verify
either by its name (<NAME>) or by its logical token hash (as given by running the command
nfkminfo --softcard-list).
ppmk prompts you to enter the pass phrase and then tells you whether the pass phrase
you entered is correct for the specified softcard.
Normally, in order to change the pass phrase of a card or softcard, you need the card or
softcard and the existing pass phrase. Known card pass phrase can be changed using the
front panel, KeySafe or the cardpp command-line utility; softcard pass phrase can be
changed using KeySafe or the ppmk command-line utility. You can also add a pass phrase
to a card or softcard that currently does not have one or remove a pass phrase from a
card that does currently have one.
If you generated your Security World with the pass phrase replacement option, you can
also replace the pass phrase of a card or softcard even if you do not know the existing
pass phrase. Such a pass phrase replacement operation requires authorization from the
ACS.
Each card in a set can have its own individual pass phrase. You can even have a set in
which some cards have a pass phrase and others do not.
See Maximum pass phrase length for more about pass phrase length
when using Security World Software v11.72.
9.5.1.1. Changing known pass phrase from the unit front panel
To change the pass phrase of a card using the unit front panel:
4. Select the softcard whose pass phrase you want to change, and click the Change
Pass phrase button. KeySafe takes you to the Get Softcard Protection pass phrase
panel.
KeySafe either displays an error dialog (if the pass phrase is not correct) or takes you
to the Set Softcard Protection pass phrase panel.
6. Enter your new pass phrase, and enter it again in the second field to confirm the pass
phrase is correct.
7. Click the OK button.
After changing a pass phrase, KeySafe displays a dialog to confirm that the pass
phrase has been successfully changes.
Each card in a card set can have its own individual pass phrase. You can even have a set
in which some cards have a pass phrase and others do not. A pass phrase can be of any
length and can contain any characters that you can type.
With Security World Software v11.72 and later, pass phrases are limited
to a maximum length of 254 characters, when using cardpp. See
Maximum pass phrase length.
To change a known card’s pass phrase with the cardpp command-line utility, take the
following steps:
If you only have one HSM, <MODULE> is 1. If you do not specify an HSM number, cardpp
uses all HSMs by default.
2. If prompted, insert the card whose pass phrase you want to change. (If there is a
card already in the slot, you are not prompted.)
3. If prompted, enter the existing pass phrase for the card (If the card has no current
pass phrase you are not prompted.) If you enter the pass phrase correctly, cardpp
prompts you to enter the new pass phrase.
4. Enter a new pass phrase, and then enter it again to confirm it.
After you have confirmed the new pass phrase, cardpp changes the card’s pass
phrase.
With Security World Software v11.72 and later, pass phrases are limited
to a maximum length of 254 characters, when using ppmk. See Maximum
pass phrase length for more information.
To change a known softcard’s pass phrase when you know the pass phrase, follow these
steps:
In this command, you can identify the softcard whose pass phrase you want to
change either by its name (<NAME>) or by its logical token hash as listed by nfkminfo
(<IDENT>).
2. Type the old pass phrase, and press Enter. If you enter the old pass phrase correctly,
ppmk prompts you to enter the new pass phrase.
3. Type the old pass phrase, and press Enter. Type the new pass phrase again, and
press Enter to confirm it.
After you have confirmed the new pass phrase, ppmk then changes the softcard’s pass
phrase.
If you generated your Security World with the pass phrase replacement option, you can
change the pass phrase of a card even if you do not know its existing pass phrase. Such a
pass phrase replacement operation requires authorization from the ACS.
To change an unknown card pass phrase with the cardpp command-line utility:
In this command, <MODULE> specifies the number of the hardware security module to
use. If you only have one hardware security module, <MODULE> is 1. If you do not
specify a number, cardpp uses all hardware security modules by default.
cardpp sets the new pass phrase, and then prompts you for another Operator
Card.
• Repeat the process in the previous step to change the pass phrase on further cards,
or press Q to quit.
If you generated your Security World with the pass phrase replacement option, you can
change the pass phrase of a softcard even if you do not know its existing pass phrase.
Such a pass phrase replacement operation requires authorization from the ACS.
To change an unknown softcard pass phrase with the ppmk command-line utility:
In this command, you can identify the softcard by its <NAME> or by its <IDENT> (its
logical token hash as shown in output from the nfkminfo command-line utility).
2. As prompted, insert the appropriate number of cards from the ACS required to
authorize pass phrase replacement.
3. When prompted, type the new pass phrase, and then press Enter.
4. When prompted, type the new pass phrase again to confirm it, and then press Enter.
If the pass phrase does not match, ppmk prompts you to input and confirm the pass
phrase again.
After you successfully confirm the new pass phrase, ppmk finishes configuring the softcard
to use the new pass phrase.
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.
If you did not enable OCS and softcard replacement, you cannot
recover keys from lost or damaged smart cards or softcards.
• 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
pass phrases if required.
When you have inserted the required number of cards, details of the recovered key
are displayed.
6. Check the key details are correct and then scroll down and select Recover key.
You can also select More info to see more information about the keys.
When you have a second OCS ready, follow these steps in order to replace the first OCS:
This panel lists existing OCSs in tabular form. For each card set it displays:
Attribute Description
Recoverable Key The number of private keys protected by this card set that
Count are recoverable.
Nonrecoverable Key The number of private keys protected by this card set that
Count are not recoverable.
You can click and drag with your mouse in order to resize the column widths and to
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 pass phrase for this card. This action is repeated until you
have loaded the required number of cards from the ACS.
If you do not have the required number of cards from the ACS, press Q and then
Enter. The rocs utility returns you to the rocs > prompt without processing any keys.
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 as listed by the list
cardsets command.
b. Insert a card from this OCS.
c. rocs prompts you for the pass phrase for this card. This action is repeated until
you have loaded the required number of cards from the OCS.
If you are recovering keys to a softcard, rocs prompts you for the pass phrase for the
softcard that you have selected as the target.
If you decide that you do not want to transfer the keys to the selected card set or
softcard, press Q and then Enter (to quit. rocs returns you to the rocs > prompt and
does not process any further OCSs or softcards.
When you have loaded the target softcard or the required number of cards from the
target OCS, rocs transfers the selected keys to the target OCS or softcard.
If you have selected other target OCSs or softcards, rocs prompts for a card from the
next OCS.
• help <topic>
• help intro
• list cardsets
• list keys
• mark <key-spec>
• module <number>
• quit
• recover
• rescan
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
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 the
other by spaces, as in the following example:
If you have not selected a target OCS or softcard, or if rocs cannot parse the key-spec,
then rocs displays an error message.
You can mark and remark the keys to be recovered to various target OCSs or softcards.
Remarking a key displaces the first target in favor of the second target.
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.
-k, --keys=<KEYS-SPEC> These options select the keys to be recovered. For more
information, see Specifying keys.
-c, --cardset=<CARDSET These options select all keys that are protected by the given
-SPEC> 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:
[number] cardset- A value of this form selects the OCS or softcard with the given
number 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
hash keyhash A value of this form selects the key with the given key hash.
An example of usage is:
--cardset cardset-spec A value of this form selects all keys protected by a given card
set.
1. loading the secret information that is to be used to protect the archived copy of the
Security World key.
2. creating a new secret that is to be shared between a new set of cards
3. creating a new archive that is to be protected by this secret.
If you discover that one of the cards in the current ACS has been damaged or lost, or you
want to migrate from standard nShield cards to nShield Remote Administration Cards,
you should use one of the following to create a new set:
If further cards are damaged, you may not be able to re-create your
Security World.
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 pass phrase for the card.
5. Insert cards until the card set is complete. A message confirms that the card set has
been created.
6. At this point the modified world file has been pushed to the RFS, so make a backup
of the modified world file on the RFS, preferably in a way that distinguishes it from
previous backups.
Only insert cards from your ACS into a module that is connected to
a trusted server.
6. When you have loaded enough Administrator Cards to authorize the action, KeySafe
takes you to the Create Administrator Card Set panel, where it prompts you to insert
the cards that are to form the ACS. These must be blank cards or cards that KeySafe
can erase. KeySafe will not let you use cards from the existing ACS. If you do not
have enough cards to form a complete new ACS, cancel the operation now.
7. When you insert a blank card, KeySafe takes you to the Set Card Protection Pass
Phrase panel.
8. If you want to set a pass phrase for this Administrator Card:
KeySafe then prompts you for the next card (if any). A given pass phrase is
associated with a specific card, so each card can have a different pass phrase. You
can change these pass phrases at any time by using the KeySafe Examine/Change
Card option (available from the List Operator Card Sets panel) or the cardpp
command-line utility.
9. If you do not want to set a pass phrase for this Administrator Card:
a. Select the No option.
b. Click the OK button.
10. After you have created all the Administrator Cards, KeySafe displays a message
confirming that the ACS has been successfully replaced.
11. Click the OK button, and KeySafe returns you to its introduction panel.
1. If you ran KeySafe on a client machine, ensure that there is a copy of the modified
world file on the RFS.
2. Make a backup of the world file, preferably in a way that distinguishes it from
previous backups.
3. Copy the world file to any other Connects in the same Security World, for example
using the nethsmadmin utility, see Using nethsmadmin to copy a Security World to an
Connect 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 pass phrases have
been set as intended, see Verifying the pass phrase of a card or softcard.
6. Erase the old Administrator Cards; for more information, see Erasing cards and
softcards.
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.
You must add the user of any application that uses an nShield HSM to
the group nfast before the application runs.
If you create keys on a client that is not on the same computer as the
RFS, you must copy the key data to the RFS before the nShield HSM
can use these keys.
• the nShield Java package which includes the nShield Java jars and KeySafe.
For more information about the bundles and components supplied on your Security
World Software installation media, see the User Guide.
The following versions of Java have been tested to work with, and are supported by, your
nShield Security World Software:
We recommend that you ensure Java is installed before you install the Security World
Software. The Java executable must be on your system path.
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
Softcards are not supported for use with the nCipherKM JCA/JCE CSP
in Security Worlds that are compliant with FIPS 140-2 Level 3.
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 7 and 8 only. Copy the CipherKM.jar file to the extensions folder of your local
Java Virtual Machine installation from the following directory:
◦ /opt/nfast/java/classes
The location of the extensions folder depends on the type of your local Java
Virtual Machine (JVM) installation:
In these paths, $JAVA_HOME is the home directory of the Java installation (commonly
specified in the JAVA_HOME environment variable). If you are using Java 11 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 configuration file java.security
(located in the security directory for your local Java Virtual Machine (JVM)
installation).
The java.security file contains a list of providers in preference order that is used by
the Java Virtual Machine to decide from which provider to request a mechanism
instance. Ensure that the nCipherKM provider is registered in the first position in this
list, as shown in the following example:
#
# List of providers and their preference orders (see above):
#
security.provider.1=com.ncipher.provider.km.nCipherKM
security.provider.2=sun.security.provider.Sun
security.provider.3=sun.security.rsa.SunRsaSign
security.provider.4=com.sun.net.ssl.internal.ssl.Provider
security.provider.5=com.sun.crypto.provider.SunJCE
security.provider.6=sun.security.jgss.SunProvider
security.provider.7=com.sun.security.sasl.Provider
For Java 11 you do not need to specify the fully qualified class name for the provider.
Instead you can just use the provider name.
security.provider.1=nCipherKM
Placing the nCipherKM provider first in the list permits the nCipherKM provider’s
algorithms to override the algorithms that would be implemented by any other
providers (except in cases where you explicitly request another provider name).
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.
java com.ncipher.provider.InstallationTest
For this command to work, you must have added $JAVA_HOME to your
PATH system variable).
If the nCipherKM JCA/JCE CSP is functioning correctly, output from this command has
the following form:
Installed providers:
1: nCipherKM
2: SUN
3: SunRsaSign
4: SunJSSE
5: SunJCE
6: SunJGSS
7: SunSASL
Unlimited strength jurisdiction files are installed.
The nCipher provider is correctly installed.
nCipher JCE services:
Alg.Alias.Cipher.1.2.840.113549.1.1.1
Alg.Alias.Cipher.1.2.840.113549.3.4
Alg.Alias.Cipher.AES
Alg.Alias.Cipher.DES3
If the nCipherKM provider is installed but is not registered at the top of the providers list in
the java.security file, the InstallationTest command produces output that includes the
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.
Whether or not the nCipherKM provider is correctly installed, if the unlimited strength
jurisdiction files are not installed or (not correctly installed), the InstallationTest
command produces output that includes the message:
This message means that, because the Java Virtual Machine imposes limits on the
cryptographic strength that you can use by default with JCE providers, you must replace
the default policy configuration files with the unlimited strength policy files. For
information about how to install the unlimited strength jurisdiction files, see Installing the
nCipherKM JCA/JCE CSP.
Alternatively, you can specify the location of the nCipherKM jar on the classpath:
10.1.3. keytool
You can use either the Oracle keytool utility or the IBM keytool utility to read and edit an
nShield KeyStore. These utilities are shipped with the Oracle and IBM JVMs. You must
specify the correct nCipher.sworld KeyStore type when you run the keytool utility, and you
must specify the correct package name for the Oracle or IBM keytool utility.
To generate a new key in an OCS-protected KeyStore with the Oracle or IBM keytool
utility, run the appropriate command:
java sun.security.tools.keytool.Main -genkey -storetype nCipher.sworld -keyalg RSA -sigalg SHA1withRSA -storepass
<KeyStore_passphrase> -keystore <KeyStore_path>
java sun.security.tools.KeyTool -genkey -storetype nCipher.sworld -keyalg RSA -sigalg SHA1withRSA -storepass
<KeyStore_passphrase> -keystore <KeyStore_path>
java com.ibm.crypto.tools.KeyTool -genkey -storetype nCipher.sworld -keyalg RSA -sigalg SHA1withRSA -storepass
<KeyStore_passphrase> -keystore <KeyStore_path>
In these example commands, <KeyStore_passphrase> is the passphrase for the OCS that
protects the KeyStore and <KeyStore_path> is the path to that KeyStore.
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
In this example command, <property> represents any system property, <value> represents
the value set for that property, and <MyJavaApplication> is the name of the Java
application you are starting. You can set multiple system properties in a single command,
for example:
The available system properties and their functions as controlled by setting different
values for a property are described in the following table:
JCECSP_DEBUG This property is a bit mask for which different values specify
different debugging functions; the default value is 0. For
details about the effects of setting different values for this
property, see JCECSP_DEBUG property values.
module This property lets you override the default HSM and select a
specific HSM to use for HSM and OCS protection. Set the value
of this property as the ESN of the HSM you want to use.
slot This property lets you override the default slot for OCS-
protection and select a specific slot to use. Set this the value
of this property as the number of the slot you want to use.
ignorepass phrase If the value of this property is set to true, the nCipherKM
provider ignores the pass phrase provided in its KeyStore
implementation. This feature is included to allow the Oracle or
IBM keytool utilities to be used with module-protected keys.
The keytool utilities require a pass phrase be provided; setting
this property allows a dummy pass phrase to be used.
com.ncipher.provider.ann The default value for this property is auto, which uses firmware
ouncemode auto-detection to disable algorithms in the provider that
cannot be supported across all installed HSMs. Setting the
value of this property to on forces the provider to advertise all
mechanisms at start-up. Setting the value of this property to
off forces the provider to advertise no mechanisms at start-up.
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:
64 If this property has the bit 7 set, the time elapsed during each
logged function is calculated, and information on the number
of times a function is called and by which function it was
called is reported.
128 If this property has the bit 8 set, debugging information for
NFJAVA is reported in the debugging file.
256 If this property has the bit 9 set, the call stack is printed for
every debug message.
To set multiple logging functions, add up the JCECSP_DEBUG values for the debugging
functions you want to set, and specify the total as the value for JCECSP_DEBUG. For
example, if you want to set the debugging to use both function tracing (bit 4) and
function tracing with parameters (bit 5), add the JCECSP_DEBUG values shown in the table
for these debugging functions (8 + 16 = 24) and specify this total (24) as the value to use
for JCECSP_DEBUG.
10.1.6. Compatibility
The nCipherKM JCA/JCE CSP supports both module-protected keys and OCS-protected
keys. The CSP currently supports 1/N OCSs and a single protection type for each
nCipherKM JCE KeyStore.
You can use the nCipherKM JCA/JCE CSP with Security Worlds that comply with FIPS
140‑2 at either Level 2 or Level 3.
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.
Keys generated or imported by the nCipherKM JCA/JCE CSP are not recorded into the
Security World until:
The pass phrase used with the KeyStore must be the pass phrase of the card from the
OCS that protects the keys in the KeyStore.
Instructions for using the nShield PKCS #11 library with specific applications are available
from Entrust nShield 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 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-2 Level 3
compliant Security Worlds. This version of the library also introduces load‑sharing mode.
This feature provides support for multiple hardware security modules that are connected
to a single server, spreading the load of cryptographic operations between the HSMs in
order to provide scalability in terms of performance.
To share OCS protected keys with load‑sharing mode, you must create a 1/N OCS that
contains at least as many cards as you have HSMs. All the cards on the OCS must have
the same 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 HSM includes a hardware random number generator. A hardware random
number generator provides greater security than the pseudo-random number generators
provided by host computers. Therefore, always use the nShield HSM to generate random
numbers and keys.
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)
An nShield hardware security module is specifically optimized for public key algorithms,
and therefore it will provide significant acceleration for DSA, RSA and ECDSA signature
generation and verification. You should always choose to perform asymmetric signature
generation and verification with an nShield HSM.
The nShield PKCS #11 library can use an nShield HSM to perform asymmetric encryption
and decryption with the RSA algorithm.
The nShield HSM is specifically optimized for asymmetric algorithms, so you should
always choose to perform asymmetric operations with the nShield HSM.
The nShield PKCS #11 library can use the nShield HSM to perform symmetric encryption
with the following algorithms:
• DES
• Triple DES
• AES
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
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).
To ensure the security of your keys, you must review any messages
returned by the PKCS #11 library before changing the settings of the
CKNFAST_OVERRIDE_SECURITY_ASSURANCES environment variable.
Questionable operations largely relate to the concept of a key being secure. A private or
secret key is considered insecure if there is some reason for believing that its value may
be available outside the HSM. Public keys are never considered insecure; by definition
they are intended to be public.
An explicitly insecure PKCS #11 key is one where CKA_SENSITIVE is set to false. If an
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).
An additional virtual slot may be returned (with the label of accelerator), depending on
the value given to the variable CKNFAST_NO_ACCELERATOR_SLOTS (described in
CKNFAST_NO_ACCELERATOR_SLOTS). Accelerator slots can:
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
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-2 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.
The NFAST_NFKM_TOKENSFILE environment variable must also be set in the cknfastrc file to
the location of the preload file (see Environment variables).
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_FAKE_ACCELERATOR_LOGIN
• CKNFAST_HSM_POOL
• CKNFAST_LOADSHARING
• CKNFAST_LOAD_KEYS
• CKNFAST_NO_ACCELERATOR_SLOTS
• CKNFAST_NO_SYMMETRIC
• CKNFAST_NO_UNWRAP
If you used the default values in the installation script, you should not need to change
any of these environment variables.
You can set environment variables in the file cknfastrc. This file must be in the /opt/nfast/
directory of the client.
The cknfastrc file should be saved without any suffix (such as .txt).
<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
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.
The default is ANSI X9.63 to match that of the PKCS #11 Specification.
ECDH derive with concatenate KDF SP800-56a can use the standard
PKCS #11 v3 CKD_SHA[x]_SP800_KDF values.
10.2.4.5. CKNFAST_DEBUG
This variable is set to enable PKCS #11 debugging. The values you can set are in the range
0 ‑ 11. If you are using NFLOG_* for debugging, you must set CKNFAST_DEBUG to 1.
Value Description
1 Fatal error
2 General error
3 Fix-up error
4 Warnings
5 Application errors
10 Details
10.2.4.6. CKNFAST_DEBUGDIR
If this variable is set to the name of a writeable directory, log files are written to the
specified directory. The name of each log file contains a process ID. This can make
debugging easier for applications that fork a lot of child processes.
10.2.4.7. CKNFAST_DEBUGFILE
You can use this variable to write the output for CKNFAST_DEBUG (Path name > file name).
10.2.4.8. CKNFAST_FAKE_ACCELERATOR_LOGIN
If this variable is set, the 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.9. CKNFAST_HSM_POOL
HSM Pool mode is determined by the state of the CKNFAST_HSM_POOL environment variable.
Set the environment variable to 1, y or Y to enable HSM Pool mode for the PKCS #11
HSM Pool mode takes precedence over load-sharing mode. HSM Pool mode only
supports module protected keys so do not use CKNFAST_NO_ACCELERATOR_SLOTS to disable
the accelerator slot.
10.2.4.10. CKNFAST_LOADSHARING
To use softcards with PKCS #11, you must have CKNFAST_LOADSHARING set
to a nonzero value. When using pre-loaded softcards or other objects,
the PKCS #11 library automatically sets CKNFAST_LOADSHARING=1 (load-
sharing mode on) unless it has been explicitly set to 0 (load-sharing
mode off).
10.2.4.11. CKNFAST_NO_ACCELERATOR_SLOTS
If this variable is set, the 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.12. CKNFAST_NO_SYMMETRIC
If this variable is set, the nShield PKCS #11 library does not advertise any symmetric key
operations.
10.2.4.13. 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
10.2.4.14. 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.15. CKNFAST_NVRAM_KEY_STORAGE
When this environment variable is set, the PKCS #11 library generates only keys in
nonvolatile memory (NVRAM). You must also ensure this environment variable is set in
order to delete NVRAM-stored keys.
10.2.4.16. CKNFAST_OVERRIDE_SECURITY_ASSURANCES
This variable can be assigned one or more of the following parameters, with an
associated value where appropriate, to override the specified security assurances in key
operations where this is deemed acceptable:
• all
• none
• tokenkeys
• longterm [=<days>]
• explicitness
• import
• unwrap_mech
• unwrap_kek
• derive_kek
• derive_xor
• derive_concatenate
• weak_<algorithm>
• shortkey_<algorithm>=<bitlength>
• silent.
Each parameter specified is separated by a semicolon. Using the command line, enter the
following to set the variable:
CKNFAST_OVERRIDE_SECURITY_ASSURANCES=<parameter1>;<parameter2>=<value3>
10.2.4.16.1. all
The all parameter overrides all security checks and has the same effect as supplying all
the other CKNFAST_OVERRIDE_SECURITY_ASSURANCES parameters except the none parameter.
Using the all parameter prevents the library from performing any of the security checks
and allows the library to perform potentially insecure operations. This parameter cannot
be used with any other parameters.
10.2.4.16.2. none
The none parameter does not override any of the security checks and has the same effect
as supplying no parameters. Using the none parameter allows the library to perform all
security checks and warn about potentially insecure operations without performing
them. This parameter cannot be used with any other parameters.
10.2.4.16.3. tokenkeys
The tokenkeys parameter permits applications to request that insecure keys are stored
long-term by the cryptographic hardware and library.
Some PKCS #11 applications create short‑term session keys as long‑term objects in the
cryptographic provider, for which strong protection by the HSM is not important.
Therefore, provided that you intend to create long‑term keys, the need to set this token
does not always indicate a potential problem because the longterm keys restriction is
triggered automatically. If you set the tokenkeys parameter, ensure that your Quality
Assurance process tests all of your installation’s functionality at least 48 hours after the
system was set up to check that the key lifetimes are as expected.
When the tokenkeys parameter is set, the effect on the PKCS #11 library is to permit
insecure Token keys. By default, any attempts to create, generate, or unwrap insecure
keys with CKA_TOKEN=true fails with CKR_TEMPLATE_INCONSISTENT and a log message that
explains the insecurity. When tokenkeys is included as a parameter for
CKNFAST_OVERRIDE_SECURITY_ASSURANCES, attempts to create, generate, or unwrap insecure
10.2.4.16.4. longterm[=days]
The longterm parameter permits an insecure key to be used for days after it was created.
Usually insecure keys may not be used more than 48 hours after their creation. If days is
not specified, there is no time limit.
A need to set this variable usually means that some important keys that
should be protected by the HSM’s security are not secure.
When the longterm parameter is set, the PKCS #11 API permits the use of the following
functions with an insecure key up to the specified number of days after its creation:
When the longterm parameter is set, the functions C_SignInit, C_VerifyInit, C_EncryptInit,
and C_DecryptInit check the CKA_CREATION_DATE against the current time.
10.2.4.16.5. explicitness
The import parameter allows keys that are to be imported into the HSM’s protection from
insecure external sources to be treated as secure, provided that the application requests
security for them. Usually, the library treats imported keys as insecure for the purposes of
checking the security policy of the application. Even though the imported copy may be
secure, insecure copies of the key may still exist on the host and elsewhere.
If you are migrating from software storage to hardware protection of keys, you must
enable the import parameter at the time of migration. You can disable import again after
migrating the keys.
Setting this variable at any other time indicates that the library regards
the key as secure, even though it is not always kept within a secure
environment.
When the import parameter is set, the PKCS #11 API treats keys that are imported through
C_CreateObject or C_UnwrapKey as secure (provided there is no other reason to treat them
as insecure). By default, keys which are imported through C_CreateObject or C_UnwrapKey
without this option in effect are marked as being insecure. Only the setting of the
parameter at the time of import is relevant.
10.2.4.16.7. unwrap_mech
The unwrap_mech parameter allows 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.16.8. unwrap_kek
When a key is transferred into the HSM in encrypted form, the key is usually treated as
insecure unless the key that was used for the decryption only allows the import and
export of keys and not the decryption of arbitrary messages. This behavior is necessary
to prevent an unauthorized application from simply decrypting the encrypted key
instead of importing it. However, because PKCS #11 wrapping mechanisms are insecure,
all unwrapping keys have CKA_DECRYPT=true.
By default, keys that are unwrapped with a key that has CKA_DECRYPT permission are
considered insecure. When the unwrap_kek parameter is set, the PKCS #11 API considers
10.2.4.16.9. derive_kek
By default, keys that have been derived by using CKM_DES3_ECB_ENCRYPT_DATA with a key
that has CKA_ENCRYPT permission are considered insecure. However, when the derive_kek
parameter is set, the PKCS #11 API considers keys that are derived with a key that has
CKA_ENCRYPT permission as secure (provided that there is no other reason to treat them as
insecure).
10.2.4.16.10. derive_xor
Normally, you can only use only extractable keys with CKM_XOR_BASE_AND_DATA and, on
unextractable keys, only CKM_DES3_ECB_ENCRYPT_DATA is allowed by CKA_DERIVE. However,
when the derive_xor parameter is set, the PKCS #11 API also allows such functions with
keys that are not extractable and treats them as secure (provided that there is no other
reason to treat them as insecure).
10.2.4.16.11. derive_concatenate
Normally, you can only use session keys with CKM_CONCATENATE_BASE_AND_KEY for use with
the operation C_DeriveKey. However, when the derive_concatenate parameter is set, the
PKCS #11 API also allows such functions with keys that are long term (token) keys. The
PKCS #11 API treats these keys as secure, provided there is no other reason to treat them
as insecure. Even if the all parameter is set, if you do not include the
CKA_ALLOWED_MECHANISMS with CKM_CONCATENATE_BASE_AND_KEY, this C_DeriveKey operation will
not be allowed.
10.2.4.16.12. weak_<algorithm>
The weak_<algorithm> parameter allows you to treat keys used with a weak algorithm as
secure. For example, DES is not secure, but setting the parameter weak_des means that
such keys are considered secure. You can apply the weak_<algorithm> parameter to all
keys that have a short fixed key length or whose algorithms have other security
problems. As a guide, weak algorithms are those whose work factor to break is less than
approximately 80 bits.
10.2.4.16.13. shortkey_<algorithm=bitlength>
10.2.4.16.14. silent
The silent parameter turns off the warning output. Checks are still performed and still
return failures correctly according to the other variables that are set.
If the problem is not that a questionable operation has been permitted because of a
setting in CKNFAST_OVERRIDE_SECURITY_ASSURANCES it could be that an operation has failed. In
such a case, the setting required to authorize the operation is noted.
By default, these messages are sent to stderr. If a file name has been specified in the
CKNFAST_ASSURANCE_LOG environment variable, diagnostic messages are also written to this
file.
10.2.4.17. CKNFAST_SEED_MAC_ZERO
Set this variable to use zero padding for the Korean SEED MAC mechanisms (CK_SEED_MAC
and CKM_SEED_MAC_GENERAL). If this variable is not set, or is set to n, then the SEED MAC
mechanisms will use the default PKCS #5 padding scheme.
10.2.4.18. CKNFAST_SESSION_THREADSAFE
You must set this environment variable to yes if you are using the Sun PKCS #11 provider
when running nCipherKM JCA/JCE code.
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.20. 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 PKCS #11 supports.)
If neither mutex callbacks nor CKF_OS_LOCKING_OK is passed, this variable is ignored. Only a
single connection is used because the application must be single threaded in this case.
10.2.4.21. CKNFAST_LOAD_KEYS
This variable will load private objects at C_Login time, rather than at the first
cryptographic operation.
10.2.4.22. CKNFAST_WRITE_PROTECTED
Set this variable to make your OCS or softcard (token) write-protected. If a token is
write‑protected, you cannot:
This environment variable does not prevent you from deleting an object
from your token.
10.2.4.23. 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.
If you insert a blank card or an unrecognized card (for example, an Operator Card
from a different Security World or an Administrator Card), this is indicated in the
Status column. The corresponding slot number is not available.
If there is no card in a slot, ckcheckinst displays No token present beside the relevant
slot numbers.
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.
If you wish to use the SEE to run applications, it must have been
ordered and enabled as described in Enabling optional features.
Check the documentation that your application vendor supplies for information about
any signatures that you may require to set up and use the application, as well as for any
other installation and configuration information.
CodeSafe applications are standalone applications, but each CodeSafe C application can
consist of multiple parts, and its installation can include several configuration steps. For
instructions on installing and configuring each application, see your application vendor’s
documentation.
1. Ensure that the SEE machine for the application is in the directory /opt/nfast/
custom-seemachines 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).
Before configuring a module to autonomously run an SEE machine and accept updates
using the RFS, that module must first be set up to accept remotely-pushed
configurations, see Configuring auto push.
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.
For CodeSafe Direct, the userdata file must be packed as a SAR file.
The remote module will load the new SEE machine in place of any
existing SEE machine. If no machine_file value is set, then pushing
the config file will remove any existing machines on the unit.
behaviour=push
push_interval=1
These settings control how and where log messages are written.
Using the example above, messages will be written to the
system.log and hardserver.log files of the module, which are
accessible using the remote file system. You may wish to revise the
push_interval to a higher value once the Connect has successfully
loaded the new SEE machine.
4. Run nopclearfail to clear the module, followed by enquiry to check that the module is
ready.
5. Run cfg-pushnethsm to push the new config file to the module.
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 an nShield
Connect for more about changing the mode.
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.
a. Check whether the Remote Operator feature is enabled by running the enquiry
command-line utility. The output for the HSM must include Remote Share in its list
of Features.
b. Check whether the HSM has permission to allow loading of Remote OCSs by
selecting Security World mgmt > Display World info. The output from this
selection must show that flags are set to include ShareTarget, as in the following
example:
This information can also be output by running the nfkminfo command-line utility.
Ensure that your network firewall settings are correct. See the Installation Guide for more
about firewall settings.
11.2.3.1. Configuring slot import and export using the Connect front panel
When the HSMs have been configured, follow these steps to configure slot import and
export:
You can check that the slot was imported successfully by, on the unattended machine,
running the command:
If slot importation was successful, the output from this command includes the line:
The R in the Flags column indicates that slot 2 is a Remote Operator slot.
Applications running on the unattended machine can now use slot 2 to load OCSs that
are presented to slot 0 on the attended machine. If any of the cards require a pass
phrase, the application must pass this to the unattended HSM in the usual way.
For the application to be able to load the OCS onto the unattended HSM, it must be able
to read the card set files associated with the OCS from the local Key Management Data
directory. If the OCS was created on a different machine, you must copy the card set files
in the Key Management Data directory onto the unattended machine (either manually or
by using client cooperation; for more information, see Setting up client cooperation).
The same applies for any keys that an application on an unattended HSM needs to load
but that were not generated on that machine.
For the most part, card sets and keys intended to be used with Remote Operator are
similar to their ordinary, non-Remote counterparts.
To check whether the card in a slot is from a Remote OCS, select Security World mgmt >
Display World info from the main menu or run the nfkminfo command-line utility. The
output displays slot section information similar to the following:
In this example output, the RemoteEnabled flag indicates the card in the slot is from a
Remote OCS.
If you create a Remote OCS on the attended machine, then you must
copy the Key Management Data files on the attended machine to the
unattended machine.
Both the attended and unattended HSMs must be in the same Security
World before you generate a Remote OCS. If you are not using client
cooperation, the Key Management Data directories must be manually
synchronized after you generate the Remote OCS.
After an OCS has been inserted into a Remote Operator slot, for each
time a given card is inserted, the module only allows each share on that
card to be read one time. If there is a second attempt to read shares
from that card before the card is reinserted, the operation fails with a
UseLimitsUnavailable error.
If you already have an OCS-protected key that you want to use, but the protecting OCS
is not a Remote OCS, you can use KeySafe to protect the key under a new Remote OCS
if the key was originally generated with the key recovery option enabled.
However, if the key was not generated with key recovery enabled, you cannot protect it
under a different OCS. In such a case, you must generate a new key to be protected by a
Remote OCS.
After you have configured the application, start it remotely from the attended machine.
Insert cards from the OCS into the attended machine’s exported slot as prompted.
11.3.5. Managing Remote Operator slots using the unit front panel
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.
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.
• 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.
Assigned Keys provide for more restrictive controls which are enforced with ACLs. An
Assigned Key is a secret key with a Key Generation Certificate and with the ACL
configuration defined in nShield Solo XC Common Criteria Evaluated Configuration
Guide, specifically:
These properties of an Assigned Key enable the sole control that’s required for a secret
key used to create a digital signature.
A General Key is one that does not meet the criteria for an Assigned Key.
For both Assigned and General Keys in a Common Criteria CMTS Security World it is not
possible to export or import as plain text. This is enforced by the HSM.
The ACL configuration defining an Assigned Key is described in the nShield Solo XC
Common Criteria Evaluated Configuration Guide. Determination of the Assigned status of
a key uses the nfkmverify utility and the Key Generation certificate recorded in the key
when it was created.
The generatekey and mkaclx utilities have been enhanced to offer support for generating
Assigned Keys, see Key generation options and parameters for generatekey and the online
When you attempt to generate keys for a Security World that complies with FIPS 140-2
Level 3, you are prompted to insert an Administrator Card or Operator Card. You may
need to specify to the application, the slot you are going to use to insert the card. You
need to insert the card only once in a session.
For softcard protected key generation, you must use an Operator Card
Set.
Generating a key creates both a key and a certificate request for the following
application types:
• 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 and
lowercase letters; it cannot contain spaces, underscores (_), or hyphens (-).
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:
• --generate option specifies that this instance of generatekey is generating a key. Other
options can be specified to perform tasks such as importing or retargeting keys. To
see a list of options run the command generatekey --help.
• the <APPNAME> parameter specifies the name of the application for which the key is to
be generated. For details of the available application types (APPNAME), Key application
type (APPNAME).
• The <NAME>=<VALUE> syntax is used to specify the properties of the key being
generated. For details of the available application types (APPNAME), see Key properties
(NAME=VALUE).
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.
In interactive mode, generatekey prompts you for any required parameters or actions that
have not been included in the command. When you give the command:
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.
Although it is not explicitly specified, the created key is recoverable by default if OCS
and softcard replacement is enabled for the Security World.
1. Start KeySafe. (For an introduction to KeySafe and for information on starting the
software, see Using KeySafe.)
2. Click the Keys menu button, or select Keys from the Manage menu. KeySafe takes
you to the Keys panel, which shows the keys in the Security World.
3. Click the Create button to open the Generate Key panel.
4. Select an application with which you want to use your key from the list, and then
click the Next button. KeySafe takes you to the Key Generation Parameters panel.
5. Select and enter your desired parameters for key generation.
The types of information that you need to provide on the Key Generation
Parameters panel differs slightly depending on the application you selected on the
Generate Key panel.
6. When you have supplied your desired key generation parameters, click the Commit
button.
We recommend that you do not store keys in NVRAM unless you must
do so to satisfy regulatory requirements. NVRAM key storage was
introduced only for users who must store keys within the physical
boundary of a module to comply with regulatory requirements.
NVRAM-stored keys provide no additional security benefits and their
use exposes your ACS to increased risk. Storing keys in nonvolatile
memory also reduces load-balancing and recovery capabilities.
Because of these factors, we recommend you always use standard
Security World keys unless explicitly required to use NVRAM-stored
keys.
When you generate an NVRAM-stored key, you must have sufficient nonvolatile memory
available in the module or the command fails.
We provide the nvram-backup utility to enable the copying of files, including NVRAM-
stored keys, between a module’s nonvolatile memory and a smart card.
• RSA keys in PEM-encoded PKCS #1 format (from a file). The PEM key that contains
the key to import must not require a pass phrase.
• DES, DES2 and Triple DES keys (entered in hex).
You cannot import keys into a Security World that complies with FIPS
140-2 Level 3. Attempting to import keys into a FIPS 140-2 Level 3
Security World returns an error.
Option Description
<APPNAME> This option specifies the name of the application for which the
key is to be imported. This must be an application for which
generatekey can generate keys.
For RSA keys, you can include pemreadfile=filename in the command to specify the file
name of the PEM file that contains the key. Otherwise, you are prompted for this
information during import.
In interactive mode, you are prompted for any required parameters or actions that have
not been included in the command:
• Enter parameters, as requested. If you enter a parameter incorrectly, the request for
that information is repeated and you can re-enter the parameter.
• If you want to protect the key with an OCS, you are prompted to insert the relevant
cards and input pass phrases, as required.
• If prompted, insert an Administrator Card or an Operator Card from the current
Security World.
To import an RSA key stored in /opt/projects/key.pem for use with an nShield native
application and protect it with the Security World, use the command:
In this example, generatekey requires you to input RSA for the key type.
Although not explicitly specified, this key is, by default, recoverable if OCS and softcard
replacement is enabled for the Security World.
1. Start KeySafe. (For an introduction to KeySafe and for information on starting the
software, see Using KeySafe.)
2. Click the Keys menu button, or select Keys from the Manage menu. KeySafe takes
The types of information that you need to provide on the Key Import Parameters
panel will differ slightly depending on the application you selected on the Import
Key panel.
6. When you have supplied parameters for the key that you want to import, click the
Commit button.
7. If you choose to import a key that is protected by a smart card, KeySafe takes you to
the Load Operator Card Set panel. Follow the onscreen instructions, inserting the
required number of Operator Cards and supplying any pass phrases as needed.
8. KeySafe displays a message indicating that the key has been successfully imported.
Click the OK button.
9. KeySafe returns you to the Import Key panel, from which you can import another key
or choose another operation.
generatekey --list-apps
When you retarget a key, generatekey does not remove the original key
from the Security World. If required, you can use KeySafe to discard the
original key.
When you retarget a key, you cannot change its protection method. You cannot change
the key from module-protected to card-protected, or from card-protected to module-
protected.
In this command:
Option Description
If generatekey cannot identify the key type for retargeting, you are prompted to specify
the key type. Input the key type and press Enter.
To view keys:
1. From the main menu, select Security World mgmt > Keys > List keys.
2. Select the application to which the key belongs.
3. Select a key to view its full details.
4. If you wish, select Verify key ACLs to verify the key’s ACL.
1. Start KeySafe. (For an introduction to KeySafe and for information on starting the
software, see Using KeySafe.)
2. Click the Keys menu button, or select Keys from the Manage menu. KeySafe takes
you to the Keys panel, which lists all the keys in the Security World on this client
computer. It displays the name of the key, the application for which it was created,
the protection method that was used and whether the key is stored in NVRAM.
If you click a key’s listing, KeySafe displays additional information about that key, for
example, the application with which the key is used, whether or not the key is
recoverable, and the key’s name, creation date, hash, instance, and copy ID.
nfkminfo -k [<APPNAME>[<IDENT>]]
nfkminfo -l [<APPNAME>[<APPNAME>...]]
The -k|--key-list option lists keys only. The -l|--name-list option lists keys and their
names.
• custom
• embed (currently only usable with your own provider or provider from a previous
nShield release)
• pkcs11
• kpm
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:
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.
12.7.1. Usage
To verify the key generation certificates from the command line, run the command:
nfkmverify [-f|--force] [-v|--verbose] [-U|--unverifiable] [-m|--module=MODULE] [appname ident [appname ident [...]]]
-C|--certificate This option checks the original ACL for the key using
the key generation certificate. This is the default.
-R|--recov This option checks the ACL of the key loaded from the
recovery blob.
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.
• 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.
By default, KeySafe uses the same mechanisms and supports the same
features and applications as the generatekey utility.
After you have set up the path, check that you are using the
correct Java version by running java with the -version option.
Example:
>>java -version
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
See the Installation Guide for more about ports and firewall
settings.
Start KeySafe by running the /opt/nfast/bin/ksafe script (assuming you installed the
Security World Software in the default /opt/nfast/ directory).
A.3.1. Sidebar
The sidebar provides access to different parts of the KeySafe application (with the menu
buttons) and also displays information about both the current Security World and your
module or modules (with the Module Status tree).
The options listed below are also available from the Manage menu.
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.
• 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.
• [.gui]Manage*
◦ [.gui]Introduction* - opens the Introduction panel. See Introduction button.
◦ [.gui]World* - opens the World Operations panel. See World button.
◦ [.gui]Card sets* - opens the List Operator Card Sets panel. See Cardsets button.
◦ [.gui]Softcards* - opens the List Softcards panel. See Soft Cardsets button.
◦ [.gui]Keys* - opens the Keys panel. See Keys button.
• [.gui]Help*
◦ [.gui]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.
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:
When the Advanced node is expanded, the following additional 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
For FIPS 140-2 Level 3 Security Worlds, a FIPS Auth Loaded entry
shows if an Administrator Card or Operator Card has been inserted
to authorize an operation that requires a FIPS key.
The Module status tree has an Advanced folder that shows the following details when
expanded:
• ESN — the module’s electronic serial number (ESN), which is a unique identifier. You
must quote a module’s ESN if you need to contact Support. Keep a record of the
ESN(s) associated with your module(s).
• the HSM type and model number
• Firmware version — the version of the module’s firmware
• Has RTC — whether the module has a Real Time Clock (RTC)
• Has NVRAM — whether the module has nonvolatile memory (NVRAM).
• RO Compatible —
• RO Permitted —
On the next panel, the Commit button executes an operation, while the Back button
returns to the previous panel. For example, on the Erase Module panel, clicking the
Commit button will erase the module, while clicking the Back button will return to the
World Operations panel.
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).
A.4. Errors
If KeySafe detects an error from which it cannot recover, it may display a Fatal Error
message.
These utilities exist in the bin subdirectory of your Security World Software installation.
Unless noted, all utilities have the following standard help options:
ncdate View, set, and update the time on a module’s real-time clock.
ncversions Obtain and verify the versions of the Security World Software
components that are installed. This utility lists the following
information:
nfdiag Obtain information about the module and the host on which it
is installed. This diagnostic utility can save information to
either a ZIP file or a text file.
nopclearfail Clear an HSM, put an HSM into the error state, retry a failed
HSM, or change the HSM mode.
All the listed utilities, except the floodtest utility, are supported only on
FIPS 140‑2 Level 2 Security Worlds.
ncthread-test Stress test modules and test nCore API concurrent connection
support.
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.
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.
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.
If you have installed Cipher Tools, you can use the following additional PKCS #11 utilities.
For more information about these utilities, see the Cryptographic API Integration Guide.
ckinfo View PKCS #11 library, slot, and token information. Use this
utility to verify that the library is functioning correctly.
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.
Options include:
nethsmenroll Edit the local hardserver configuration file to add the specified
nShield Connect unit. As an alternative to hand‑editing a
client’s configuration file, you can run this utility on a client to
configure it to access an nShield Connect.
• nethsm_imports.
• Configuring the unit to use the client.
• nethsmenroll.
trial Test the nCore API commands. You can use this utility
interactively or from a script file.
C.1. Overview
The preload utility loads persistent cryptographic objects (keys/OCS/softcards) onto a
chosen set of modules, then makes those objects available for use by applications. This
removes the need for applications to load keys/cards themselves, and allows for easy
sharing of keys/cards between multiple applications. Additionally, preload can manage
keys, such that they are reloaded/maintained on modules to provide high availability.
Preloading is achieved via keys/cardsets being loaded, then once loaded the IDs of these
objects are recorded persistently to a file (the preload file), which can be read via
another application sharing the same session, and subsequently used.
Keys/cardsets must have previously been created before they can be preloaded, and all
modules participating in a preload session must be in the same security world.
The preload binary can be found in /opt/nfast/bin. This binary calls the preload.py script
found in /opt/nfast/python/scripts
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 only exception to this is the --list-admin option that does not
require a command.
The preload session remains open, and thus the preloaded keys remain loaded, as long as
at least one instance of preload continues to run. If/when the final preload instance
terminates, all loaded objects will be cleaned up.
Example showing a single key, of type simple, being loaded and then an application
being launched:
Argument Effect
-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 Load keys with name matching PATTERN. Use * for
-pattern=PATTERN wildcard.
-R, --reload-everything Reload keys and tokens that are already loaded.
--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
generation ….
/tmp/nfpriv_<username>/default
This location can be changed by using the command line option -f PRELOAD_FILE,
--preload-file=PRELOAD_FILE.
In order to preload a softcard and the corresponding keys being protected by said
softcard the -s or --softcard-name arguments can be used.
The -s option can be used with the softcard name or the hash of the softcard:
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.
Available admin keys are NSO, M, RA, P, NV, RTC, FIPS, MC, RE, DSEE, FTO.
C.6.2. Loading
Admin keys can be loaded using the --admin=KEYS command line option, supplying the
value --admin=ALL to load all available admin keys. Note that admin key loading will
require an ACS card being present in a slot of each module that is to be used.
Also note that the logical token of the admin key is preloaded alongside the key itself.
E.G. kfips and ltfips.
When preload is invoked with the --high-availability or -H option, it does the following
differently:
1. Whenever preload loads a key onto the HSMs, it creates a Merged Key to represent
the set of (HSM, key ID) pairs. Applications will then use these merged IDs to address
the keys.
◦ As discussed below, this in itself provides failback, resilience and increased
availability: the Merged Key ID remains usable even if some HSMs fail or are
removed from the security world.
2. For as long as preload is running, it does the following repeatedly, once per polling
interval:
◦ Consult the hardserver to get a list of operational HSMs which are in the relevant
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.
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 above section on using preload)
Merged Key IDs (just like single-key IDs) are shared between multiple
instances of preload that are invoked by the same client (i.e. using the
same ClientID). As such, applications must ensure that they perform no
operations that delete or replace the merged key ID, or alter the keys
that are part of that merged key ID.
Once per interval, if preload detects modules (new or existing) without the relevant
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:
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
e.g.
Preload can also log to a file, this behaviour is separate from stderr logging. Therefore we
can disable logging or log to stderr and/or a file.
To disable stderr logging, use the command line option -S. To enable file logging use the
command line option -l.
To change the file location, use the command line option --log-file=FILE.
• 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
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
Variable Description
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
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.
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
pkcs11-sam Logs all security assurance messages from the PKCS #11
library.
pkcs11 Logs all other messages from the PKCS #11 library.
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.
If none of the four environment variables are set, the default behavior is
to log nothing, unless this is overridden by any individual library. If any
of the four variables are set, all unset variables are given default values.
To produce PKCS #11 debug output, the CKNFAST_DEBUG variable can be a given value from
1 through to 11, where the greater the value the more detailed debug information is
provided. A value of 7 is a reasonable compromise between too little and too much
debug information. A value of 0 switches the debug output off.
This environment variable takes a colon-separated list of categories on which to filter log
messages (categories may contain the wildcards characters * and ?).
The following table maps PKCS #11 debug level numbers to the corresponding
NFLOG_SEVERITY value:
0 DL_None NONE
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.
E.2.1.1. Usage
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
are using which any 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 Support ticket number When you contact Support you are supplied with a Support
(if you have one) ticket 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 Include the appropriate country and any region code for your
number contact telephone number.
any additional By default, nfdiag asks if you want to supply any additional
diagnostic file(s) diagnostic files. If you do not want to supply additional
diagnostic files, type N, or Enter to continue.
• Type Y.
• When prompted, supply the name of the file to be
attached. Attached files must be in plain text format.
• After you have supplied the name of a file to attach, nfdiag
asks again if you want to supply any additional diagnostic
files. Repeat the process to attach additional files.
• When you do not want to attach any more files, type N, or
Enter to continue.
Supplying this information helps nfdiag capture as much relevant information as possible
for any problem report to Support. As you supply information at each prompt in turn,
press Enter to confirm the information and continue to the next prompt. Information you
supply cannot extend over multiple lines, but if you need to supply this level of
information, you can include it in additional attached files, as described.
By default, nfdiag runs in verbose mode, providing feedback on each command that it
executes and which log files are available. If the system is unable to execute a command,
the verbose output from nfdiag shows where commands are stalling or waiting to time
out.
E.2.1.2. Output
After you have finished supplying information for each required prompt, nfdiag generates
a plain text output file and displays its file name.
If the file opt/nfast/log/logfile exists, nfdiag automatically includes this file in its output.
If the file opt/nfast/log/logfile does not exist, nfdiag warns you that it could not process
this file. This warning does not affect the validity of the generated output file.
Because the contents of the output file are plain text, they are human readable. You can
choose to view the output file to ensure no sensitive information has been included.
The nfdiag utility does not capture any pass phrases in the output file.
You view the tamper log using the nShield Connect front panel, by selecting System >
E.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>]]
-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
...
No Pre-Loaded Objects
E.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 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 pass phrase is not required:
!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.
PINRecovery This indicates that the Security World has the pass phrase
replacement feature enabled.
FTO This indicates that the Security World has an FTO delegation
key.
!FTO This indicates that the Security World has no FTO 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).
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
Assigned Keys
E.2.2.2.2. Module
generation
state
Unknown This indicates that the HSM’s state could not be determined.
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.
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).
E.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
These are flags describing the capabilities of the slot. Single letters in parentheses are
the flag codes reported by the slotinfo utility:
0x40000 ® RemoteSlot
This indicates that the slot is a Remote Operator slot that has
been imported from a remote HSM.
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).
flags
This displays pass phrase if the smart card requires a pass phrase.
shareno
This indicates the number of the card within the card set.
shares
If the card in the slot is an Operator Card, no values are displayed for shares.
If the card in the slot is an Administrator Card, values are displayed indicating what key
shares are stored on the card. Each share is prefixed with the letters LT (Logical Token),
and the remaining letters identify the key (for example, the value LTNSO indicates that a
share of KNSO, the Security Officer’s key, is stored on the card).
error
This indicates the error status encountered if the smart card could not be read:
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
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(dis This indicates that the card in the slot does not have pass
abled) phrase replacement enabled. This is always true if pass phrase
replacement is disabled for the Security World.
PINRecoveryRequired(enab This indicates that the card in the slot does have pass phrase
led) 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
To see the list of tests available in a particular suite, run a command of the form:
For example, to list all the signing tests, run the command:
In the output, each listed test in the suite is identified with a number.
• 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.
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
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.
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.
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
E.2.4.1. Usage
E.2.4.2. Output
Running the stattree utility displays a snapshot of statistics currently available on the
host machine. Statistics are gathered both by the hardserver (relating to the server itself,
and its current clients) and by each attached HSM.
Times are listed in seconds. Other numbers are integers, which are either real numbers, IP
addresses, or counters. For example, a result ‑CmdCount 74897 means that there have been
74,897 commands submitted.
+PerModule:
+#1:
+ModuleObjStats:
-ObjectCount 5
-ObjectsCreated 5
-ObjectsDestroyed 0
+ModuleEnvStats:
-MemTotal 15327232
-MemAllocKernel 126976
-MemAllocUser 0
+ModuleJobStats:
-CmdCount 169780
-ReplyCount 169778
-CmdBytes 3538812
-ReplyBytes 4492764
-HostWriteCount 169772
-HostWriteErrors 0
-HostReadCount 437472
-HostReadErrors 0
-HostReadEmpty 100128
-HostReadDeferred 167578
-HostReadTerminated 0
-PFNIssued 102578
-PFNRejected 1
-PFNCompleted 102577
-ANIssued 1
-CPULoadPercent 0
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:
Category Contains
ModuleJobStats This tag holds statistics for the Security World Software
commands (jobs) processed by this HSM.
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.
CmdBytes The total length of all the command blocks sent for
processing.
ReplyBytes The total length of all the reply blocks received after
completion.
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.
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.
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.
HostWriteNoMemory Not currently reported by the HSM. Write failures due to a lack
of memory are reflected in HostWriteErrors.
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.
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.
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.
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.
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.
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.
SystemFans The fan speed (RPM) for each fan in the HSM.
Therefore, after restoring power to a module, you must reload any keys that had been
loaded onto it before it lost power. After reloading, the KeyIDs are different.
Likewise, after restoring power to a module, you must reload any cards that were loaded
onto it before it lost power.
If you are using multiple nShield modules in the same Security World,
and have the same key (or keys) loaded onto each module as part of a
load-sharing configuration, loss of power to one module does not
affect key availability (as long as at least one other module onto which
the keys are loaded remains operational). However, in such a multiple-
module system, after restoring power to a module, you must still reload
any keys to that module before they can be available from that module.
The module configuration files are stored on the internal file system of the nShield
Connect. They are updated automatically when the nShield Connect is configured from
the front panel. The configuration files are also exported automatically to the remote file
system, where they can be edited manually and reloaded on the nShield Connect, if
required. For more information, see 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
You can also save backup copies of configuration files in this directory.
In this path, ESN is the electronic serial number of the network nShield Connect from
which the files were exported. This directory contains the master configuration file config,
The remote file system information is also contained in the client configuration file
section remote_file_system.
Lines starting with a # character are comments and are ignored. Some comments that
document the configuration options are generated by the configuration process. You can
add your own comments, but in some cases they may later be overwritten.
A configuration file begins with a single line that specifies the version of the file syntax.
This syntax-version line has the format:
syntax-version=n
In this syntax-version line example, n represents the version of the syntax in which the
file is written. The system can process a file with a lower syntax version than the one it
uses, but not one with a higher version.
After the syntax-version line, the rest of the configuration file consists of sections that
can be edited to control different aspects of nShield Connect or client behavior. Each
section begins with its name in square brackets, as in this example:
[slot_imports]
Module configuration files and client configuration files have some sections in common,
and some specific to the type of file:
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 Connect 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 the fields in an entry.
Strings are case sensitive in the section names and field names.
F.4.1. nethsm_settings
The nethsm_settings section defines settings specific to the nShield Connect. The section
contains the following fields:
Field Description
enable_impath_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).
F.4.2. nethsm_eth
The nethsm_eth section defines the Ethernet interfaces for IPv4 for the nShield Connect.
Each interface is defined by an entry as follows:
netmask The net mask for the nShield Connect. The default is 0.0.0.0.
linkspeed This field specifies the link speed setting. It can be one of
auto/1Gb (nShield Connect only), 10BaseT, 10BaseT-FDX, 100BaseTX,
or 100BaseTX-FDX.
F.4.3. nethsm_eth_ipv6
The nethsm_eth_ipv6 section defines the Ethernet interfaces for IPv6 for the nShield
Connect. 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.
F.4.4. nethsm_gateway
The nethsm_gateway section defines the default IPv4 Ethernet gateway for the nShield
Connect. There is one field, as follows:
gateway The IPv4 address of the gateway for the nShield Connect. The
default is 0.0.0.0.
F.4.5. nethsm_gateway_ipv6
The nethsm_gateway_ipv6 section defines the default IPv6 Ethernet gateway for the nShield
Connect. There is one field, as follows:
Field Description
gateway The IPv6 address of the gateway for the nShield Connect. The
default is ::.
F.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.
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.
F.4.7. nethsm_route
The nethsm_route section defines the static IPv4 routes for the nShield Connect. Each
route is defined by an entry as follows:
Field Description
gateway The IPv4 address of the gateway for the route. The default is
0.0.0.0.
F.4.8. nethsm_route_ipv6
The nethsm_route_ipv6 section defines the static IPv6 routes for the nShield Connect. 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.
F.4.9. nethsm_eth1_enable
The nethsm_eth1_enable section defines if the eth1 interface is enabled.
Field Description
F.4.10. nethsm_bond_enable
The nethsm_bond_enable section defines if the bond interface is enabled.
Field Description
F.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
F.4.12. cosmod
The cosmod section defines the input configuration for the nShield Connect. The
configuration is defined by an entry as follows:
Field Description
keymap The selected layout for the keyboard connected to the nShield
Connect front panel. This value is either UK or US.
F.4.13. hs_clients
The hs_clients section defines the clients that are allowed to connect to the nShield
Connect. Each client is defined by an entry as follows:
Field Description
addr Either the IP address of the client or 0.0.0.0, ::, or blank if the
Connect is to accept clients identified by their keyhash instead
of their IP address.
keyhash The hash of the KNETI key that the client should present to
authenticate itself.
F.4.14. 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:
F.4.15. sys_log
The sys_log section defines how the nShield Connect logging works:
Field Description
behaviour The way the log is written. How the log is written is decided
by setting either of the following:
• log
• push
If log is set, the log is written only to the file system of the
nShield Connect. It is lost if the nShield Connect is rebooted.
Logging stops when the file system is full. If push is set, the log
is automatically appended to the log file in the RFS or remote
syslog server at the interval specified in push_interval.
F.4.16. remote_sys_log
The remote_sys_log section defines a remote syslog server to send the nShield Connect
logging (system.log and hardserver.log) to.
Field Description
remote_syslog_ip The IP address of the remote syslog server to send logs to. The
default is 0.0.0.0.
remote_sys_log_port The UDP port of the remote syslog server to send logs to. The
default is 514.
Field Description
• 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.
F.4.18. ui_lockout
The ui_lockout section defines whether you can lock the nShield Connect 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.
lockout_mode Controls front panel access to the nShield Connect. Set to:
• locked
• locked_lt
• unlocked
No UI lockout (default).
panel_poweroff This controls the function of the Power button on the nShield
Connect front panel when it is in operational mode. The
default setting of yes enables the Power button. When set to
no, the Power button is disabled.
F.5.1. server_settings
The server_settings section defines the settings for the client hardserver you can modify
while the hardserver is running.
• info
• notice
• client
• remoteserver
• error
• serious
• internal
• startup
• fatal
• fatalinternal
logdetail This field specifies the level of detail logged by the hardserver.
You can supply one or more flags in a space-separated list. For
more information about the flags, see the table below.
connect_maxqueue This field specifies the maximum number of jobs which can be
queued on the hardserver. The default is 4096: this is also the
maximum value. Setting connect_maxqueue to a high value allows
high throughput, but may cause long latency if the hardserver
goes down.
accept_keepidle This field specifies the number of seconds before the first
keepalive 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.
connect_command_block When the nShield Connect has failed, this field specifies the
number of seconds the hardserver should wait before failing
commands directed to that HSM with a NetworkError message.
For commands to have a chance of succeeding after the
nShield Connect has failed this value should be greater than
that of connect_retry. If it is set to 0, commands to an nShield
Connect are failed with NetworkError immediately. The default
is 35.
max_pci_if_vers This field specifies the maximum PCI interface version number.
If max_pci_if_vers is set to 0 (the default), there is no limit.
enable_remote_mode If this field is set to yes (the default value) in the module
configuration file, nShield Connect mode changing using the
nopclearfail utility is enabled. If set to no, mode changing
using the nopclearfail utility is disabled.
enable_remote_reboot If this field is set to yes (the default value) in the module
configuration file, the nShield Connect remote reboot using
the nethsmadmin utility is enabled. If set to no, remote reboot
using the nethsmadmin utility is disabled. 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 Connect 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_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.
Any changes made to these fields in the Connect module config file should be followed
by a reboot of the nShield Connect.
It is not 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 Connect configuration, the remote_port field of the
nethsm_imports section of the client-side hardserver config file must be updated to
match. The port number can also be specified with the -P parameter when running
nethsmenroll.
Field Description
impath_port This field specifies the port on which the hardserver listens for
incoming impath connections. The default is 9004. Setting
this field to 0 specifies that the hardserver does not listen for
incoming connections (do not set to 0 on an nShield
Connect).
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.
Any changes made to these fields in the Connect module config file should be followed
by a reboot of the nShield Connect.
It is not 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 Connect configuration, the remote_port field of the
nethsm_imports section of the client-side hardserver config file must be updated to
match. The port number can also be specified with the -P parameter when running
nethsmenroll.
Field Description
impath_port This field specifies the port on which the hardserver listens for
incoming impath connections. The default is 9004. Setting
this field to 0 specifies that the hardserver does not listen for
incoming connections (do not set to 0 on an nShield
Connect).
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.
F.5.4. 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
unix_socket_name This field specifies the name of the socket to use for non-
privileged connections on Linux. 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.
unix_privsocket_name This field specifies the name of the socket to use for privileged
connections on Linux. 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.
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.
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.
F.5.5. load_seemachine
The load_seemachine section of the hardserver configuration file defines SEE machines
that the nShield Connects connected to the client should load and, if required, start for
use by other clients. Each SEE machine is defined by the following fields:
Field Description
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.
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#.
pull_rfs This field specifies whether the SEE machine name and
userdata should be pulled from the RFS. The default is no: set
to yes to pull the SEE machine and userdata from the RFS
before loading on the remote nShield Connect.
Field Description
local_esn This field specifies the ESN of the local nShield Connect
importing the slot.
local_slotid This field specifies the SlotID to use to refer to the slot when it
is imported on the local nShield Connect. The default is 2.
remote_ip This field specifies the IP address of the machine that hosts
the slot to import.
remote_port This field specifies the port for connecting to the nShield
Connect.
remote_esn This field specifies the ESN of the remote nShield Connect
from which to import the slot.
remote_slotid This field specifies the SlotID of the slot to import on the
remote nShield Connect. The value of this field must be an
integer. The default is 0.
F.5.7. slot_exports
The slot_exports section defines the slots on the HSMs connected directly to the client
that the client hardserver should export for other network HSMs to import. Each local
slot has an entry for each network nShield Connect that can import it, consisting of the
following fields:
Field Description
local_esn This field specifies the ESN of the local nShield Connect whose
slot can be imported by a network nShield Connect.
local_slotid This field specifies the SlotID of the slot that is allowed to be
exported. The value must be an integer. The default is 0.
remote_ip This field specifies the IP address of the nShield Connect 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 Connect allowed to
import the slot. Leave the value blank to allow all permitted
nShield Connects in the Security World. The default is blank.
F.5.8. 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.
F.5.9. 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
F.5.10. 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.
F.6.1. module_settings
The module_settings section defines the settings for the nShield Connect that can be
changed while the hardserver is running. The section contains the following fields:
Field Description
esn This field specifies the electronic serial number of the nShield
Connect.
priority This field specifies the priority of the nShield Connect. The
value for this field can be an integer from 1 (highest) to 100
(lowest). The default is 100.
F.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:
F.6.3. nethsm_imports
The nethsm_imports section defines the network nShield Connects that the client imports.
It can also be set up by the nethsmenroll utility. Each nShield Connect is defined by the
following fields:
Field Description
remote_port This field specifies the port for connecting to the nShield
Connect.
remote_esn This field specifies the ESN of the imported nShield Connect.
keyhash This field specifies the hash of the key that the nShield
Connect should use to authenticate itself.
privileged The value in this field specifies whether the client can make a
privileged connection to the nShield Connect. The default is 0,
which specifies no privileged connections. Any other value
specifies privileged connections.
ntoken_esn This field specifies the ESN of this client’s nToken, if an nToken
is installed.
F.6.4. rfs_sync_client
This section defines which remote file system the client should use to synchronize its key
management data:
Field Description
remote_port This field specifies the port for connecting to the nShield
Connect.
The remote_file_system section defines a remote file system on the client by listing the
nShield Connects allowed to access the file system on this client. Each nShield Connect is
defined by an entry consisting of the following fields:
Field Description
remote_esn This field specifies the ESN of the remote nShield Connect
allowed to access the file system on this client.
keyhash This field specifies the hash of the key with which the client
must authenticate itself to the nShield Connect. The default is
40 zeros, which means that no key authentication is required.
native_path This field specifies the local file name for the volume to which
this entry corresponds.
volume This field specifies the volume that the remote host would
access to use this entry.
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.
If you upgrade from an earlier software version to v12 and are using
Remote Administration, you need to manually add the following
sections to your configuration file.
Field Description
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
RIPEMD160 N N HMACRIPEMD16 N
HMAC 0
SEED N N SEED N
1
Not FIPS 140-2 approved for encryption operations, but available for decryption
operations.
Diffie-Hellman Y Y DH or DHEx Y
DSA Y Y DSA Y
ECDH Y2 Y 2
ECDH or EC 3
Y
ECDSA Y4 Y 4
ECDSA or EC Y
ECIES N N ECDH or EC N
Ed25519 N N Ed25519 N
El Gamal Y Y DH Y
KCDSA N N KCDSA N
RSA Y Y RSA Y
X25519 N N X25519 N
1
Some insecure key sizes are non-FIPS 140-2 approved.
2
FIPS 140-2 approval is only for use with ECDH keys, not with EC keys, but see 3 for
exception.
3
FIPS 140-2 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-2 approval is only for use with ECDSA keys, not with EC keys.
• A module is only operating in a FIPS approved mode when it uses FIPS 140-2
approved algorithms, and the algorithms are used with keys of an FIPS approved key
length or elliptic curve.
These changes do not affect Security Worlds that were created to comply with FIPS 140-
2 Level 2, nor do they affect systems that use the nShield module to protect long-term
keys but perform encryption with session keys on the host (as is the case with the
nShield MSCAPI, and PKCS #11 libraries).
Some algorithms that are shown are not FIPS-approved for encryption
or signing operations but may still be available for decryption or
verification operations.
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. The FIPS CMVP certificates for nShield products can be
found at https://csrc.nist.gov/projects/cryptographic-module-validation-program/
validated-modules/search, and the Security Policy is linked from the FIPS CMVP
certificate.
These changes do not affect Security Worlds that were created to comply with FIPS 140-
2 Level 2, nor do they affect systems that use the nShield module to protect long-term
keys but perform encryption with session keys on the host (as is the case with the
nShield MSCAPI, and PKCS #11 libraries).
H.1. Architecture
Audit logging is implemented on the nShield Connect. The audit logging functionality is
on the embedded nShield Solo or nShield Solo XC card. The image below shows nShield
Connect or Connect XC implementation. The audit log entries are generated on the
module, the hardserver acts as a relay to a syslog infrastructure.
Given the architecture described above, the Audit Logging capability is implemented in
the HSM (embedded Solo/Solo XC in the case of a nShield Connect). This means that the
logging is at the level of nCore commands as processed by the HSM. The hardserver
layer implements a higher-level abstraction which is presented to application clients. The
information used to manage this such as Client Identifiers etc. is not available to the HSM
and therefore cannot be logged.
• 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.
The number of messages is dictated by the transport medium, the size of the digests, the
size of the signature and the size of other data contained in the message. There is a limit
to the size of messages that can be transported over syslog. The signature is performed
using a log signing key. This key is generated and the private half is held securely in the
HSM.
1. Audit Logging is set as enabled for this Security World and is recorded in the world
file.
2. The HSM is initialized and:
◦ 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 a new HSM is indoctrinated into an Audit Logging Security World the world file
specifies that this is an Audit Logging Security World. The same actions as for initializing
an HSM when the Audit Logging Security World was created are performed. This means
that:
• All HSMs in an Audit Logging Security World have Audit Logging enabled
• Each HSM has a distinct Audit Logging Signing Key.
The Audit Logging entries are delivered over syslog using UDP transport. This transport
must be configured before Audit Logging is enabled in order to collect the initial
messages. The following section on configuring syslog describe the steps necessary to
enable syslog for Audit Logging.
The Real Time Clock (RTC) on the HSM must be set and the setting
confirmed after creating the Security World or indoctrinating an HSM
into the Security World. The RTC on the HSM is used to timestamp
audit log entries.
Audit Logging is indicated by the presence of AuditLogging in the state line of the
command’s output. If Audit Logging was not enabled this line would show !AuditLogging.
This indication applies to the Security World.
The enquiry command shows the Audit Logging status of the HSMs.
The HSM’s Audit Logging status is indicated by the presence of AuditLogging in the active
modes line.
The following example shows the relevant entries in the hardserver configuration file.
Having set these entries it is necessary to restart the hardserver for them to be
recognized.
[auditlog_settings]
# Start of the auditlog_settings section
# Hardserver settings for audit logging.
# Each entry has the following fields:
#
# The port number Auditlogging server listens to .
auditlog_port=514
#
# IP Address of the Auditlogging server
auditlog_addr=WWW.XXX.YYY.ZZZ
#
# Copy auditlog to hardserver log. (default=no)
# auditlog_copy_hslog=ENUM
Field Description
auditlog_port This is the UDP destination port for Audit Logging syslog
messages. The default is 514.
auditlog_addr This is the IP address of the host to which the Audit Logging
syslog messages should be delivered. The default is 0.0.0.0.
auditlog_copy_hslog This indicates that the syslog messages from Audit logging
should be copied to the hardserver’s log file. This provides
some degree of redundancy but means that the hardserver’s
log file may grow significantly. The default is no.
It is recommended that the syslog transport is checked before creating an Audit Logging
Security World. This can be accomplished by sending a log message to the configured
host and port using a command such as logger if it’s available on your operating system,
and the implementation of this command is capable of sending messages to a syslog
server over UDP.
The PRI value of this header <134> indicates the facility local0 and a severity of info.
The syslog infrastructure used for Log distribution is out of the scope of this guide and
your responsibility to implement. Log distribution for Audit Logging uses syslog as the
transport medium which allows a standard protocol and message format to be used for
the Audit Logging messages. This transport is compatible with SIEM systems and the
wider syslog infrastructure in an organization can be used to further distribute or process
the log stream. There are many possible configurations of syslog deployment, 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:
H.5.1.1. rsyslog
rsyslog can be configured to not reformat messages using the following approach:
2. Apply this formatting template to the processing of Audit Logging messages. For
this example it is assumed that messages containing nCipher Security will be
persisted in the file /var/log/hsmauditlog. You can use any other selection mechanism
such as storing messages for a particular HSM as identified by its ESN in separate
files.
3. If the rsyslog server is going to be used as a relay, then the format needs to be
applied to any relay statements in the rsyslog configuration file and to any receivers
of the syslog message.
H.5.1.2. syslog-ng
syslog-ng does not appear to rewrite messages in the same way as rsyslog. Refer to the
syslog-ng documentation for information on formatting.
Parameter Description
• nShield Solo
• nShield Solo XC
• nShield Edge.
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.
Severity Description
1 nCore Commands
• Reboot events
• Secure channel establishment
• Signature Blocks
• Certifier Blocks
6 Shutdown messages
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
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
Name Description
tpbl Total Payload Block Length. This is the length of all Certifier
Block fragments.
Name Description
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.
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 Signature Block has name element ssign identifying it as a Signature Block. The gbc is
6 meaning this is the 7th Signature Block in this Reboot Session ID. The fmn is 31 and hcnt
is 10 meaning that this Signature Block covers messages 31 to 40. As Audit Logs are
generated this sequence will be repeated. Once this Signature Block has been received
and with the log signing public key available the signature on this Signature Block can be
verified and then the hashes of the individual log messages can be calculated and
compared with the hashes recorded in the Signature Block for the corresponding log
message to allow the detection of tampering.
The generatekey utility (see Key generation options and parameters) 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
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
Slot tokenslot
Slot tokenslot
LT Hash htok
SlotId tokenslot
SlotId tokenslot
DSAp3072s256
DSAp3072s256
Combination of AuditLogging and
UseFIPSApprovedInternalMechanisms
Combination of AlwaysUseStrongPrimes,
DisablePKCS1Padding, FIPSLevel3Enforcedv2
and CommonCriteriaCMTSRestrictions
Cmd_CreateSeeWorld
Cmd_SetSEEMachine
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
As an example, the following shows a post reboot log of Cmd_ClearUnit. In this excerpt, it
can be seen after the last fragment of the Certifier Block. A Signature Block is generated
after the reboot log entries.
The following example shows the notional traceback from a Cmd_Encrypt operation. This
command logs the nCore Key Hash KKKKKKK. Prior to this the Key was loaded onto the
HSM using Cmd_LoadBlob which correlates the nCore Key Hash with the ncore Hash of the
Logical Token that authorized loading the Key. Tracing further back we can identify the
shares used to reconstruct that Logical Token. In this example two shares are required
identified by share indices S1 and S2. The share index identifies a specific card in an OCS
cardset.
Cmd_Encrypt KKKKKKK
Cmd_LoadLogicalToken LLLLLLL
The basics of the verification approach is shown on the Audit Log Verification diagram.
/opt/nfast/python/examples/audit-log-verifier.py
This program requires the use of the nShield Python interpreter. This is necessary to
provide support for the nShield specific marshalling functions used to export the log
signing public key. The example verification program also requires the presence of an
nShield HSM accessible to the machine on which the verification is to be performed. This
is required to perform the cryptographic operations necessary to verify the log signing
public key and the Signature Blocks. This HSM does not need to be the same HSM on
which the logs were generated, nor does it need to be in a Security World.
The Audit Log verifier program is run with a command of the form:
Where:
Parameter Function
H.8.1.1. Results
Results from the Audit Log Verifier are written to several different files and saved in a
sub-directory called LogResult. See example below for more detail.
H.8.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=&LGAXS1nvgHElvXhk8RVT2lCK2NM
tXyD9OYTecVOaaBk=&MbJAk706yU2+QykWmtfnCV0lxn/enber8aJK3cZyxLg=&y2qxF5VGm/X/h6ZcZ5iOes7ZAFpqM/6ND8nAXzCM/bY=&kWjEaGIclJv494
A1ZcUgGHJko7AeKvUUqVimhfExioU= 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
The failed log messages should be reported in Tampered_logs.txt in the LogResult folder.
The verifier calls its parse function which segregates the messages based on ESN, and
Syslog may have gathered logs from multiple sources. As such, the verifier has a concept
of a logging world, which represents a set of logs, sigblocks and certblocks that belong
together, from a Security World. Based on Reboot Sequence ID, Sequence Number of the
Log event, Global block counter of the Signature block and Fragment index of the
Certifier block, a logging world is identified and a logging instance is created.
All records are thus given a log-instance number, such that records with the same
instance number belong together.
Each event can thus be uniquely identified via a tuple. For the log messages, signature
blocks and certifier blocks these are respectively (rsid and sequence number), (rsid and
gbc) and (rsid and findex).
The reconstruct_CBs function is then called to validate the certifier fragments (using calls
to an nShield HSM for crypto functionality). It then reconstructs the certifier blocks from
the certifier fragments.
This does not require the HSM to be in the same Security World as the
HSM that first generated the logs.
For any log instance one valid Certifier Block is enough to validate the events, so further
certifier blocks are ignored after the first.
Next the process_sbs function is called. Signature Blocks for a supplied ESN are validated
per log instance (once again via calls to the module for crypto functionality), using the
KAL value taken from the Certifier block previously.
The validated Signature block hashes are maintained as a dictionary of hashes with keys
as unique ids. These unique ids per instance are generated based on rsid and sequence
numbers.
The process_logs function is finally called. This generates the hash of each of the log
events and matches against hashes from corresponding signature blocks. Verified and
Tampered log events are then written to different files in the LogResult folder.
Additionally, the example verifier does not cope with fields that rotate back around to
zero when their max size is exceeded. (for example, gbk, rsid or seqno). Currently logs,
SBs and CBs are uniquely identified by (rsid and sequence number), (rsid and gbc) and
(rsid and findex). This means that, if any of those values rotate back around to zero, we
are no longer able to uniquely identify them. As a potential extension, RTC or line
number values could be used to solve this.
The example verifier does not detect missing/deleted log messages in the case where a
complete group of log messages are deleted, along with their corresponding
SignatureBlock. Given that the SeqNo field increases for each log message, spotting
missing SeqNos would reveal missing or deleted log messages. This is a potential
extension.
The example verifier expects a static, unchanging log file to be supplied to it. This would
be compatible with verifying a batch of log files at the end of each day, for example. A
possible extension would be to extend the verifier to cope with a live stream of logs,
continuously verifying them as they are generated.
For information about generating keys with the generatekey utility, see
Generating keys with the command line.
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-2 Level 3, or if you do not set
the ‑‑no‑verify option.
embed Specifying the embed application type generates a key for use
with older applications that integrate with the OpenSSL CHIL
engine and/or hwcrhk. Note, these interop libraries are no
longer provided as of v12.60.
You can use a key of the embed application type like a PEM-
format RSA/DSA key file, even though it is really a specially
encoded reference to a key stored in opt/nfast/kmdata/local.
This allows you to use an embed key when integrating with
applications that normally require software RSA keys. For
example, you can supply an embed key to the patched version
of OpenSSL we have provided so that it uses the module to
access the key rather than using its own built-in RSA
operations.
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).
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-ident When retargeting a key, the VALUE for from-ident specifies the
identifier of the key to be retargeted (as displayed by the
nfkminfo command-line utility).
hexdata The VALUE for hexdata specifies the hex value of DES or Triple
DES key to import. The hex digits are echoed to the screen
and can appear in process listings if this parameter is specified
in the command line.
ident The VALUE for ident specifies a unique identifier for the key in
the Security World. For applications of types simple, this is the
key identifier to use. For other application types, keys are
assigned an automatically generated identifier and accessed
by means of some application-specific name.
keystore The VALUE for keystore specifies the file name of the key store
to use. This must be an nShield key store.
keystorepass The VALUE for keystorepass specifies the password to the key
store to use.
paramsreadfile The VALUE for paramsreadfile specifies the name of the group
parameters file that contains the discrete log group
parameters for Diffie-Hellman keys only. This should be a PEM-
formatted PKCS#3 file. If a VALUE for paramsreadfile is not
specified, the module uses a default file.
pemreadfile The VALUE for pemreadfile specifies the name of the PEM file
that contains the key to be imported. When importing an RSA
key, this is the name of the PEM-encoded PKCS #1 file to read
it from. Password-protected PEM files are not supported.
plainname The VALUE for plainname specifies the key name within the
Security World. For some applications, the key identifier is
derived from the name, but for others the name is just
recorded in kmdata and not used otherwise.
protect The VALUE for protect specifies the protection method, which
can be module for security-world protection, softcard for
softcard protection or token for Operator Card Set protection.
The default is token, except for seeconf keys, where the default
is module. seeinteg keys are always token-protected. The
softcard option is only available when your system has at least
one softcard present.
pubexp For RSA key generation only, the VALUE for pubexp specifies
(in hexadecimal format) the public exponent to use when
generating RSA keys. We recommend leaving this parameter
blank unless advised to supply a particular value by Support.
recovery The VALUE for recovery enables recovery for this key and is
only available for card-set protected keys in a recovery-
enabled world. If set to yes, the key is recoverable. If set to no,
key is not recoverable. The default is yes. Non-recoverable
module-protected keys are not supported.
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.
strict For DSA key generation only, setting the VALUE for strict to
yes enables strict verification, which also limits the size to
exactly 1024 bits. The default is no.
type The VALUE for type specifies the type of key. You must usually
specify the key type for generation and import (though some
applications only support one key type, in which case you are
not asked to choose). Sometimes the type must also be
specified for retargeting; for information on available key
types and sizes, see Cryptographic algorithms. The ‑‑verify
option limits the available key types.
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.
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 custo embed hwcrh pkcs 11 seeco seeint seessl simple kpm
m k nf eg
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- X X X X X X
application
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
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
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
• Operational
◦ The default setting for day-to-day use
• Initialization
◦ Sets the nShield Connect to start in pre-initialization mode
◦ Allows you to use the nShield Connect to create a Security World or add the
module to an existing one
The nShield Connect Status LED indicates the operational status of the module.
The nShield Connect screen shows a color-coded footer at the bottom of the display
when it is not in Operational mode.
opt/nfast/bin/enquiry
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 Connect is in operational mode.
See Using KeySafe for more about using KeySafe. See Module information for more
about checking the mode.
J.4.1. Changing the mode using the front panel controls of an nShield
Connect
To change the mode of an nShield Connect, use the front panel menu screens and
dialogs to do the following:
Once you have enabled remote mode changes, you can change the mode of an nShield
Connect from a computer using the nopclearfail command, without accessing the unit
itself.
You can use the following commands to change the mode of a module:
1. Run either:
The image file package is installed on the remote file system when you install the client
software. The following sections describe how to load this firmware package onto your
nShield module.
We supply several versions of the module firmware. You can always upgrade to firmware
with an equal or higher VSN than that currently installed on your module.
You can never load an image file with a lower VSN than the currently
installed version.
You can never load module firmware with a lower VSN than the
currently installed firmware.
Ensuring you use an image file package with the highest available VSN allows you to
benefit from security improvements and enhanced functionality. It also prevents future
downgrades of the image file and/or that could potentially weaken security. However,
you may choose to install an image file or associated firmware that does not have the
highest available VSN. For example, if you have a regulatory requirement to use FIPS-
approved firmware, you should install the latest available FIPS-validated firmware
package, which may not have the highest VSN. Similarly, if you want to install a version
with enhanced features without committing yourself to the upgrade, you can do so
providing you upgrade only to firmware with a VSN equal to that currently installed on
your module.
When upgrading the Connect image file, client licenses and features
activations on the nShield Connect will persist unless you deliberately
factory state the unit (from the front panel menu).
For more information, see Adding or restoring an HSM to the Security World.
The nShield Connect image file contains both the Connect image and the firmware.
1. Ensure that the nShield Connect image file that you require has been copied to the
following directory:
◦ Windows: %NFAST_HOME%\nethsm-firmware\<version>.
◦ Linux: /opt/nfast/nethsm-firmware/<version>.
2. From the main menu on the unit, select System > Upgrade system.
3. Confirm that you want to upgrade the nShield Connect image file.
4. Select the directory that contains the image file or firmware that you require. You are
informed that the files are being transferred.
5. Verify the image version, HSM (firmware) version, and image VSN that are displayed,
and confirm the upgrade when prompted.
To apply a dynamic feature certificate, e.g. nShield Connect client license, do the
following:
1. Use the nethsmadmin utility to list the nShield Connect feature files on the RFS. Run
the command:
In this command:
In this command:
◦ <feature_file> must be the path to the feature file that is displayed when you run
the nethsmadmin --module=<MODULE>--rfs_<RFS_IP> --list-features command. Errors
are reported if you use either just the feature name, or the full path. The file must
be alphanumeric, and no longer than 150 characters.
The following description assumes the RFS and Client are separate machines which an
nShield Connect has already been configured to use. If you are using a combined
RFS/Client, then apply the following instructions to the same machine. The Client must
have privileged access to the nShield Connect.
The image upgrade file may be supplied as a separate item that must be copied into the
subfolder for its respective version. The file must always be named nCx3N.nff irrespective
of its version.
1. Ensure that the new nShield Connect image file is in the following folder on the RFS:
◦ Windows: %NFAST_HOME%\nethsm-firmware\<version>
◦ Linux: /opt/nfast/nethsm-firmware/<version>
Where <version> is a subfolder containing the nShield Connect image for the
respective version. There can be more than one <version> subfolder. The string
<version> must match the name of the version folder in which the image is
located on the version’s firmware ISO.
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, when the image file is located in the appropriately named <version>
folder:
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 firmware image onto the nShield Connect, run the
following command from the Client:
Where:
e.g.
4. After the image upgrade has completed, run the enquiry utility to check the image
version of the target nShield Connect is as expected.
Once you have enabled remote upgrade, you can upgrade an nShield Connect from a
computer using the nethsmadmin command, without accessing the unit itself.
If you are initializing the HSM into a new Security World, see Creating a Security World.
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
The SNMP monitoring agent is based on the open-source Net-SNMP project, version
5.7.3. More information on SNMP in general, and the data structures used to support
SNMP installations, is available from the NET-SNMP project Web site: http://net-
snmp.sourceforge.net/.
This site includes some support information and offers access to discussion e-mail lists.
You can use the discussion lists to monitor subjects that might affect the operation or
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 snmpd.conf file. If both files have been edited, the agentaddress entry in snmpd.conf
file takes priority for snmpd, and the defaultPort entry in snmpd.conf is ignored.
/etc/init.d/nc_ncsnmpd stop|start|restart
See The SNMP configuration file: snmp.conf for more information on additional
parameters accepted by snmpd.
The default nShield SNMP installation allows read-only access to the Management
Information Base (MIB). There is no default write access to any part of the MIB.
Every effort has been taken to ensure the confidentiality of cryptographic keys even
when the SNMP agent is enabled. In particular, the nShield module is designed to prevent
the theft of keys even if the security of the host system is compromised, provided that
the Administrator Cards are used only with trusted hosts. Care must be used when
changing the configuration of the SNMP agent.
We strongly advise that you use the SNMP User-based Security Model
(USM) with Authentication and Privacy protocols selected, to ensure
only authorised users can obtain information from the SNMP agent and
the confidentiality and data integrity of the transferred information is
protected.
Care has also been taken to ensure that malicious attackers are unable to inundate your
module with requests by flooding your SNMP agent. Command results from
administration or statistics commands are cached, and thus the maximum rate at which
the SNMP agent sends commands to the module is throttled. For more information on
setting the cache time-outs. see The SNMP configuration file: snmp.conf.
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?.
Make sure you protect access to the configuration files, since these
contain information that defines the security parameters of the SNMP
system.
By default, the SNMP configuration files are located in the /opt/nfast/etc/snmp/ directory.
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:
statstimeout This directive specifies the length of time for which statistics
commands are cached. The default is 5 seconds.
keytable This directive sets the initial state of the key table to none, all,
or query. See listKeys in Administration sub-tree overview.
/opt/nfast/etc/snmp/persist
Modifications should only be made to the persist folder’s snmp.conf file in order to create
users. The files within this directory should otherwise only be managed by the SNMP
agent itself.
Do not modify the persistent snmpd.conf file while the agent is running.
The file is only read on initialization of the agent and it is overwritten
when the SNMP agent terminates. Any changes made to this file while
the SNMP agent directives is running will be lost. The SNMP agent
should be stopped prior to adding createUser directories to the
configuration file.
The default behaviour is to listen on UDP port 161 on all IPv4 interfaces (i.e. equivalent to
udp:161).
agentaddress will listen on UDP port 161, but only on the loopback interface (the port
specification ":161" is not strictly necessary as this is the default port). It will also listen on
TCP port 1161 on all IPv4 interfaces.
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.
createUser [-e ENGINEID] username [SHA authpass phrase] [AES privpass phrase]
It would not normally be necessary to specify the engine ID, but if it is specified, ENGINEID
is defined as a hexadecimal string of octets starting with the 0x prefix. The encoding of
the engine ID is defined in the description of SnmpEngineID from RFC3411. The following
recommendations should be followed when defining the security parameters for
SNMPv3:
MD5 and DES are not supported or enabled in the nShield distribution
of SNMP. Only SHA may be used for authentication, and only AES may
be used for privacy (encryption).
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-only user with access to the nShield MIB allowing unauthenticated requests:
rwuser user3
Or
Or
Specifies an SNMPv1 or SNMPv2c community that will be allowed read-only (GET and
GETNEXT) or read-write (GET, GETNEXT and SET) access respectively. By default, this will
provide access to the full OID tree for such requests, regardless of where they were sent
from. SOURCE allows access either from a particular range of source addresses, or globally
(default). A restricted source can either be a specific hostname or address (e.g. localhost
or 127.0.01), or a subnet - represented as IP/MASK (e.g. 10.10.10.0/255.255.255.0), or
IP/BITS (e.g. 10.10.10.0/24).
OID VIEW and CONTEXT are as defined for rouser and rwuser.
Example:
• Setting up a read-only community named public that can be accessed by any user
with the community name:
rocommmunity public
• Setting up a read/write community named private that can only be accessed from
the machine on which the agent is running:
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.
COMMUNITY defines the community name to be mapped to the security name. The same
community string can be specified in several separate directives with different source
tokens, and the first source/community combination that matches the incoming request
will be selected. Various source/community combinations can also map to the same
security name.
CONTEXT if defined (using -Cn), means that the community string will be mapped to a
security name in the named SNMPv3 context. Otherwise the default context ("") will be
used.
Example:
Creating three SNMPv1/v2c community names (private, public and ltd), where private
and ltd only allow requests from the machine on which the SNMP Agent is running (note
lines beginning with a # in snmpd.conf are treated as comments):
Maps a security name (in the specified security model) into a named group. Several
group directives can specify the same group name, allowing a single access setting to
apply to several users and /or community strings. Note that groups must be set up for
the two community-based models separately - a single com2sec directive will typically be
accompanied by two group directives.
GROUP is the group name being defined/added to v1, v2c or usm defines the security model
to which the definition relates SECNAME is the security (USM user name or security name
defined by com2sec to be added to the group.
Example:
Creating three groups (grp_private, grp_public, grp_limited) for three USM users (user1,
user2 and user3) and the three communities shown in the com2sec example above:
Defines a named view - a subset of the overall OID tree. This is most commonly a single
subtree, but several view directives can be given with the same view name (VNAME), to
build up a more complex collection of OIDs. An optional mask can also be specified,
providing a means of indicating which parts of the OID must be matched.
included | excluded allows you to define whether the view includes or excludes the
subtree, allowing the definition of a more complex view (e.g. by excluding certain
sensitive objects from an otherwise accessible subtree).
MASK is an optional list of hex octets (separated by '.' or ':') whose bits indicate which OID
.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
Maps from a group of users/communities (with a particular security model and minimum
security level, and specific context) to one of three views, depending on the request
being processed.
GROUP is a group name defined by the group directive and specifies the group that access
is being defined for.
CONTEXT specifies the context for the access (the default context is the empty string "").
The context of incoming requests must match against the context either exactly or by
prefix, as specified by the choice of exact | prefix made in this directive.
any, v1, v2c, or usm define the security model to which this definition relates.
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 nCipher 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
Defines the default community to be used when sending SNMPv1 or SNMPv2 traps. Note
that this directive must be used prior to a trapsink or trap2sink directive that wishes to
use this community.
Example:
trapcommunity traps
HOST is an address specifier defining the network target that traps will be sent to. It
consists of an optional transport specifier (udp (default if not specified) or tcp) followed
by a hostname or IPv4 address followed by an optional port number, deliminated by
colons ":". (e.g. localhost or tcp:192.168.137.2:163).
COMMUNITY if specified will be the community name used for the traps. If it is not specified,
the most recently specified trapcommunity will be used.
PORT allows for port-number to be defined if it is not present as part of the HOST
specification. If no port is defined, the default port number of 162 will be used.
When a TCP transport specifier is used the SNMP agent establishes the TCP connection
with the trap manager at start-up. Therefore the trap manger must be started before the
SNMP agent otherwise an error is reported for the line in the snmpd.conf file which defines
the trap manager.
Likewise when the TCP connection between the SNMP agent and the trap manager is
dropped, traps are lost. Therefore it is inadvisable to use TCP instead of UDP for the
transport specifier of trap managers.
If TCP is used for the connection between the SNMP agent and the trap manager and the
connection is lost, to re-establish the connection the SNMP agent must be restarted, with
the trap manager running and able to accept a TCP connection from the SNMP agent.
For issues with the trap manager accepting TCP connections from a SNMP agent refer to
trap manager documentation.
Defines the configuration for a trap. This is the only way to define SNMPv3 traps and it is
an alternative method for defining SNMPv1 and SNMPv2 traps.
SNMPCMD_ARGS are arguments that would be used for an equivalent snmptrap command. So
for example to send an SNMPv3 trap as USM user user1 with authentication and
encryption, the value -v3 -u user1 -1 priv would be used.
Example:
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.
/opt/nfast/etc/snmp/mibs/ncipher-mib.txt
These categories form the top-level nodes of the sub-tree; the functionality of the first
category is in the administration sub-tree, and the second category is in the statistics
L.7.3.1. Traps
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.
Other generic Net-SNMP traps may also be received. These include the
two below, see Net-SNMP project website for more details.
With memory usage monitoring enabled, there will be a memoryUsageHighAlert trap sent
each time the currently in-use memoryUsageHighThreshold is reached or exceeded by an
HSM.
• 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,
For each of the four scenarios above, one memoryUsageHighAlert trap will be sent for each
HSM in a high memory usage state.
With memory usage monitoring enabled, there will be a memoryUsageOkAlert trap sent each
time the memory usage for an HSM falls below the currently in-use
memoryUsageOkThreshold.
The value for memoryUsageOkThreshold is read from the snmpd.conf file on starting the
SNMP agent and is used provided it contains an integer value in the range 0 to 100
(inclusive); otherwise, the default value of 0 is used. The value for
memoryUsageHighThreshold is processed in the same way.
Memory usage monitoring is enabled unless the in-use values for memoryUsageOkThreshold
and memoryUsageHighThreshold are both 0 or the in-use values are such that
memoryUsageOkThreshold > memoryUsageHighThreshold.
The following table gives details of the individual nodes in the administration sub-tree:
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: outofrange
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
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
CPUVoltage9 R DisplayString
CPUVoltage10 R DisplayString
CPUVoltage11 R DisplayString
The following table gives details of the nodes in the nShield Connect 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.
-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.
-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.
Utility Description
snmpget This utility runs a single GET request to query for 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 ...--
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
Codes OLD, and OLE are more likely to indicate a hardware problem than a firmware
problem.
To reset a unit that is in an error state, turn off the unit and then turn it on again.
In the following table, the symbol “#” stands for a given numeral’s
Morse code representation.
Code Meaning
HCnC .... -.-. # -.-. .-. CPU n failed self-test; read error
R during 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 - RSA known-
R answer test
HCnK .... -.-. # -.- ... CPU n failed self-test; DSA known-
S answer test.
HCnS .... -.-. # ... .-. CPU n failed self-test; read error
R during uncached RAM test.
HCnS .... -.-. # ... .-- CPU n failed self-test; write error
W during uncached RAM test.
SOS IJA can occur for any type of log message (i.e. a log message,
signature block or certifier block).
When using a Solo, Solo+, Connect or Connect+, around 40 outstanding jobs per HSM is
a good target when using an application that is coded directly against the nCore API.
When using higher-level APIs such as PKCS#11 or CNG, your application may benefit
from increasing the job count further, e.g. to 60 or more outstanding jobs per HSM.
When using higher-level APIs such as PKCS#11 or CNG, all cryptographic operations are
synchronous, so larger numbers of threads must be used to increase the job count and
make full use of HSM resources. These APIs automatically create a hardserver connection
for each thread. If many HSMs are being used, a great many threads may be required to
achieve best throughput. You can adjust the thread counts in the performance test tools
for these APIs (e.g. cksigtest for PKCS#11 and cngsoak for CNG) to gauge how much
concurrency is required for best throughput in your application.
You may benefit from using a scalable memory allocator that is designed to be efficient
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 (e.g. 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
https://nshieldsupport.entrust.com.
The Administrator Cards containing share in the logical tokens that protect the
Security World keys, including KNSO, the key-recovery key, and the recovery
authorization keys. Each card contains one share from each token. The ACS is created
using the well-known module key so that it can be loaded onto any nShield module.
See also
Security World, Operator Card Set (OCS)
Although AES is often referred to as Rijndael (the cipher having been submitted to
the AES selection process under that name by its developers, Joan Daemen and
Vincent Rijmen), these are not precisely the same cipher. Technically, Rijndael
supports a larger range of block and key sizes (at any multiple of 32 bits, to a
minimum of 128 bits and a maximum of 256 bits); AES has a fixed block size of 128
bits and only supports key sizes of 128, 192, or 256 bits.
See also
Data Encryption Standard (DES)
CAST
CAST is a symmetric encryption algorithm with a 64-bit block size and a key size of
between 40 bits to 128 bits (but only in 8-bit increments).
See also
Triple DES, Advanced Encryption Standard (AES)
Diffie-Hellman
The Diffie-Hellman algorithm was the first commercially published public key
algorithm. The Diffie-Hellman algorithm can only be used for key exchange.
ECDH
A variant of the Diffie-Hellman anonymous key agreement protocol which uses elliptic
curve cryptography.
See also
Diffie-Hellman
ECDSA
Elliptic Curve DSA: a variant of the Digital Signature Algorithm (DSA) which uses
elliptic curve cryptography.
See also
Digital Signature Algorithm (DSA), Diffie-Hellman
ECIES
Elliptic Curve Integrated Encryption Scheme; a variant of the Integrated Encryption
Scheme (sometimes known as Augmented Encryption Scheme) which uses elliptic
curve cryptography. It is a hybrid encryption scheme providing semantic security
against chosen-plaintext and chosen-ciphertext attacks.
Security World software supports ECIES key wrap and unwrap only.
EdDSA
Edwards-curve DSA; a Digital Signature Algorithm (DSA) which uses a variant of
Schnorr Signature based on Twisted Edwards curves.
nShield software supports the Edwards 25519 curve and its prehash variant,
Ed25519ph. The context variant, Ed25519ctx, is not supported. Keys generated using
the Ed25519 algorithm can be used for both Ed25519 and Ed25519ph signature
operations.
See also
Digital Signature Algorithm (DSA)
encryption: {A}B
This notation indicates the result of A encrypted with key B.
All Security Worlds are compliant with FIPS 140-2. By default, Security Worlds are
created to comply with FIPS 140-2 at level 2, but those customers who have a
regulatory requirement for compliance with FIPS 140-2 at level 3 can also choose to
create a Security World that meets those requirements.
Hardserver
The hardserver software controls communication between applications and nShield
modules, which may be installed locally or remotely. It runs as a service on the host
computer. The behavior of the hardserver is controlled by the settings in the
hardserver configuration file.
Hash: H(X)
This notation indicates a fixed length result that can be obtained from a variable
length input and that can be used to identify the input without revealing any other
information about it. The nShield module uses the Secure Hash Algorithm (SHA-1) for
its internal security.
• HID is not modified by any operations on the key (for example, altering the ACL,
the application data field, or other modes and flags)
• HID is the same for both public and private halves of a key pair.
Unique data is added to the hash so that a HID is most unlikely to be the same as any
other hash value that might be derived from the key material.
See also
Access Control List (ACL)
Key object: KA
This is a key object to be kept securely by the module. A key object may be a private
key, a public counterpart to a private key, a key for a symmetric cipher (MAC or some
other symmetric algorithm), or an arbitrary block of data. Applications can use this
last type to allow the module to protect any other data items in the same way that it
protects cryptographic keys. Each key object is stored with an ACL and a 20-byte
data block that the application can use to hold any relevant information.
KeyID: IDKA
When a key object KA is loaded within the module’s RAM, it is given a short identifier
or handle that is notated as IDKA. This is a transient identifier, not to be confused with
the key hash HID(KA).
Logical token: KT
A logical token is a key used to protect key blobs. A logical token is generated on the
nShield module and never revealed, except as shares.
MAC: MACKC
This notation indicates a MAC (Message Authentication Code) created using key KC.
Module
See also
hardware security module (HSM)
Module key: KM
A module key is a cryptographic key generated by each nShield module at the time of
initialization and stored within the module. It is used to wrap key blobs and key shares
for tokens. Module keys can be shared across several modules to create a larger
Security World.
• module key zero KM0, a module key generated when the module is initialized and
never revealed outside the module.
See also
Security World, hardware security module (HSM)
See also
Security World, Administrator Card Set (ACS)
For example, the remote access solution is used to run Security World utilities
remotely and to enter passphrases.
Remote Administration
An optional Security World feature that enables Remote Administration card holders
to present their cards to an HSM located elsewhere. For example, the card holder may
be in an office, while the HSM is in a data center. Remote Administration supports the
ACS, as well as persistent and non-persistent OCS cards, and allows all smart card
operations to be carried out, apart from loading feature certificates.
Rijndael
See also
Advanced Encryption Standard (AES)
Salt: X
The random value, or salt, is used in some commands to discourage brute force
searching for keys.
Security World
The Security World technology provides an infrastructure for secure lifecycle
management of keys. A Security World consists of at least one HSM, some
cryptographic key and certificate data encrypted by a Security World key and stored
on at least one host computer, a set of Administrator Cards used to control access to
Security World configuration, recovery and replacement operations, and optionally
one or more sets of Operator Cards used to control access to application keys.
See also
Administrator Card Set (ACS), Operator Card Set (OCS)
Share: KTi
The notation KTi indicates a share of a logical token. Shares can be stored on smart
cards or software tokens. Each share is encrypted under a separate share key.
Tamper Resistance
Hardening a device so that tamper attempts are more difficult (require specialized
tools and take more time, e.g. potting and using hardened containers).
Tamper Detection
Mechanisms that indicate when a potential tamper is occurring (e.g. temperature
sensors, that indicate when the temperature of the device’s environment has
exceeded a preset threshold).
Tamper Response
An automatic reaction to a tamper being detected (e.g. purge of the sensitive data).
Triple DES
Triple DES is a highly secure variant of the Data Encryption Standard (DES) algorithm
in which the message is encrypted three times.
See also
Data Encryption Standard (DES), Advanced Encryption Standard (AES)