aboutsummaryrefslogtreecommitdiff
path: root/src/include/common/cipher.h
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2020-12-27 21:37:42 -0500
committerBruce Momjian <bruce@momjian.us>2020-12-27 21:37:42 -0500
commit3187ef7c46c5b884267a88f2d6119c9a05f1bbba (patch)
tree6ff5e31d8ffaaf806ee908fe2ef8733c7ba348ef /src/include/common/cipher.h
parentfacad31474ac6dace3894ebc7c45dc3cc829422e (diff)
downloadpostgresql-3187ef7c46c5b884267a88f2d6119c9a05f1bbba.tar.gz
postgresql-3187ef7c46c5b884267a88f2d6119c9a05f1bbba.zip
Revert "Add key management system" (978f869b99) & later commits
The patch needs test cases, reorganization, and cfbot testing. Technically reverts commits 5c31afc49d..e35b2bad1a (exclusive/inclusive) and 08db7c63f3..ccbe34139b. Reported-by: Tom Lane, Michael Paquier Discussion: https://postgr.es/m/E1ktAAG-0002V2-VB@gemulon.postgresql.org
Diffstat (limited to 'src/include/common/cipher.h')
-rw-r--r--src/include/common/cipher.h62
1 files changed, 0 insertions, 62 deletions
diff --git a/src/include/common/cipher.h b/src/include/common/cipher.h
deleted file mode 100644
index 598ef11289f..00000000000
--- a/src/include/common/cipher.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * cipher.h
- * Declarations for cryptographic functions
- *
- * Portions Copyright (c) 2020, PostgreSQL Global Development Group
- *
- * src/include/common/cipher.h
- *
- *-------------------------------------------------------------------------
- */
-#ifndef PG_CIPHER_H
-#define PG_CIPHER_H
-
-#ifdef USE_OPENSSL
-#include <openssl/evp.h>
-#include <openssl/conf.h>
-#include <openssl/err.h>
-#endif
-
-/*
- * Supported symmetric encryption algorithm. These identifiers are passed
- * to pg_cipher_ctx_create() function, and then actual encryption
- * implementations need to initialize their context of the given encryption
- * algorithm.
- */
-#define PG_CIPHER_AES_GCM 0
-#define PG_MAX_CIPHER_ID 1
-
-/* AES128/192/256 various length definitions */
-#define PG_AES128_KEY_LEN (128 / 8)
-#define PG_AES192_KEY_LEN (192 / 8)
-#define PG_AES256_KEY_LEN (256 / 8)
-
-/*
- * The encrypted data is a series of blocks of size. Initialization
- * vector(IV) is the same size of cipher block.
- */
-#define PG_AES_BLOCK_SIZE 16
-#define PG_AES_IV_SIZE (PG_AES_BLOCK_SIZE)
-
-#ifdef USE_OPENSSL
-typedef EVP_CIPHER_CTX PgCipherCtx;
-#else
-typedef void PgCipherCtx;
-#endif
-
-extern PgCipherCtx *pg_cipher_ctx_create(int cipher, uint8 *key, int klen,
- bool enc);
-extern void pg_cipher_ctx_free(PgCipherCtx *ctx);
-extern bool pg_cipher_encrypt(PgCipherCtx *ctx,
- const unsigned char *plaintext, const int inlen,
- unsigned char *ciphertext, int *outlen,
- const unsigned char *iv, const int ivlen,
- unsigned char *tag, const int taglen);
-extern bool pg_cipher_decrypt(PgCipherCtx *ctx,
- const unsigned char *ciphertext, const int inlen,
- unsigned char *plaintext, int *outlen,
- const unsigned char *iv, const int ivlen,
- unsigned char *intag, const int taglen);
-
-#endif /* PG_CIPHER_H */