Skip to main content
SAP Adaptive Server Enterprise (SAP ASE, formerly Sybase ASE) is a relational database server that encrypts columns and whole databases with keys it manages itself. This integration stores the SAP ASE HSM key in CryptoHub through the Futurex PKCS #11 (FXPKCS11) module, so CryptoHub protects the master key of every database on the server.

Key features

This integration has the following features:
  • Hardware-backed HSM key: SAP ASE creates its HSM key, an AES-256 key, on CryptoHub with a single SQL command.
  • Master key protection: SAP ASE encrypts the master key of each database with the HSM key, and decrypts it through CryptoHub when it starts.
  • Column and full database encryption: Column encryption keys and database encryption keys stay under the master key, so all of them depend on the key in CryptoHub.
  • Standard PKCS #11 interface: SAP ASE loads the FXPKCS11 module through its built-in external keystore support, with no custom code.

Benefits of CryptoHub integration through PKCS #11

Integrating with CryptoHub provides the following benefits:
  • Enhanced security: The HSM key is generated and used inside CryptoHub, so a compromise of the SAP ASE host does not yield the key that protects every master key.
  • Centralized key management: CryptoHub provides one repository for the HSM keys of your SAP ASE servers, which simplifies access review and audit.
  • Policy-based controls: CryptoHub identity and permission controls govern which application identities can use the HSM key.
  • Compliance readiness: Storing the key that protects your database encryption keys in a Futurex HSM helps you meet requirements for hardware key protection.
  • Operational resilience: CryptoHub high-availability and failover features keep the key available when SAP ASE starts and recovers encrypted databases.

The SAP ASE key model

SAP ASE protects data with a hierarchy of keys:
  • Column encryption keys and database encryption keys encrypt the data. SAP ASE stores them in the database, encrypted by the master key.
  • Master keys (sybencrmasterkey) protect the keys in each database. With an external keystore, SAP ASE encrypts each master key with the HSM key.
  • The HSM key is an AES-256 key in CryptoHub. SAP ASE uses one HSM key per server instance and records its UUID in the master database.
SAP ASE asks CryptoHub to encrypt and decrypt master keys with the HSM key. The HSM key never leaves CryptoHub.

How the integration works

  1. A CryptoHub administrator deploys the SAP ASE service and creates a client endpoint for the SAP ASE host.
  2. The endpoint ZIP supplies libfxpkcs11.so, fxpkcs11.cfg, the test programs, and the TLS files for the endpoint.
  3. The SAP ASE host installs the module in $SYBASE/ASE-16_0/lib and the configuration in /etc. SAP ASE stores the endpoint PIN in its HSM credential, so fxpkcs11.cfg doesn’t keep it.
  4. The module opens a mutual TLS session to the CryptoHub Host API on TCP port 2001.
  5. create encryption key ... on external keystore creates the HSM key in CryptoHub. SAP ASE then encrypts the master keys with it.
  6. At every start, SAP ASE logs in with the stored credential and decrypts the master keys through CryptoHub, then recovers fully encrypted databases.

Out of scope

This guide covers one SAP ASE 16.0 SP04 server on SUSE Linux Enterprise Server 15 or openSUSE Leap 15. The following topics are not covered:
  • Installing SAP ASE.
  • Sharing one HSM key between several SAP ASE servers.
  • Replication and high-availability clusters.
For those topics, refer to the SAP ASE documentation, including the Database Encryption guide chapter Key Protection Using External Keystore.