# FeistelCipher, AshFeistelCipher - Encrypted integer IDs using Feistel cipher

**URL:** <https://forum.elixirforum.com/t/feistelcipher-ashfeistelcipher-encrypted-integer-ids-using-feistel-cipher/72880>\
**Category:** Announcing\
**Tags:** ecto, library, postgres, encryption, ash\
**Created:** [October 12, 2025, 1:39pm UTC](https://forum.elixirforum.com/t/feistelcipher-ashfeistelcipher-encrypted-integer-ids-using-feistel-cipher/72880 "2025-10-12T13:39:12Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![jechol](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/jechol/32/39260_2.png) [@jechol](https://forum.elixirforum.com/u/jechol)\
**Post date:** [October 14, 2025, 12:15am UTC](https://forum.elixirforum.com/t/feistelcipher-ashfeistelcipher-encrypted-integer-ids-using-feistel-cipher/72880/8 "2025-10-14T00:15:32Z")

</div>

@byu Yeah, disp\_id needs an index. I’ve updated the README just now.

Non-PK disp\_id can be annoying with tools like TablePlus though. If you have a user’s disp\_id from a URL and want to see their posts, you’d need to look up the user table first to get the real id. Using the encrypted id as PK (seq-\>id pattern) avoids this.

---

_[View the full topic](https://forum.elixirforum.com/t/feistelcipher-ashfeistelcipher-encrypted-integer-ids-using-feistel-cipher/72880)._
