permuteseq
Pseudo-randomly permute sequences with a format-preserving encryption on elements
Repository
dverite/permuteseq
https://github.com/dverite/permuteseq
Source
permuteseq-1.2.2.tar.gz
permuteseq-1.2.2.tar.gz
Overview
| Package | Version | Category | License | Language |
|---|---|---|---|---|
permuteseq | 1.2.2 | FUNC | PostgreSQL | C |
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 4540 | permuteseq | No | Yes | No | Yes | No | Yes | - |
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.2.2 | 1817161514 | permuteseq | - |
| RPM | PIGSTY | 1.2.2 | 1817161514 | permuteseq_$v | - |
| DEB | PIGSTY | 1.2.2 | 1817161514 | postgresql-$v-permuteseq | - |
Build
You can build the RPM / DEB packages for permuteseq using pig build:
Install
You can install permuteseq directly. First, make sure the PGDG and PIGSTY repositories are added and enabled:
Install the extension using pig or apt/yum/dnf:
Install
pig
dnf
apt
Create Extension:
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 |
Examples
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)