Example to create bidx in another language (python)?
cj opened this issue · 3 comments
cj commented
Hi - is there an example of creating the bidx in python, like there is for lockbox? https://github.com/ankane/lockbox/blob/master/docs/Compatibility.md#python
ankane commented
Hi @cj, will add an example when I have a chance, but on a high level, you’ll want to get the index key and pass it to Argon2id with the same cost options. https://github.com/ankane/blind_index/blob/master/lib/blind_index.rb#L70
Edit: Be sure to use the KDF functionality (argon2id_hash_raw function in C), not password hashing
Edit 2: Try this https://pynacl.readthedocs.io/en/latest/api/pwhash/#module-nacl.pwhash.argon2id
ankane commented
Added an example in the commit above. Use BlindIndex.index_key
to get the key for a specific attribute.