OPENSSL_s390xcap.pod 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. =pod
  2. =head1 NAME
  3. OPENSSL_s390xcap - the IBM z processor capabilities vector
  4. =head1 SYNOPSIS
  5. env OPENSSL_s390xcap=... <application>
  6. =head1 DESCRIPTION
  7. libcrypto supports z/Architecture instruction set extensions. These
  8. extensions are denoted by individual bits in the capabilities vector.
  9. When libcrypto is initialized, the bits returned by the STFLE instruction
  10. and by the QUERY functions are stored in the vector.
  11. To change the set of instructions available to an application, you can
  12. set the OPENSSL_s390xcap environment variable before you start the
  13. application. After initialization, the capability vector is ANDed bitwise
  14. with a mask which is derived from the environment variable.
  15. The environment variable is a semicolon-separated list of tokens which is
  16. processed from left to right (whitespace is ignored):
  17. OPENSSL_s390xcap="<tok1>;<tok2>;..."
  18. There are three types of tokens:
  19. =over 4
  20. =item <string>
  21. The name of a processor generation. A bit in the environment variable's
  22. mask is set to one if and only if the specified processor generation
  23. implements the corresponding instruction set extension. Possible values
  24. are z900, z990, z9, z10, z196, zEC12, z13 and z14.
  25. =item <string>:<mask>:<mask>
  26. The name of an instruction followed by two 64-bit masks. The part of the
  27. environment variable's mask corresponding to the specified instruction is
  28. set to the specified 128-bit mask. Possible values are kimd, klmd, km, kmc,
  29. kmac, kmctr, kmo, kmf, prno and kma.
  30. =item stfle:<mask>:<mask>:<mask>
  31. Store-facility-list-extended (stfle) followed by three 64-bit masks. The
  32. part of the environment variable's mask corresponding to the stfle
  33. instruction is set to the specified 192-bit mask.
  34. =back
  35. The 64-bit masks are specified in hexadecimal notation. The 0x prefix is
  36. optional. Prefix a mask with a tilde (~) to denote a bitwise NOT operation.
  37. The following is a list of significant bits for each instruction. Colon
  38. rows separate the individual 64-bit masks. The bit numbers in the first
  39. column are consistent with [1], that is, 0 denotes the leftmost bit and
  40. the numbering is continuous across 64-bit mask boundaries.
  41. Bit Mask Facility/Function
  42. stfle:
  43. # 17 1<<46 message-security assist
  44. # 25 1<<38 store-clock-fast facility
  45. :
  46. # 76 1<<51 message-security assist extension 3
  47. # 77 1<<50 message-security assist extension 4
  48. :
  49. #129 1<<62 vector facility
  50. #134 1<<57 vector packed decimal facility
  51. #135 1<<56 vector enhancements facility 1
  52. #146 1<<45 message-security assist extension 8
  53. kimd :
  54. # 1 1<<62 KIMD-SHA-1
  55. # 2 1<<61 KIMD-SHA-256
  56. # 3 1<<60 KIMD-SHA-512
  57. # 32 1<<31 KIMD-SHA3-224
  58. # 33 1<<30 KIMD-SHA3-256
  59. # 34 1<<29 KIMD-SHA3-384
  60. # 35 1<<28 KIMD-SHA3-512
  61. # 36 1<<27 KIMD-SHAKE-128
  62. # 37 1<<26 KIMD-SHAKE-256
  63. :
  64. # 65 1<<62 KIMD-GHASH
  65. klmd :
  66. # 32 1<<31 KLMD-SHA3-224
  67. # 33 1<<30 KLMD-SHA3-256
  68. # 34 1<<29 KLMD-SHA3-384
  69. # 35 1<<28 KLMD-SHA3-512
  70. # 36 1<<27 KLMD-SHAKE-128
  71. # 37 1<<26 KLMD-SHAKE-256
  72. :
  73. km :
  74. # 18 1<<45 KM-AES-128
  75. # 19 1<<44 KM-AES-192
  76. # 20 1<<43 KM-AES-256
  77. # 50 1<<13 KM-XTS-AES-128
  78. # 52 1<<11 KM-XTS-AES-256
  79. :
  80. kmc :
  81. # 18 1<<45 KMC-AES-128
  82. # 19 1<<44 KMC-AES-192
  83. # 20 1<<43 KMC-AES-256
  84. :
  85. kmac :
  86. # 18 1<<45 KMAC-AES-128
  87. # 19 1<<44 KMAC-AES-192
  88. # 20 1<<43 KMAC-AES-256
  89. :
  90. kmctr:
  91. :
  92. kmo :
  93. # 18 1<<45 KMO-AES-128
  94. # 19 1<<44 KMO-AES-192
  95. # 20 1<<43 KMO-AES-256
  96. :
  97. kmf :
  98. # 18 1<<45 KMF-AES-128
  99. # 19 1<<44 KMF-AES-192
  100. # 20 1<<43 KMF-AES-256
  101. :
  102. prno :
  103. :
  104. kma :
  105. # 18 1<<45 KMA-GCM-AES-128
  106. # 19 1<<44 KMA-GCM-AES-192
  107. # 20 1<<43 KMA-GCM-AES-256
  108. :
  109. =head1 EXAMPLES
  110. Disables all instruction set extensions which the z196 processor does not implement:
  111. OPENSSL_s390xcap="z196"
  112. Disables the vector facility:
  113. OPENSSL_s390xcap="stfle:~0:~0:~0x4000000000000000"
  114. Disables the KM-XTS-AES and and the KIMD-SHAKE function codes:
  115. OPENSSL_s390xcap="km:~0x2800:~0;kimd:~0xc000000:~0"
  116. =head1 RETURN VALUES
  117. Not available.
  118. =head1 SEE ALSO
  119. [1] z/Architecture Principles of Operation, SA22-7832-11
  120. =head1 COPYRIGHT
  121. Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
  122. Licensed under the Apache License 2.0 (the "License"). You may not use
  123. this file except in compliance with the License. You can obtain a copy
  124. in the file LICENSE in the source distribution or at
  125. L<https://www.openssl.org/source/license.html>.
  126. =cut