Documentation enhancement request (re: Blind Index Planning)
udf2457 opened this issue ยท 9 comments
Hi,
Re: The Blind Index Planning page of the docs (https://ciphersweet.paragonie.com/php/blind-index-planning)
It would be helpful for the non-cryptographers amongst us to perhaps provide a plain-english definition of what you mean by the terms output size
and input domain
.
I have tried asking Mr Google what an index input domain is but he was not being particularly helpful. Therefore whilst I think I know what you mean by the term, I would rather be "safe than sorry" and see a plain-english definition magically appear in the docs. ;-)
Thanks and keep up the fabulous work !
Absolutely.
The term input domain
is related to the concepts of the "domain" and "range" of a function in algebra. Another term that's used in a similar context is "keyspace".
This will be explained in our next documentation update. ๐
https://ciphersweet.paragonie.com/php/blind-index-planning -- how does this look now?
https://ciphersweet.paragonie.com/php/blind-index-planning -- how does this look now?
A significant step in in the right direction. If I were being picky, I might question the following:
-
Whether the expression "existing index ("name_goes_here") has an output size of" perhaps needs to be tweaked ? Since in essence you're talking about the (average) length of the plaintext before it gets encrypted, right ?
-
The hot-off-the-press definition for
Output size
, you say "you want your blind index output to be". But surely it's not necessarily a case of what "I" want ? Since the purpose ofFieldIndexPlanner
is to give me the recommended range ? Taking your example code, going by your definition, I'm saying "I want the output to be 16" but then the output fromFieldIndexPlanner
is saying "No, between 4 and 11". (Maybe I'm overthinking this point though !)
Since in essence you're talking about the (average) length of the plaintext before it gets encrypted, right ?
No, the output sizes of other indexes built from the same input diminish the safe boundary of your new index on the same input.
Alright, let me have a another noob go at "getting" this whole output size
thing....
Are you saying output size
for FieldIndexPlanner
is like blake2b
and its "pick your own digest length" approach ?
I've updated the documentation once again: https://ciphersweet.paragonie.com/php/blind-index-planning
Are you saying
output size
forFieldIndexPlanner
is likeblake2b
and its "pick your own digest length" approach ?
Yes, your output size is something you get to choose. The planner tells you the minimum and maximum safe values (inclusive).
When you're adding an existing index, you have to provide the output size of each existing index. That will inform the planner of how much leakage is already present in the existing indexes, and therefore how much to limit the recommendations for an additional index on the same field.
I've updated the documentation once again: https://ciphersweet.paragonie.com/php/blind-index-planning
That's awesome ! Now it all clicks ! Turns out I was overthinking what needed too be done at the first stage, and also the whole thing about concatenations on the same data was sort of there in my mind but I couldn't see how the pieces of the indexing planner jigsaw fitted together to keep things safe, which I do now.
Thanks for your patience !
Happy to help! Thanks for your valuable feedback on improving our documentation. :)