fishcake on Nostr: Argon2 is hard to generate with the modern hardware and CPU. What you could do is, to ...
Argon2 is hard to generate with the modern hardware and CPU. What you could do is, to make it even harder, is generate each phone number hash with deterministic hash (0-16 prepended) and when looking up, generate all 16 hashes and then match against stored hashes. Not fool proof approach, since you literally need a rainbow table, but would take years for anyone determined to bruit force it. And storing such table would take a few TB of storage (not much but). One more way, that will make lookup a pain, is to salt it and then compute for each comparison, but then it will take ages in normal use.
Short of finding a compromise (spend 10 seconds to compute n hashes that will be used for lookup), I see no other way. 🐶🐾🤔
Published at
2024-03-27 11:21:50Event JSON
{
"id": "a0924893830da74bcdfe08c9ef34265f81f4efa0f0003fc9b070d23f0631c890",
"pubkey": "8fb140b4e8ddef97ce4b821d247278a1a4353362623f64021484b372f948000c",
"created_at": 1711538510,
"kind": 1,
"tags": [
[
"e",
"4944aecf5eb1be3895c0c3c26424e51b9463623ec803942b9169def14882614c"
],
[
"p",
"32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"
]
],
"content": "Argon2 is hard to generate with the modern hardware and CPU. What you could do is, to make it even harder, is generate each phone number hash with deterministic hash (0-16 prepended) and when looking up, generate all 16 hashes and then match against stored hashes. Not fool proof approach, since you literally need a rainbow table, but would take years for anyone determined to bruit force it. And storing such table would take a few TB of storage (not much but). One more way, that will make lookup a pain, is to salt it and then compute for each comparison, but then it will take ages in normal use. \n\nShort of finding a compromise (spend 10 seconds to compute n hashes that will be used for lookup), I see no other way. 🐶🐾🤔",
"sig": "2e568ed046a5426657718d3fca5ab15080a23f601a3ece8c75999fd45dd083885e17958d6fc1eaa4d202ab4fe57798bf1e2c410d1d2dffc4d2a065a1d3af55e6"
}