permuteseq
Pseudo-randomly permute sequences with a format-preserving encryption on elements
permuteseq : Pseudo-randomly permute sequences with a format-preserving encryption on elements
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 4540 | permuteseq | permuteseq | 1.2.2 |
FUNC | PostgreSQL | C |
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-r | No | Yes | No | Yes | yes | no |
| Relationships | |
|---|---|
| See Also | sequential_uuids pg_uuidv7 snowflake pg_idkit pgx_ulid uuid-ossp pg_uuid_v8 typeid |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.2.2 |
18 17 16 15 14 | permuteseq |
- |
| RPM | PIGSTY | 1.2.2 |
18 17 16 15 14 | permuteseq_$v |
- |
| DEB | PIGSTY | 1.2.2 |
18 17 16 15 14 | postgresql-$v-permuteseq |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 |
| el8.aarch64 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 |
| el9.x86_64 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 |
| el9.aarch64 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 |
| el10.x86_64 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 |
| el10.aarch64 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 |
| d12.x86_64 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 |
| d12.aarch64 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 |
| d13.x86_64 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 |
| d13.aarch64 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 |
| u22.x86_64 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 |
| u22.aarch64 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 |
| u24.x86_64 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 |
| u24.aarch64 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 |
| u26.x86_64 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 |
| u26.aarch64 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 | PIGSTY 1.2.2 |
Source
github.com/dverite/permuteseq
permuteseq-1.2.2.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
Usage
permuteseq: scalable pseudo-random permutations of sequences
Generate unique, non-sequential, random-looking series of numbers without storing previous values. Uses a Feistel cipher with cycle-walking for format-preserving encryption.
Functions
| Function | Description |
|---|---|
permute_nextval(seq_oid, crypt_key bigint) |
Advance sequence and return encrypted value within sequence bounds |
reverse_permute(seq_oid, value bigint, crypt_key bigint) |
Compute original value from its permuted element |
range_encrypt_element(clear_val bigint, min_val bigint, max_val bigint, crypt_key bigint) |
Encrypt a bigint in a given range |
range_decrypt_element(crypt_val bigint, min_val bigint, max_val bigint, crypt_key bigint) |
Decrypt a previously encrypted value |