@@ -164,7 +164,7 @@ hardening mitigations as possible.
164164It is up to you to edit the get key script to get or generate the key
165165however you want. pgsodium can be used to generate a new random key
166166with ` select encode(randombytes_buf(32), 'hex') ` . Other common
167- patterns including prompting for the key on boot, fetching it from an
167+ patterns include prompting for the key on boot, fetching it from an
168168ssh server or managed cloud secret system, or using a command line
169169tool to get it from a hardware security module.
170170
@@ -279,7 +279,7 @@ user_data |
279279optional:
280280
281281 - ` key_type pgsodium.key_type = 'aead-det' ` : The type of key to
282- create.If you do not specify a ` raw_key ` argument, a new derived
282+ create. If you do not specify a ` raw_key ` argument, a new derived
283283 key_id of the correct type will be automatically generated in
284284 ` key_context ` argument context. Possible values are:
285285 - ` aead-det `
@@ -319,15 +319,15 @@ valid and not expired.
319319
320320The pgsodium API has two nested layers of security roles:
321321
322- - ` pgsodium_keyiduser ` Is the less privileged role that can only
322+ - ` pgsodium_keyiduser ` is the less privileged role that can only
323323 access keys by their UUID. This is the role you would typically
324324 give to a user facing application.
325325
326326 - ` pgsodium_keymaker ` is the more privileged role and can work with
327- raw ` bytea ` And managed server keys. You would not typically give
327+ raw ` bytea ` and managed server keys. You would not typically give
328328 this role to a user facing application.
329329
330- Note that public key apis like ` crypto_box ` and ` crypto_sign ` do not
330+ Note that public key APIs like ` crypto_box ` and ` crypto_sign ` do not
331331have "key id" variants, because they work with a combination of four
332332keys, two keypairs for each of two parties.
333333
@@ -347,7 +347,7 @@ pgsodium using the [SECURITY LABEL ...]() PostgreSQL command.
347347
348348If an attacker acquires a dump of the table or database, they will not
349349be able to derive the keys used to encrypt the data since they will
350- not have the root server managed key, which is never revealed to SQL
350+ not have the root server managed key, which is never revealed to SQL.
351351See the [ example file for more details] ( ./example/tce.sql ) .
352352
353353In order to use TCE you must use keys created from the [ Key Management
@@ -431,7 +431,7 @@ The default cryptographic algorithm for the above approach uses a
431431*nonceless* encryption algorithm called `crypto_aead_det_xchacha20()`.
432432This scheme has the advantage that it does not require nonce values,
433433the disadvantage is that duplicate plaintexts will produce duplicate
434- ciphertexts, but this information can not be used to attack the key it
434+ ciphertexts, but this information can not be used to attack the key, it
435435can only reveal the duplication.
436436
437437However duplication is still information, and if you want more
@@ -483,7 +483,7 @@ associated data column. Columns used for associated data must be
483483UPSERT is not a command in PostgreSQL, it is one pattern among many
484484possible when using the `INSERT ... ON CONFLICT DO ...` clause in
485485Postgres to either insert a value, or do some other action, which is
486- commonly to update the alreadt extant row that the command was
486+ commonly to update the already existant row that the command was
487487attempting to INSERT. This pattern usually looks like:
488488
489489```sql
@@ -626,7 +626,7 @@ can avoid this by using derived keys.
626626
627627If you choose to work with your own keys and not restrict yourself to
628628the `pgsodium_keyiduser` role, a useful approach is to keep keys in an
629- external storage and disables logging while injecting the keys into
629+ external storage and disabling logging while injecting the keys into
630630local variables with [`SET
631631LOCAL`](https://www.postgresql.org/docs/current/sql-set.html). If the
632632images of database are hacked or stolen, the keys will not be
@@ -635,7 +635,7 @@ available to the attacker.
635635To disable logging of the key injections, `SET LOCAL` is also used to
636636disable
637637[`log_statements`](https://www.postgresql.org/docs/current/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-WHAT)
638- and then re-enable normal logging afterwards. as shown below. Setting
638+ and then re-enable normal logging afterwards, as shown below. Setting
639639`log_statement` requires superuser privileges:
640640
641641 -- SET LOCAL must be done in a transaction block
@@ -765,7 +765,7 @@ unpredictable sequence of bytes.
765765The `randombytes_buf_deterministic()` returns a `size` bytea
766766containing bytes indistinguishable from random bytes without knowing
767767the seed. For a given seed, this function will always output the same
768- sequence. size can be up to 2^38 (256 GB).
768+ sequence. Size can be up to 2^38 (256 GB).
769769
770770[C API
771771Documentation](https://doc.libsodium.org/generating_random_data)
@@ -800,7 +800,7 @@ multiple times with the same key will produce different ciphertexts.
800800
801801`crypto_secretbox()` encrypts a message using a previously generated
802802nonce and secret key or key id. The encrypted message can be
803- decrypted using `crypto_secretbox_open()` Note that in order to
803+ decrypted using `crypto_secretbox_open()`. Note that in order to
804804decrypt the message, the original nonce will be needed.
805805
806806`crypto_secretbox_open()` decrypts a message encrypted by
@@ -920,10 +920,10 @@ Aggregates:
920920```
921921 crypto_sign_update_agg(message bytea) -> bytea
922922
923- crypto_sign_update_agg(state, bytea message bytea) -> bytea
923+ crypto_sign_update_agg(state bytea, message bytea) -> bytea
924924```
925925
926- These functions are used to authenticate that messages have have come
926+ These functions are used to authenticate that messages have come
927927from a specific originator (the holder of the secret key for which you
928928have the public key), and have not been tampered with.
929929
@@ -1106,7 +1106,7 @@ considered collision-resistant.
11061106Use cases:
11071107
11081108- Hash tables Probabilistic
1109- - data structures such as Bloom filters
1109+ - Data structures such as Bloom filters
11101110- Integrity checking in interactive protocols
11111111
11121112Example:
0 commit comments