Questions tagged [cryptography]
13 questions
17
votes
3 answers
Securely generate a UNIQUEIDENTIFIER in SQL Server
I intend to be using a UNIQUEIDENTIFIER as an access key that users can use to access certain data. The key will act as a password in that sense.
I need to generate multiple such identifiers as part of an INSERT...SELECT statement. For architectural…
usr
- 7,390
- 5
- 33
- 58
8
votes
3 answers
Adding unsigned 256 bit integers in PostgreSQL
I was wondering if there would be any way to do the following in PostgreSQL:
UPDATE cryptotable SET work = work + 'some big hexadecimal number'
where work is an unsigned 256 bit number. Right now my column is a character varying(64) column…
Olivier Lalonde
- 357
- 2
- 7
5
votes
1 answer
How is SQL Server host identity ensured?
When I connect to some e-commerce website with my browser I use HTTPS that uses a certificate that (more or less) guarantees that example.com is indeed example.com.
Now I connect to a SQL Server somewhere on the Internet - it might be SQL Azure for…
sharptooth
- 1,331
- 2
- 9
- 21
4
votes
1 answer
Encrypt data with DES_CBC_PKCS5 in DB2
I am using encryption algo DES/CBC/PKCS5Padding. How do I encrypt data using this in DB2?
In Pl/SQL I used DBMS_CRYPTO package with DES_CBC_PKCS5 from DBMS_CRYPTO Block Cipher Suites -…
Aniket Thakur
- 167
- 1
- 6
4
votes
3 answers
PGP for securing my database?
I have considered TDE and cell level encryption mechanism for securing my database, however these two cannot fully satisfy my requirements.
I've found that PGP may help me, but it is mainly used for mail services.
What is the technical feasibility…
sujith karivelil
- 567
- 1
- 6
- 14
3
votes
2 answers
Detect if `pg_crypto` in Postgres was built with strong random feature enabled
The source code for pg_crypto module mentions an option to build without cryptographically-strong random generation.
/*
Generate random bits. pg_backend_random() will do here, we don't promis
UUIDs to be cryptographically random, when built…
Basil Bourque
- 11,188
- 20
- 63
- 96
1
vote
1 answer
Download certificate from Key Vault w/ private key for use in SQL Server (TDE) via powershell
I need to download an x509 Certificate from Azure Key Vault and import it in SQL Server to use for TDE.
Note: I'm not referring to EKM providers/ASYMMETRIC KEYs, where SQL accesses key vault to pull the key when needed.
My use case is simple: grab a…
StrayCatDBA
- 2,173
- 16
- 23
1
vote
2 answers
Decrypt Symmetrically/Asymmetrically Encrypted Data in MS SQL (T-SQL) Server via Apex Crypto Class
Hope you're having a good day. This is in continuation to my previously posted question in Salesforce StackExchange. I was suggested to seek help at DBA SE in order to find a way to extract Symmetric key from MS SQL in order to use it for…
Assadullah Shaikh
- 11
- 2
1
vote
0 answers
Postgres: Encrypted User Function. Is it possible?
is it possible to create a function on PostgreSQL server, which routines can't be seen by any Postgres-user on the server?
The function gets some string as a parameter and outputs a boolean value. But nobody should know, how the calculation of the…
Alexander
- 11
- 1
1
vote
0 answers
Informatica MD5 function vs SQL Hashbytes MD5 function
I am hoping someone has some crossover experience here. I am attempting to utilize the Hashbytes function within SQL to match a value that is being generated utilizing the MD5 function from Informatica.
Has anyone ever been dove into this issue?…
TestMcTesterson
- 111
- 3
1
vote
0 answers
Encrypt through Java and Decrypt through SQL Server AES 256
Am trying to insert some value through JAVA Application with AES Algorithm and need to decrypt the data from the SQL Procedure and need to process a data.
Which is the best practice to do so?
Manu C Rajan
- 21
- 1
0
votes
1 answer
(PostgreSQL pgcrypto) How to generate blowfish hash without salt?
In PostgreSQL, using the pgcrypto module, I can generate a slow hash with blowfish (or any supported algorithm) like this:
crypt('SomeTextHere', gen_salt('bf'));
However, it auto-generates a salt (with gen_salt) and requires it. I don't want to use…
Starscream512
- 73
- 1
- 6
0
votes
0 answers
External verification of `SIGNBYCERT()` signatures from SQL Server 2016
I want to sign plaintext using a SQL Server certificate and then verify that signature using the certificate's public key on an external system. Here's what I've tried.
-- Create a self-signed certificate
CREATE CERTIFICATE MyCert WITH SUBJECT =…
NReilingh
- 785
- 2
- 9
- 27