You can selectively disable mechanisms and the random number feature from a hardware provider. To enable them again, see Example 14–29. The hardware in this example, the Sun Crypto Accelerator 1000 board, provides a random number generator.
Become superuser or assume a role that includes the Crypto Management rights profile.
To create a role that includes the Crypto Management rights profile and assign the role to a user, see Example 9–7.
Choose the mechanisms or feature to disable.
List the hardware provider.
# cryptoadm list ... Kernel hardware providers: dca/0 |
Disable selected mechanisms.
# cryptoadm list -m provider=dca/0 dca/0: CKM_RSA_PKCS, CKM_RSA_X_509, CKM_DSA, CKM_DES_CBC, CKM_DES3_CBC random is enabled. # cryptoadm disable provider=dca/0 mechanism=CKM_DES_CBC,CKM_DES3_CBC # cryptoadm list -p provider=dca/0 dca/0: all mechanisms are enabled except CKM_DES_CBC,CKM_DES3_CBC. random is enabled. |
Disable the random number generator.
# cryptoadm list -p provider=dca/0 dca/0: all mechanisms are enabled. random is enabled. # cryptoadm disable provider=dca/0 random # cryptoadm list -p provider=dca/0 dca/0: all mechanisms are enabled. random is disabled. |
Disable all mechanisms. Do not disable the random number generator.
# cryptoadm list -p provider=dca/0 dca/0: all mechanisms are enabled. random is enabled. # cryptoadm disable provider=dca/0 mechanism=all # cryptoadm list -p provider=dca/0 dca/0: all mechanisms are disabled. random is enabled. |
Disable every feature and mechanism on the hardware.
# cryptoadm list -p provider=dca/0 dca/0: all mechanisms are enabled. random is enabled. # cryptoadm disable provider=dca/0 all # cryptoadm list -p provider=dca/0 dca/0: all mechanisms are disabled. random is disabled. |
In the following examples, disabled mechanisms on a piece of hardware are selectively enabled.
# cryptoadm list -p provider=dca/0 dca/0: all mechanisms are enabled except CKM_DES_ECB,CKM_DES3_ECB |
. random is enabled. # cryptoadm enable provider=dca/0 mechanism=CKM_DES3_ECB # cryptoadm list -p provider=dca/0 dca/0: all mechanisms are enabled except CKM_DES_ECB. random is enabled. |
In the following example, only the random generator is enabled.
# cryptoadm list -p provider=dca/0 dca/0: all mechanisms are enabled, except CKM_MD5,CKM_MD5_HMAC,…. random is disabled. # cryptoadm enable provider=dca/0 random # cryptoadm list -p provider=dca/0 dca/0: all mechanisms are enabled, except CKM_MD5,CKM_MD5_HMAC,…. random is enabled. |
In the following example, only the mechanisms are enabled. The random generator continues to be disabled.
# cryptoadm list -p provider=dca/0 dca/0: all mechanisms are enabled, except CKM_MD5,CKM_MD5_HMAC,…. random is disabled. # cryptoadm enable provider=dca/0 mechanism=all # cryptoadm list -p provider=dca/0 dca/0: all mechanisms are enabled. random is disabled. |
In the following example, every feature and mechanism on the board is enabled.
# cryptoadm list -p provider=dca/0 dca/0: all mechanisms are enabled, except CKM_DES_ECB,CKM_DES3_ECB. random is disabled. # cryptoadm enable provider=dca/0 all # cryptoadm list -p provider=dca/0 dca/0: all mechanisms are enabled. random is enabled. |