3 ms·
It's reversible. That's the whole point. You don't need to keep a separate table or column for the hashed id.
by jemfinch 7y ago
It's reversible. That's the whole point. You don't need to keep a separate table or column for the hashed id.
- tptacek 7y agoThat by itself is an old problem; see for instance Black and Rogaway's paper on restricted domain ciphers: https://web.cs.ucdavis.edu/~rogaway/papers/subset.pdf https://web.cs.ucdavis.edu/~rogaway/papers/subset.pdf
- rainsford 7y agoIsn't AES encryption also reversible? The use-case for AES-SID appears to be mapping 64-bit ID values to 128-bit ciphertexts and reversibly producing an authenticated 64-bit ID value from the 128-bit ciphertext. Zero padded AES does both of these things as far as I can tell.
- dchest 7y agoIt's also reversible: newid = AES-EncryptBlock(0||id) 0||id = AES-DecryptBlock(newid) Check for 8 zero bytes for authentication. Bonus: can use a constant instead of zeros for domain separation (eg different DB columns or tables).