⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 crypto-api.txt

📁 linux-2.6.15.6
💻 TXT
字号:
crypto-API support for z990 Message Security Assist (MSA) instructions~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~AUTHOR:	Thomas Spatzier (tspat@de.ibm.com)1. Introduction crypto-API~~~~~~~~~~~~~~~~~~~~~~~~~~See Documentation/crypto/api-intro.txt for an introduction/description of thekernel crypto API.According to api-intro.txt support for z990 crypto instructions has been addedin the algorithm api layer of the crypto API. Several files containing z990optimized implementations of crypto algorithms are placed in thearch/s390/crypto directory.2. Probing for availability of MSA~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~It should be possible to use Kernels with the z990 crypto implementations bothon machines with MSA available an on those without MSA (pre z990 or z990without MSA). Therefore a simple probing mechanisms has been implemented:In the init function of each crypto module the availability of MSA and of therespective crypto algorithm in particular will be tested. If the algorithm isavailable the module will load and register its algorithm with the crypto API.If the respective crypto algorithm is not available, the init function willreturn -ENOSYS. In that case a fallback to the standard software implementationof the crypto algorithm must be taken ( -> the standard crypto modules arealso build when compiling the kernel).3. Ensuring z990 crypto module preference~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~If z990 crypto instructions are available the optimized modules should bepreferred instead of standard modules.3.1. compiled-in modules~~~~~~~~~~~~~~~~~~~~~~~~For compiled-in modules it has to be ensured that the z990 modules are linkedbefore the standard crypto modules. Then, on system startup the init functionsof z990 crypto modules will be called first and query for availability of z990crypto instructions. If instruction is available, the z990 module will registerits crypto algorithm implementation -> the load of the standard module will failsince the algorithm is already registered.If z990 crypto instruction is not available the load of the z990 module willfail -> the standard module will load and register its algorithm.3.2. dynamic modules~~~~~~~~~~~~~~~~~~~~A system administrator has to take care of giving preference to z990 cryptomodules. If MSA is available appropriate lines have to be added to/etc/modprobe.conf.Example:	z990 crypto instruction for SHA1 algorithm is available		add the following line to /etc/modprobe.conf (assuming the		z990 crypto modules for SHA1 is called sha1_z990):		alias sha1 sha1_z990		-> when the sha1 algorithm is requested through the crypto API		(which has a module autoloader) the z990 module will be loaded.TBD:	a userspace module probin mechanism	something like 'probe sha1 sha1_z990 sha1' in modprobe.conf	-> try module sha1_z990, if it fails to load load standard module sha1	the 'probe' statement is currently not supported in modprobe.conf4. Currently implemented z990 crypto algorithms~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~The following crypto algorithms with z990 MSA support are currently implemented.The name of each algorithm under which it is registered in crypto API and thename of the respective module is given in square brackets.- SHA1 Digest Algorithm [sha1 -> sha1_z990]- DES Encrypt/Decrypt Algorithm (64bit key) [des -> des_z990]- Tripple DES Encrypt/Decrypt Algorithm (128bit key) [des3_ede128 -> des_z990]- Tripple DES Encrypt/Decrypt Algorithm (192bit key) [des3_ede -> des_z990]In order to load, for example, the sha1_z990 module when the sha1 algorithm isrequested (see 3.2.) add 'alias sha1 sha1_z990' to /etc/modprobe.conf.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -