gooderp18绿色标准版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

537 satır
45KB

  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>F.25. pgcrypto</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="prev" href="pgbuffercache.html" title="F.24. pg_buffercache" /><link rel="next" href="pgfreespacemap.html" title="F.26. pg_freespacemap" /></head><body><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">F.25. pgcrypto</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="pgbuffercache.html" title="F.24. pg_buffercache">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="contrib.html" title="Appendix F. Additional Supplied Modules">Up</a></td><th width="60%" align="center">Appendix F. Additional Supplied Modules</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 12.4 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="pgfreespacemap.html" title="F.26. pg_freespacemap">Next</a></td></tr></table><hr></hr></div><div class="sect1" id="PGCRYPTO"><div class="titlepage"><div><div><h2 class="title" style="clear: both">F.25. pgcrypto</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="sect2"><a href="pgcrypto.html#id-1.11.7.34.5">F.25.1. General Hashing Functions</a></span></dt><dt><span class="sect2"><a href="pgcrypto.html#id-1.11.7.34.6">F.25.2. Password Hashing Functions</a></span></dt><dt><span class="sect2"><a href="pgcrypto.html#id-1.11.7.34.7">F.25.3. PGP Encryption Functions</a></span></dt><dt><span class="sect2"><a href="pgcrypto.html#id-1.11.7.34.8">F.25.4. Raw Encryption Functions</a></span></dt><dt><span class="sect2"><a href="pgcrypto.html#id-1.11.7.34.9">F.25.5. Random-Data Functions</a></span></dt><dt><span class="sect2"><a href="pgcrypto.html#id-1.11.7.34.10">F.25.6. Notes</a></span></dt><dt><span class="sect2"><a href="pgcrypto.html#id-1.11.7.34.11">F.25.7. Author</a></span></dt></dl></div><a id="id-1.11.7.34.2" class="indexterm"></a><a id="id-1.11.7.34.3" class="indexterm"></a><p>
  3. The <code class="filename">pgcrypto</code> module provides cryptographic functions for
  4. <span class="productname">PostgreSQL</span>.
  5. </p><div class="sect2" id="id-1.11.7.34.5"><div class="titlepage"><div><div><h3 class="title">F.25.1. General Hashing Functions</h3></div></div></div><div class="sect3" id="id-1.11.7.34.5.2"><div class="titlepage"><div><div><h4 class="title">F.25.1.1. <code class="function">digest()</code></h4></div></div></div><a id="id-1.11.7.34.5.2.2" class="indexterm"></a><pre class="synopsis">
  6. digest(data text, type text) returns bytea
  7. digest(data bytea, type text) returns bytea
  8. </pre><p>
  9. Computes a binary hash of the given <em class="parameter"><code>data</code></em>.
  10. <em class="parameter"><code>type</code></em> is the algorithm to use.
  11. Standard algorithms are <code class="literal">md5</code>, <code class="literal">sha1</code>,
  12. <code class="literal">sha224</code>, <code class="literal">sha256</code>,
  13. <code class="literal">sha384</code> and <code class="literal">sha512</code>.
  14. If <code class="filename">pgcrypto</code> was built with
  15. OpenSSL, more algorithms are available, as detailed in
  16. <a class="xref" href="pgcrypto.html#PGCRYPTO-WITH-WITHOUT-OPENSSL" title="Table F.19. Summary of Functionality with and without OpenSSL">Table F.19</a>.
  17. </p><p>
  18. If you want the digest as a hexadecimal string, use
  19. <code class="function">encode()</code> on the result. For example:
  20. </p><pre class="programlisting">
  21. CREATE OR REPLACE FUNCTION sha1(bytea) returns text AS $$
  22. SELECT encode(digest($1, 'sha1'), 'hex')
  23. $$ LANGUAGE SQL STRICT IMMUTABLE;
  24. </pre><p>
  25. </p></div><div class="sect3" id="id-1.11.7.34.5.3"><div class="titlepage"><div><div><h4 class="title">F.25.1.2. <code class="function">hmac()</code></h4></div></div></div><a id="id-1.11.7.34.5.3.2" class="indexterm"></a><pre class="synopsis">
  26. hmac(data text, key text, type text) returns bytea
  27. hmac(data bytea, key bytea, type text) returns bytea
  28. </pre><p>
  29. Calculates hashed MAC for <em class="parameter"><code>data</code></em> with key <em class="parameter"><code>key</code></em>.
  30. <em class="parameter"><code>type</code></em> is the same as in <code class="function">digest()</code>.
  31. </p><p>
  32. This is similar to <code class="function">digest()</code> but the hash can only be
  33. recalculated knowing the key. This prevents the scenario of someone
  34. altering data and also changing the hash to match.
  35. </p><p>
  36. If the key is larger than the hash block size it will first be hashed and
  37. the result will be used as key.
  38. </p></div></div><div class="sect2" id="id-1.11.7.34.6"><div class="titlepage"><div><div><h3 class="title">F.25.2. Password Hashing Functions</h3></div></div></div><p>
  39. The functions <code class="function">crypt()</code> and <code class="function">gen_salt()</code>
  40. are specifically designed for hashing passwords.
  41. <code class="function">crypt()</code> does the hashing and <code class="function">gen_salt()</code>
  42. prepares algorithm parameters for it.
  43. </p><p>
  44. The algorithms in <code class="function">crypt()</code> differ from the usual
  45. MD5 or SHA1 hashing algorithms in the following respects:
  46. </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
  47. They are slow. As the amount of data is so small, this is the only
  48. way to make brute-forcing passwords hard.
  49. </p></li><li class="listitem"><p>
  50. They use a random value, called the <em class="firstterm">salt</em>, so that users
  51. having the same password will have different encrypted passwords.
  52. This is also an additional defense against reversing the algorithm.
  53. </p></li><li class="listitem"><p>
  54. They include the algorithm type in the result, so passwords hashed with
  55. different algorithms can co-exist.
  56. </p></li><li class="listitem"><p>
  57. Some of them are adaptive — that means when computers get
  58. faster, you can tune the algorithm to be slower, without
  59. introducing incompatibility with existing passwords.
  60. </p></li></ol></div><p>
  61. <a class="xref" href="pgcrypto.html#PGCRYPTO-CRYPT-ALGORITHMS" title="Table F.16. Supported Algorithms for crypt()">Table F.16</a> lists the algorithms
  62. supported by the <code class="function">crypt()</code> function.
  63. </p><div class="table" id="PGCRYPTO-CRYPT-ALGORITHMS"><p class="title"><strong>Table F.16. Supported Algorithms for <code class="function">crypt()</code></strong></p><div class="table-contents"><table class="table" summary="Supported Algorithms for crypt()" border="1"><colgroup><col /><col /><col /><col /><col /><col /></colgroup><thead><tr><th>Algorithm</th><th>Max Password Length</th><th>Adaptive?</th><th>Salt Bits</th><th>Output Length</th><th>Description</th></tr></thead><tbody><tr><td><code class="literal">bf</code></td><td>72</td><td>yes</td><td>128</td><td>60</td><td>Blowfish-based, variant 2a</td></tr><tr><td><code class="literal">md5</code></td><td>unlimited</td><td>no</td><td>48</td><td>34</td><td>MD5-based crypt</td></tr><tr><td><code class="literal">xdes</code></td><td>8</td><td>yes</td><td>24</td><td>20</td><td>Extended DES</td></tr><tr><td><code class="literal">des</code></td><td>8</td><td>no</td><td>12</td><td>13</td><td>Original UNIX crypt</td></tr></tbody></table></div></div><br class="table-break" /><div class="sect3" id="id-1.11.7.34.6.7"><div class="titlepage"><div><div><h4 class="title">F.25.2.1. <code class="function">crypt()</code></h4></div></div></div><a id="id-1.11.7.34.6.7.2" class="indexterm"></a><pre class="synopsis">
  64. crypt(password text, salt text) returns text
  65. </pre><p>
  66. Calculates a crypt(3)-style hash of <em class="parameter"><code>password</code></em>.
  67. When storing a new password, you need to use
  68. <code class="function">gen_salt()</code> to generate a new <em class="parameter"><code>salt</code></em> value.
  69. To check a password, pass the stored hash value as <em class="parameter"><code>salt</code></em>,
  70. and test whether the result matches the stored value.
  71. </p><p>
  72. Example of setting a new password:
  73. </p><pre class="programlisting">
  74. UPDATE ... SET pswhash = crypt('new password', gen_salt('md5'));
  75. </pre><p>
  76. </p><p>
  77. Example of authentication:
  78. </p><pre class="programlisting">
  79. SELECT (pswhash = crypt('entered password', pswhash)) AS pswmatch FROM ... ;
  80. </pre><p>
  81. This returns <code class="literal">true</code> if the entered password is correct.
  82. </p></div><div class="sect3" id="id-1.11.7.34.6.8"><div class="titlepage"><div><div><h4 class="title">F.25.2.2. <code class="function">gen_salt()</code></h4></div></div></div><a id="id-1.11.7.34.6.8.2" class="indexterm"></a><pre class="synopsis">
  83. gen_salt(type text [, iter_count integer ]) returns text
  84. </pre><p>
  85. Generates a new random salt string for use in <code class="function">crypt()</code>.
  86. The salt string also tells <code class="function">crypt()</code> which algorithm to use.
  87. </p><p>
  88. The <em class="parameter"><code>type</code></em> parameter specifies the hashing algorithm.
  89. The accepted types are: <code class="literal">des</code>, <code class="literal">xdes</code>,
  90. <code class="literal">md5</code> and <code class="literal">bf</code>.
  91. </p><p>
  92. The <em class="parameter"><code>iter_count</code></em> parameter lets the user specify the iteration
  93. count, for algorithms that have one.
  94. The higher the count, the more time it takes to hash
  95. the password and therefore the more time to break it. Although with
  96. too high a count the time to calculate a hash may be several years
  97. — which is somewhat impractical. If the <em class="parameter"><code>iter_count</code></em>
  98. parameter is omitted, the default iteration count is used.
  99. Allowed values for <em class="parameter"><code>iter_count</code></em> depend on the algorithm and
  100. are shown in <a class="xref" href="pgcrypto.html#PGCRYPTO-ICFC-TABLE" title="Table F.17. Iteration Counts for crypt()">Table F.17</a>.
  101. </p><div class="table" id="PGCRYPTO-ICFC-TABLE"><p class="title"><strong>Table F.17. Iteration Counts for <code class="function">crypt()</code></strong></p><div class="table-contents"><table class="table" summary="Iteration Counts for crypt()" border="1"><colgroup><col /><col /><col /><col /></colgroup><thead><tr><th>Algorithm</th><th>Default</th><th>Min</th><th>Max</th></tr></thead><tbody><tr><td><code class="literal">xdes</code></td><td>725</td><td>1</td><td>16777215</td></tr><tr><td><code class="literal">bf</code></td><td>6</td><td>4</td><td>31</td></tr></tbody></table></div></div><br class="table-break" /><p>
  102. For <code class="literal">xdes</code> there is an additional limitation that the
  103. iteration count must be an odd number.
  104. </p><p>
  105. To pick an appropriate iteration count, consider that
  106. the original DES crypt was designed to have the speed of 4 hashes per
  107. second on the hardware of that time.
  108. Slower than 4 hashes per second would probably dampen usability.
  109. Faster than 100 hashes per second is probably too fast.
  110. </p><p>
  111. <a class="xref" href="pgcrypto.html#PGCRYPTO-HASH-SPEED-TABLE" title="Table F.18. Hash Algorithm Speeds">Table F.18</a> gives an overview of the relative slowness
  112. of different hashing algorithms.
  113. The table shows how much time it would take to try all
  114. combinations of characters in an 8-character password, assuming
  115. that the password contains either only lower case letters, or
  116. upper- and lower-case letters and numbers.
  117. In the <code class="literal">crypt-bf</code> entries, the number after a slash is
  118. the <em class="parameter"><code>iter_count</code></em> parameter of
  119. <code class="function">gen_salt</code>.
  120. </p><div class="table" id="PGCRYPTO-HASH-SPEED-TABLE"><p class="title"><strong>Table F.18. Hash Algorithm Speeds</strong></p><div class="table-contents"><table class="table" summary="Hash Algorithm Speeds" border="1"><colgroup><col /><col /><col /><col /><col /></colgroup><thead><tr><th>Algorithm</th><th>Hashes/sec</th><th>For <code class="literal">[a-z]</code></th><th>For <code class="literal">[A-Za-z0-9]</code></th><th>Duration relative to <code class="literal">md5 hash</code></th></tr></thead><tbody><tr><td><code class="literal">crypt-bf/8</code></td><td>1792</td><td>4 years</td><td>3927 years</td><td>100k</td></tr><tr><td><code class="literal">crypt-bf/7</code></td><td>3648</td><td>2 years</td><td>1929 years</td><td>50k</td></tr><tr><td><code class="literal">crypt-bf/6</code></td><td>7168</td><td>1 year</td><td>982 years</td><td>25k</td></tr><tr><td><code class="literal">crypt-bf/5</code></td><td>13504</td><td>188 days</td><td>521 years</td><td>12.5k</td></tr><tr><td><code class="literal">crypt-md5</code></td><td>171584</td><td>15 days</td><td>41 years</td><td>1k</td></tr><tr><td><code class="literal">crypt-des</code></td><td>23221568</td><td>157.5 minutes</td><td>108 days</td><td>7</td></tr><tr><td><code class="literal">sha1</code></td><td>37774272</td><td>90 minutes</td><td>68 days</td><td>4</td></tr><tr><td><code class="literal">md5</code> (hash)</td><td>150085504</td><td>22.5 minutes</td><td>17 days</td><td>1</td></tr></tbody></table></div></div><br class="table-break" /><p>
  121. Notes:
  122. </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
  123. The machine used is an Intel Mobile Core i3.
  124. </p></li><li class="listitem"><p>
  125. <code class="literal">crypt-des</code> and <code class="literal">crypt-md5</code> algorithm numbers are
  126. taken from John the Ripper v1.6.38 <code class="literal">-test</code> output.
  127. </p></li><li class="listitem"><p>
  128. <code class="literal">md5 hash</code> numbers are from mdcrack 1.2.
  129. </p></li><li class="listitem"><p>
  130. <code class="literal">sha1</code> numbers are from lcrack-20031130-beta.
  131. </p></li><li class="listitem"><p>
  132. <code class="literal">crypt-bf</code> numbers are taken using a simple program that
  133. loops over 1000 8-character passwords. That way I can show the speed
  134. with different numbers of iterations. For reference: <code class="literal">john
  135. -test</code> shows 13506 loops/sec for <code class="literal">crypt-bf/5</code>.
  136. (The very small
  137. difference in results is in accordance with the fact that the
  138. <code class="literal">crypt-bf</code> implementation in <code class="filename">pgcrypto</code>
  139. is the same one used in John the Ripper.)
  140. </p></li></ul></div><p>
  141. Note that <span class="quote">“<span class="quote">try all combinations</span>”</span> is not a realistic exercise.
  142. Usually password cracking is done with the help of dictionaries, which
  143. contain both regular words and various mutations of them. So, even
  144. somewhat word-like passwords could be cracked much faster than the above
  145. numbers suggest, while a 6-character non-word-like password may escape
  146. cracking. Or not.
  147. </p></div></div><div class="sect2" id="id-1.11.7.34.7"><div class="titlepage"><div><div><h3 class="title">F.25.3. PGP Encryption Functions</h3></div></div></div><p>
  148. The functions here implement the encryption part of the OpenPGP (RFC 4880)
  149. standard. Supported are both symmetric-key and public-key encryption.
  150. </p><p>
  151. An encrypted PGP message consists of 2 parts, or <em class="firstterm">packets</em>:
  152. </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
  153. Packet containing a session key — either symmetric-key or public-key
  154. encrypted.
  155. </p></li><li class="listitem"><p>
  156. Packet containing data encrypted with the session key.
  157. </p></li></ul></div><p>
  158. When encrypting with a symmetric key (i.e., a password):
  159. </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
  160. The given password is hashed using a String2Key (S2K) algorithm. This is
  161. rather similar to <code class="function">crypt()</code> algorithms — purposefully
  162. slow and with random salt — but it produces a full-length binary
  163. key.
  164. </p></li><li class="listitem"><p>
  165. If a separate session key is requested, a new random key will be
  166. generated. Otherwise the S2K key will be used directly as the session
  167. key.
  168. </p></li><li class="listitem"><p>
  169. If the S2K key is to be used directly, then only S2K settings will be put
  170. into the session key packet. Otherwise the session key will be encrypted
  171. with the S2K key and put into the session key packet.
  172. </p></li></ol></div><p>
  173. When encrypting with a public key:
  174. </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
  175. A new random session key is generated.
  176. </p></li><li class="listitem"><p>
  177. It is encrypted using the public key and put into the session key packet.
  178. </p></li></ol></div><p>
  179. In either case the data to be encrypted is processed as follows:
  180. </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
  181. Optional data-manipulation: compression, conversion to UTF-8,
  182. and/or conversion of line-endings.
  183. </p></li><li class="listitem"><p>
  184. The data is prefixed with a block of random bytes. This is equivalent
  185. to using a random IV.
  186. </p></li><li class="listitem"><p>
  187. An SHA1 hash of the random prefix and data is appended.
  188. </p></li><li class="listitem"><p>
  189. All this is encrypted with the session key and placed in the data packet.
  190. </p></li></ol></div><div class="sect3" id="id-1.11.7.34.7.11"><div class="titlepage"><div><div><h4 class="title">F.25.3.1. <code class="function">pgp_sym_encrypt()</code></h4></div></div></div><a id="id-1.11.7.34.7.11.2" class="indexterm"></a><a id="id-1.11.7.34.7.11.3" class="indexterm"></a><pre class="synopsis">
  191. pgp_sym_encrypt(data text, psw text [, options text ]) returns bytea
  192. pgp_sym_encrypt_bytea(data bytea, psw text [, options text ]) returns bytea
  193. </pre><p>
  194. Encrypt <em class="parameter"><code>data</code></em> with a symmetric PGP key <em class="parameter"><code>psw</code></em>.
  195. The <em class="parameter"><code>options</code></em> parameter can contain option settings,
  196. as described below.
  197. </p></div><div class="sect3" id="id-1.11.7.34.7.12"><div class="titlepage"><div><div><h4 class="title">F.25.3.2. <code class="function">pgp_sym_decrypt()</code></h4></div></div></div><a id="id-1.11.7.34.7.12.2" class="indexterm"></a><a id="id-1.11.7.34.7.12.3" class="indexterm"></a><pre class="synopsis">
  198. pgp_sym_decrypt(msg bytea, psw text [, options text ]) returns text
  199. pgp_sym_decrypt_bytea(msg bytea, psw text [, options text ]) returns bytea
  200. </pre><p>
  201. Decrypt a symmetric-key-encrypted PGP message.
  202. </p><p>
  203. Decrypting <code class="type">bytea</code> data with <code class="function">pgp_sym_decrypt</code> is disallowed.
  204. This is to avoid outputting invalid character data. Decrypting
  205. originally textual data with <code class="function">pgp_sym_decrypt_bytea</code> is fine.
  206. </p><p>
  207. The <em class="parameter"><code>options</code></em> parameter can contain option settings,
  208. as described below.
  209. </p></div><div class="sect3" id="id-1.11.7.34.7.13"><div class="titlepage"><div><div><h4 class="title">F.25.3.3. <code class="function">pgp_pub_encrypt()</code></h4></div></div></div><a id="id-1.11.7.34.7.13.2" class="indexterm"></a><a id="id-1.11.7.34.7.13.3" class="indexterm"></a><pre class="synopsis">
  210. pgp_pub_encrypt(data text, key bytea [, options text ]) returns bytea
  211. pgp_pub_encrypt_bytea(data bytea, key bytea [, options text ]) returns bytea
  212. </pre><p>
  213. Encrypt <em class="parameter"><code>data</code></em> with a public PGP key <em class="parameter"><code>key</code></em>.
  214. Giving this function a secret key will produce an error.
  215. </p><p>
  216. The <em class="parameter"><code>options</code></em> parameter can contain option settings,
  217. as described below.
  218. </p></div><div class="sect3" id="id-1.11.7.34.7.14"><div class="titlepage"><div><div><h4 class="title">F.25.3.4. <code class="function">pgp_pub_decrypt()</code></h4></div></div></div><a id="id-1.11.7.34.7.14.2" class="indexterm"></a><a id="id-1.11.7.34.7.14.3" class="indexterm"></a><pre class="synopsis">
  219. pgp_pub_decrypt(msg bytea, key bytea [, psw text [, options text ]]) returns text
  220. pgp_pub_decrypt_bytea(msg bytea, key bytea [, psw text [, options text ]]) returns bytea
  221. </pre><p>
  222. Decrypt a public-key-encrypted message. <em class="parameter"><code>key</code></em> must be the
  223. secret key corresponding to the public key that was used to encrypt.
  224. If the secret key is password-protected, you must give the password in
  225. <em class="parameter"><code>psw</code></em>. If there is no password, but you want to specify
  226. options, you need to give an empty password.
  227. </p><p>
  228. Decrypting <code class="type">bytea</code> data with <code class="function">pgp_pub_decrypt</code> is disallowed.
  229. This is to avoid outputting invalid character data. Decrypting
  230. originally textual data with <code class="function">pgp_pub_decrypt_bytea</code> is fine.
  231. </p><p>
  232. The <em class="parameter"><code>options</code></em> parameter can contain option settings,
  233. as described below.
  234. </p></div><div class="sect3" id="id-1.11.7.34.7.15"><div class="titlepage"><div><div><h4 class="title">F.25.3.5. <code class="function">pgp_key_id()</code></h4></div></div></div><a id="id-1.11.7.34.7.15.2" class="indexterm"></a><pre class="synopsis">
  235. pgp_key_id(bytea) returns text
  236. </pre><p>
  237. <code class="function">pgp_key_id</code> extracts the key ID of a PGP public or secret key.
  238. Or it gives the key ID that was used for encrypting the data, if given
  239. an encrypted message.
  240. </p><p>
  241. It can return 2 special key IDs:
  242. </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
  243. <code class="literal">SYMKEY</code>
  244. </p><p>
  245. The message is encrypted with a symmetric key.
  246. </p></li><li class="listitem"><p>
  247. <code class="literal">ANYKEY</code>
  248. </p><p>
  249. The message is public-key encrypted, but the key ID has been removed.
  250. That means you will need to try all your secret keys on it to see
  251. which one decrypts it. <code class="filename">pgcrypto</code> itself does not produce
  252. such messages.
  253. </p></li></ul></div><p>
  254. Note that different keys may have the same ID. This is rare but a normal
  255. event. The client application should then try to decrypt with each one,
  256. to see which fits — like handling <code class="literal">ANYKEY</code>.
  257. </p></div><div class="sect3" id="id-1.11.7.34.7.16"><div class="titlepage"><div><div><h4 class="title">F.25.3.6. <code class="function">armor()</code>, <code class="function">dearmor()</code></h4></div></div></div><a id="id-1.11.7.34.7.16.2" class="indexterm"></a><a id="id-1.11.7.34.7.16.3" class="indexterm"></a><pre class="synopsis">
  258. armor(data bytea [ , keys text[], values text[] ]) returns text
  259. dearmor(data text) returns bytea
  260. </pre><p>
  261. These functions wrap/unwrap binary data into PGP ASCII-armor format,
  262. which is basically Base64 with CRC and additional formatting.
  263. </p><p>
  264. If the <em class="parameter"><code>keys</code></em> and <em class="parameter"><code>values</code></em> arrays are specified,
  265. an <em class="firstterm">armor header</em> is added to the armored format for each
  266. key/value pair. Both arrays must be single-dimensional, and they must
  267. be of the same length. The keys and values cannot contain any non-ASCII
  268. characters.
  269. </p></div><div class="sect3" id="id-1.11.7.34.7.17"><div class="titlepage"><div><div><h4 class="title">F.25.3.7. <code class="function">pgp_armor_headers</code></h4></div></div></div><a id="id-1.11.7.34.7.17.2" class="indexterm"></a><pre class="synopsis">
  270. pgp_armor_headers(data text, key out text, value out text) returns setof record
  271. </pre><p>
  272. <code class="function">pgp_armor_headers()</code> extracts the armor headers from
  273. <em class="parameter"><code>data</code></em>. The return value is a set of rows with two columns,
  274. key and value. If the keys or values contain any non-ASCII characters,
  275. they are treated as UTF-8.
  276. </p></div><div class="sect3" id="id-1.11.7.34.7.18"><div class="titlepage"><div><div><h4 class="title">F.25.3.8. Options for PGP Functions</h4></div></div></div><p>
  277. Options are named to be similar to GnuPG. An option's value should be
  278. given after an equal sign; separate options from each other with commas.
  279. For example:
  280. </p><pre class="programlisting">
  281. pgp_sym_encrypt(data, psw, 'compress-algo=1, cipher-algo=aes256')
  282. </pre><p>
  283. </p><p>
  284. All of the options except <code class="literal">convert-crlf</code> apply only to
  285. encrypt functions. Decrypt functions get the parameters from the PGP
  286. data.
  287. </p><p>
  288. The most interesting options are probably
  289. <code class="literal">compress-algo</code> and <code class="literal">unicode-mode</code>.
  290. The rest should have reasonable defaults.
  291. </p><div class="sect4" id="id-1.11.7.34.7.18.5"><div class="titlepage"><div><div><h5 class="title">F.25.3.8.1. cipher-algo</h5></div></div></div><p>
  292. Which cipher algorithm to use.
  293. </p><div class="literallayout"><p><br />
  294. Values: bf, aes128, aes192, aes256 (OpenSSL-only: <code class="literal">3des</code>, <code class="literal">cast5</code>)<br />
  295. Default: aes128<br />
  296. Applies to: pgp_sym_encrypt, pgp_pub_encrypt<br />
  297. </p></div></div><div class="sect4" id="id-1.11.7.34.7.18.6"><div class="titlepage"><div><div><h5 class="title">F.25.3.8.2. compress-algo</h5></div></div></div><p>
  298. Which compression algorithm to use. Only available if
  299. <span class="productname">PostgreSQL</span> was built with zlib.
  300. </p><div class="literallayout"><p><br />
  301. Values:<br />
  302.   0 - no compression<br />
  303.   1 - ZIP compression<br />
  304.   2 - ZLIB compression (= ZIP plus meta-data and block CRCs)<br />
  305. Default: 0<br />
  306. Applies to: pgp_sym_encrypt, pgp_pub_encrypt<br />
  307. </p></div></div><div class="sect4" id="id-1.11.7.34.7.18.7"><div class="titlepage"><div><div><h5 class="title">F.25.3.8.3. compress-level</h5></div></div></div><p>
  308. How much to compress. Higher levels compress smaller but are slower.
  309. 0 disables compression.
  310. </p><div class="literallayout"><p><br />
  311. Values: 0, 1-9<br />
  312. Default: 6<br />
  313. Applies to: pgp_sym_encrypt, pgp_pub_encrypt<br />
  314. </p></div></div><div class="sect4" id="id-1.11.7.34.7.18.8"><div class="titlepage"><div><div><h5 class="title">F.25.3.8.4. convert-crlf</h5></div></div></div><p>
  315. Whether to convert <code class="literal">\n</code> into <code class="literal">\r\n</code> when
  316. encrypting and <code class="literal">\r\n</code> to <code class="literal">\n</code> when
  317. decrypting. RFC 4880 specifies that text data should be stored using
  318. <code class="literal">\r\n</code> line-feeds. Use this to get fully RFC-compliant
  319. behavior.
  320. </p><div class="literallayout"><p><br />
  321. Values: 0, 1<br />
  322. Default: 0<br />
  323. Applies to: pgp_sym_encrypt, pgp_pub_encrypt, pgp_sym_decrypt, pgp_pub_decrypt<br />
  324. </p></div></div><div class="sect4" id="id-1.11.7.34.7.18.9"><div class="titlepage"><div><div><h5 class="title">F.25.3.8.5. disable-mdc</h5></div></div></div><p>
  325. Do not protect data with SHA-1. The only good reason to use this
  326. option is to achieve compatibility with ancient PGP products, predating
  327. the addition of SHA-1 protected packets to RFC 4880.
  328. Recent gnupg.org and pgp.com software supports it fine.
  329. </p><div class="literallayout"><p><br />
  330. Values: 0, 1<br />
  331. Default: 0<br />
  332. Applies to: pgp_sym_encrypt, pgp_pub_encrypt<br />
  333. </p></div></div><div class="sect4" id="id-1.11.7.34.7.18.10"><div class="titlepage"><div><div><h5 class="title">F.25.3.8.6. sess-key</h5></div></div></div><p>
  334. Use separate session key. Public-key encryption always uses a separate
  335. session key; this option is for symmetric-key encryption, which by default
  336. uses the S2K key directly.
  337. </p><div class="literallayout"><p><br />
  338. Values: 0, 1<br />
  339. Default: 0<br />
  340. Applies to: pgp_sym_encrypt<br />
  341. </p></div></div><div class="sect4" id="id-1.11.7.34.7.18.11"><div class="titlepage"><div><div><h5 class="title">F.25.3.8.7. s2k-mode</h5></div></div></div><p>
  342. Which S2K algorithm to use.
  343. </p><div class="literallayout"><p><br />
  344. Values:<br />
  345.   0 - Without salt.  Dangerous!<br />
  346.   1 - With salt but with fixed iteration count.<br />
  347.   3 - Variable iteration count.<br />
  348. Default: 3<br />
  349. Applies to: pgp_sym_encrypt<br />
  350. </p></div></div><div class="sect4" id="id-1.11.7.34.7.18.12"><div class="titlepage"><div><div><h5 class="title">F.25.3.8.8. s2k-count</h5></div></div></div><p>
  351. The number of iterations of the S2K algorithm to use. It must
  352. be a value between 1024 and 65011712, inclusive.
  353. </p><div class="literallayout"><p><br />
  354. Default: A random value between 65536 and 253952<br />
  355. Applies to: pgp_sym_encrypt, only with s2k-mode=3<br />
  356. </p></div></div><div class="sect4" id="id-1.11.7.34.7.18.13"><div class="titlepage"><div><div><h5 class="title">F.25.3.8.9. s2k-digest-algo</h5></div></div></div><p>
  357. Which digest algorithm to use in S2K calculation.
  358. </p><div class="literallayout"><p><br />
  359. Values: md5, sha1<br />
  360. Default: sha1<br />
  361. Applies to: pgp_sym_encrypt<br />
  362. </p></div></div><div class="sect4" id="id-1.11.7.34.7.18.14"><div class="titlepage"><div><div><h5 class="title">F.25.3.8.10. s2k-cipher-algo</h5></div></div></div><p>
  363. Which cipher to use for encrypting separate session key.
  364. </p><div class="literallayout"><p><br />
  365. Values: bf, aes, aes128, aes192, aes256<br />
  366. Default: use cipher-algo<br />
  367. Applies to: pgp_sym_encrypt<br />
  368. </p></div></div><div class="sect4" id="id-1.11.7.34.7.18.15"><div class="titlepage"><div><div><h5 class="title">F.25.3.8.11. unicode-mode</h5></div></div></div><p>
  369. Whether to convert textual data from database internal encoding to
  370. UTF-8 and back. If your database already is UTF-8, no conversion will
  371. be done, but the message will be tagged as UTF-8. Without this option
  372. it will not be.
  373. </p><div class="literallayout"><p><br />
  374. Values: 0, 1<br />
  375. Default: 0<br />
  376. Applies to: pgp_sym_encrypt, pgp_pub_encrypt<br />
  377. </p></div></div></div><div class="sect3" id="id-1.11.7.34.7.19"><div class="titlepage"><div><div><h4 class="title">F.25.3.9. Generating PGP Keys with GnuPG</h4></div></div></div><p>
  378. To generate a new key:
  379. </p><pre class="programlisting">
  380. gpg --gen-key
  381. </pre><p>
  382. </p><p>
  383. The preferred key type is <span class="quote">“<span class="quote">DSA and Elgamal</span>”</span>.
  384. </p><p>
  385. For RSA encryption you must create either DSA or RSA sign-only key
  386. as master and then add an RSA encryption subkey with
  387. <code class="literal">gpg --edit-key</code>.
  388. </p><p>
  389. To list keys:
  390. </p><pre class="programlisting">
  391. gpg --list-secret-keys
  392. </pre><p>
  393. </p><p>
  394. To export a public key in ASCII-armor format:
  395. </p><pre class="programlisting">
  396. gpg -a --export KEYID &gt; public.key
  397. </pre><p>
  398. </p><p>
  399. To export a secret key in ASCII-armor format:
  400. </p><pre class="programlisting">
  401. gpg -a --export-secret-keys KEYID &gt; secret.key
  402. </pre><p>
  403. </p><p>
  404. You need to use <code class="function">dearmor()</code> on these keys before giving them to
  405. the PGP functions. Or if you can handle binary data, you can drop
  406. <code class="literal">-a</code> from the command.
  407. </p><p>
  408. For more details see <code class="literal">man gpg</code>,
  409. <a class="ulink" href="https://www.gnupg.org/gph/en/manual.html" target="_top">The GNU
  410. Privacy Handbook</a> and other documentation on
  411. <a class="ulink" href="https://www.gnupg.org/" target="_top">https://www.gnupg.org/</a>.
  412. </p></div><div class="sect3" id="id-1.11.7.34.7.20"><div class="titlepage"><div><div><h4 class="title">F.25.3.10. Limitations of PGP Code</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
  413. No support for signing. That also means that it is not checked
  414. whether the encryption subkey belongs to the master key.
  415. </p></li><li class="listitem"><p>
  416. No support for encryption key as master key. As such practice
  417. is generally discouraged, this should not be a problem.
  418. </p></li><li class="listitem"><p>
  419. No support for several subkeys. This may seem like a problem, as this
  420. is common practice. On the other hand, you should not use your regular
  421. GPG/PGP keys with <code class="filename">pgcrypto</code>, but create new ones,
  422. as the usage scenario is rather different.
  423. </p></li></ul></div></div></div><div class="sect2" id="id-1.11.7.34.8"><div class="titlepage"><div><div><h3 class="title">F.25.4. Raw Encryption Functions</h3></div></div></div><p>
  424. These functions only run a cipher over data; they don't have any advanced
  425. features of PGP encryption. Therefore they have some major problems:
  426. </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
  427. They use user key directly as cipher key.
  428. </p></li><li class="listitem"><p>
  429. They don't provide any integrity checking, to see
  430. if the encrypted data was modified.
  431. </p></li><li class="listitem"><p>
  432. They expect that users manage all encryption parameters
  433. themselves, even IV.
  434. </p></li><li class="listitem"><p>
  435. They don't handle text.
  436. </p></li></ol></div><p>
  437. So, with the introduction of PGP encryption, usage of raw
  438. encryption functions is discouraged.
  439. </p><a id="id-1.11.7.34.8.5" class="indexterm"></a><a id="id-1.11.7.34.8.6" class="indexterm"></a><a id="id-1.11.7.34.8.7" class="indexterm"></a><a id="id-1.11.7.34.8.8" class="indexterm"></a><pre class="synopsis">
  440. encrypt(data bytea, key bytea, type text) returns bytea
  441. decrypt(data bytea, key bytea, type text) returns bytea
  442. encrypt_iv(data bytea, key bytea, iv bytea, type text) returns bytea
  443. decrypt_iv(data bytea, key bytea, iv bytea, type text) returns bytea
  444. </pre><p>
  445. Encrypt/decrypt data using the cipher method specified by
  446. <em class="parameter"><code>type</code></em>. The syntax of the
  447. <em class="parameter"><code>type</code></em> string is:
  448. </p><pre class="synopsis">
  449. <em class="replaceable"><code>algorithm</code></em> [<span class="optional"> <code class="literal">-</code> <em class="replaceable"><code>mode</code></em> </span>] [<span class="optional"> <code class="literal">/pad:</code> <em class="replaceable"><code>padding</code></em> </span>]
  450. </pre><p>
  451. where <em class="replaceable"><code>algorithm</code></em> is one of:
  452. </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><code class="literal">bf</code> — Blowfish</p></li><li class="listitem"><p><code class="literal">aes</code> — AES (Rijndael-128, -192 or -256)</p></li></ul></div><p>
  453. and <em class="replaceable"><code>mode</code></em> is one of:
  454. </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
  455. <code class="literal">cbc</code> — next block depends on previous (default)
  456. </p></li><li class="listitem"><p>
  457. <code class="literal">ecb</code> — each block is encrypted separately (for
  458. testing only)
  459. </p></li></ul></div><p>
  460. and <em class="replaceable"><code>padding</code></em> is one of:
  461. </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
  462. <code class="literal">pkcs</code> — data may be any length (default)
  463. </p></li><li class="listitem"><p>
  464. <code class="literal">none</code> — data must be multiple of cipher block size
  465. </p></li></ul></div><p>
  466. </p><p>
  467. So, for example, these are equivalent:
  468. </p><pre class="programlisting">
  469. encrypt(data, 'fooz', 'bf')
  470. encrypt(data, 'fooz', 'bf-cbc/pad:pkcs')
  471. </pre><p>
  472. </p><p>
  473. In <code class="function">encrypt_iv</code> and <code class="function">decrypt_iv</code>, the
  474. <em class="parameter"><code>iv</code></em> parameter is the initial value for the CBC mode;
  475. it is ignored for ECB.
  476. It is clipped or padded with zeroes if not exactly block size.
  477. It defaults to all zeroes in the functions without this parameter.
  478. </p></div><div class="sect2" id="id-1.11.7.34.9"><div class="titlepage"><div><div><h3 class="title">F.25.5. Random-Data Functions</h3></div></div></div><a id="id-1.11.7.34.9.2" class="indexterm"></a><pre class="synopsis">
  479. gen_random_bytes(count integer) returns bytea
  480. </pre><p>
  481. Returns <em class="parameter"><code>count</code></em> cryptographically strong random bytes.
  482. At most 1024 bytes can be extracted at a time. This is to avoid
  483. draining the randomness generator pool.
  484. </p><a id="id-1.11.7.34.9.5" class="indexterm"></a><pre class="synopsis">
  485. gen_random_uuid() returns uuid
  486. </pre><p>
  487. Returns a version 4 (random) UUID.
  488. </p></div><div class="sect2" id="id-1.11.7.34.10"><div class="titlepage"><div><div><h3 class="title">F.25.6. Notes</h3></div></div></div><div class="sect3" id="id-1.11.7.34.10.2"><div class="titlepage"><div><div><h4 class="title">F.25.6.1. Configuration</h4></div></div></div><p>
  489. <code class="filename">pgcrypto</code> configures itself according to the findings of the
  490. main PostgreSQL <code class="literal">configure</code> script. The options that
  491. affect it are <code class="literal">--with-zlib</code> and
  492. <code class="literal">--with-openssl</code>.
  493. </p><p>
  494. When compiled with zlib, PGP encryption functions are able to
  495. compress data before encrypting.
  496. </p><p>
  497. When compiled with OpenSSL, there will be more algorithms available.
  498. Also public-key encryption functions will be faster as OpenSSL
  499. has more optimized BIGNUM functions.
  500. </p><div class="table" id="PGCRYPTO-WITH-WITHOUT-OPENSSL"><p class="title"><strong>Table F.19. Summary of Functionality with and without OpenSSL</strong></p><div class="table-contents"><table class="table" summary="Summary of Functionality with and without OpenSSL" border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Functionality</th><th>Built-in</th><th>With OpenSSL</th></tr></thead><tbody><tr><td>MD5</td><td>yes</td><td>yes</td></tr><tr><td>SHA1</td><td>yes</td><td>yes</td></tr><tr><td>SHA224/256/384/512</td><td>yes</td><td>yes</td></tr><tr><td>Other digest algorithms</td><td>no</td><td>yes (Note 1)</td></tr><tr><td>Blowfish</td><td>yes</td><td>yes</td></tr><tr><td>AES</td><td>yes</td><td>yes</td></tr><tr><td>DES/3DES/CAST5</td><td>no</td><td>yes</td></tr><tr><td>Raw encryption</td><td>yes</td><td>yes</td></tr><tr><td>PGP Symmetric encryption</td><td>yes</td><td>yes</td></tr><tr><td>PGP Public-Key encryption</td><td>yes</td><td>yes</td></tr></tbody></table></div></div><br class="table-break" /><p>
  501. Notes:
  502. </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>
  503. Any digest algorithm OpenSSL supports is automatically picked up.
  504. This is not possible with ciphers, which need to be supported
  505. explicitly.
  506. </p></li></ol></div></div><div class="sect3" id="id-1.11.7.34.10.3"><div class="titlepage"><div><div><h4 class="title">F.25.6.2. NULL Handling</h4></div></div></div><p>
  507. As is standard in SQL, all functions return NULL, if any of the arguments
  508. are NULL. This may create security risks on careless usage.
  509. </p></div><div class="sect3" id="id-1.11.7.34.10.4"><div class="titlepage"><div><div><h4 class="title">F.25.6.3. Security Limitations</h4></div></div></div><p>
  510. All <code class="filename">pgcrypto</code> functions run inside the database server.
  511. That means that all
  512. the data and passwords move between <code class="filename">pgcrypto</code> and client
  513. applications in clear text. Thus you must:
  514. </p><div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem"><p>Connect locally or use SSL connections.</p></li><li class="listitem"><p>Trust both system and database administrator.</p></li></ol></div><p>
  515. If you cannot, then better do crypto inside client application.
  516. </p><p>
  517. The implementation does not resist
  518. <a class="ulink" href="https://en.wikipedia.org/wiki/Side-channel_attack" target="_top">side-channel
  519. attacks</a>. For example, the time required for
  520. a <code class="filename">pgcrypto</code> decryption function to complete varies among
  521. ciphertexts of a given size.
  522. </p></div><div class="sect3" id="id-1.11.7.34.10.5"><div class="titlepage"><div><div><h4 class="title">F.25.6.4. Useful Reading</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="ulink" href="https://www.gnupg.org/gph/en/manual.html" target="_top">https://www.gnupg.org/gph/en/manual.html</a></p><p>The GNU Privacy Handbook.</p></li><li class="listitem"><p><a class="ulink" href="https://www.openwall.com/crypt/" target="_top">https://www.openwall.com/crypt/</a></p><p>Describes the crypt-blowfish algorithm.</p></li><li class="listitem"><p>
  523. <a class="ulink" href="https://www.iusmentis.com/security/passphrasefaq/" target="_top">https://www.iusmentis.com/security/passphrasefaq/</a>
  524. </p><p>How to choose a good password.</p></li><li class="listitem"><p><a class="ulink" href="http://world.std.com/~reinhold/diceware.html" target="_top">http://world.std.com/~reinhold/diceware.html</a></p><p>Interesting idea for picking passwords.</p></li><li class="listitem"><p>
  525. <a class="ulink" href="http://www.interhack.net/people/cmcurtin/snake-oil-faq.html" target="_top">http://www.interhack.net/people/cmcurtin/snake-oil-faq.html</a>
  526. </p><p>Describes good and bad cryptography.</p></li></ul></div></div><div class="sect3" id="id-1.11.7.34.10.6"><div class="titlepage"><div><div><h4 class="title">F.25.6.5. Technical References</h4></div></div></div><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="ulink" href="https://tools.ietf.org/html/rfc4880" target="_top">https://tools.ietf.org/html/rfc4880</a></p><p>OpenPGP message format.</p></li><li class="listitem"><p><a class="ulink" href="https://tools.ietf.org/html/rfc1321" target="_top">https://tools.ietf.org/html/rfc1321</a></p><p>The MD5 Message-Digest Algorithm.</p></li><li class="listitem"><p><a class="ulink" href="https://tools.ietf.org/html/rfc2104" target="_top">https://tools.ietf.org/html/rfc2104</a></p><p>HMAC: Keyed-Hashing for Message Authentication.</p></li><li class="listitem"><p>
  527. <a class="ulink" href="https://www.usenix.org/legacy/events/usenix99/provos.html" target="_top">https://www.usenix.org/legacy/events/usenix99/provos.html</a>
  528. </p><p>Comparison of crypt-des, crypt-md5 and bcrypt algorithms.</p></li><li class="listitem"><p>
  529. <a class="ulink" href="https://en.wikipedia.org/wiki/Fortuna_(PRNG)" target="_top">https://en.wikipedia.org/wiki/Fortuna_(PRNG)</a>
  530. </p><p>Description of Fortuna CSPRNG.</p></li><li class="listitem"><p><a class="ulink" href="https://jlcooke.ca/random/" target="_top">https://jlcooke.ca/random/</a></p><p>Jean-Luc Cooke Fortuna-based <code class="filename">/dev/random</code> driver for Linux.</p></li></ul></div></div></div><div class="sect2" id="id-1.11.7.34.11"><div class="titlepage"><div><div><h3 class="title">F.25.7. Author</h3></div></div></div><p>
  531. Marko Kreen <code class="email">&lt;<a class="email" href="mailto:markokr@gmail.com">markokr@gmail.com</a>&gt;</code>
  532. </p><p>
  533. <code class="filename">pgcrypto</code> uses code from the following sources:
  534. </p><div class="informaltable"><table class="informaltable" border="1"><colgroup><col /><col /><col /></colgroup><thead><tr><th>Algorithm</th><th>Author</th><th>Source origin</th></tr></thead><tbody><tr><td>DES crypt</td><td>David Burren and others</td><td>FreeBSD libcrypt</td></tr><tr><td>MD5 crypt</td><td>Poul-Henning Kamp</td><td>FreeBSD libcrypt</td></tr><tr><td>Blowfish crypt</td><td>Solar Designer</td><td>www.openwall.com</td></tr><tr><td>Blowfish cipher</td><td>Simon Tatham</td><td>PuTTY</td></tr><tr><td>Rijndael cipher</td><td>Brian Gladman</td><td>OpenBSD sys/crypto</td></tr><tr><td>MD5 hash and SHA1</td><td>WIDE Project</td><td>KAME kame/sys/crypto</td></tr><tr><td>SHA256/384/512 </td><td>Aaron D. Gifford</td><td>OpenBSD sys/crypto</td></tr><tr><td>BIGNUM math</td><td>Michael J. Fromberger</td><td>dartmouth.edu/~sting/sw/imath</td></tr></tbody></table></div></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="pgbuffercache.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="contrib.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="pgfreespacemap.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">F.24. pg_buffercache </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> F.26. pg_freespacemap</td></tr></table></div></body></html>
上海开阖软件有限公司 沪ICP备12045867号-1