All Projects → johto → pgspeck

johto / pgspeck

Licence: MIT license
Small block size Speck encryption in PostgreSQL

Programming Languages

c
50402 projects - #5 most used programming language
Makefile
30231 projects
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to pgspeck

Berserker
Obfuscate your Python scripts better, faster.
Stars: ✭ 81 (+406.25%)
Mutual labels:  obfuscate, encrypt
code-obfuscation
一款iOS代码混淆工具(A code obfuscation tool for iOS.)
Stars: ✭ 32 (+100%)
Mutual labels:  obfuscate
hisha
Postgres SQL Cross Platform Web-based Client
Stars: ✭ 23 (+43.75%)
Mutual labels:  pg
Javascript Obfuscator
A powerful obfuscator for JavaScript and Node.js
Stars: ✭ 8,204 (+51175%)
Mutual labels:  obfuscate
Blog
Everything about database,business.(Most for PostgreSQL).
Stars: ✭ 6,330 (+39462.5%)
Mutual labels:  pg
AutoIt-Obfuscator
AutoIt Obfuscator lets you protect AutoIt script source code against analysis, reverse engineering & decompilation using advanced obfuscation techniques and polymorphic encryption.
Stars: ✭ 31 (+93.75%)
Mutual labels:  obfuscate
pg-sql-helpers
A set helpers for writing dynamic SQL queries with `pg-sql` in Javascript.
Stars: ✭ 37 (+131.25%)
Mutual labels:  pg
sqle
SQLE is a SQL audit platform | SQLE 是一个支持多场景,原生支持 MySQL 审核且数据库类型可扩展的 SQL 审核工具
Stars: ✭ 731 (+4468.75%)
Mutual labels:  pg
django-mirage-field
Django model field encrypt/decrypt your data, keep secret in database.
Stars: ✭ 86 (+437.5%)
Mutual labels:  encrypt
node-bash-obfuscate
A Node.js CLI tool and library to heavily obfuscate bash scripts.
Stars: ✭ 79 (+393.75%)
Mutual labels:  obfuscate
obfuscator
Obfuscate PHP source files with basic XOR encryption in userland code at runtime.
Stars: ✭ 20 (+25%)
Mutual labels:  obfuscate
Postgraphile
GraphQL is a new way of communicating with your server. It eliminates the problems of over- and under-fetching, incorporates strong data types, has built-in introspection, documentation and deprecation capabilities, and is implemented in many programming languages. This all leads to gloriously low-latency user experiences, better developer experiences, and much increased productivity. Because of all this, GraphQL is typically used as a replacement for (or companion to) RESTful API services.
Stars: ✭ 10,967 (+68443.75%)
Mutual labels:  pg
Faz-SHC
Faz-SHC is a program that can be encrypted the text you give to a Shellcode. Simple and coded with Perl. Coded by M.Fazri Nizar.
Stars: ✭ 16 (+0%)
Mutual labels:  encrypt
Android-SDK-Payment
A Simple Library for handle ZarinPal Payment on Android
Stars: ✭ 19 (+18.75%)
Mutual labels:  pg
doctrine-extensions
Doctrine2 behavioral extension Transformable
Stars: ✭ 14 (-12.5%)
Mutual labels:  encrypt
casbin-pg-adapter
A go-pg adapter for casbin
Stars: ✭ 23 (+43.75%)
Mutual labels:  pg
nestjs-api-mongoose
Collection example apps with NestJS and Typeorm, Sequelize, Mongodb, PostgreSQL, MySQL, GraphQL, Mercurius, etc. for the NestJS community 😻
Stars: ✭ 153 (+856.25%)
Mutual labels:  pg
mos-tls-tunnel
Archived. Check this out https://github.com/IrineSistiana/simple-tls
Stars: ✭ 21 (+31.25%)
Mutual labels:  obfuscate
URL-obfuscator
Python Program to obfuscate URLs to make Phishing attacks more difficult to detect. Uses Active open redirect list and other URL obfuscation techniques.
Stars: ✭ 101 (+531.25%)
Mutual labels:  obfuscate
Forsaken
One of the best Python3.9 obfuscators.
Stars: ✭ 94 (+487.5%)
Mutual labels:  obfuscate

pgspeck

pgspeck is a PostgreSQL extension for symmetrical encryption using the Speck encryption algorithm. Only 32-bit and 48-bit block sizes, and 64-bit and 96-bit keys (respectively) are supported. The primary use case is generating a random-looking sequence from an increasing sequence. Requires PostgreSQL version 9.1 or later.

Example usage:

CREATE FUNCTION my_secret_key()
RETURNS int8 IMMUTABLE
AS $$
    SELECT 1234567890987654321
$$ LANGUAGE sql;

CREATE SEQUENCE userid_plaintext_seq;

CREATE TABLE users (
    userid bigint NOT NULL
        DEFAULT pgspeck_encrypt32(nextval('userid_plaintext_seq'), my_secret_key()),
    PRIMARY KEY (userid)
);

=# INSERT INTO users DEFAULT VALUES RETURNING *;
   userid
------------
 3497276207
(1 row)

INSERT 0 1
=# INSERT INTO users DEFAULT VALUES RETURNING *;
   userid
------------
 1514490635
(1 row)

INSERT 0 1

The extension adds four functions:

-- Encrypts a 32-bit plaintext using a 64-bit key.  Only the lowermost 32 bits
-- of the plaintext are used.  For the key, the full 64-bit range is effective.
CREATE FUNCTION pgspeck_encrypt32(plaintext int8, key int8)
	RETURNS int8
	AS 'pgspeck', 'pgspeck_encrypt32' LANGUAGE c STRICT;

-- Decrypts a value encrypted with pgspeck_encrypt32.
CREATE FUNCTION pgspeck_decrypt32(ciphertext int8, key int8)
	RETURNS int8
	AS 'pgspeck', 'pgspeck_decrypt32' LANGUAGE c STRICT;

-- Encrypts a 48-bit plaintext using a 96-bit key.  Only the lowermost 48 bits
-- of each key component can be non-zero.
CREATE FUNCTION pgspeck_encrypt48(plaintext int8, key1 int8, key2 int8)
	RETURNS int8
	AS 'pgspeck', 'pgspeck_encrypt48' LANGUAGE c STRICT;

-- Decrypts a value encrypted with pgspeck_encrypt48.
CREATE FUNCTION pgspeck_decrypt48(ciphertext int8, key1 int8, key2 int8)
	RETURNS int8
	AS 'pgspeck', 'pgspeck_decrypt48' LANGUAGE c STRICT;

This software is released under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].