Re: Proposed patch for key managment

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Proposed patch for key managment
Дата
Msg-id 20201215170008.GF14596@momjian.us
обсуждение исходный текст
Ответ на Re: Proposed patch for key managment  (Neil Chen <carpenter.nail.cz@gmail.com>)
Список pgsql-hackers
On Tue, Dec 15, 2020 at 10:36:56AM +0800, Neil Chen wrote:
> 2. I tried to add support for AES_CTR mode, and the code for encrypting buffer
> blocks. In the process I found that in pg_cipher_ctx_create, the key length is
> declared as "byte". However, in the CryptoKey structure, the length is stored
> as "bit", which leads me to use a form similar to Key->klen / 8 when I call
> this function. Maybe we should unify the two to avoid unnecessary confusion.

Yes, I would also like to get opinions on this.  We certainly have to
have the key length be in _bit_ units when visible by users, but I see a
lot of cases where we allocate arrays based on bytes.  I am unclear
where the proper units should be.  At a minimum, we should specify the
units in the function parameter names.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Konstantin Knizhnik
Дата:
Сообщение: Re: On login trigger: take three
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: SQL/JSON: functions