Posts

Showing posts with the label encryption

How encrypted AWS PostgreSQL RDS works under the hood?

How encrypted AWS PostgreSQL RDS works under the hood? I read that when creating an encrypted AWS Postgres RDS, it encrypts the underlying EBS volume created for it, all read replicas, backups, and snapshots as well. Also when I queried and inserted the data into DB, it worked same as unencrypted DB would and gave results in plain text. I have some questions regarding how exactly it is working under the hood. Here they are: A simple value-based search can be performed by encrypting what to search and then search it on the encrypted RDS. But my search in PostgreSQL was also working on JSONB nested objects. How is that achieved? I was able to do a partial search( like query) on a name and address inside a JSONB object. How can a partial search be done on encrypted DB? like I have some JSONB columns in my PostgreSQL and I was able to partial insert on my JSONB objects. Its a cool feature of PostgreSQL but how was it achieved when the whole JSONB was encrypted? PS: I have some knowledge o...

Add password to openssl .pem file from -password

Add password to openssl .pem file from -password I am generating a .pem file using openssl using the command: .pem openssl genrsa -aes256 -out ca.key.pem 4096 It is working great but when I do this: openssl genrsa -aes256 -out ca.key.pem 4096 -password pass:abcd It is still asking me for a password in the terminal and not automatically taking the supplied password. I've tried generating certificates before and it works for them eg. openssl pkcs12 -name username -inkey cert/key.key -in abc.pem -export -out cert.p12 -password pass:abcd 1 Answer 1 Your very close to the goal ! Key size must be the last parameter and -password replace with -passout -password -passout openssl genrsa -aes256 -out ca.key.pem -passout pass:abcd 4096 That worked, Thanks :) – Rishabh Chaudhary 1 hour ago ...

Convert ComputeHash using SHA1 algorithm in C# to Java

Convert ComputeHash using SHA1 algorithm in C# to Java I have a function to encrypt a string with the SHA1 algorithm in C#. And now I would like to convert exactly it to Java language. I have tried, but I don't get the same output for C# and Java. Someone kindly please help me convert it. I'm really grateful for this. Thanks. Here is C# code : public static string ComputeHash(string inString) { SHA1 sh = SHA1.Create(); byte data = UTF8Encoding.UTF8.GetBytes(inString); byte result = sh.ComputeHash(data); return ToHexString(result); } public static string ToHexString(byte data) { string s = ""; for (int i = 0, n = data.Length; i < n; i++) { s += String.Format("{0:X2}", data[i]); } return s; } just as side-note: SHA1 is no longer secure computerworld.com/article/3173616/security/… – M. Schena Jun 29 at 9:43 ...