Keys to the Virtual Kingdom
§ Intelligent encryption of sensitive data that executes off processor saving costs
Download 242.43 Kb. Pdf ko'rish
|
§
Intelligent encryption of sensitive data that executes off processor saving costs § PIN transactions, EMV transactions for integrated circuit based payment cards (chip & pin), and general- purpose cryptographic applications using symmetric key, hashing, and public key algorithms, VISA format preserving encryption (FPE), and simplification of cryptographic key management. #vmworkshop #IBMz #zVM © 2017 IBM Corporation 22
§ Hardware configuration for the feature is done on the Support Element – Step 1: Make sure CPACF is enabled. – Step 2: Select feature, then choose personality type
© 2017 IBM Corporation 23
§ Validate option selection § May zeroize existing keys in the process (destroy any residual secrets) #vmworkshop #IBMz #zVM © 2017 IBM Corporation 24
§ Hardware activation is done from the Support Element § Select pertinent feature, "Configure On/Off" #vmworkshop #IBMz #zVM © 2017 IBM Corporation 25
§ LPAR assignation is done from the HMC (building an activation profile)
– Candidate list: domains on this AP which are eligible to be accessed by this partition – Online List: processors automatically brought online at LPAR startup. – Usage Domain: bundles domains together inside a common cryptographic boundary – Control Domain: identifies domain index pertinent to TKE control of the LPAR. Must also contain Usage Domain. § z/VM will only detect those cards and domains assigned to the LPAR
#vmworkshop #IBMz #zVM © 2017 IBM Corporation 26
§
communicates directly with the Crypto Express features over a secure TCP/IP connection. – Functions as a separate physical device to the side of your z System – Card reader for crypto secret storage – Generates new secrets, stores data in Crypto Express domains – Required for EP11 Crypto Express features! § z/OS Integrated Cryptographic Services Facility (ICSF) – a base component which allows interaction with Crypto Express features. (Requires MVS.) §
IBM .rpms which allows for key management function. Catcher is the Linux daemon for communicating with TKE. – /opt/IBM/CEX5C/bin/panel.exe §
flexible and secure key management services. – See also Advanced Crypto Service Provider – http://www-05.ibm.com/dk/security/cccc/products/acsp.html #vmworkshop #IBMz #zVM © 2017 IBM Corporation 27 Three different types of key protection in the IBM Crypto hardware: §
– The security of keys is provided by operating procedures. – This means keys may appear in the clear in the environment somewhere §
– Secure keys are protected by another key (the master key) stored in hardware – When a secure key must leave the hardware, the key is encrypted under the master key … so the value of the secure key is never exposed to the operating system §
– Protected keys are encrypted under a Wrapping Key uniquely created for each LPAR – Cryptographic operations using protected keys can benefit from CPACF performance Securing the Keys Once They're Installed #vmworkshop #IBMz #zVM © 2017 IBM Corporation 28
z Systems Cryptography CPACF
CEX5A CEX5C
#vmworkshop #IBMz #zVM USER DIRECT z/VM Crypto Virtualization © 2017 IBM Corporation 29
(stack view) § Once domains are added to an LPAR running z/VM, they become available for guest use #vmworkshop #IBMz #zVM CPACF
CEX5A CEX5C
z/VM CP (Control Program) Hardware Features USER DIRECT z/VM Crypto Virtualization © 2017 IBM Corporation 30
(z/VM’s view) LPAR 1
z/VM . . .
n . . .
0 n 1 1 CEX5S 0 CEX5C 1 0
© 2017 IBM Corporation 31
The CRYPTO User Directory statement grants a z/VM userid access to cryptographic features associated with the hardware: v----------+ v--------+ CRYPto -+- DOMAIN ---+-domains -+- APDEDicated -+- aps --+--->< | | +- APVIRTual-------------------------------------^ APDED Dedicates a particular AP domain (or set of domains) to this virtual machine. Domains granted in the directory are “reserved for dedication”; they are not actually in- use until the virtual machine logs on. APVIRT Virtual machine can access a collection of domains controlled by the system. #vmworkshop #IBMz #zVM © 2017 IBM Corporation 32
§ z/VM 6.2 and z/VM 6.3 only – z13 GA 1 – APAR VM65577 – z13 GA 2 and z13s GA 1 – apply GA 1 service, then APAR VM65716 § Expanded domain selection for dedicated domains – z/VM supports architected limits for CryptoExpress domains – CEX5S on z13 supports 85 domains per feature, maximum of 16 features
– Z13s supports 40 domains per feature § APDED really does mean dedicated; no collision is permitted – In a race, the first guest to LOGON has all requests fulfilled – Collisions void the latter guest's domain claims for an entire AP CEX5C 0 . . .
0 n
A 1 1 . . . #vmworkshop #IBMz #zVM © 2017 IBM Corporation 33
CEX5S 0 CEX5C 1 LPAR 1
z/VM ZVSE01
LINUX04 MVSUSR01
APDED APDED
APDED CRYPTO DOMAIN N APDED 0 CRYPTO DOMAIN 1 APDED 0 1 CRYPTO DOMAIN N APDED 1 . . .
0 n . . . 0 n 1 MK MK
1 MK
© 2017 IBM Corporation 34
. . . 0
CEX5S 0 . . .
0 n
A 1 1 1 LPAR 1 z/VM LINUX02
LINUX04 MVSUSR01
APDED CRYPTO DOMAIN N APDED 0 CRYPTO APVIRT CRYPTO APVIRT APVIRT
MK #vmworkshop #IBMz #zVM © 2017 IBM Corporation 35
§ Any domain in APVIRT will behave as an accelerator (clear-key RSA) – Whether it is or not it is configured as one or not – CP will discard coprocessor operations sent to an APVIRT domain – This is done for security context reasons (and why APVIRT is meant for clear-key) § APVIRT domains are selected by mode and release level – Default behavior if nothing specified in System Configuration file (see next slide) – Accelerator is chosen before coprocessor – CEX5S is chosen before CEX4S before CEX3 … § EP11 domains cannot be used for APVIRT . . . 0 n CEX5S 0 . . .
0 n
A 1 1 1 MK #vmworkshop #IBMz #zVM © 2017 IBM Corporation 36 § z/VM supports a new System Configuration statement for z/VM V6 which allows a system administrator to assign APVIRT domains for use by CP: § Usage Notes: – z/VM will designate the first available domain in its list as the type – Any other available domains in SYSTEM CONFIG that are also of that type are designated for APVIRT usage – Domains that do not meet criteria are ignored. § If this statement is not present in the System Configuration file, z/VM will use default APVIRT domain selection behavior CRYPTO APVIRT AP 1 DOMAIN 0 1 CRYPTO APVIRT AP 0 DOMAIN 22 Assigning Domains to APVIRT (z/VM V6 APAR VM65577, or in V6.4 Base) #vmworkshop #IBMz #zVM © 2017 IBM Corporation 37 § Given the following System Configuration: … z/VM V6 will check domains in the following order: § If AP 1 DOMAIN 7 is available at system initialization, it will be APVIRT. – APVIRT must use type CEX5A – Only AP 1 DOMAIN 8, with a matching type, is set as APVIRT – If a guest lists AP 1 DOMAIN 7 as APDED, the guest will be denied access
© 2017 IBM Corporation 38 § System Configuration: CRYPTO APVIRT AP 1-2 DOMAIN 15-16 §
/* Conflicts on AP 1-2; no domains granted on AP 1 or 2. */ §
/* Conflict at Domain 14. No Domains granted on this AP. */ §
/* No conflicts. */ § Reverse the logon order of Guest A and
Guest B ...
Example: Assigning Domains for z/VM #vmworkshop #IBMz #zVM AP 0 AP 1 AP 2 AP 3 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 © 2017 IBM Corporation 39
QUERY CRYPTO (Class A, B, C, or E) will display which domains/APs are available. Note that this list will be limited to devices available to a z/VM instance.
. . .
0 n . . . 0 n 1 1 MK
CEX5 A 1 #vmworkshop #IBMz #zVM © 2017 IBM Corporation 40
01: AP 02 CEX3C Domain 08 available free unspecified 01: AP 03 CEX3A Domain 06 available dedicated to BWHUGEN dedication 01: AP 03 CEX3A Domain 07 available free unspecified 01: AP 03 CEX3A Domain 08 available shared shared 01: AP 04 CEX4C Domain 06 available free dedication 01: AP 04 CEX4C Domain 07 available free dedication 01: AP 04 CEX4C Domain 08 available free unspecified Ready; QUERY CRYPTO DOMAINS USERS AP device Domain nn device status system usage planned usage #vmworkshop #IBMz #zVM © 2017 IBM Corporation 41
AP 03 CEX3A Domain 06 dedicated Ready; QUERY VIRTUAL CRYPTO QUERY VIRTUAL CRYPTO (Class G) will display virtual crypto facilities for your guest. Keyword “virtual” required for Guests with A, B, C, or E privileges .
© 2017 IBM Corporation 42
§
§
– Do you need secure key operations? ( APDED
) – Does your security policy require physical isolation? ( APDED )
APDED only) – Do you need to relocate your guest? ( APVIRT *)
APVIRT ) – Are you running out of domains attached to the LPAR? – Are your guests similar, cloned, or tied to HA solutions? – Does your guest operating system have particular restrictions? § Different guests will have different needs, based upon their drivers and configuration requirements … * Note: some restrictions apply. Consult the CP Planning and Administration Guide or Getting Started With Linux manuals. #vmworkshop #IBMz #zVM © 2017 IBM Corporation 43
§
§
§
– CPACF
– Crypto Express CCA Accelerator • Assign 1 domain from 2-3 different features (hardware failover, performance) z/VM 6.4 RHEL
RHEL SUSE
Crypto Express CPACF
PR/SM (one z System Logical Partition) z13 Ubuntu
APVIRT Ubuntu
Your Cloud Controller #vmworkshop #IBMz #zVM © 2017 IBM Corporation 44
§
§
§
– CPACF (required for secure and protected key ops on the crypto adapters) – Crypto Express CCA Coprocessors • One domain per guest participating in the Hyperledger fabric z/VM 6.4 RHEL
RHEL SUSE
Crypto Express CPACF
PR/SM (one z System Logical Partition) z13 Ubuntu
APDED Ubuntu
#vmworkshop #IBMz #zVM © 2017 IBM Corporation 45
of the z Systems Cryptographic Features #vmworkshop #IBMz #zVM Crypto Libraries Guest Config © 2017 IBM Corporation 46
§ Cryptographic libraries will vary from operating system to operating system § Some may require specific configuration to make use of certain features § Consult pertinent local documentation #vmworkshop #IBMz #zVM Guest Operating System Crypto Libraries Guest Config © 2017 IBM Corporation 47
§ z/VSE automatically detects any Crypto Express features dedicated to (or shared with) the virtual machine in which it's running #vmworkshop #IBMz #zVM © 2017 IBM Corporation 48
§ CMS guests can utilize CPACF if enabled – Need to issue appropriate machine instructions – Some features (Pipelines, TLS/SSL Server) use these automatically § The CMS environment does not have Crypto Express libraries – Different instructions / communication paths than CPACF – Nothing available yet for general system programmer use #vmworkshop #IBMz #zVM © 2017 IBM Corporation 49
Crypto Express CPACF
PR/SM (one z System Logical Partition) TCPIP Network
APVIRT APDED
Crypto APVIRT for the z/VM TLS/SSL Server PTFs for APAR PI72106 § If Crypto Express domains are defined for sharing, then TLS/SSL Server will use them – Clear-key RSA operations are the primary beneficiary • Handshaking, rather than data transfer – benefit will come from a lot of connections • Will still use CPACF when pertinent – Meant as a performance enabler, not to replace key storage (still need .kdb or .p12 in BFS) § Also works for your LDAP/VM Server! SSL00001 SSL00001 SSL00001 System
SSL MAINT By BWHUGEN #vmworkshop #IBMz #zVM © 2017 IBM Corporation 50
PTFs for APAR PI72106 § Add CRYPTO APVIRT to your SSL server's PROFILE entry – TCPSSLU - the default PROFILE entry for the TLS/SSL Server – APDED not allowed for a POOL of userids § Insert directly into VM definition for: – LDAPSRV - uses its own System SSL calls – GSKADMIN - for certificate creation / management – A stand-alone TLS/SSL server (non-POOL) PROFILE TCPSSL10 CRYPTO APVIRTUAL IPL CMS PARM FILEPOOL VMSYS IUCV ALLOW LOGONBY GSKADMIN TCPMNT10 BWHUGEN NAMESAVE TCPIP10 OPTION ACCT MAXCONN 1024 QUICKDSP POSIXINFO UID 7 GNAME security SHARE RELATIVE 3000 CONSOLE 0009 3215 T [...] #vmworkshop #IBMz #zVM © 2017 IBM Corporation 51
#vmworkshop #IBMz #zVM © 2017 IBM Corporation 52 CPACF (DES, 3DES, AES, SHA,PRNG) Accelerator (RSA) CCA Co-
Processor (RSA, RNG, ECC) Kernel Kernel crypto framework zcrypt device driver ICA (libica) CCA (libcsulcaa) System z backend Crypto Adapters openssl / libcrypto openCryptoki (PKCS#11) ibmca
engine ica token cca token
openssh (ssh, scp, sftp) Apache
(mod_ssl) GSKIT
IBM C/C++
SW. WAS
Apache (mod_nss) NSS Customer
CCA SW Application Layer Standard
Crypto Interfaces System z HW Crypto Libraries Operating System Hardware
JCA/JCE IBMPKCS11Impl Customer C/C++
SW using PKCS#11
clear key protected key secure key CPU
IPsec dmcrypt
ICC Customer
Java/JCE SW EP11 library ep11 token icsf token EP11 Co- Processor z/OS crypto
server via
network Linux on z Systems Crypto Infrastructure #vmworkshop #IBMz #zVM © 2017 IBM Corporation 53
§
– Generic, platform-independent implementations of cryptographic algorithms – Support for platform-optimized algorithms that are automatically used if available §
– Exploiting CPACF to optimize and accelerate symmetric cryptographic functions – Managing Crypto Express cards with the zcrypt device driver §
– IPsec and ssh (from the beginning of the presentation, remember?) – Linux device-mappers – for example, dm-crypt or eCryptFS #vmworkshop #IBMz #zVM © 2017 IBM Corporation 54
dm-crypt
§
(transparent disk encryption subsystem) – Inserts layer of crypto between block device & accessing file systems or apps – Positioned between file system and device mapper § Administration done through cryptsetup – Uses LUKS (Linux Unified Key Setup) – Choose cipher/hashing algorithms from /proc/crypto/procfs – HW crypto (AES-CBC, XTS-AES) § Can also set up encrypted filesystems during init – /etc/crypttab (referenced before /etc/fstab ) – Bear in mind, though, interactive password prompts will still wait for you
© 2017 IBM Corporation 55
Today: Toleration Support § Linux kernel recognizes CEX5S adapter and treats it as CEX4S adapter Download 242.43 Kb. Do'stlaringiz bilan baham: |
ma'muriyatiga murojaat qiling